Merge remote-tracking branch 'origin/tizen' into devel/new_mesh 83/38783/1
authorFrancisco Santos <f1.santos@samsung.com>
Mon, 27 Apr 2015 16:11:28 +0000 (17:11 +0100)
committerFrancisco Santos <f1.santos@samsung.com>
Mon, 27 Apr 2015 16:11:28 +0000 (17:11 +0100)
Conflicts:
automated-tests/src/dali-toolkit/utc-Dali-Cluster.cpp
automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp
automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp
automated-tests/src/dali-toolkit/utc-Dali-TableView.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp
automated-tests/src/dali-toolkit/utc-Dali-View.cpp
dali-toolkit/internal/controls/buttons/button-impl.cpp
dali-toolkit/internal/controls/buttons/push-button-impl.cpp
dali-toolkit/internal/controls/buttons/push-button-impl.h
dali-toolkit/internal/controls/cluster/cluster-impl.cpp
dali-toolkit/internal/controls/cluster/cluster-style-impl.cpp
dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp
dali-toolkit/internal/controls/popup/popup-impl.cpp
dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp
dali-toolkit/internal/controls/scroll-component/scroll-bar-internal-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-base-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-base-impl.h
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp
dali-toolkit/internal/controls/scrollable/scrollable-impl.cpp
dali-toolkit/internal/controls/scrollable/scrollable-impl.h
dali-toolkit/internal/controls/shadow-view/shadow-view-impl.cpp
dali-toolkit/internal/controls/slider/slider-impl.cpp
dali-toolkit/internal/controls/text-controls/text-field-impl.cpp
dali-toolkit/internal/controls/text-controls/text-field-impl.h
dali-toolkit/internal/controls/text-controls/text-label-impl.cpp
dali-toolkit/internal/controls/text-controls/text-label-impl.h
dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp
dali-toolkit/internal/controls/view/view-impl.cpp
dali-toolkit/internal/controls/view/view-impl.h
dali-toolkit/internal/file.list
dali-toolkit/internal/text/clipping/text-clipper.cpp
dali-toolkit/internal/text/decorator/text-decorator.cpp
dali-toolkit/internal/text/decorator/text-decorator.h
dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp
dali-toolkit/internal/text/text-control-interface.h
dali-toolkit/internal/text/text-controller.cpp
dali-toolkit/internal/text/text-controller.h
dali-toolkit/internal/transition-effects/cube-transition-cross-effect-impl.cpp
dali-toolkit/internal/transition-effects/cube-transition-effect-impl.cpp
dali-toolkit/internal/transition-effects/cube-transition-fold-effect-impl.cpp
dali-toolkit/internal/transition-effects/cube-transition-wave-effect-impl.cpp
dali-toolkit/public-api/controls/buttons/push-button.cpp
dali-toolkit/public-api/controls/cluster/cluster-style.cpp
dali-toolkit/public-api/controls/control-impl.cpp
dali-toolkit/public-api/controls/scrollable/item-view/grid-layout.cpp
dali-toolkit/public-api/controls/scrollable/item-view/item-layout.cpp
dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h
dali-toolkit/public-api/controls/text-controls/text-field.cpp
dali-toolkit/public-api/controls/text-controls/text-field.h
dali-toolkit/public-api/controls/view/view.h
dali-toolkit/public-api/dali-toolkit-version.cpp
docs/content/programming-guide/animation-example.h
docs/content/programming-guide/animation-rotation.h
docs/content/programming-guide/dynamics-bodies.h
docs/content/programming-guide/size-negotiation.h
packaging/dali-toolkit.spec
plugins/dali-script-v8/src/object/property-value-wrapper.cpp

Change-Id: I5a0a9bc20a55ebcc9605c24d9ce1e688f0e6b9cc

302 files changed:
automated-tests/src/dali-toolkit/CMakeLists.txt
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-platform-abstraction.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-platform-abstraction.h
automated-tests/src/dali-toolkit/utc-Dali-Cluster.cpp [deleted file]
automated-tests/src/dali-toolkit/utc-Dali-Control.cpp
automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp
automated-tests/src/dali-toolkit/utc-Dali-PushButton.cpp
automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp
automated-tests/src/dali-toolkit/utc-Dali-TableView.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextField.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp
automated-tests/src/dali-toolkit/utc-Dali-View.cpp [deleted file]
dali-toolkit/dali-toolkit.h
dali-toolkit/images/insertpoint-icon-pressed.png [new file with mode: 0644]
dali-toolkit/internal/builder/builder-animations.cpp
dali-toolkit/internal/controls/alignment/alignment-impl.cpp
dali-toolkit/internal/controls/bloom-view/bloom-view-impl.cpp
dali-toolkit/internal/controls/bubble-effect/bubble-emitter-impl.cpp
dali-toolkit/internal/controls/buttons/button-impl.cpp
dali-toolkit/internal/controls/buttons/push-button-impl.cpp
dali-toolkit/internal/controls/buttons/push-button-impl.h
dali-toolkit/internal/controls/cluster/cluster-impl.cpp [deleted file]
dali-toolkit/internal/controls/cluster/cluster-impl.h [deleted file]
dali-toolkit/internal/controls/cluster/cluster-style-impl.cpp [deleted file]
dali-toolkit/internal/controls/cluster/cluster-style-impl.h [deleted file]
dali-toolkit/internal/controls/effects-view/effects-view-impl.cpp
dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp
dali-toolkit/internal/controls/magnifier/magnifier-impl.cpp
dali-toolkit/internal/controls/navigation-frame/navigation-bar.h
dali-toolkit/internal/controls/navigation-frame/navigation-control-impl.cpp
dali-toolkit/internal/controls/navigation-frame/page-impl.cpp
dali-toolkit/internal/controls/navigation-frame/page-impl.h
dali-toolkit/internal/controls/page-turn-view/page-turn-portrait-view-impl.cpp
dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.cpp
dali-toolkit/internal/controls/popup/popup-impl.cpp
dali-toolkit/internal/controls/popup/popup-impl.h
dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp
dali-toolkit/internal/controls/scroll-component/scroll-bar-internal-impl.cpp
dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.h
dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-connector-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-base-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-base-impl.h
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-carousel-effect-impl.h
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-cube-effect-impl.h
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-depth-effect-impl.h
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-page-carousel-effect-impl.h
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-page-cube-effect-impl.h
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-page-spiral-effect-impl.h
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-wobble-effect-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-wobble-effect-impl.h
dali-toolkit/internal/controls/scrollable/scrollable-impl.cpp
dali-toolkit/internal/controls/scrollable/scrollable-impl.h
dali-toolkit/internal/controls/shadow-view/shadow-view-impl.cpp
dali-toolkit/internal/controls/slider/slider-impl.cpp
dali-toolkit/internal/controls/super-blur-view/super-blur-view-impl.cpp
dali-toolkit/internal/controls/table-view/table-view-impl.cpp
dali-toolkit/internal/controls/text-controls/text-field-impl.cpp
dali-toolkit/internal/controls/text-controls/text-field-impl.h
dali-toolkit/internal/controls/text-controls/text-label-impl.cpp
dali-toolkit/internal/controls/text-controls/text-label-impl.h
dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.cpp
dali-toolkit/internal/controls/tool-bar/tool-bar-impl.cpp
dali-toolkit/internal/controls/tool-bar/tool-bar-impl.h
dali-toolkit/internal/controls/view/view-impl.cpp [deleted file]
dali-toolkit/internal/controls/view/view-impl.h [deleted file]
dali-toolkit/internal/file.list
dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp
dali-toolkit/internal/text/clipping/text-clipper.cpp
dali-toolkit/internal/text/decorator/text-decorator.cpp
dali-toolkit/internal/text/decorator/text-decorator.h
dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp
dali-toolkit/internal/text/text-control-interface.h
dali-toolkit/internal/text/text-controller-impl.cpp [new file with mode: 0644]
dali-toolkit/internal/text/text-controller-impl.h [new file with mode: 0644]
dali-toolkit/internal/text/text-controller.cpp
dali-toolkit/internal/text/text-controller.h
dali-toolkit/internal/transition-effects/cube-transition-cross-effect-impl.cpp
dali-toolkit/internal/transition-effects/cube-transition-effect-impl.cpp
dali-toolkit/internal/transition-effects/cube-transition-fold-effect-impl.cpp
dali-toolkit/internal/transition-effects/cube-transition-wave-effect-impl.cpp
dali-toolkit/public-api/builder/builder.cpp
dali-toolkit/public-api/builder/builder.h
dali-toolkit/public-api/builder/json-parser.cpp
dali-toolkit/public-api/builder/json-parser.h
dali-toolkit/public-api/builder/tree-node.cpp
dali-toolkit/public-api/builder/tree-node.h
dali-toolkit/public-api/controls/alignment/alignment.cpp
dali-toolkit/public-api/controls/alignment/alignment.h
dali-toolkit/public-api/controls/bloom-view/bloom-view.cpp
dali-toolkit/public-api/controls/bloom-view/bloom-view.h
dali-toolkit/public-api/controls/bubble-effect/bubble-emitter.cpp
dali-toolkit/public-api/controls/bubble-effect/bubble-emitter.h
dali-toolkit/public-api/controls/buttons/button.cpp
dali-toolkit/public-api/controls/buttons/button.h
dali-toolkit/public-api/controls/buttons/check-box-button.cpp
dali-toolkit/public-api/controls/buttons/check-box-button.h
dali-toolkit/public-api/controls/buttons/push-button.cpp
dali-toolkit/public-api/controls/buttons/push-button.h
dali-toolkit/public-api/controls/buttons/radio-button.cpp
dali-toolkit/public-api/controls/buttons/radio-button.h
dali-toolkit/public-api/controls/cluster/cluster-style.cpp [deleted file]
dali-toolkit/public-api/controls/cluster/cluster-style.h [deleted file]
dali-toolkit/public-api/controls/cluster/cluster.cpp [deleted file]
dali-toolkit/public-api/controls/cluster/cluster.h [deleted file]
dali-toolkit/public-api/controls/control-impl.cpp
dali-toolkit/public-api/controls/control-impl.h
dali-toolkit/public-api/controls/control.cpp
dali-toolkit/public-api/controls/control.h
dali-toolkit/public-api/controls/default-controls/check-button-factory.cpp
dali-toolkit/public-api/controls/default-controls/check-button-factory.h
dali-toolkit/public-api/controls/default-controls/push-button-factory.cpp
dali-toolkit/public-api/controls/default-controls/push-button-factory.h
dali-toolkit/public-api/controls/default-controls/solid-color-actor.cpp
dali-toolkit/public-api/controls/default-controls/solid-color-actor.h
dali-toolkit/public-api/controls/effects-view/effects-view.cpp
dali-toolkit/public-api/controls/effects-view/effects-view.h
dali-toolkit/public-api/controls/gaussian-blur-view/gaussian-blur-view.cpp
dali-toolkit/public-api/controls/gaussian-blur-view/gaussian-blur-view.h
dali-toolkit/public-api/controls/image-view/masked-image-view.cpp
dali-toolkit/public-api/controls/image-view/masked-image-view.h
dali-toolkit/public-api/controls/magnifier/magnifier.cpp
dali-toolkit/public-api/controls/magnifier/magnifier.h
dali-toolkit/public-api/controls/navigation-frame/navigation-bar-style.h
dali-toolkit/public-api/controls/navigation-frame/navigation-control.cpp
dali-toolkit/public-api/controls/navigation-frame/navigation-control.h
dali-toolkit/public-api/controls/navigation-frame/page.cpp
dali-toolkit/public-api/controls/navigation-frame/page.h
dali-toolkit/public-api/controls/page-turn-view/page-factory.cpp
dali-toolkit/public-api/controls/page-turn-view/page-factory.h
dali-toolkit/public-api/controls/page-turn-view/page-turn-landscape-view.cpp
dali-toolkit/public-api/controls/page-turn-view/page-turn-landscape-view.h
dali-toolkit/public-api/controls/page-turn-view/page-turn-portrait-view.cpp
dali-toolkit/public-api/controls/page-turn-view/page-turn-portrait-view.h
dali-toolkit/public-api/controls/page-turn-view/page-turn-view.cpp
dali-toolkit/public-api/controls/page-turn-view/page-turn-view.h
dali-toolkit/public-api/controls/popup/popup.cpp
dali-toolkit/public-api/controls/popup/popup.h
dali-toolkit/public-api/controls/scroll-bar/scroll-bar.cpp
dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h
dali-toolkit/public-api/controls/scrollable/item-view/depth-layout.cpp
dali-toolkit/public-api/controls/scrollable/item-view/depth-layout.h
dali-toolkit/public-api/controls/scrollable/item-view/grid-layout.cpp
dali-toolkit/public-api/controls/scrollable/item-view/grid-layout.h
dali-toolkit/public-api/controls/scrollable/item-view/item-factory.cpp
dali-toolkit/public-api/controls/scrollable/item-view/item-factory.h
dali-toolkit/public-api/controls/scrollable/item-view/item-layout.cpp
dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h
dali-toolkit/public-api/controls/scrollable/item-view/item-view-declarations.h
dali-toolkit/public-api/controls/scrollable/item-view/item-view.cpp
dali-toolkit/public-api/controls/scrollable/item-view/item-view.h
dali-toolkit/public-api/controls/scrollable/item-view/spiral-layout.cpp
dali-toolkit/public-api/controls/scrollable/item-view/spiral-layout.h
dali-toolkit/public-api/controls/scrollable/scroll-component-impl.cpp
dali-toolkit/public-api/controls/scrollable/scroll-component-impl.h
dali-toolkit/public-api/controls/scrollable/scroll-component.cpp
dali-toolkit/public-api/controls/scrollable/scroll-component.h
dali-toolkit/public-api/controls/scrollable/scroll-connector.cpp
dali-toolkit/public-api/controls/scrollable/scroll-connector.h
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-carousel-effect.cpp
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-carousel-effect.h
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-constraints.cpp
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-constraints.h
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-cube-effect.cpp
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-cube-effect.h
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-depth-effect.cpp
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-depth-effect.h
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.cpp
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-page-carousel-effect.cpp
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-page-carousel-effect.h
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-page-cube-effect.cpp
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-page-cube-effect.h
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-page-spiral-effect.cpp
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-page-spiral-effect.h
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-wobble-effect.cpp
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-wobble-effect.h
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.cpp
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h
dali-toolkit/public-api/controls/scrollable/scrollable.cpp
dali-toolkit/public-api/controls/scrollable/scrollable.h
dali-toolkit/public-api/controls/shadow-view/shadow-view.cpp
dali-toolkit/public-api/controls/shadow-view/shadow-view.h
dali-toolkit/public-api/controls/slider/slider.cpp
dali-toolkit/public-api/controls/slider/slider.h
dali-toolkit/public-api/controls/super-blur-view/super-blur-view.cpp
dali-toolkit/public-api/controls/super-blur-view/super-blur-view.h
dali-toolkit/public-api/controls/table-view/table-view.cpp
dali-toolkit/public-api/controls/table-view/table-view.h
dali-toolkit/public-api/controls/text-controls/text-field.cpp
dali-toolkit/public-api/controls/text-controls/text-field.h
dali-toolkit/public-api/controls/tool-bar/tool-bar.cpp
dali-toolkit/public-api/controls/tool-bar/tool-bar.h
dali-toolkit/public-api/controls/view/view.cpp [deleted file]
dali-toolkit/public-api/controls/view/view.h [deleted file]
dali-toolkit/public-api/dali-toolkit-version.cpp
dali-toolkit/public-api/dali-toolkit-version.h
dali-toolkit/public-api/enums.cpp
dali-toolkit/public-api/enums.h
dali-toolkit/public-api/file.list
dali-toolkit/public-api/focus-manager/focus-manager.cpp
dali-toolkit/public-api/focus-manager/focus-manager.h
dali-toolkit/public-api/focus-manager/keyboard-focus-manager.cpp
dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h
dali-toolkit/public-api/focus-manager/keyinput-focus-manager.cpp
dali-toolkit/public-api/focus-manager/keyinput-focus-manager.h
dali-toolkit/public-api/scripting/script-plugin.h
dali-toolkit/public-api/scripting/script.cpp
dali-toolkit/public-api/scripting/script.h
dali-toolkit/public-api/shader-effects/alpha-discard-effect.cpp
dali-toolkit/public-api/shader-effects/alpha-discard-effect.h
dali-toolkit/public-api/shader-effects/bendy-effect.cpp
dali-toolkit/public-api/shader-effects/bendy-effect.h
dali-toolkit/public-api/shader-effects/blind-effect.cpp
dali-toolkit/public-api/shader-effects/blind-effect.h
dali-toolkit/public-api/shader-effects/bouncing-effect.cpp
dali-toolkit/public-api/shader-effects/bouncing-effect.h
dali-toolkit/public-api/shader-effects/bubble-effect/bubble-effect.cpp
dali-toolkit/public-api/shader-effects/bubble-effect/bubble-effect.h
dali-toolkit/public-api/shader-effects/bubble-effect/color-adjuster.cpp
dali-toolkit/public-api/shader-effects/bubble-effect/color-adjuster.h
dali-toolkit/public-api/shader-effects/carousel-effect.cpp
dali-toolkit/public-api/shader-effects/carousel-effect.h
dali-toolkit/public-api/shader-effects/displacement-effect.cpp
dali-toolkit/public-api/shader-effects/displacement-effect.h
dali-toolkit/public-api/shader-effects/dissolve-effect.cpp
dali-toolkit/public-api/shader-effects/dissolve-effect.h
dali-toolkit/public-api/shader-effects/dissolve-local-effect.cpp
dali-toolkit/public-api/shader-effects/dissolve-local-effect.h
dali-toolkit/public-api/shader-effects/distance-field-effect.cpp
dali-toolkit/public-api/shader-effects/distance-field-effect.h
dali-toolkit/public-api/shader-effects/image-region-effect.cpp
dali-toolkit/public-api/shader-effects/image-region-effect.h
dali-toolkit/public-api/shader-effects/iris-effect.cpp
dali-toolkit/public-api/shader-effects/iris-effect.h
dali-toolkit/public-api/shader-effects/mask-effect.cpp
dali-toolkit/public-api/shader-effects/mask-effect.h
dali-toolkit/public-api/shader-effects/mirror-effect.cpp
dali-toolkit/public-api/shader-effects/mirror-effect.h
dali-toolkit/public-api/shader-effects/motion-blur-effect.cpp
dali-toolkit/public-api/shader-effects/motion-blur-effect.h
dali-toolkit/public-api/shader-effects/motion-stretch-effect.cpp
dali-toolkit/public-api/shader-effects/motion-stretch-effect.h
dali-toolkit/public-api/shader-effects/nine-patch-mask-effect.cpp
dali-toolkit/public-api/shader-effects/nine-patch-mask-effect.h
dali-toolkit/public-api/shader-effects/overlay-effect.cpp
dali-toolkit/public-api/shader-effects/overlay-effect.h
dali-toolkit/public-api/shader-effects/page-turn-book-spine-effect.cpp
dali-toolkit/public-api/shader-effects/page-turn-book-spine-effect.h
dali-toolkit/public-api/shader-effects/page-turn-effect.cpp
dali-toolkit/public-api/shader-effects/page-turn-effect.h
dali-toolkit/public-api/shader-effects/quadratic-bezier.cpp
dali-toolkit/public-api/shader-effects/quadratic-bezier.h
dali-toolkit/public-api/shader-effects/ripple-effect.cpp
dali-toolkit/public-api/shader-effects/ripple-effect.h
dali-toolkit/public-api/shader-effects/ripple2d-effect.cpp
dali-toolkit/public-api/shader-effects/ripple2d-effect.h
dali-toolkit/public-api/shader-effects/shear-effect.cpp
dali-toolkit/public-api/shader-effects/shear-effect.h
dali-toolkit/public-api/shader-effects/soft-button-effect.cpp
dali-toolkit/public-api/shader-effects/soft-button-effect.h
dali-toolkit/public-api/shader-effects/spot-effect.cpp
dali-toolkit/public-api/shader-effects/spot-effect.h
dali-toolkit/public-api/shader-effects/square-dissolve-effect.cpp
dali-toolkit/public-api/shader-effects/square-dissolve-effect.h
dali-toolkit/public-api/shader-effects/swirl-effect.cpp
dali-toolkit/public-api/shader-effects/swirl-effect.h
dali-toolkit/public-api/shader-effects/water-effect.cpp
dali-toolkit/public-api/shader-effects/water-effect.h
dali-toolkit/public-api/styling/style-manager.cpp
dali-toolkit/public-api/styling/style-manager.h
dali-toolkit/public-api/transition-effects/cube-transition-cross-effect.cpp
dali-toolkit/public-api/transition-effects/cube-transition-cross-effect.h
dali-toolkit/public-api/transition-effects/cube-transition-effect.cpp
dali-toolkit/public-api/transition-effects/cube-transition-effect.h
dali-toolkit/public-api/transition-effects/cube-transition-fold-effect.cpp
dali-toolkit/public-api/transition-effects/cube-transition-fold-effect.h
dali-toolkit/public-api/transition-effects/cube-transition-wave-effect.cpp
dali-toolkit/public-api/transition-effects/cube-transition-wave-effect.h
docs/content/programming-guide/animation-example.h
docs/content/programming-guide/animation-rotation.h
docs/content/programming-guide/dynamics-bodies.h
docs/content/programming-guide/size-negotiation-controls.h
docs/content/programming-guide/size-negotiation.h
packaging/dali-toolkit.spec
plugins/dali-script-v8/file.list
plugins/dali-script-v8/src/actors/actor-wrapper.cpp
plugins/dali-script-v8/src/actors/image-actor-api.cpp
plugins/dali-script-v8/src/actors/image-actor-api.h
plugins/dali-script-v8/src/animation/animation-api.cpp
plugins/dali-script-v8/src/constants/constants-wrapper.cpp
plugins/dali-script-v8/src/dali-wrapper.cpp
plugins/dali-script-v8/src/image/image-attributes-api.cpp [deleted file]
plugins/dali-script-v8/src/image/image-attributes-api.h [deleted file]
plugins/dali-script-v8/src/image/image-attributes-wrapper.cpp [deleted file]
plugins/dali-script-v8/src/image/image-attributes-wrapper.h [deleted file]
plugins/dali-script-v8/src/image/resource-image-api.cpp
plugins/dali-script-v8/src/image/resource-image-api.h
plugins/dali-script-v8/src/object/property-value-wrapper.cpp

index 62d0174..e522f31 100644 (file)
@@ -15,7 +15,6 @@ SET(TC_SOURCES
    utc-Dali-Builder.cpp
    utc-Dali-CarouselEffect.cpp
    utc-Dali-CheckBoxButton.cpp
-   utc-Dali-Cluster.cpp
    utc-Dali-CubeTransitionEffect.cpp
    utc-Dali-DepthLayout.cpp
    utc-Dali-DisplacementEffect.cpp
@@ -40,7 +39,6 @@ SET(TC_SOURCES
    utc-Dali-TextField.cpp
    utc-Dali-TextLabel.cpp
    utc-Dali-ToolBar.cpp
-   utc-Dali-View.cpp
    utc-Dali-WaterEffect.cpp
    utc-Dali-Button.cpp
    utc-Dali-Control.cpp
index 92d1390..9441e0a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  *
  */
+// CLASS HEADER
+#include "dali-test-suite-utils.h"
+
+// EXTERNAL INCLUDES
+#include <ostream>
 
 // INTERNAL INCLUDES
 #include <dali/public-api/dali-core.h>
-#include <stdarg.h>
-
-#include "dali-test-suite-utils.h"
 
 using namespace Dali;
 
@@ -72,9 +74,21 @@ bool operator==(TimePeriod a, TimePeriod b)
   return Equals(a.durationSeconds, b.durationSeconds) && Equals(a.delaySeconds, b.delaySeconds) ;
 }
 
-std::ostream& operator<< (std::ostream& o, const TimePeriod value)
+std::ostream& operator<< (std::ostream& ostream, const TimePeriod value)
+{
+  return ostream << "( Duration:" << value.durationSeconds << " Delay:" << value.delaySeconds << ")";
+}
+
+std::ostream& operator<<( std::ostream& ostream, Radian angle )
+{
+  ostream << angle.radian;
+  return ostream;
+}
+
+std::ostream& operator<<( std::ostream& ostream, Degree angle )
 {
-  return o << "( Duration:" << value.durationSeconds << " Delay:" << value.delaySeconds << ")";
+  ostream << angle.degree;
+  return ostream;
 }
 
 void DALI_TEST_EQUALS( const Matrix3& matrix1, const Matrix3& matrix2, const char* location)
index 44f2da9..30ace77 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TEST_SUITE_UTILS_H__
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  */
 
+// EXTERNAL INCLUDES
+#include <cstdarg>
+#include <iosfwd>
+
 // INTERNAL INCLUDES
 #include <dali/public-api/dali-core.h>
 #include <stdarg.h>
@@ -149,7 +153,9 @@ inline bool CompareType<Degree>(Degree q1, Degree q2, float epsilon)
 }
 
 bool operator==(TimePeriod a, TimePeriod b);
-std::ostream& operator<< (std::ostream& o, const TimePeriod value);
+std::ostream& operator<<( std::ostream& ostream, TimePeriod value );
+std::ostream& operator<<( std::ostream& ostream, Radian angle );
+std::ostream& operator<<( std::ostream& ostream, Degree angle );
 
 /**
  * Test whether two values are equal.
index 3d4d1d5..ddf0356 100644 (file)
@@ -64,20 +64,26 @@ void TestPlatformAbstraction::Resume()
   mTrace.PushCall("Resume", "");
 }
 
-void TestPlatformAbstraction::GetClosestImageSize( const std::string& filename,
-                                                   const ImageAttributes& attributes,
-                                                   Vector2& closestSize)
+ImageDimensions TestPlatformAbstraction::GetClosestImageSize( const std::string& filename,
+                                                              ImageDimensions size,
+                                                              FittingMode::Type scalingMode,
+                                                              SamplingMode::Type samplingMode,
+                                                              bool orientationCorrection )
 {
-  closestSize = mClosestSize;
+  ImageDimensions closestSize = ImageDimensions( mClosestSize.x, mClosestSize.y );
   mTrace.PushCall("GetClosestImageSize", "");
+  return closestSize;
 }
 
-void TestPlatformAbstraction::GetClosestImageSize( Integration::ResourcePointer resourceBuffer,
-                                                   const ImageAttributes& attributes,
-                                                   Vector2& closestSize)
+ImageDimensions TestPlatformAbstraction::GetClosestImageSize( Integration::ResourcePointer resourceBuffer,
+                                                   ImageDimensions size,
+                                                   FittingMode::Type scalingMode,
+                                                   SamplingMode::Type samplingMode,
+                                                   bool orientationCorrection )
 {
-  closestSize = mClosestSize;
+  ImageDimensions closestSize = ImageDimensions( mClosestSize.x, mClosestSize.y );
   mTrace.PushCall("GetClosestImageSize", "");
+  return closestSize;
 }
 
 /**
index a4ec8d3..c3beebe 100644 (file)
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <stdint.h>
 #include <cstring>
+#include <dali/public-api/images/image-operations.h>
 
 // INTERNAL INCLUDES
 #include <dali/public-api/common/set-wrapper.h>
@@ -97,13 +98,23 @@ public:
    */
   virtual void Resume();
 
-  virtual void GetClosestImageSize( const std::string& filename,
-                                    const ImageAttributes& attributes,
-                                    Vector2& closestSize);
+  /**
+   * @copydoc PlatformAbstraction::GetClosestImageSize()
+   */
+  virtual ImageDimensions GetClosestImageSize( const std::string& filename,
+                                                 ImageDimensions size,
+                                                 FittingMode::Type scalingMode,
+                                                 SamplingMode::Type samplingMode,
+                                                 bool orientationCorrection );
 
-  virtual void GetClosestImageSize( Integration::ResourcePointer resourceBuffer,
-                                    const ImageAttributes& attributes,
-                                    Vector2& closestSize);
+  /**
+   * @copydoc PlatformAbstraction::GetClosestImageSize()
+   */
+  virtual ImageDimensions GetClosestImageSize( Integration::ResourcePointer resourceBuffer,
+                                               ImageDimensions size,
+                                               FittingMode::Type scalingMode,
+                                               SamplingMode::Type samplingMode,
+                                               bool orientationCorrection );
 
   /**
    * @copydoc PlatformAbstraction::LoadResource()
diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Cluster.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Cluster.cpp
deleted file mode 100644 (file)
index b83ff8c..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 <iostream>
-#include <stdlib.h>
-#include <dali-toolkit-test-suite-utils.h>
-#include <dali-toolkit/dali-toolkit.h>
-
-
-using namespace Dali;
-using namespace Dali::Toolkit;
-
-namespace
-{
-
-static bool gObjectCreatedCallBackCalled;
-
-static void TestCallback(BaseHandle handle)
-{
-  gObjectCreatedCallBackCalled = true;
-}
-
-} // namespace
-
-
-void cluster_startup(void)
-{
-  test_return_value = TET_UNDEF;
-}
-
-void cluster_cleanup(void)
-{
-  test_return_value = TET_PASS;
-}
-
-int UtcDaliClusterNew(void)
-{
-  ToolkitTestApplication application;
-
-  // Create the Cluster actor
-  ClusterStyle style = ClusterStyleStandard::New(ClusterStyleStandard::ClusterStyle1);
-  Cluster cluster = Cluster::New(style);
-
-  DALI_TEST_CHECK(cluster);
-
-  //Additional check to ensure object is created by checking if it's registered
-  ObjectRegistry registry = Stage::GetCurrent().GetObjectRegistry();
-  DALI_TEST_CHECK( registry );
-
-  gObjectCreatedCallBackCalled = false;
-  registry.ObjectCreatedSignal().Connect(&TestCallback);
-  {
-    ClusterStyle style = ClusterStyleStandard::New(ClusterStyleStandard::ClusterStyle1);
-    Cluster cluster = Cluster::New(style);
-  }
-  DALI_TEST_CHECK( gObjectCreatedCallBackCalled );
-  END_TEST;
-}
-
-int UtcDaliClusterDownCast(void)
-{
-  ToolkitTestApplication application;
-
-  // Create the Cluster actor
-  ClusterStyle style = ClusterStyleRandom::New();
-  const Cluster clusterConst = Cluster::New(style);
-  Cluster cluster(clusterConst);
-
-  BaseHandle handle(cluster);
-
-  Cluster newCluster = Cluster::DownCast( handle );
-  DALI_TEST_CHECK( cluster );
-  DALI_TEST_CHECK( newCluster == cluster );
-  END_TEST;
-}
-
-int UtcDaliClusterAddAndRemoveChild(void)
-{
-  ToolkitTestApplication application;
-
-  // Create the Cluster actor
-  ClusterStyle style = ClusterStyleStandard::New(ClusterStyleStandard::ClusterStyle1);
-  Cluster cluster = Cluster::New(style);
-
-  Actor childActor1 = Actor::New();
-  Actor childActor2 = Actor::New();
-  Actor childActor3 = Actor::New();
-  Actor childActor4 = Actor::New();
-
-  // Add the first child and check it is added to the end
-  cluster.AddChild(childActor1);
-  DALI_TEST_CHECK( cluster.GetChildAt(0) == childActor1);
-  DALI_TEST_CHECK( !cluster.GetChildAt(1) );
-  DALI_TEST_CHECK( cluster.GetTotalCount() == 1 );
-
-  // Add the second child to the given position and check it is added
-  cluster.AddChild(childActor2, 1);
-  DALI_TEST_CHECK( cluster.GetChildAt(1) == childActor2);
-  DALI_TEST_CHECK( cluster.GetTotalCount() == 2 );
-
-  // Add the third child with depth index 1 and check it is added to the end
-  cluster.AddChildAt(childActor3, 1);
-  DALI_TEST_CHECK( cluster.GetChildAt(2) == childActor3);
-  DALI_TEST_CHECK( cluster.GetTotalCount() == 3 );
-
-  // Add the fourth child with depth index 2 to the given position and check it is added
-  cluster.AddChildAt(childActor4, 2, 3);
-  DALI_TEST_CHECK( cluster.GetChildAt(3) == childActor4);
-  DALI_TEST_CHECK( cluster.GetTotalCount() == 4 );
-
-  // Remove the child in the given position and check it's removed
-  cluster.RemoveChildAt(3);
-  DALI_TEST_CHECK( !cluster.GetChildAt(3) );
-  DALI_TEST_CHECK( cluster.GetTotalCount() == 3 );
-  END_TEST;
-}
-
-int UtcDaliClusterExpandAndCollapseChild(void)
-{
-  ToolkitTestApplication application;
-
-  // Create the Cluster actor
-  ClusterStyle style = ClusterStyleStandard::New(ClusterStyleStandard::ClusterStyle1);
-  Cluster cluster = Cluster::New(style);
-
-  Actor childActor1 = Actor::New();
-  Actor childActor2 = Actor::New();
-  Actor childActor3 = Actor::New();
-  Actor childActor4 = Actor::New();
-
-  // Add the child actors
-  cluster.AddChild(childActor1);
-  cluster.AddChild(childActor2);
-  cluster.AddChildAt(childActor3, 1);
-  cluster.AddChildAt(childActor4, 2, 3);
-
-  // Expand child actor 3
-  cluster.ExpandChild(2);
-  DALI_TEST_CHECK( cluster.GetExpandedCount() == 1 );
-
-  // Expand child actor 4
-  cluster.ExpandChild(3);
-  DALI_TEST_CHECK( cluster.GetExpandedCount() == 2 );
-
-  // Collapse child actor 3
-  cluster.CollapseChild(2);
-  DALI_TEST_CHECK( cluster.GetExpandedCount() == 1 );
-
-  // Expand all children
-  cluster.ExpandAllChildren();
-  DALI_TEST_CHECK( cluster.GetExpandedCount() == 4 );
-
-  // Collpase all children
-  cluster.CollapseAllChildren();
-  DALI_TEST_CHECK( cluster.GetExpandedCount() == 0 );
-
-  // Transform and restore the child
-  cluster.TransformChild(1, Vector3(10.0f, 10.0f, 1.0f), Vector3(1.0f, 1.0f, 1.0f), Quaternion( Radian(0.0f), Vector3::YAXIS), AlphaFunctions::EaseOut, 0.5f);
-  cluster.RestoreChild(1, AlphaFunctions::EaseOut, 0.25f, true);
-  END_TEST;
-}
-
-int UtcDaliClusterSetAndGetStyle(void)
-{
-  ToolkitTestApplication application;
-
-  // Create the default cluster style
-  ClusterStyle defaultStyle = ClusterStyleStandard::New(ClusterStyleStandard::ClusterStyle1);
-  DALI_TEST_CHECK( defaultStyle.GetMaximumNumberOfChildren() > 0 );
-
-  // Add style to background and title
-  Actor background = Actor::New();
-  Actor title = Actor::New();
-  defaultStyle.ApplyStyleToBackground(background, AlphaFunctions::EaseOut, 1.0f);
-  defaultStyle.ApplyStyleToTitle(title, AlphaFunctions::EaseOut, 1.0f);
-
-  // Create the Cluster actor with the default style
-  Cluster cluster = Cluster::New(defaultStyle);
-  DALI_TEST_CHECK( cluster.GetStyle() == defaultStyle );
-  cluster.SetBackgroundImage(background);
-  cluster.SetTitle(title);
-
-  // Create a new style and apply it to the cluster
-  ClusterStyle newStyle = ClusterStyleRandom::New();
-  cluster.SetStyle(newStyle);
-  DALI_TEST_CHECK( cluster.GetStyle() == newStyle );
-  END_TEST;
-}
index beeb619..17e8456 100644 (file)
@@ -55,6 +55,15 @@ void TestVoidCallback()
 {
 }
 
+static bool gKeyInputFocusCallBackCalled;
+
+static void TestKeyInputFocusCallback( Control control )
+{
+  tet_infoline(" TestKeyInputFocusCallback");
+
+  gKeyInputFocusCallBackCalled = true;
+}
+
 } // namespace
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -475,3 +484,49 @@ int UtcDaliControlGestureSignals(void)
 
   END_TEST;
 }
+
+int UtcDaliControlImplKeyInputFocusGainedSignal(void)
+{
+  ToolkitTestApplication application;
+
+  Control control = Control::New();
+  Stage::GetCurrent().Add( control );
+
+  gKeyInputFocusCallBackCalled = false;
+  control.KeyInputFocusGainedSignal().Connect(&TestKeyInputFocusCallback);
+
+  application.SendNotification();
+  application.Render();
+
+  control.SetKeyInputFocus();
+
+  DALI_TEST_CHECK( control.HasKeyInputFocus() );
+
+  DALI_TEST_CHECK( gKeyInputFocusCallBackCalled );
+
+  END_TEST;
+}
+
+int UtcDaliControlImplKeyInputFocusLostSignal(void)
+{
+  ToolkitTestApplication application;
+
+  Control control = Control::New();
+  Stage::GetCurrent().Add( control );
+
+  gKeyInputFocusCallBackCalled = false;
+  control.KeyInputFocusLostSignal().Connect(&TestKeyInputFocusCallback);
+
+  application.SendNotification();
+  application.Render();
+
+  control.SetKeyInputFocus();
+
+  DALI_TEST_CHECK( control.HasKeyInputFocus() );
+
+  control.ClearKeyInputFocus();
+
+  DALI_TEST_CHECK( gKeyInputFocusCallBackCalled );
+
+  END_TEST;
+}
index f7926a5..8f363af 100644 (file)
@@ -218,7 +218,6 @@ int UtcDaliControlImplOnGestureMethods(void)
   // Check gesture actually happens
   {
     DummyControl dummy = DummyControl::New(true);
-    dummy.SetRelayoutEnabled( true );
     dummy.SetSize( Vector2(100.0f, 100.0f ) );
 
     dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
@@ -279,7 +278,6 @@ int UtcDaliControlImplOnGestureMethods(void)
   // Ensure full code coverage
   {
     DummyControl dummy = DummyControl::New();
-    dummy.SetRelayoutEnabled( true );
     dummy.SetSize( Vector2( 100.0f, 100.0f ) );
 
     dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
@@ -445,7 +443,6 @@ int UtcDaliControlImplSizeSet(void)
 
   {
     DummyControl dummy = DummyControl::New( true );
-    dummy.SetRelayoutEnabled( true );
     DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
 
     Stage::GetCurrent().Add(dummy);
@@ -470,7 +467,6 @@ int UtcDaliControlImplSizeSet(void)
   // Ensure full code coverage
   {
     DummyControl dummy = DummyControl::New();
-    dummy.SetRelayoutEnabled( true );
     Stage::GetCurrent().Add(dummy);
 
     Vector2 size(100.0f, 200.0f);
@@ -546,7 +542,6 @@ int UtcDaliControlImplTouchEvent(void)
 
   {
     DummyControl dummy = DummyControl::New( true );
-    dummy.SetRelayoutEnabled( true );
     DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
 
     dummy.SetSize( Vector2( 100.0f, 100.0f ) );
@@ -571,7 +566,6 @@ int UtcDaliControlImplTouchEvent(void)
   // Ensure full code coverage
   {
     DummyControl dummy = DummyControl::New();
-    dummy.SetRelayoutEnabled( true );
 
     dummy.SetSize( Vector2( 100.0f, 100.0f ) );
     dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
@@ -639,39 +633,6 @@ int UtcDaliControlImplKeyEvent(void)
   END_TEST;
 }
 
-int UtcDaliControlImplStyleChange(void)
-{
-  ToolkitTestApplication application;
-
-  DummyControl dummy = DummyControl::New( true );
-  DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
-
-  Stage::GetCurrent().Add(dummy);
-
-  application.Render();
-  application.SendNotification();
-  application.Render();
-  application.SendNotification();
-
-  // Add a Control and normal Actor as children
-  DummyControl dummyChild = DummyControl::New();
-  dummy.Add(dummyChild);
-
-  Actor actor = Actor::New();
-  dummy.Add(actor);
-
-  DALI_TEST_EQUALS( dummyImpl.fontChangeCalled, false, TEST_LOCATION );
-  StyleChange styleChange;
-  styleChange.defaultFontChange = true;
-  Dali::StyleMonitor styleMonitor = StyleMonitor::Get();
-  styleMonitor.EmitStyleChangeSignal(styleChange);
-
-  DALI_TEST_EQUALS( dummyImpl.fontChangeCalled, true, TEST_LOCATION );
-
-  Stage::GetCurrent().Remove(dummy);
-  END_TEST;
-}
-
 int UtcDaliControlImplKeyInputFocusGained(void)
 {
   ToolkitTestApplication application;
@@ -773,7 +734,6 @@ int UtcDaliControlImplMouseWheelEvent(void)
 
   {
     DummyControl dummy = DummyControl::New( true );
-    dummy.SetRelayoutEnabled( true );
     DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
 
     dummy.SetSize( Vector2( 100.0f, 100.0f ) );
@@ -801,7 +761,6 @@ int UtcDaliControlImplMouseWheelEvent(void)
   // Ensure full code coverage
   {
     DummyControl dummy = DummyControl::New();
-    dummy.SetRelayoutEnabled( true );
 
     dummy.SetSize( Vector2( 100.0f, 100.0f ) );
     dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
index 0d259d9..b2f0324 100644 (file)
@@ -287,8 +287,7 @@ int UtcDaliPushButtonSetImages(void)
   application.SendNotification();
   application.Render();
 
-  // Just check if check box button size changes when a bigger image is set.
-
+  pushButton.SetSize( Vector2( 20.0f, 20.0f ) );
   pushButton.SetButtonImage( image01 );
 
   application.SendNotification();
@@ -296,9 +295,6 @@ int UtcDaliPushButtonSetImages(void)
 
   size = pushButton.GetCurrentSize();
 
-  DALI_TEST_EQUALS( size.width, 10.f, TEST_LOCATION );
-  DALI_TEST_EQUALS( size.height, 10.f, TEST_LOCATION );
-
   END_TEST;
 }
 
index 39af3d3..493a795 100644 (file)
@@ -67,6 +67,8 @@ const float TEST_RATIO_TOLERANCE = 0.05;                        ///< +/-5% toler
 
 const int MAX_FRAMES_TO_TEST_OVERSHOOT = 600;                         ///< 10 seconds (at 60 frames per second).
 const Vector3 OVERSHOOT_START_SCROLL_POSITION(100.0f, 100.0f, 0.0f);  ///< Scroll start position for the Overshoot tests.
+const float SCROLL_ANIMATION_DURATION(0.33f);                   ///< Duration of scroll animation in Overshoot tests (i.e. 100 pixels of overshoot in the speed of 500 pixels per 100 frames, 100/(500/(60/100)) = 0.33)
+const Vector3 SNAP_POSITION_WITH_DECELERATED_VELOCITY(74.0f, 74.0f, 0.0f);  ///< the snap position for Overshoot tests with the decelerated velocity (i.e. Decelerated from 500 pixels per 100 frames).
 const float TEST_CUSTOM1_SNAP_OVERSHOOT_DURATION = 0.05f;             ///< a Test duration
 const float TEST_CUSTOM2_SNAP_OVERSHOOT_DURATION = 1.5f;              ///< another Test duration
 const float TEST_CUSTOM3_SNAP_OVERSHOOT_DURATION = TEST_CUSTOM2_SNAP_OVERSHOOT_DURATION * 0.5f; // Same as above, but different alpha function.
@@ -1027,8 +1029,11 @@ int UtcDaliScrollViewOvershoot(void)
   SendPan(application, Gesture::Finished, currentPos);
   timeToReachOrigin = TestOvershootSnapDuration(application, scrollView);
 
-  DALI_TEST_CHECK( (timeToReachOrigin > Toolkit::ScrollView::DEFAULT_SNAP_OVERSHOOT_DURATION - TIME_TOLERANCE) &&
-                   (timeToReachOrigin < Toolkit::ScrollView::DEFAULT_SNAP_OVERSHOOT_DURATION + TIME_TOLERANCE) );
+  float minTimeToReachOrigin = SCROLL_ANIMATION_DURATION + Toolkit::ScrollView::DEFAULT_SNAP_OVERSHOOT_DURATION * (SNAP_POSITION_WITH_DECELERATED_VELOCITY.x / Toolkit::ScrollView::DEFAULT_MAX_OVERSHOOT) - TIME_TOLERANCE;
+  float maxTimeToReachOrigin = SCROLL_ANIMATION_DURATION + Toolkit::ScrollView::DEFAULT_SNAP_OVERSHOOT_DURATION * (SNAP_POSITION_WITH_DECELERATED_VELOCITY.x / Toolkit::ScrollView::DEFAULT_MAX_OVERSHOOT) + TIME_TOLERANCE;
+
+  DALI_TEST_CHECK( (timeToReachOrigin > minTimeToReachOrigin) &&
+                   (timeToReachOrigin < maxTimeToReachOrigin) );
 
   // 2. Repeat Scroll, but this time change overshoot snap duration to shorter time
   scrollView.SetSnapOvershootDuration(TEST_CUSTOM1_SNAP_OVERSHOOT_DURATION);
@@ -1038,8 +1043,11 @@ int UtcDaliScrollViewOvershoot(void)
   SendPan(application, Gesture::Finished, currentPos);
   timeToReachOrigin = TestOvershootSnapDuration(application, scrollView);
 
-  DALI_TEST_CHECK( (timeToReachOrigin > TEST_CUSTOM1_SNAP_OVERSHOOT_DURATION - TIME_TOLERANCE) &&
-                   (timeToReachOrigin < TEST_CUSTOM1_SNAP_OVERSHOOT_DURATION + TIME_TOLERANCE) );
+  minTimeToReachOrigin = SCROLL_ANIMATION_DURATION + TEST_CUSTOM1_SNAP_OVERSHOOT_DURATION * (SNAP_POSITION_WITH_DECELERATED_VELOCITY.x / Toolkit::ScrollView::DEFAULT_MAX_OVERSHOOT) - TIME_TOLERANCE;
+  maxTimeToReachOrigin = SCROLL_ANIMATION_DURATION + TEST_CUSTOM1_SNAP_OVERSHOOT_DURATION * (SNAP_POSITION_WITH_DECELERATED_VELOCITY.x / Toolkit::ScrollView::DEFAULT_MAX_OVERSHOOT) + TIME_TOLERANCE;
+
+  DALI_TEST_CHECK( (timeToReachOrigin > minTimeToReachOrigin) &&
+                   (timeToReachOrigin < maxTimeToReachOrigin) );
 
   // 3. Repeat Scroll, but this time change overshoot snap duration to longer time.
   scrollView.SetSnapOvershootDuration(TEST_CUSTOM2_SNAP_OVERSHOOT_DURATION);
@@ -1049,8 +1057,11 @@ int UtcDaliScrollViewOvershoot(void)
   SendPan(application, Gesture::Finished, currentPos);
   timeToReachOrigin = TestOvershootSnapDuration(application, scrollView);
 
-  DALI_TEST_CHECK( (timeToReachOrigin > TEST_CUSTOM2_SNAP_OVERSHOOT_DURATION - TIME_TOLERANCE) &&
-                   (timeToReachOrigin < TEST_CUSTOM2_SNAP_OVERSHOOT_DURATION + TIME_TOLERANCE) );
+  minTimeToReachOrigin = SCROLL_ANIMATION_DURATION + TEST_CUSTOM2_SNAP_OVERSHOOT_DURATION * (SNAP_POSITION_WITH_DECELERATED_VELOCITY.x / Toolkit::ScrollView::DEFAULT_MAX_OVERSHOOT) - TIME_TOLERANCE;
+  maxTimeToReachOrigin = SCROLL_ANIMATION_DURATION + TEST_CUSTOM2_SNAP_OVERSHOOT_DURATION * (SNAP_POSITION_WITH_DECELERATED_VELOCITY.x / Toolkit::ScrollView::DEFAULT_MAX_OVERSHOOT) + TIME_TOLERANCE;
+
+  DALI_TEST_CHECK( (timeToReachOrigin > minTimeToReachOrigin) &&
+                   (timeToReachOrigin < maxTimeToReachOrigin) );
 
   // 4. Repeat Scroll, but this time change overshoot function.
   scrollView.SetSnapOvershootDuration(TEST_CUSTOM3_SNAP_OVERSHOOT_DURATION);
@@ -1061,8 +1072,11 @@ int UtcDaliScrollViewOvershoot(void)
   SendPan(application, Gesture::Finished, currentPos);
   timeToReachOrigin = TestOvershootSnapDuration(application, scrollView);
 
-  DALI_TEST_CHECK( (timeToReachOrigin > TEST_CUSTOM3_SNAP_OVERSHOOT_DURATION - TIME_TOLERANCE) &&
-                   (timeToReachOrigin < TEST_CUSTOM3_SNAP_OVERSHOOT_DURATION + TIME_TOLERANCE) );
+  minTimeToReachOrigin = SCROLL_ANIMATION_DURATION + TEST_CUSTOM3_SNAP_OVERSHOOT_DURATION * (SNAP_POSITION_WITH_DECELERATED_VELOCITY.x / Toolkit::ScrollView::DEFAULT_MAX_OVERSHOOT) - TIME_TOLERANCE;
+  maxTimeToReachOrigin = SCROLL_ANIMATION_DURATION + TEST_CUSTOM3_SNAP_OVERSHOOT_DURATION * (SNAP_POSITION_WITH_DECELERATED_VELOCITY.x / Toolkit::ScrollView::DEFAULT_MAX_OVERSHOOT) + TIME_TOLERANCE;
+
+  DALI_TEST_CHECK( (timeToReachOrigin > minTimeToReachOrigin) &&
+                   (timeToReachOrigin < maxTimeToReachOrigin) );
   END_TEST;
 }
 
@@ -1073,15 +1087,14 @@ int UtcDaliScrollViewSnapAlphaFunction(void)
 
   // Set up a scrollView...
   ScrollView scrollView = ScrollView::New();
-  scrollView.SetScrollSnapAlphaFunction( AlphaFunctions::EaseIn );
-  DALI_TEST_CHECK( scrollView.GetScrollSnapAlphaFunction() == AlphaFunctions::EaseIn );
-  scrollView.SetScrollSnapAlphaFunction( AlphaFunctions::EaseOut );
-  DALI_TEST_CHECK( scrollView.GetScrollSnapAlphaFunction() == AlphaFunctions::EaseOut );
-
-  scrollView.SetScrollFlickAlphaFunction( AlphaFunctions::Bounce );
-  DALI_TEST_CHECK( scrollView.GetScrollFlickAlphaFunction() == AlphaFunctions::Bounce );
-  scrollView.SetScrollFlickAlphaFunction( AlphaFunctions::BounceBack );
-  DALI_TEST_CHECK( scrollView.GetScrollFlickAlphaFunction() == AlphaFunctions::BounceBack );
+  scrollView.SetScrollSnapAlphaFunction( AlphaFunction::EASE_IN );
+  DALI_TEST_CHECK( scrollView.GetScrollSnapAlphaFunction().GetBuiltinFunction() == AlphaFunction::EASE_IN );
+  scrollView.SetScrollSnapAlphaFunction( AlphaFunction::EASE_OUT );
+  DALI_TEST_CHECK( scrollView.GetScrollSnapAlphaFunction().GetBuiltinFunction() == AlphaFunction::EASE_OUT );
+
+  scrollView.SetScrollFlickAlphaFunction( AlphaFunction::BOUNCE );
+  DALI_TEST_CHECK( scrollView.GetScrollFlickAlphaFunction().GetBuiltinFunction() == AlphaFunction::BOUNCE );
+
   END_TEST;
 }
 
index dc6b0af..45dd92c 100644 (file)
@@ -70,8 +70,6 @@ static void SetupTableViewAndActors(TableView& tableView, Actor& actor1, Actor&
   tableView = TableView::New( 10, 10 ); // 10 by 10 grid.
   DALI_TEST_CHECK( tableView );
 
-  tableView.SetRelayoutEnabled( true );
-
   Stage::GetCurrent().Add( tableView );
   tableView.SetSize( Dali::Vector2( 100.0f, 100.0f ) );
 
@@ -79,11 +77,8 @@ static void SetupTableViewAndActors(TableView& tableView, Actor& actor1, Actor&
   actor2 = Actor::New();
   actor3 = Actor::New();
 
-  actor1.SetRelayoutEnabled( true );
   actor1.SetSize( Dali::Vector2( 10, 10 ) );
-  actor2.SetRelayoutEnabled( true );
   actor2.SetSize( Dali::Vector2( 10, 10 ) );
-  actor3.SetRelayoutEnabled( true );
   actor3.SetSize( Dali::Vector2( 10, 10 ) );
 
   tableView.AddChild( actor1, TableView::CellPosition( 0, 0 ) );
index 9069525..bf3111d 100644 (file)
@@ -36,59 +36,145 @@ void dali_textfield_cleanup(void)
 namespace
 {
 
-const char* const PROPERTY_NAME_RENDERING_BACKEND = "rendering-backend";
-const char* const PROPERTY_NAME_PLACEHOLDER_TEXT = "placeholder-text";
-const char* const PROPERTY_NAME_FONT_FAMILY = "font-family";
-const char* const PROPERTY_NAME_FONT_STYLE = "font-style";
-const char* const PROPERTY_NAME_POINT_SIZE = "point-size";
-const char* const PROPERTY_NAME_EXCEED_POLICY = "exceed-policy";
-const char* const PROPERTY_NAME_PRIMARY_CURSOR_COLOR = "primary-cursor-color";
-const char* const PROPERTY_NAME_SECONDARY_CURSOR_COLOR = "secondary-cursor-color";
-const char* const PROPERTY_NAME_ENABLE_CURSOR_BLINK = "enable-cursor-blink";
-const char* const PROPERTY_NAME_CURSOR_BLINK_INTERVAL = "cursor-blink-interval";
-const char* const PROPERTY_NAME_CURSOR_BLINK_DURATION = "cursor-blink-duration";
-const char* const PROPERTY_NAME_GRAB_HANDLE_IMAGE = "grab-handle-image";
+const char* const PROPERTY_NAME_RENDERING_BACKEND       = "rendering-backend";
+const char* const PROPERTY_NAME_PLACEHOLDER_TEXT        = "placeholder-text";
+const char* const PROPERTY_NAME_TEXT                    = "text";
+const char* const PROPERTY_NAME_FONT_FAMILY             = "font-family";
+const char* const PROPERTY_NAME_FONT_STYLE              = "font-style";
+const char* const PROPERTY_NAME_POINT_SIZE              = "point-size";
+const char* const PROPERTY_NAME_EXCEED_POLICY           = "exceed-policy";
+const char* const PROPERTY_NAME_PRIMARY_CURSOR_COLOR    = "primary-cursor-color";
+const char* const PROPERTY_NAME_SECONDARY_CURSOR_COLOR  = "secondary-cursor-color";
+const char* const PROPERTY_NAME_ENABLE_CURSOR_BLINK     = "enable-cursor-blink";
+const char* const PROPERTY_NAME_CURSOR_BLINK_INTERVAL   = "cursor-blink-interval";
+const char* const PROPERTY_NAME_CURSOR_BLINK_DURATION   = "cursor-blink-duration";
+const char* const PROPERTY_NAME_GRAB_HANDLE_IMAGE       = "grab-handle-image";
 const char* const PROPERTY_NAME_DECORATION_BOUNDING_BOX = "decoration-bounding-box";
-const char* const PROPERTY_NAME_HORIZONTAL_ALIGNMENT = "horizontal-alignment";
-const char* const PROPERTY_NAME_VERTICAL_ALIGNMENT = "vertical-alignment";
+const char* const PROPERTY_NAME_HORIZONTAL_ALIGNMENT    = "horizontal-alignment";
+const char* const PROPERTY_NAME_VERTICAL_ALIGNMENT      = "vertical-alignment";
 
-static bool gObjectCreatedCallBackCalled;
+} // namespace
 
-static void TestCallback(BaseHandle handle)
+int UtcDaliToolkitTextFieldConstructorP(void)
 {
-  gObjectCreatedCallBackCalled = true;
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextFieldConstructorP");
+  TextField textField;
+  DALI_TEST_CHECK( !textField );
+  END_TEST;
 }
 
-} // namespace
+int UtcDaliToolkitTextFieldNewP(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextFieldNewP");
+  TextField textField = TextField::New();
+  DALI_TEST_CHECK( textField );
+  END_TEST;
+}
+
+int UtcDaliToolkitTextFieldDownCastP(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextFieldDownCastP");
+  TextField textField1 = TextField::New();
+  BaseHandle object( textField1 );
+
+  TextField textField2 = TextField::DownCast( object );
+  DALI_TEST_CHECK( textField2 );
+
+  TextField textField3 = DownCast< TextField >( object );
+  DALI_TEST_CHECK( textField3 );
+  END_TEST;
+}
 
-int UtcDaliTextFieldNew(void)
+int UtcDaliToolkitTextFieldDownCastN(void)
 {
   ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextFieldDownCastN");
+  BaseHandle uninitializedObject;
+  TextField textField1 = TextField::DownCast( uninitializedObject );
+  DALI_TEST_CHECK( !textField1 );
+
+  TextField textField2 = DownCast< TextField >( uninitializedObject );
+  DALI_TEST_CHECK( !textField2 );
+  END_TEST;
+}
+
+int UtcDaliToolkitTextFieldCopyConstructorP(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextFieldCopyConstructorP");
+  TextField textField = TextField::New();
+  textField.SetProperty( TextField::Property::TEXT, "Test" );
+
+  TextField copy( textField );
+  DALI_TEST_CHECK( copy );
+  DALI_TEST_CHECK( copy.GetProperty<std::string>( TextLabel::Property::TEXT ) == textField.GetProperty<std::string>( TextLabel::Property::TEXT ) );
+  END_TEST;
+}
+
+int UtcDaliToolkitTextFieldAssignmentOperatorP(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextFieldAssignmentOperatorP");
+  TextField textField = TextField::New();
+  textField.SetProperty( TextField::Property::TEXT, "Test" );
+
+  TextField copy = textField;
+  DALI_TEST_CHECK( copy );
+  DALI_TEST_CHECK( copy.GetProperty<std::string>( TextField::Property::TEXT ) == textField.GetProperty<std::string>( TextField::Property::TEXT ) );
+  END_TEST;
+}
+
+int UtcDaliTextFieldNewP(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextFieldNewP");
+  TextField textField = TextField::New();
+  DALI_TEST_CHECK( textField );
+  END_TEST;
+}
+
+int UtcDaliTextFieldGetPropertyN(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextFieldGetPropertyN");
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
 
-  //Additional check to ensure object is created by checking if it's registered
-  ObjectRegistry registry = Stage::GetCurrent().GetObjectRegistry();
-  DALI_TEST_CHECK( registry );
-
-  gObjectCreatedCallBackCalled = false;
-  registry.ObjectCreatedSignal().Connect(&TestCallback);
+  bool assert = false;
+  try
+  {
+    Property::Value value = field.GetProperty<bool>( 0 );
+  }
+  catch ( ... )
+  {
+    assert = true;
+  }
+  if ( assert )
   {
-    TextField field = TextField::New();
+    tet_result(TET_PASS);
+  }
+  else
+  {
+    tet_result(TET_FAIL);
   }
-  DALI_TEST_CHECK( gObjectCreatedCallBackCalled );
   END_TEST;
 }
 
-int UtcDaliTextFieldGetSetProperty(void)
+// Positive test case for a method
+int UtcDaliTextFieldGetPropertyP(void)
 {
   ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextFieldGetPropertyP");
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
 
   // Check Property Indices are correct
   DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_RENDERING_BACKEND ) == TextField::Property::RENDERING_BACKEND );
   DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_PLACEHOLDER_TEXT ) == TextField::Property::PLACEHOLDER_TEXT );
+  DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_TEXT ) == TextField::Property::TEXT );
   DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_FONT_FAMILY ) == TextField::Property::FONT_FAMILY );
   DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_FONT_STYLE ) == TextField::Property::FONT_STYLE );
   DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_POINT_SIZE ) == TextField::Property::POINT_SIZE );
@@ -102,6 +188,16 @@ int UtcDaliTextFieldGetSetProperty(void)
   DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_DECORATION_BOUNDING_BOX ) == TextField::Property::DECORATION_BOUNDING_BOX );
   DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_HORIZONTAL_ALIGNMENT ) == TextField::Property::HORIZONTAL_ALIGNMENT );
   DALI_TEST_CHECK( field.GetPropertyIndex( PROPERTY_NAME_VERTICAL_ALIGNMENT ) == TextField::Property::VERTICAL_ALIGNMENT );
+  END_TEST;
+}
+
+// Positive test case for a method
+int UtcDaliTextFieldSetPropertyP(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextFieldSetPropertyP");
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
 
   // Check exceed policy
   field.SetProperty( TextField::Property::EXCEED_POLICY, TextField::EXCEED_POLICY_CLIP );
@@ -117,9 +213,9 @@ int UtcDaliTextFieldGetSetProperty(void)
   field.SetProperty( TextField::Property::CURSOR_BLINK_DURATION, 10.0f );
   DALI_TEST_EQUALS( field.GetProperty<float>( TextField::Property::CURSOR_BLINK_DURATION ), 10.0f, TEST_LOCATION );
 
-  // Blink interval gets converted to milliseconds....
+  // Blink interval
   field.SetProperty( TextField::Property::CURSOR_BLINK_INTERVAL, 1.0f );
-  DALI_TEST_EQUALS( field.GetProperty<float>( TextField::Property::CURSOR_BLINK_INTERVAL ), 1000.0f, TEST_LOCATION );
+  DALI_TEST_EQUALS( field.GetProperty<float>( TextField::Property::CURSOR_BLINK_INTERVAL ), 1.0f, TEST_LOCATION );
 
   // Decoration bounding box
   field.SetProperty( TextField::Property::DECORATION_BOUNDING_BOX, Rect<int>( 0, 0, 1, 1 ) );
@@ -128,14 +224,59 @@ int UtcDaliTextFieldGetSetProperty(void)
   // Check that the Alignment properties can be correctly set
   field.SetProperty( TextField::Property::HORIZONTAL_ALIGNMENT, "BEGIN" );
   DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::HORIZONTAL_ALIGNMENT ), "BEGIN", TEST_LOCATION );
-  field.SetProperty( TextField::Property::VERTICAL_ALIGNMENT, "TOP" );
-  DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::VERTICAL_ALIGNMENT ), "TOP", TEST_LOCATION );
+  field.SetProperty( TextField::Property::VERTICAL_ALIGNMENT, "CENTER" );
+  DALI_TEST_EQUALS( field.GetProperty<std::string>( TextField::Property::VERTICAL_ALIGNMENT ), "CENTER", TEST_LOCATION );
+
+  // Set text
+  field.SetProperty( TextField::Property::TEXT, "Setting Text" );
+
+  // Set placeholder text (currently not implemented)
+  field.SetProperty( TextField::Property::PLACEHOLDER_TEXT, "Setting Text" );
+
+  // Set Grab Handle image
+  field.SetProperty( TextField::Property::GRAB_HANDLE_IMAGE, "" );
+
+  // Check that the MAX_LENGTH property can be correctly set
+  const int maxNumberOfCharacters = 20;
+  field.SetProperty( TextField::Property::MAX_LENGTH, maxNumberOfCharacters );
+  DALI_TEST_EQUALS( field.GetProperty<int>( TextField::Property::MAX_LENGTH ), maxNumberOfCharacters, TEST_LOCATION );
+
+  END_TEST;
+}
+
+// Negative test case for a method
+int UtcDaliTextFieldSetPropertyN(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextFieldSetPropertyN");
+  TextField field = TextField::New();
+  DALI_TEST_CHECK( field );
+
+  bool assert = false;
+  try
+  {
+    field.SetProperty( 0, true );
+  }
+  catch ( ... )
+  {
+    assert = true;
+  }
+  if ( assert )
+  {
+    tet_result(TET_PASS);
+  }
+  else
+  {
+    tet_result(TET_FAIL);
+  }
   END_TEST;
 }
 
-int utcDaliTextFieldBasicRender(void)
+// Positive Basic Text Renderer test
+int utcDaliTextFieldBasicRenderP(void)
 {
   ToolkitTestApplication application;
+  tet_infoline("UtcDaliToolkitTextFieldBasicRenderP");
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
 
@@ -155,9 +296,13 @@ int utcDaliTextFieldBasicRender(void)
   END_TEST;
 }
 
-int utcDaliTextFieldAtlasRender(void)
+// Positive Atlas Text Renderer test
+int utcDaliTextFieldAtlasRenderP(void)
 {
   ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextFieldAtlasRenderP");
+  StyleManager styleManager = StyleManager::Get();
+  styleManager.RequestDefaultTheme();
   TextField field = TextField::New();
   DALI_TEST_CHECK( field );
 
index 3365605..498c40e 100644 (file)
@@ -49,38 +49,114 @@ const char* const PROPERTY_NAME_SHADOW_OFFSET = "shadow-offset";
 const char* const PROPERTY_NAME_SHADOW_COLOR = "shadow-color";
 const char* const PROPERTY_NAME_UNDERLINE_ENABLED = "underline-enabled";
 const char* const PROPERTY_NAME_UNDERLINE_COLOR = "underline-color";
+const char* const PROPERTY_NAME_UNDERLINE_HEIGHT = "underline-height";
 
-static bool gObjectCreatedCallBackCalled;
+} // namespace
 
-static void TestCallback(BaseHandle handle)
+int UtcDaliToolkitTextLabelConstructorP(void)
 {
-  gObjectCreatedCallBackCalled = true;
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextLabelConstructorP");
+  TextLabel textLabel;
+  DALI_TEST_CHECK( !textLabel );
+  END_TEST;
 }
 
-} // namespace
+int UtcDaliToolkitTextLabelNewP(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextLabelNewP");
+  TextLabel textLabel = TextLabel::New( "Test Text" );
+  DALI_TEST_CHECK( textLabel );
+  END_TEST;
+}
+
+int UtcDaliToolkitTextLabelDownCastP(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextLabelDownCastP");
+  TextLabel textLabel1 = TextLabel::New();
+  BaseHandle object( textLabel1 );
+
+  TextLabel textLabel2 = TextLabel::DownCast( object );
+  DALI_TEST_CHECK( textLabel2 );
+
+  TextLabel textLabel3 = DownCast< TextLabel >( object );
+  DALI_TEST_CHECK( textLabel3 );
+  END_TEST;
+}
+
+int UtcDaliToolkitTextLabelDownCastN(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextLabelDownCastN");
+  BaseHandle uninitializedObject;
+  TextLabel textLabel1 = TextLabel::DownCast( uninitializedObject );
+  DALI_TEST_CHECK( !textLabel1 );
 
-int UtcDaliTextLabelNew(void)
+  TextLabel textLabel2 = DownCast< TextLabel >( uninitializedObject );
+  DALI_TEST_CHECK( !textLabel2 );
+  END_TEST;
+}
+
+int UtcDaliToolkitTextLabelCopyConstructorP(void)
 {
   ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextLabelCopyConstructorP");
+  TextLabel textLabel = TextLabel::New();
+  textLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::RED );
+
+  TextLabel copy( textLabel );
+  DALI_TEST_CHECK( copy );
+  DALI_TEST_CHECK( copy.GetProperty<Vector4>( TextLabel::Property::TEXT_COLOR ) == textLabel.GetProperty<Vector4>( TextLabel::Property::TEXT_COLOR ) );
+  END_TEST;
+}
+
+int UtcDaliToolkitTextLabelAssignmentOperatorP(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextLabelAssingmentOperatorP");
+  TextLabel textLabel = TextLabel::New();
+  textLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::RED );
+
+  TextLabel copy = textLabel;
+  DALI_TEST_CHECK( copy );
+  DALI_TEST_CHECK( copy.GetProperty<Vector4>( TextLabel::Property::TEXT_COLOR ) == textLabel.GetProperty<Vector4>( TextLabel::Property::TEXT_COLOR ) );
+  END_TEST;
+}
+
+int UtcDaliToolkitTextLabelGetPropertyN(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextLabelGetPropertyN");
   TextLabel label = TextLabel::New("Test Text");
   DALI_TEST_CHECK( label );
 
-  //Additional check to ensure object is created by checking if it's registered
-  ObjectRegistry registry = Stage::GetCurrent().GetObjectRegistry();
-  DALI_TEST_CHECK( registry );
-
-  gObjectCreatedCallBackCalled = false;
-  registry.ObjectCreatedSignal().Connect(&TestCallback);
+  bool assert = false;
+  try
+  {
+    Property::Value value = label.GetProperty<bool>( 0 );
+  }
+  catch ( ... )
+  {
+    assert = true;
+  }
+  if ( assert )
   {
-    TextLabel label = TextLabel::New("Test Text");
+    tet_result(TET_PASS);
+  }
+  else
+  {
+    tet_result(TET_FAIL);
   }
-  DALI_TEST_CHECK( gObjectCreatedCallBackCalled );
   END_TEST;
 }
 
-int UtcDaliTextLabelGetSetProperty(void)
+// Positive test case for a method
+int UtcDaliToolkitTextLabelGetPropertyP(void)
 {
   ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextLabelGetPropertyP");
   TextLabel label = TextLabel::New("Test Text");
   DALI_TEST_CHECK( label );
 
@@ -98,13 +174,51 @@ int UtcDaliTextLabelGetSetProperty(void)
   DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_SHADOW_COLOR ) == TextLabel::Property::SHADOW_COLOR );
   DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_UNDERLINE_ENABLED ) == TextLabel::Property::UNDERLINE_ENABLED );
   DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_UNDERLINE_COLOR ) == TextLabel::Property::UNDERLINE_COLOR );
+  DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_UNDERLINE_HEIGHT) == TextLabel::Property::UNDERLINE_HEIGHT );
 
   // Check label defaults are correct
   DALI_TEST_EQUALS( label.GetProperty<int>( TextLabel::Property::RENDERING_BACKEND ), Text::RENDERING_SHARED_ATLAS, TEST_LOCATION );
   DALI_TEST_EQUALS( label.GetProperty<Vector4>( TextLabel::Property::TEXT_COLOR ), Color::WHITE, TEST_LOCATION );
   DALI_TEST_EQUALS( label.GetProperty<Vector2>( TextLabel::Property::SHADOW_OFFSET ), Vector2::ZERO, TEST_LOCATION );
-  DALI_TEST_EQUALS( label.GetProperty<Vector4>( TextLabel::Property::SHADOW_COLOR ), Vector4::ZERO, TEST_LOCATION );
+  DALI_TEST_EQUALS( label.GetProperty<Vector4>( TextLabel::Property::SHADOW_COLOR ), Color::BLACK, TEST_LOCATION );
   DALI_TEST_EQUALS( label.GetProperty<bool>( TextLabel::Property::UNDERLINE_ENABLED ), false, TEST_LOCATION );
+  DALI_TEST_EQUALS( label.GetProperty<float>( TextLabel::Property::UNDERLINE_HEIGHT ), 0.0f, TEST_LOCATION );
+  END_TEST;
+}
+
+int UtcDaliToolkitTextLabelSetPropertyN(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextLabelSetPropertyN");
+  TextLabel label = TextLabel::New("Test Text");
+  DALI_TEST_CHECK( label );
+
+  bool assert = false;
+  try
+  {
+    label.SetProperty( 0, true );
+  }
+  catch ( ... )
+  {
+    assert = true;
+  }
+  if ( assert )
+  {
+    tet_result(TET_PASS);
+  }
+  else
+  {
+    tet_result(TET_FAIL);
+  }
+  END_TEST;
+}
+
+int UtcDaliToolkitTextLabelSetPropertyP(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextLabelSetPropertyP");
+  TextLabel label = TextLabel::New("Test Text");
+  DALI_TEST_CHECK( label );
 
   // Check that text can be correctly reset
   label.SetProperty( TextLabel::Property::TEXT, "Setting Text" );
@@ -127,6 +241,12 @@ int UtcDaliTextLabelGetSetProperty(void)
   DALI_TEST_EQUALS( label.GetProperty<bool>( TextLabel::Property::UNDERLINE_ENABLED ), true, TEST_LOCATION );
   label.SetProperty( TextLabel::Property::UNDERLINE_COLOR, Color::RED );
   DALI_TEST_EQUALS( label.GetProperty<Vector4>( TextLabel::Property::UNDERLINE_COLOR ), Color::RED, TEST_LOCATION );
+  label.SetProperty( TextLabel::Property::UNDERLINE_HEIGHT, 1.0f );
+  DALI_TEST_EQUALS( label.GetProperty<float>( TextLabel::Property::UNDERLINE_HEIGHT ), 1.0f, TEST_LOCATION );
+
+  // Check that text color can be properly set
+  label.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLUE );
+  DALI_TEST_EQUALS( label.GetProperty<Vector4>( TextLabel::Property::TEXT_COLOR ), Color::BLUE, TEST_LOCATION );
 
   // Toggle multi-line
   label.SetProperty( TextLabel::Property::MULTI_LINE, true );
@@ -134,9 +254,10 @@ int UtcDaliTextLabelGetSetProperty(void)
   END_TEST;
 }
 
-int utcDaliTextlabelBasicRender(void)
+int UtcDaliToolkitTextlabelBasicRenderP(void)
 {
   ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextLabelBasicRenderP");
   TextLabel label = TextLabel::New("Test Text");
   DALI_TEST_CHECK( label );
 
@@ -157,9 +278,10 @@ int utcDaliTextlabelBasicRender(void)
   END_TEST;
 }
 
-int utcDaliTextlabelAtlasRender(void)
+int UtcDaliToolkitTextlabelAtlasRenderP(void)
 {
   ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToolkitTextLabelAtlasRenderP");
   TextLabel label = TextLabel::New("Test Text");
   DALI_TEST_CHECK( label );
 
diff --git a/automated-tests/src/dali-toolkit/utc-Dali-View.cpp b/automated-tests/src/dali-toolkit/utc-Dali-View.cpp
deleted file mode 100644 (file)
index ad124e1..0000000
+++ /dev/null
@@ -1,392 +0,0 @@
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 <iostream>
-#include <stdlib.h>
-#include <dali-toolkit-test-suite-utils.h>
-#include <dali-toolkit/dali-toolkit.h>
-
-using namespace Dali;
-using namespace Toolkit;
-
-
-void dali_view_startup(void)
-{
-  test_return_value = TET_UNDEF;
-}
-
-void dali_view_cleanup(void)
-{
-  test_return_value = TET_PASS;
-}
-
-
-namespace
-{
-
-static bool gAnimationStarted = false;
-
-void StartAnimation( View, Animation& animation, const Orientation& orientation )
-{
-  gAnimationStarted = true;
-}
-
-
-static bool gObjectCreatedCallBackCalled;
-static void TestCallback(BaseHandle handle)
-{
-  gObjectCreatedCallBackCalled = true;
-}
-
-
-}
-
-
-int UtcDaliViewNew(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliViewNew");
-
-  View view1;
-  DALI_TEST_CHECK( !view1 );
-
-  view1 = View::New();
-  DALI_TEST_CHECK( view1 );
-
-  View view2( view1 );
-  DALI_TEST_CHECK( view2 );
-
-  View view3 = view2;
-  DALI_TEST_CHECK( view3 );
-
-  view1.Reset();
-  view2.Reset();
-  view3.Reset();
-
-  //Additional check to ensure object is created by checking if it's registered
-  ObjectRegistry registry = Stage::GetCurrent().GetObjectRegistry();
-  DALI_TEST_CHECK( registry );
-
-  gObjectCreatedCallBackCalled = false;
-  registry.ObjectCreatedSignal().Connect( &TestCallback );
-  {
-    View view = View::New();
-  }
-  DALI_TEST_CHECK( gObjectCreatedCallBackCalled );
-  END_TEST;
-}
-
-int UtcDaliViewAddGetRemoveContentLayer01(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliViewAddGetRemoveContentLayer01");
-
-  View view = View::New();
-  Layer layer1;
-  Layer layer2;
-  Layer layer3;
-  Layer layer4;
-
-  // Test: add and get layers.
-  try
-  {
-    layer1 = Layer::New();
-    layer1.SetName( "Layer1" );
-    layer2 = Layer::New();
-    layer2.SetName( "Layer2" );
-
-    unsigned int layerId1 = view.AddContentLayer( layer1 );
-    unsigned int layerId2 = view.AddContentLayer( layer2 );
-
-    layer3 = view.GetContentLayer( layerId1 );
-    layer4 = view.GetContentLayer( layerId2 );
-
-    DALI_TEST_EQUALS( layer1.GetName(), layer3.GetName(), TEST_LOCATION );
-    DALI_TEST_EQUALS( layer2.GetName(), layer4.GetName(), TEST_LOCATION );
-  }
-  catch( ... )
-  {
-    tet_printf( "UtcDaliViewAddGetRemoveContentLayer: Exception while adding and geting layers to/from view.\n" );
-    tet_result(TET_FAIL);
-  }
-
-  bool test1 = false;
-  bool test2 = false;
-  // Test: remove layers.
-  try
-  {
-    view.RemoveContentLayer( layer3 );
-    view.RemoveContentLayer( layer4 );
-    test1 = true;
-  }
-  catch( ... )
-  {
-    tet_printf( "UtcDaliViewAddGetRemoveContentLayer: Exception while removing layers from view.\n" );
-    tet_result(TET_FAIL);
-  }
-
-  // Test: add same layers again.
-  try
-  {
-    view.AddContentLayer( layer1 );
-    view.AddContentLayer( layer2 );
-    test2 = true;
-  }
-  catch( ... )
-  {
-    tet_printf( "UtcDaliViewAddGetRemoveContentLayer: Exception while adding layers from view after have been removed.\n" );
-    tet_result(TET_FAIL);
-  }
-
-  DALI_TEST_CHECK( test1 && test2 );
-  END_TEST;
-}
-
-int UtcDaliViewAddGetRemoveContentLayer02(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliViewAddGetRemoveContentLayer02");
-
-  View view = View::New();
-
-  Layer layer1 = Layer::New();
-  layer1.SetName( "Layer1" );
-  Layer layer2 = Layer::New();
-  layer2.SetName( "Layer2" );
-
-  view.AddContentLayer( layer1 );
-  view.AddContentLayer( layer2 );
-
-  // Test: add a layer twice.
-  try
-  {
-    view.AddContentLayer( layer1 );
-  }
-  catch( ... )
-  {
-    tet_result(TET_FAIL);
-  }
-
-  // Test: add an unitialized layer.
-  try
-  {
-    Layer layer;
-    view.AddContentLayer( layer );
-  }
-  catch( DaliException& e )
-  {
-    DALI_TEST_PRINT_ASSERT( e );
-    DALI_TEST_EQUALS( e.condition, "layer", TEST_LOCATION );
-  }
-
-  // Test: get a layer which was not added before.
-  Layer layer = view.GetContentLayer( 100 );
-  DALI_TEST_CHECK( !layer );
-
-  // Test: Remove a layer which was not added before.
-  try
-  {
-    Layer layer = Layer::New();
-    view.RemoveContentLayer( layer );
-  }
-  catch( ... )
-  {
-    tet_result(TET_FAIL);
-  }
-
-  tet_result(TET_PASS);
-  END_TEST;
-}
-
-int UtcDaliViewSetGetBackgroundLayer01(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliViewSetGetBackgroundLayer01");
-
-  View view;
-  Layer layer1, layer2;
-
-  // Test with an actor.
-
-  view = View::New();
-  Stage::GetCurrent().Add( view );
-
-  ImageActor background = CreateSolidColorActor( Color::RED );
-
-  view.SetBackground( background );
-
-  layer1 = view.GetBackgroundLayer();
-
-  DALI_TEST_CHECK( layer1 );
-
-  background = CreateSolidColorActor( Color::GREEN );
-
-  view.SetBackground( background );
-
-  layer2 = view.GetBackgroundLayer();
-
-  DALI_TEST_CHECK( layer2 );
-
-  Stage::GetCurrent().Remove( view );
-  END_TEST;
-}
-
-int UtcDaliViewSetGetBackgroundLayer02(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliViewSetGetBackgroundLayer02");
-
-  bool assert = false;
-
-  try
-  {
-    View view = View::New();
-
-    ImageActor background = CreateSolidColorActor( Color::RED );
-
-    view.SetBackground( background );
-  }
-  catch( DaliException& e )
-  {
-    DALI_TEST_PRINT_ASSERT( e );
-    DALI_TEST_EQUALS( e.condition, "mBackgroundLayer.OnStage()", TEST_LOCATION );
-    assert = true;
-  }
-
-  DALI_TEST_CHECK( assert );
-  END_TEST;
-}
-
-int UtcDaliViewSetOrientationFunction(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliViewSetOrientationFunction");
-
-  // Test it doesn't crash
-  try
-  {
-    View view = View::New();
-    Stage::GetCurrent().Add( view );
-
-    view.SetSize( 480, 800 );
-    view.SetOrientationFunction( Degree( 0.f ), Degree( 90.f ), Degree( 180.f ), Degree( 270.f ) );
-  }
-  catch( ... )
-  {
-    tet_result(TET_FAIL);
-  }
-
-  tet_result(TET_PASS);
-  END_TEST;
-}
-
-int UtcDaliViewOrientationChanged(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliViewOrientationChanged");
-
-  gAnimationStarted = false;
-
-  // Test it doesn't crash
-  try
-  {
-    View view = View::New();
-    view.SetRelayoutEnabled( true );
-    Stage::GetCurrent().Add( view );
-
-    view.SetSize( Vector2( 480, 800 ) );
-
-    view.OrientationAnimationStartedSignal().Connect( &StartAnimation );
-
-    application.SendNotification(); // Remove these two lines causes
-    application.Render();           // ToolkitTestApplication destructor to crash
-
-    //Orientation orientation = application.GetOrientation().GetHandle();
-    //application.GetOrientation().SetDegrees( 90 );
-    //view.OrientationChanged( orientation );
-  }
-  catch( ... )
-  {
-    tet_result(TET_FAIL);
-  }
-
-  // Check the view animation started.
-  DALI_TEST_CHECK( gAnimationStarted );
-  END_TEST;
-}
-
-int UtcSetAutoRotate(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcSetAutoRotate");
-
-  gAnimationStarted = false;
-
-  View view;
-
-  // Test it doesn't crash
-  try
-  {
-    view = View::New();
-    Stage::GetCurrent().Add( view );
-
-    view.SetSize( 480, 800 );
-
-    //view.OrientationAnimationStartedSignal().Connect( &StartAnimation );
-
-    application.SendNotification();
-    application.Render();
-
-    //Orientation orientation = application.GetOrientation().GetHandle();
-    //application.GetOrientation().SetDegrees( 90 );
-    //view.OrientationChanged( orientation );
-  }
-  catch( ... )
-  {
-    tet_result(TET_FAIL);
-  }
-
-  // Check the view animation started.
-  //DALI_TEST_CHECK( gAnimationStarted );
-
-
-  gAnimationStarted = false;
-
-  try
-  {
-    view = View::New();
-    view.SetAutoRotate( false ); // Animation shouldn't start.
-    Stage::GetCurrent().Add( view );
-
-    view.SetSize( 480, 800 );
-
-    application.SendNotification();
-    application.Render();
-
-    //Orientation orientation = application.GetOrientation().GetHandle();
-    //application.GetOrientation().SetDegrees( 180 );
-    //view.OrientationChanged( orientation );
-  }
-  catch( ... )
-  {
-    tet_result(TET_FAIL);
-  }
-
-  // Check the view animation didn't start.
-  DALI_TEST_CHECK( !gAnimationStarted );
-  END_TEST;
-}
index 0e705e2..f9bdac1 100644 (file)
@@ -30,8 +30,6 @@
 #include <dali-toolkit/public-api/controls/buttons/check-box-button.h>
 #include <dali-toolkit/public-api/controls/buttons/push-button.h>
 #include <dali-toolkit/public-api/controls/buttons/radio-button.h>
-#include <dali-toolkit/public-api/controls/cluster/cluster-style.h>
-#include <dali-toolkit/public-api/controls/cluster/cluster.h>
 #include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/public-api/controls/control.h>
 #include <dali-toolkit/public-api/controls/default-controls/check-button-factory.h>
@@ -76,7 +74,6 @@
 #include <dali-toolkit/public-api/controls/text-controls/text-field.h>
 #include <dali-toolkit/public-api/controls/text-controls/text-label.h>
 #include <dali-toolkit/public-api/controls/tool-bar/tool-bar.h>
-#include <dali-toolkit/public-api/controls/view/view.h>
 
 #include <dali-toolkit/public-api/focus-manager/focus-manager.h>
 #include <dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h>
diff --git a/dali-toolkit/images/insertpoint-icon-pressed.png b/dali-toolkit/images/insertpoint-icon-pressed.png
new file mode 100644 (file)
index 0000000..171b737
Binary files /dev/null and b/dali-toolkit/images/insertpoint-icon-pressed.png differ
index bea8368..6caf392 100644 (file)
@@ -110,34 +110,20 @@ AlphaFunction GetAlphaFunction( const std::string& alphaFunction )
   if( 0 == alphaFunctionLut.size() )
   {
     // coding convention is uppercase enums
-    alphaFunctionLut["DEFAULT"]                    = AlphaFunctions::Default;
-    alphaFunctionLut["LINEAR"]                     = AlphaFunctions::Linear;
-    alphaFunctionLut["SQUARE"]                     = AlphaFunctions::Square;
-    alphaFunctionLut["REVERSE"]                    = AlphaFunctions::Reverse;
-    alphaFunctionLut["EASE_IN"]                    = AlphaFunctions::EaseIn;
-    alphaFunctionLut["EASE_OUT"]                   = AlphaFunctions::EaseOut;
-    alphaFunctionLut["EASE_IN_OUT"]                = AlphaFunctions::EaseInOut;
-    alphaFunctionLut["EASE_IN_SINE"]               = AlphaFunctions::EaseInSine;
-    alphaFunctionLut["EASE_OUT_SINE"]              = AlphaFunctions::EaseOutSine;
-    alphaFunctionLut["EASE_IN_OUT_SINE"]           = AlphaFunctions::EaseInOutSine;
-    alphaFunctionLut["EASE_IN_SINE_33"]            = AlphaFunctions::EaseInSine33;
-    alphaFunctionLut["EASE_OUT_SINE_33"]           = AlphaFunctions::EaseOutSine33;
-    alphaFunctionLut["EASE_IN_OUT_SINE_33"]        = AlphaFunctions::EaseInOutSine33;
-    alphaFunctionLut["EASE_IN_OUT_SINE_50"]        = AlphaFunctions::EaseInOutSine50;
-    alphaFunctionLut["EASE_IN_OUT_SINE_60"]        = AlphaFunctions::EaseInOutSine60;
-    alphaFunctionLut["EASE_IN_OUT_SINE_70"]        = AlphaFunctions::EaseInOutSine70;
-    alphaFunctionLut["EASE_IN_OUT_SINE_80"]        = AlphaFunctions::EaseInOutSine80;
-    alphaFunctionLut["EASE_IN_OUT_SINE_90"]        = AlphaFunctions::EaseInOutSine90;
-    alphaFunctionLut["DOUBLE_EASE_IN_OUT_SINE_60"] = AlphaFunctions::DoubleEaseInOutSine60;
-    alphaFunctionLut["EASE_OUT_QUINT_50"]          = AlphaFunctions::EaseOutQuint50;
-    alphaFunctionLut["EASE_OUT_QUINT_80"]          = AlphaFunctions::EaseOutQuint80;
-    alphaFunctionLut["BOUNCE"]                     = AlphaFunctions::Bounce;
-    alphaFunctionLut["BOUNCE_BACK"]                = AlphaFunctions::BounceBack;
-    alphaFunctionLut["EASE_IN_BACK"]               = AlphaFunctions::EaseInBack;
-    alphaFunctionLut["EASE_OUT_BACK"]              = AlphaFunctions::EaseOutBack;
-    alphaFunctionLut["EASE_IN_OUT_BACK"]           = AlphaFunctions::EaseInOutBack;
-    alphaFunctionLut["SIN"]                        = AlphaFunctions::Sin;
-    alphaFunctionLut["SIN2X"]                      = AlphaFunctions::Sin2x;
+    alphaFunctionLut["DEFAULT"]                    = AlphaFunction(AlphaFunction::DEFAULT);
+    alphaFunctionLut["LINEAR"]                     = AlphaFunction(AlphaFunction::LINEAR);
+    alphaFunctionLut["REVERSE"]                    = AlphaFunction(AlphaFunction::REVERSE);
+    alphaFunctionLut["EASE_IN_SQUARE"]             = AlphaFunction(AlphaFunction::EASE_IN_SQUARE);
+    alphaFunctionLut["EASE_OUT_SQUARE"]            = AlphaFunction(AlphaFunction::EASE_OUT_SQUARE);
+    alphaFunctionLut["EASE_IN"]                    = AlphaFunction(AlphaFunction::EASE_IN);
+    alphaFunctionLut["EASE_OUT"]                   = AlphaFunction(AlphaFunction::EASE_OUT);
+    alphaFunctionLut["EASE_IN_OUT"]                = AlphaFunction(AlphaFunction::EASE_IN_OUT);
+    alphaFunctionLut["EASE_IN_SINE"]               = AlphaFunction(AlphaFunction::EASE_IN_SINE);
+    alphaFunctionLut["EASE_OUT_SINE"]              = AlphaFunction(AlphaFunction::EASE_OUT_SINE);
+    alphaFunctionLut["EASE_IN_OUT_SINE"]           = AlphaFunction(AlphaFunction::EASE_IN_OUT_SINE);
+    alphaFunctionLut["BOUNCE"]                     = AlphaFunction(AlphaFunction::BOUNCE);
+    alphaFunctionLut["SIN"]                        = AlphaFunction(AlphaFunction::SIN);
+    alphaFunctionLut["EASE_OUT_BACK"]              = AlphaFunction(AlphaFunction::EASE_OUT_BACK);
   }
 
   const AlphaFunctionLut::const_iterator iter( alphaFunctionLut.find( alphaFunction ) );
@@ -149,7 +135,7 @@ AlphaFunction GetAlphaFunction( const std::string& alphaFunction )
   else
   {
     DALI_ASSERT_ALWAYS( iter != alphaFunctionLut.end() && "Unknown Anchor Constant" );
-    return Dali::AlphaFunctions::Default;
+    return Dali::AlphaFunction::DEFAULT;
   }
 }
 
@@ -278,7 +264,7 @@ Animation CreateAnimation( const TreeNode& child, const Replacement& constant, D
       }
 
       // these are the defaults
-      AlphaFunction alphaFunction( AlphaFunctions::Default );
+      AlphaFunction alphaFunction( AlphaFunction::DEFAULT );
       TimePeriod timePeriod( 0.f );
 
       OptionalChild timeChild = IsChild( pKeyChild.second, "time-period" );
@@ -326,7 +312,7 @@ Animation CreateAnimation( const TreeNode& child, const Replacement& constant, D
             throw;
           }
 
-          AlphaFunction kfAlphaFunction( AlphaFunctions::Default );
+          AlphaFunction kfAlphaFunction( AlphaFunction::DEFAULT );
           if( OptionalString alphaFuncStr = constant.IsString( IsChild(pKeyChild.second, "alpha-function") ) )
           {
             kfAlphaFunction = GetAlphaFunction( *alphaFuncStr );
index 9713587..b06e57b 100644 (file)
@@ -377,7 +377,7 @@ Toolkit::Alignment Alignment::New( Toolkit::Alignment::Type horizontal, Toolkit:
   // Create the implementation, temporarily owned on stack
   IntrusivePtr< Alignment > internalAlignment = new Alignment( horizontal, vertical );
 
-  // Pass ownership to Toolkit::View
+  // Pass ownership to Toolkit::Alignment
   Toolkit::Alignment alignment( *internalAlignment );
 
   // Second-phase init of the implementation
@@ -548,7 +548,7 @@ void Alignment::OnRelayout( const Vector2& size, RelayoutContainer& container )
 }
 
 Alignment::Alignment( Toolkit::Alignment::Type horizontal, Toolkit::Alignment::Type vertical )
-: Control( CONTROL_BEHAVIOUR_NONE ),
+: Control( ControlBehaviour( ACTOR_BEHAVIOUR_NONE ) ),
   mHorizontal( horizontal ),
   mVertical( vertical ),
   mScaling( Toolkit::Alignment::ScaleNone ),
index df9b6ed..ac56224 100644 (file)
@@ -126,7 +126,7 @@ const char* const COMPOSITE_FRAGMENT_SOURCE =
 
 
 BloomView::BloomView()
-  : Control( CONTROL_BEHAVIOUR_NONE )
+  : Control( ControlBehaviour( ACTOR_BEHAVIOUR_NONE ) )
   , mBlurNumSamples(BLOOM_GAUSSIAN_BLUR_VIEW_DEFAULT_NUM_SAMPLES)
   , mBlurBellCurveWidth(BLOOM_GAUSSIAN_BLUR_VIEW_DEFAULT_BLUR_BELL_CURVE_WIDTH)
   , mPixelFormat(BLOOM_GAUSSIAN_BLUR_VIEW_DEFAULT_RENDER_TARGET_PIXEL_FORMAT)
@@ -148,7 +148,7 @@ BloomView::BloomView()
 
 BloomView::BloomView( const unsigned int blurNumSamples, const float blurBellCurveWidth, const Pixel::Format renderTargetPixelFormat,
                                     const float downsampleWidthScale, const float downsampleHeightScale)
-  : Control( CONTROL_BEHAVIOUR_NONE )
+  : Control( ControlBehaviour( ACTOR_BEHAVIOUR_NONE ) )
   , mBlurNumSamples(blurNumSamples)
   , mBlurBellCurveWidth(blurBellCurveWidth)
   , mPixelFormat(renderTargetPixelFormat)
index 1306475..ae17a0d 100644 (file)
@@ -39,7 +39,7 @@ BubbleEmitter::BubbleEmitter( const Vector2& movementArea,
                               Image shapeImage,
                               unsigned int maximumNumberOfBubble,
                               const Vector2& bubbleSizeRange )
-: Control( REQUIRES_TOUCH_EVENTS ),
+: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS ) ),
   mMovementArea( movementArea ),
   mShapeImage( shapeImage ),
   mTotalNumOfBubble( maximumNumberOfBubble ),
@@ -261,14 +261,14 @@ void BubbleEmitter::EmitBubble( Animation& animation, const Vector2& emitPositio
   unsigned int groupIdx = mCurrentUniform / mNumBubblePerShader;
   SetBubbleParameter( mEffect[groupIdx], curUniform, emitPosition, direction, displacement);
   animation.AnimateTo( Property( mEffect[groupIdx], mEffect[groupIdx].GetPercentagePropertyName(curUniform) ),
-                       1.f, AlphaFunctions::Linear );
+                       1.f, AlphaFunction::LINEAR );
 
   if( mCurrentUniform % mNumShader == 0 )
   {
     unsigned int uniform = mCurrentUniform / mNumShader;
     SetBubbleParameter(mEffectForNoise, uniform, emitPosition, displacement);
     animation.AnimateTo( Property( mEffectForNoise, mEffectForNoise.GetPercentagePropertyName(uniform) ),
-                         1.f, AlphaFunctions::Linear );
+                         1.f, AlphaFunction::LINEAR );
   }
 
   mCurrentUniform = (mCurrentUniform + 1) % mTotalNumOfBubble;
@@ -280,10 +280,10 @@ void BubbleEmitter::StartExplosion( float duration, float multiple )
   for(unsigned int i=0; i < mNumShader; i++ )
   {
     animation.AnimateTo( Property( mEffect[i], mEffect[i].GetMagnificationPropertyName() ),
-                         multiple, AlphaFunctions::EaseOut);
+                         multiple, AlphaFunction::EASE_OUT);
   }
   animation.AnimateTo( Property( mEffectForNoise, mEffectForNoise.GetMagnificationPropertyName() ),
-                       multiple, AlphaFunctions::EaseOut);
+                       multiple, AlphaFunction::EASE_OUT);
   animation.Play();
 
   animation.FinishedSignal().Connect(this, &BubbleEmitter::OnExplosionFinished);
index d1f30bc..40ff196 100644 (file)
@@ -74,23 +74,23 @@ BaseHandle Create()
 // Setup properties, signals and actions using the type-registry.
 DALI_TYPE_REGISTRATION_BEGIN( Toolkit::Button, Toolkit::Control, Create );
 
-DALI_PROPERTY_REGISTRATION( Button, "disabled",                     BOOLEAN, DISABLED                     )
-DALI_PROPERTY_REGISTRATION( Button, "auto-repeating",               BOOLEAN, AUTO_REPEATING               )
-DALI_PROPERTY_REGISTRATION( Button, "initial-auto-repeating-delay", FLOAT,   INITIAL_AUTO_REPEATING_DELAY )
-DALI_PROPERTY_REGISTRATION( Button, "next-auto-repeating-delay",    FLOAT,   NEXT_AUTO_REPEATING_DELAY    )
-DALI_PROPERTY_REGISTRATION( Button, "togglable",                    BOOLEAN, TOGGLABLE                    )
-DALI_PROPERTY_REGISTRATION( Button, "selected",                     BOOLEAN, SELECTED                     )
-DALI_PROPERTY_REGISTRATION( Button, "normal-state-actor",           MAP,     NORMAL_STATE_ACTOR           )
-DALI_PROPERTY_REGISTRATION( Button, "selected-state-actor",         MAP,     SELECTED_STATE_ACTOR         )
-DALI_PROPERTY_REGISTRATION( Button, "disabled-state-actor",         MAP,     DISABLED_STATE_ACTOR         )
-DALI_PROPERTY_REGISTRATION( Button, "label-actor",                  MAP,     LABEL_ACTOR                  )
-
-DALI_SIGNAL_REGISTRATION(   Button, "pressed",                               SIGNAL_PRESSED               )
-DALI_SIGNAL_REGISTRATION(   Button, "released",                              SIGNAL_RELEASED              )
-DALI_SIGNAL_REGISTRATION(   Button, "clicked",                               SIGNAL_CLICKED               )
-DALI_SIGNAL_REGISTRATION(   Button, "state-changed",                         SIGNAL_STATE_CHANGED         )
-
-DALI_ACTION_REGISTRATION(   Button, "button-click",                          ACTION_BUTTON_CLICK          )
+DALI_PROPERTY_REGISTRATION( Toolkit, Button, "disabled",                     BOOLEAN, DISABLED                     )
+DALI_PROPERTY_REGISTRATION( Toolkit, Button, "auto-repeating",               BOOLEAN, AUTO_REPEATING               )
+DALI_PROPERTY_REGISTRATION( Toolkit, Button, "initial-auto-repeating-delay", FLOAT,   INITIAL_AUTO_REPEATING_DELAY )
+DALI_PROPERTY_REGISTRATION( Toolkit, Button, "next-auto-repeating-delay",    FLOAT,   NEXT_AUTO_REPEATING_DELAY    )
+DALI_PROPERTY_REGISTRATION( Toolkit, Button, "togglable",                    BOOLEAN, TOGGLABLE                    )
+DALI_PROPERTY_REGISTRATION( Toolkit, Button, "selected",                     BOOLEAN, SELECTED                     )
+DALI_PROPERTY_REGISTRATION( Toolkit, Button, "normal-state-actor",           MAP,     NORMAL_STATE_ACTOR           )
+DALI_PROPERTY_REGISTRATION( Toolkit, Button, "selected-state-actor",         MAP,     SELECTED_STATE_ACTOR         )
+DALI_PROPERTY_REGISTRATION( Toolkit, Button, "disabled-state-actor",         MAP,     DISABLED_STATE_ACTOR         )
+DALI_PROPERTY_REGISTRATION( Toolkit, Button, "label-actor",                  MAP,     LABEL_ACTOR                  )
+
+DALI_SIGNAL_REGISTRATION(   Toolkit, Button, "pressed",                               SIGNAL_PRESSED               )
+DALI_SIGNAL_REGISTRATION(   Toolkit, Button, "released",                              SIGNAL_RELEASED              )
+DALI_SIGNAL_REGISTRATION(   Toolkit, Button, "clicked",                               SIGNAL_CLICKED               )
+DALI_SIGNAL_REGISTRATION(   Toolkit, Button, "state-changed",                         SIGNAL_STATE_CHANGED         )
+
+DALI_ACTION_REGISTRATION(   Toolkit, Button, "button-click",                          ACTION_BUTTON_CLICK          )
 
 DALI_TYPE_REGISTRATION_END()
 
@@ -674,6 +674,8 @@ void Button::SetButtonImage( Actor image )
   }
 
   OnButtonImageSet();
+
+  RelayoutRequest();
 }
 
 Actor Button::GetButtonImage() const
@@ -709,6 +711,8 @@ void Button::SetSelectedImage( Actor image )
   }
 
   OnSelectedImageSet();
+
+  RelayoutRequest();
 }
 
 Actor Button::GetSelectedImage() const
@@ -742,6 +746,8 @@ void Button::SetBackgroundImage( Actor image )
   }
 
   OnBackgroundImageSet();
+
+  RelayoutRequest();
 }
 
 Actor Button::GetBackgroundImage() const
@@ -782,6 +788,8 @@ void Button::SetSelectedBackgroundImage( Actor image )
   }
 
   OnSelectedBackgroundImageSet();
+
+  RelayoutRequest();
 }
 
 Actor Button::GetSelectedBackgroundImage() const
index cf34f85..f07eb32 100644 (file)
@@ -113,7 +113,6 @@ void PushButton::OnLabelSet()
   {
     label.SetAnchorPoint( AnchorPoint::CENTER );
     label.SetParentOrigin( ParentOrigin::CENTER );
-    label.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
 
     Toolkit::TextLabel textLabel = Toolkit::TextLabel::DownCast( label );
     if( textLabel )
@@ -122,68 +121,44 @@ void PushButton::OnLabelSet()
       textLabel.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
       textLabel.SetProperty( Toolkit::TextLabel::Property::MULTI_LINE, true );
     }
+
+    ConfigureSizeNegotiation();
   }
 }
 
 void PushButton::OnButtonImageSet()
 {
-  Actor& buttonImage = GetButtonImage();
-
-  buttonImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
-
-  buttonImage.RelayoutRequestTree();
-
+  ConfigureSizeNegotiation();
   RelayoutRequest();
 }
 
 void PushButton::OnSelectedImageSet()
 {
-  Actor& selectedImage = GetSelectedImage();
-
-  selectedImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
-
-  selectedImage.RelayoutRequestTree();
-
+  ConfigureSizeNegotiation();
   RelayoutRequest();
 }
 
 void PushButton::OnBackgroundImageSet()
 {
-  Actor& backgroundImage = GetBackgroundImage();
-
-  backgroundImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
-
-  backgroundImage.RelayoutRequestTree();
-
+  ConfigureSizeNegotiation();
   RelayoutRequest();
 }
 
 void PushButton::OnSelectedBackgroundImageSet()
 {
-  Actor& selectedBackgroundImage = GetSelectedBackgroundImage();
-
-  selectedBackgroundImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
+  ConfigureSizeNegotiation();
+  RelayoutRequest();
 }
 
 void PushButton::OnDisabledImageSet()
 {
-  Actor& disabledImage = GetDisabledImage();
-
-  disabledImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
-
-  disabledImage.RelayoutRequestTree();
-
+  ConfigureSizeNegotiation();
   RelayoutRequest();
 }
 
 void PushButton::OnDisabledBackgroundImageSet()
 {
-  Actor& disabledBackgroundImage = GetDisabledBackgroundImage();
-
-  disabledBackgroundImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
-
-  disabledBackgroundImage.RelayoutRequestTree();
-
+  ConfigureSizeNegotiation();
   RelayoutRequest();
 }
 
@@ -578,27 +553,6 @@ void PushButton::OnControlSizeSet( const Vector3& targetSize )
   }
 }
 
-Vector3 PushButton::GetNaturalSize()
-{
-  Vector3 size;
-
-  // Check Image and Background image and use the largest size as the control's Natural size.
-  SizeOfActorIfLarger( GetButtonImage(), size );
-  SizeOfActorIfLarger( GetBackgroundImage(), size );
-
-  // If label, test against it's size
-  Toolkit::TextLabel label = Toolkit::TextLabel::DownCast( GetLabel() );
-  if( label )
-  {
-    Vector3 labelSize = label.GetNaturalSize();
-
-    size.width  = std::max( size.width,  labelSize.width  + TEXT_PADDING * 2.0f );
-    size.height = std::max( size.height, labelSize.height + TEXT_PADDING * 2.0f );
-  }
-
-  return size;
-}
-
 void PushButton::StartTransitionAnimation()
 {
   if( mTransitionAnimation )
@@ -659,6 +613,103 @@ void PushButton::TransitionAnimationFinished( Dali::Animation& source )
   StopTransitionAnimation();
 }
 
+Vector3 PushButton::GetNaturalSize()
+{
+  Vector3 size;
+
+  // If label, test against it's size
+  Toolkit::TextLabel label = Toolkit::TextLabel::DownCast( GetLabel() );
+  if( label )
+  {
+    size.width  = std::max( size.width,  label.GetRelayoutSize( Dimension::WIDTH ) );
+    size.height = std::max( size.height, label.GetRelayoutSize( Dimension::HEIGHT ) );
+  }
+  else
+  {
+    // Check Image and Background image and use the largest size as the control's Natural size.
+    SizeOfActorIfLarger( GetButtonImage(), size );
+    SizeOfActorIfLarger( GetBackgroundImage(), size );
+  }
+
+  return size;
+}
+
+void PushButton::OnSetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension )
+{
+  ConfigureSizeNegotiation();
+}
+
+void PushButton::ConfigureSizeNegotiation()
+{
+  ActorContainer images;
+  images.reserve( 7 );
+
+  images.push_back( GetButtonImage() );
+  images.push_back( GetSelectedImage() );
+  images.push_back( GetSelectedBackgroundImage() );
+  images.push_back( GetBackgroundImage() );
+  images.push_back( GetDisabledImage() );
+  images.push_back( GetDisabledSelectedImage() );
+  images.push_back( GetDisabledBackgroundImage() );
+
+  Actor label = GetLabel();
+
+  for( unsigned int i = 0; i < Dimension::DIMENSION_COUNT; ++i )
+  {
+    ConfigureSizeNegotiationDimension( static_cast< Dimension::Type >( 1 << i ), images, label );
+  }
+
+  if( label )
+  {
+    label.SetPadding( Padding( TEXT_PADDING, TEXT_PADDING, TEXT_PADDING, TEXT_PADDING) );
+  }
+}
+
+void PushButton::ConfigureSizeNegotiationDimension( Dimension::Type dimension, const ActorContainer& images, Actor& label )
+{
+  ResizePolicy::Type imageResizePolicy = ResizePolicy::FILL_TO_PARENT;
+  ResizePolicy::Type labelResizePolicy = ResizePolicy::FILL_TO_PARENT;
+
+  switch( Self().GetResizePolicy( dimension ) )
+  {
+    case ResizePolicy::FIT_TO_CHILDREN:
+    {
+      imageResizePolicy = labelResizePolicy = ResizePolicy::USE_NATURAL_SIZE;
+      break;
+    }
+    case ResizePolicy::USE_NATURAL_SIZE:
+    {
+      if( label )
+      {
+        labelResizePolicy = ResizePolicy::USE_NATURAL_SIZE;
+      }
+      else
+      {
+        imageResizePolicy = ResizePolicy::USE_NATURAL_SIZE;
+      }
+      break;
+    }
+    default:
+    {
+      break;
+    }
+  }
+
+  if( label )
+  {
+    label.SetResizePolicy( labelResizePolicy, dimension );
+  }
+
+  for( ActorConstIter it = images.begin(), itEnd = images.end(); it != itEnd; ++it )
+  {
+    Actor actor = *it;
+    if( actor )
+    {
+      actor.SetResizePolicy( imageResizePolicy, dimension );
+    }
+  }
+}
+
 } // namespace Internal
 
 } // namespace Toolkit
index 3eddddc..7a23474 100644 (file)
@@ -137,9 +137,14 @@ private: // From Control
   virtual void OnControlSizeSet( const Vector3& targetSize );
 
   /**
-   * @copydoc Toolkit::Control::GetNaturalSize()
+   * @copydoc Toolkit::Control::GetNaturalSize
    */
-  virtual Vector3 GetNaturalSize();
+  Vector3 GetNaturalSize();
+
+  /**
+   * @copydoc Toolkit::Control::OnSetResizePolicy
+   */
+  virtual void OnSetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension );
 
 private:
 
@@ -172,6 +177,20 @@ private:
    */
   void FadeOutImage( Actor& image, float opacity = 1.f, Vector3 scale = Vector3( 1.f, 1.f, 1.f ) );
 
+  /**
+   * @brief Custom configuration for size negotiation
+   */
+  void ConfigureSizeNegotiation();
+
+  /**
+   * @brief Configure size negotiation for a given dimension
+   *
+   * @param[in] dimension The dimension to configure
+   * @param[in] images The list of images to configure
+   * @param[in] label The text label to configure
+   */
+  void ConfigureSizeNegotiationDimension( Dimension::Type dimension, const ActorContainer& images, Actor& label );
+
   // slots
 
   /**
diff --git a/dali-toolkit/internal/controls/cluster/cluster-impl.cpp b/dali-toolkit/internal/controls/cluster/cluster-impl.cpp
deleted file mode 100644 (file)
index e2b4297..0000000
+++ /dev/null
@@ -1,583 +0,0 @@
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// CLASS HEADER
-#include <dali-toolkit/internal/controls/cluster/cluster-impl.h>
-
-// EXTERNAL INCLUDES
-#include <algorithm>
-#include <cstring> // for strcmp
-#include <dali/public-api/animation/animation.h>
-#include <dali/public-api/object/type-registry.h>
-#include <dali/public-api/object/type-registry-helper.h>
-#include <dali/integration-api/debug.h>
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/cluster/cluster-style.h>
-#include <dali-toolkit/internal/controls/cluster/cluster-style-impl.h>
-
-using namespace Dali;
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Internal
-{
-
-namespace
-{
-
-BaseHandle Create()
-{
-  Toolkit::ClusterStyleStandard s = Toolkit::ClusterStyleStandard::New( Toolkit::ClusterStyleStandard::ClusterStyle1 );
-  return Toolkit::Cluster::New( s );
-}
-
-DALI_TYPE_REGISTRATION_BEGIN( Toolkit::Cluster, Toolkit::Control, Create )
-
-DALI_ACTION_REGISTRATION( Cluster, "expand",    ACTION_EXPAND    )
-DALI_ACTION_REGISTRATION( Cluster, "collapse",  ACTION_COLLAPSE  )
-DALI_ACTION_REGISTRATION( Cluster, "transform", ACTION_TRANSFORM )
-
-DALI_TYPE_REGISTRATION_END()
-
-const float CLUSTER_STYLE_CONSTRAINT_DURATION = 1.0f;
-
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// Cluster
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-Dali::Toolkit::Cluster Cluster::New(Toolkit::ClusterStyle& style)
-{
-  // Create the implementation
-  ClusterPtr cluster(new Cluster(style));
-
-  // Pass ownership to CustomActor via derived handle
-  Dali::Toolkit::Cluster handle(*cluster);
-
-  // Second-phase init of the implementation
-  // This can only be done after the CustomActor connection has been made...
-  cluster->Initialize();
-
-  return handle;
-}
-
-Cluster::Cluster(Toolkit::ClusterStyle& style)
-: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_STYLE_CHANGE_SIGNALS ) ),
-  mClusterStyle(style),
-  mExpandedCount(0)
-{
-}
-
-void Cluster::OnInitialize()
-{
-}
-
-void Cluster::OnControlSizeSet( const Vector3& targetSize )
-{
-  mClusterSize = targetSize;
-  GetImpl(mClusterStyle).SetClusterSize(targetSize);
-
-  for(ChildInfoIter iter = mChildren.begin(); iter != mChildren.end(); ++iter)
-  {
-
-    if((*iter).mActor)
-    {
-      mClusterStyle.ApplyStyle( (*iter).mActor,
-                                (*iter).mPositionIndex,
-                                AlphaFunctions::EaseOut,
-                                0.f );
-    }
-  }
-
-  UpdateBackground(0.f);
-  UpdateTitle(0.f);
-}
-
-Cluster::~Cluster()
-{
-}
-
-void Cluster::AddChild( Actor child )
-{
-  // automatically add child with a position at end.
-  AddChild( child, mChildren.size() );
-}
-
-void Cluster::AddChild( Actor child, unsigned int positionIndex )
-{
-  AddChildInfo( ChildInfo(child, positionIndex) );
-}
-
-void Cluster::AddChildAt( Actor child, unsigned int index )
-{
-  // automatically add child with a position at end.
-  AddChild( child, mChildren.size() );
-}
-
-void Cluster::AddChildAt( Actor child, unsigned int positionIndex, unsigned int index )
-{
-  AddChildInfoAt( ChildInfo(child, positionIndex), index );
-}
-
-void Cluster::AddChildInfo( ChildInfo childInfo )
-{
-  AddChildInfoAt(childInfo, mChildren.size());
-}
-
-void Cluster::AddChildInfoAt( ChildInfo childInfo, unsigned int index )
-{
-  // check that the child is valid
-  DALI_ASSERT_ALWAYS( childInfo.mActor );
-
-  ChildInfoIter offset = index < mChildren.size() ? (mChildren.begin() + index) : mChildren.end();
-  // now perform customization on this child.
-
-  // adopt the child
-  if(childInfo.mActor.GetParent() != Self())
-  {
-    Actor& child = childInfo.mActor;
-    const float depth = std::distance(mChildren.begin(), offset);
-
-    Property::Index depthProperty = child.GetPropertyIndex(Toolkit::Cluster::CLUSTER_ACTOR_DEPTH);
-    if(depthProperty == Property::INVALID_INDEX)
-    {
-      child.RegisterProperty(Toolkit::Cluster::CLUSTER_ACTOR_DEPTH, depth);
-    }
-
-    // not added prior
-    Self().Add( childInfo.mActor );
-    mChildren.insert( offset, childInfo );
-
-    // Use parent position plus relative position.
-    child.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION_PLUS_LOCAL_POSITION );
-
-    // remove old constraints
-    child.RemoveConstraints();
-
-    // apply new constraints to the child
-    mClusterStyle.ApplyStyle(child, childInfo.mPositionIndex, AlphaFunctions::EaseOut, 0.0f);
-  }
-  else
-  {
-    // already added.
-    ChildInfoContainer mNewChildren;
-    ChildInfoIter iter = mChildren.begin();
-    float depth = 0.0f;
-
-    for( ; iter != mChildren.end(); ++iter)
-    {
-      if(iter == offset)
-      {
-        SetDepth(childInfo, depth);
-        depth++;
-        // insert the new childInfo before offset.
-        mNewChildren.push_back(childInfo);
-      }
-      // copy all children except the one that we wish to move.
-      if((*iter).mActor != childInfo.mActor)
-      {
-        SetDepth(*iter, depth);
-        depth++;
-        mNewChildren.push_back(*iter);
-      }
-    } // end for.
-
-    if(iter == offset)
-    {
-      SetDepth(childInfo, depth);
-      // insert the new childInfo before offset (end).
-      mNewChildren.push_back(childInfo);
-    }
-
-    mChildren = mNewChildren;
-
-    // Todo somehow adjust their perceived depth.
-  }
-}
-
-void Cluster::SetDepth( ChildInfo& childInfo, float depth )
-{
-  Property::Index depthProperty = childInfo.mActor.GetPropertyIndex(Toolkit::Cluster::CLUSTER_ACTOR_DEPTH);
-  childInfo.mActor.SetProperty( depthProperty, depth );
-}
-
-ChildInfo Cluster::GetChildInfoAt( unsigned int index )
-{
-  // check if we have this position in the cluster
-  if( index < mChildren.size() )
-  {
-    // return the child handle
-    return mChildren[ index ];
-  }
-
-  // return an empty handle
-  return ChildInfo();
-}
-
-Actor Cluster::GetChildAt( unsigned int index )
-{
-  // check if we have this position in the cluster
-  if( index < mChildren.size() )
-  {
-    // return the child handle
-    return mChildren[ index ].mActor;
-  }
-
-  // return an empty handle
-  return Actor();
-}
-
-Actor Cluster::RemoveChildAt( unsigned int index )
-{
-  DALI_ASSERT_ALWAYS( index < mChildren.size() );
-
-  ChildInfoIter iter = mChildren.begin() + index;
-  Actor child = (*iter).mActor;
-  mChildren.erase( iter );
-  Self().Remove(child);
-  // note: constraints will automatically be removed in OnControlChildRemove
-
-  // update depths.
-  float depth = 0.0f;
-
-  for(ChildInfoIter iter = mChildren.begin(); iter != mChildren.end(); ++iter)
-  {
-    SetDepth(*iter, depth);
-    depth++;
-  } // end for.
-
-  return child;
-}
-
-void Cluster::ExpandChild( unsigned int index )
-{
-  if( index < mChildren.size() )
-  {
-    ChildInfo& childInfo = mChildren[ index ];
-    DALI_ASSERT_ALWAYS(childInfo.mActor);
-
-    if(!childInfo.mExpanded)
-    {
-      // expand child to a random position/angle.
-      const Vector3 clusterSize = Self().GetCurrentSize();
-      const float length = clusterSize.Length() * 0.1f;
-      const float zOffset = 50.0f;
-      const float angle = (rand()%360) * Math::PI / 180.0f;
-      Vector3 position(sin(angle) * length, -cos(angle) * length, zOffset);
-      const float scale(1.2f);
-      const Radian rotate( Degree( (rand()%30) - 15 ) );
-
-      position += childInfo.mActor.GetCurrentPosition();
-
-      TransformChild(index,
-                     position,
-                     Vector3::ONE * scale,
-                     Quaternion(rotate, Vector3::ZAXIS),
-                     AlphaFunctions::EaseOut,
-                     0.5f);
-    }
-  }
-}
-
-void Cluster::ExpandAllChildren()
-{
-  for(unsigned int index = 0;index < mChildren.size(); index++)
-  {
-    ExpandChild( index );
-  }
-}
-
-void Cluster::CollapseChild( unsigned int index, bool front )
-{
-  if( index < mChildren.size() )
-  {
-    RestoreChild(index,
-                 AlphaFunctions::EaseOut,
-                 0.25f,
-                 front);
-  }
-}
-
-void Cluster::CollapseAllChildren( bool front )
-{
-  for(unsigned int index = 0;index < mChildren.size(); index++)
-  {
-    RestoreChild(index,
-                 AlphaFunctions::EaseOut,
-                 0.25f,
-                 front);
-  }
-}
-
-void Cluster::TransformChild( unsigned int index, const Vector3& position, const Vector3& scale, const Quaternion& rotation, AlphaFunction alpha, const TimePeriod& period )
-{
-  if( index < mChildren.size() )
-  {
-    ChildInfo& childInfo = mChildren[ index ];
-    DALI_ASSERT_ALWAYS(childInfo.mActor);
-
-    if(!childInfo.mExpanded)
-    {
-      Actor child = childInfo.mActor;
-      childInfo.mExpanded = true;
-      mExpandedCount++;
-
-      child.RemoveConstraints();
-      Animation animation = Animation::New(period.delaySeconds + period.durationSeconds);
-      animation.AnimateTo( Property(child, Actor::Property::POSITION), position, AlphaFunctions::EaseOut, period);
-      animation.AnimateTo( Property(child, Actor::Property::SCALE), scale, AlphaFunctions::EaseOut, period);
-      animation.AnimateTo( Property(child, Actor::Property::ORIENTATION), rotation, AlphaFunctions::EaseOut, period);
-      animation.Play();
-    }
-  }
-}
-
-void Cluster::RestoreChild( unsigned int index, AlphaFunction alpha, const TimePeriod& period, bool front )
-{
-  if( index < mChildren.size() )
-  {
-    ChildInfo& childInfo = mChildren[ index ];
-    DALI_ASSERT_ALWAYS(childInfo.mActor);
-
-    if(childInfo.mExpanded)
-    {
-      Actor child = childInfo.mActor;
-      childInfo.mExpanded = false;
-      mExpandedCount--;
-      mClusterStyle.ApplyStyle( child, childInfo.mPositionIndex, alpha, period );
-
-      const unsigned int hideIndex = front ? mChildren.size() : 0;
-      AddChildInfoAt(childInfo, hideIndex); // move child info to the back or front of the pack.
-    }
-  }
-}
-
-void Cluster::SetBackgroundImage( Actor image )
-{
-  // Replaces the background image.
-  if(mBackgroundImage && mBackgroundImage.GetParent())
-  {
-    mBackgroundImage.GetParent().Remove(mBackgroundImage);
-  }
-
-  mBackgroundImage = image;
-  Self().Add(mBackgroundImage);
-
-  mBackgroundImage.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-  mBackgroundImage.SetParentOrigin( ParentOrigin::TOP_LEFT );
-
-  UpdateBackground(0.0f);
-}
-
-void Cluster::SetTitle( Actor text )
-{
-  // Replaces the title actor.
-  if(mTitle && mTitle.GetParent())
-  {
-    mTitle.GetParent().Remove( mTitle );
-  }
-
-  mTitle = text;
-  Self().Add( mTitle );
-
-  mTitle.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-  mTitle.SetParentOrigin( ParentOrigin::TOP_LEFT );
-
-  UpdateTitle(0.0f);
-}
-
-void Cluster::SetStyle(Toolkit::ClusterStyle style)
-{
-  unsigned int previousChildrenNum = mChildren.size();
-  mClusterStyle = style;
-  GetImpl(mClusterStyle).SetClusterSize(mClusterSize);
-  unsigned int newChildrenNum = mClusterStyle.GetMaximumNumberOfChildren();
-
-  // New style supports less children (remove those that no longer belong)
-  if(newChildrenNum < previousChildrenNum)
-  {
-    ChildInfoIter removeStart = mChildren.begin() + newChildrenNum;
-
-    for(ChildInfoIter iter = removeStart; iter != mChildren.end(); ++iter)
-    {
-      Actor child = (*iter).mActor;
-      child.RemoveConstraints();
-      Self().Remove(child);
-    }
-
-    mChildren.erase( removeStart, mChildren.end() );
-  }
-
-  for(ChildInfoIter iter = mChildren.begin(); iter != mChildren.end(); ++iter)
-  {
-
-    if((*iter).mActor)
-    {
-      mClusterStyle.ApplyStyle( (*iter).mActor,
-                        (*iter).mPositionIndex,
-                        AlphaFunctions::EaseOut,
-                        CLUSTER_STYLE_CONSTRAINT_DURATION );
-    }
-  }
-
-  UpdateBackground(CLUSTER_STYLE_CONSTRAINT_DURATION);
-  UpdateTitle(CLUSTER_STYLE_CONSTRAINT_DURATION);
-}
-
-Toolkit::ClusterStyle Cluster::GetStyle() const
-{
-  return mClusterStyle;
-}
-
-unsigned int Cluster::GetExpandedCount() const
-{
-  return mExpandedCount;
-}
-
-unsigned int Cluster::GetTotalCount() const
-{
-  return mChildren.size();
-}
-
-void Cluster::UpdateBackground(float duration)
-{
-  if (mBackgroundImage)
-  {
-    mClusterStyle.ApplyStyleToBackground(mBackgroundImage, AlphaFunctions::EaseOut, duration);
-  }
-}
-
-void Cluster::UpdateTitle(float duration)
-{
-  if (mTitle)
-  {
-    mClusterStyle.ApplyStyleToTitle(mTitle, AlphaFunctions::EaseOut, duration);
-  }
-}
-
-void Cluster::DoExpandAction(const PropertyValueContainer& attributes)
-{
-  if(attributes.size() >= 1)
-  {
-    for(PropertyValueConstIter iter = attributes.begin(); iter != attributes.end(); ++iter)
-    {
-      const Property::Value& value = *iter;
-
-      DALI_ASSERT_ALWAYS(value.GetType() == Property::FLOAT);
-      unsigned int index = value.Get<float>();
-      ExpandChild( index );
-    }
-  }
-  else
-  {
-    ExpandAllChildren();
-  }
-}
-
-void Cluster::DoCollapseAction(const PropertyValueContainer& attributes)
-{
-  if(attributes.size() >= 1)
-  {
-    for(PropertyValueConstIter iter = attributes.begin(); iter != attributes.end(); ++iter)
-    {
-      const Property::Value& value = *iter;
-
-      DALI_ASSERT_ALWAYS(value.GetType() == Property::FLOAT);
-      unsigned int index = value.Get<float>();
-      CollapseChild( index, false );
-    }
-  }
-  else
-  {
-    CollapseAllChildren( false );
-  }
-}
-
-void Cluster::DoTransformAction(const PropertyValueContainer& attributes)
-{
-  DALI_ASSERT_ALWAYS(attributes.size() >= 2);
-
-  DALI_ASSERT_ALWAYS(attributes[0].GetType() == Property::FLOAT);
-  unsigned int index = attributes[0].Get<float>();
-  Vector3 position;
-  Vector3 scale(Vector3::ONE);
-  Quaternion rotation( Dali::ANGLE_0, Vector3::ZAXIS );
-
-  DALI_ASSERT_ALWAYS(attributes[1].GetType() == Property::VECTOR3);
-  attributes[1].Get(position);
-
-  if(attributes.size()>2)
-  {
-    attributes[2].Get(scale);
-  }
-
-  if(attributes.size()>3)
-  {
-    attributes[3].Get(rotation);
-  }
-
-  // wrap index around -1 => size - 1
-  index%= mChildren.size();
-
-  TransformChild(index, position, scale, rotation, AlphaFunctions::EaseOut, 0.5f);
-}
-
-void Cluster::OnControlChildRemove(Actor& child)
-{
-  child.RemoveConstraints();
-}
-
-bool Cluster::DoAction(BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes)
-{
-  bool ret = false;
-
-  Dali::BaseHandle handle( object );
-
-  Toolkit::Cluster cluster = Toolkit::Cluster::DownCast( handle );
-
-  DALI_ASSERT_ALWAYS( cluster );
-
-  if( 0 == strcmp( actionName.c_str(), ACTION_EXPAND ) )
-  {
-    GetImpl( cluster ).DoExpandAction( attributes );
-    ret = true;
-  }
-  else if( 0 == strcmp( actionName.c_str(), ACTION_COLLAPSE ) )
-  {
-    GetImpl( cluster ).DoCollapseAction( attributes );
-    ret = true;
-  }
-  else if( 0 == strcmp( actionName.c_str(), ACTION_TRANSFORM ) )
-  {
-    GetImpl( cluster ).DoTransformAction( attributes );
-    ret = true;
-  }
-
-  return ret;
-}
-
-} // namespace Internal
-
-} // namespace Toolkit
-
-} // namespace Dali
diff --git a/dali-toolkit/internal/controls/cluster/cluster-impl.h b/dali-toolkit/internal/controls/cluster/cluster-impl.h
deleted file mode 100644 (file)
index 17585fe..0000000
+++ /dev/null
@@ -1,325 +0,0 @@
-#ifndef __DALI_TOOLKIT_INTERNAL_CLUSTER_H__
-#define __DALI_TOOLKIT_INTERNAL_CLUSTER_H__
-
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <dali/public-api/object/ref-object.h>
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/cluster/cluster.h>
-#include <dali-toolkit/public-api/controls/cluster/cluster-style.h>
-#include <dali-toolkit/public-api/controls/control-impl.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Internal
-{
-
-class Cluster;
-
-typedef IntrusivePtr<Cluster> ClusterPtr;
-
-class ChildInfo
-{
-
-public:
-
-  ChildInfo()
-  : mExpanded(false)
-  {
-  }
-
-  ChildInfo(Actor actor, unsigned int positionIndex)
-  : mActor(actor),
-    mExpanded(false),
-    mPositionIndex(positionIndex)
-  {
-  }
-
-  Actor mActor;
-  bool mExpanded;
-  unsigned int mPositionIndex;
-};
-
-typedef std::vector<ChildInfo> ChildInfoContainer;
-typedef ChildInfoContainer::iterator ChildInfoIter;
-typedef ChildInfoContainer::const_iterator ChildInfoConstIter;
-
-/**
- * Cluster is a container of grouped actors positioned in different cluster styles.
- * Multiple cluster styles may be provided, to determine the position, size, rotation, scale, color and visibility
- * of the child actors in the cluster.
- */
-class Cluster : public Control
-{
-public:
-
-  /**
-   * Create a new Cluster.
-   * @param[in] style of the cluster
-   * @return A public handle to the newly allocated Cluster.
-   */
-  static Dali::Toolkit::Cluster New(Toolkit::ClusterStyle& style);
-
-  /**
-   * @copydoc Toolkit::Cluster::AddChild( Actor child )
-   */
-  void AddChild( Actor child );
-
-  /**
-   * @copydoc Toolkit::Cluster::AddChild( Actor child, unsigned int positionIndex )
-   */
-  void AddChild( Actor child, unsigned int positionIndex );
-
-  /**
-   * @copydoc Toolkit::Cluster::AddChildAt( Actor child, unsigned int index );
-   */
-  void AddChildAt( Actor child, unsigned int index );
-
-  /**
-   * @copydoc Toolkit::Cluster::AddChildAt( Actor child, unsigned int positionIndex, unsigned int index );
-   */
-  void AddChildAt( Actor child, unsigned int positionIndex, unsigned int index );
-
-  /**
-   * Adds a ChildInfo struct to the end of the children list.
-   * @param[in] childInfo the child info to that to children list.
-   */
-  void AddChildInfo( ChildInfo childInfo );
-
-  /**
-   * Adds a ChildInfo struct before the specified index.
-   * @param[in] childInfo the child info to that to children list.
-   * @param[in] index the index within the children list to insert
-   * ChildInfo
-   */
-  void AddChildInfoAt( ChildInfo childInfo, unsigned int index );
-
-  /**
-   * @copydoc Toolkit::Cluster::GetChildAt
-   */
-  Actor GetChildAt( unsigned int index );
-
-  /**
-   * @copydoc Toolkit::Cluster::RemoveChildAt
-   */
-  Actor RemoveChildAt( unsigned int index );
-
-  /**
-   * @copydoc Toolkit::Cluster::ExpandChild
-   */
-  void ExpandChild( unsigned int index );
-
-  /**
-   * @copydoc Toolkit::Cluster::ExpandAllChildren
-   */
-  void ExpandAllChildren();
-
-  /**
-   * @copydoc Toolkit::Cluster::CollapseChild
-   */
-  void CollapseChild( unsigned int index, bool front );
-
-  /**
-   * @copydoc Toolkit::Cluster::CollapseAllChildren
-   */
-  void CollapseAllChildren( bool front );
-
-  /**
-   * @copydoc Toolkit::Cluster::TransformChild
-   */
-  void TransformChild( unsigned int index, const Vector3& position, const Vector3& scale, const Quaternion& rotation, AlphaFunction alpha, const TimePeriod& period );
-
-  /**
-   * @copydoc Toolkit::Cluster::RestoreChild
-   */
-  void RestoreChild( unsigned int index, AlphaFunction alpha, const TimePeriod& period, bool front );
-
-  /**
-   * @copydoc Toolkit::Cluster::SetBackgroundImage
-   */
-  void SetBackgroundImage( Actor image );
-
-  /**
-   * @copydoc Toolkit::Cluster::SetTitle
-   */
-  void SetTitle( Actor text );
-
-  /**
-   * @copydoc Toolkit::Cluster::SetStyle
-   */
-  void SetStyle(Toolkit::ClusterStyle style);
-
-  /**
-   * @copydoc Toolkit::Cluster::GetStyle
-   */
-  Toolkit::ClusterStyle GetStyle() const;
-
-  /**
-   * @copydoc Toolkit::Cluster::GetExpandedCount
-   */
-  unsigned int GetExpandedCount() const;
-
-  /**
-   * @copydoc Toolkit::Cluster::GetTotalCount
-   */
-  unsigned int GetTotalCount() const;
-
-private:
-
-  ChildInfo GetChildInfoAt( unsigned int index );
-
-  void SetDepth( ChildInfo& childInfo, float depth );
-
-  /**
-   * Updates the style of the Background
-   * (occurs when either background changes or style changes)
-   * @param[in] duration apply duration for style
-   */
-  void UpdateBackground(float duration);
-
-  /**
-   * Updates the style of the Title
-   * (occurs when either background changes or style changes)
-   * @param[in] duration apply duration for style
-   */
-  void UpdateTitle(float duration);
-
-  /**
-   * Action: Expand
-   * Expands one or more actors.
-   *
-   * @param[in] attributes list of indices of actors to expand.
-   * (if no attributes specifies, then all actors expand)
-   */
-  void DoExpandAction(const PropertyValueContainer& attributes);
-
-  /**
-   * Action: Collapse
-   * Collapses one or more actors.
-   *
-   * @param[in] attributes list of indices of actors to collapse.
-   * (if no attributes specifies, then all actors collapse)
-   */
-  void DoCollapseAction(const PropertyValueContainer& attributes);
-
-  /**
-   * Action: Transform
-   * Transforms one actor (index) to a specified position (Vector3),
-   * scale (Vector3), and rotation (Quaternion).
-   *
-   * @param[in] attributes index and transform values.
-   */
-  void DoTransformAction(const PropertyValueContainer& attributes);
-
-private: // From Control
-  /**
-   * From Control; called shortly before a child is removed from the owning actor.
-   * @param[in] child The child being removed.Ptr
-   */
-  virtual void OnControlChildRemove(Actor& child);
-
-public:
-
-  /**
-   * Performs actions as requested using the action name.
-   * @param[in] object The object on which to perform the action.
-   * @param[in] actionName The action to perform.
-   * @param[in] attributes The attributes with which to perfrom this action.
-   * @return true if action has been accepted by this control
-   */
-  static bool DoAction(BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes);
-
-private: // From Control
-
-  /**
-   * @copydoc Toolkit::Control::OnInitialize()
-   */
-  virtual void OnInitialize();
-
-  /**
-   *
-   * @copydoc Toolkit::Control::OnControlSizeSet( const Vector3& targetSize )
-   */
-  virtual void OnControlSizeSet( const Vector3& targetSize );
-
-protected:
-
-  /**
-   * Construct a new Cluster.
-   * @param[in] style of the cluster
-   */
-  Cluster(Toolkit::ClusterStyle& style);
-
-  /**
-   * A reference counted object may only be deleted by calling Unreference()
-   */
-  virtual ~Cluster();
-
-private:
-
-  // Undefined
-  Cluster(const Cluster&);
-
-  // Undefined
-  Cluster& operator=(const Cluster& rhs);
-
-private:
-
-  Toolkit::ClusterStyle mClusterStyle;
-  ChildInfoContainer mChildren;
-  Vector3 mClusterSize;
-
-  Actor mBackgroundImage;           ///< Stores the background image.
-  Actor mTitle;                     ///< Stores the text title.
-  unsigned int mExpandedCount;      ///< A count of how many children have been expanded.
-
-};
-
-} // namespace Internal
-
-// Helpers for public-api forwarding methods
-
-inline Toolkit::Internal::Cluster& GetImpl(Toolkit::Cluster& cluster)
-{
-  DALI_ASSERT_ALWAYS(cluster);
-
-  Dali::RefObject& handle = cluster.GetImplementation();
-
-  return static_cast<Toolkit::Internal::Cluster&>(handle);
-}
-
-inline const Toolkit::Internal::Cluster& GetImpl(const Toolkit::Cluster& cluster)
-{
-  DALI_ASSERT_ALWAYS(cluster);
-
-  const Dali::RefObject& handle = cluster.GetImplementation();
-
-  return static_cast<const Toolkit::Internal::Cluster&>(handle);
-}
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // __DALI_TOOLKIT_INTERNAL_CLUSTER_H__
diff --git a/dali-toolkit/internal/controls/cluster/cluster-style-impl.cpp b/dali-toolkit/internal/controls/cluster/cluster-style-impl.cpp
deleted file mode 100644 (file)
index 16dd5ea..0000000
+++ /dev/null
@@ -1,486 +0,0 @@
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// CLASS HEADER
-#include <dali-toolkit/internal/controls/cluster/cluster-style-impl.h>
-
-// EXTERNAL INCLUDES
-#include <dali/public-api/animation/animation.h>
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/cluster/cluster.h>
-
-namespace Dali
-{
-
-namespace // unnamed namespace
-{
-// Cluster style one
-
-const unsigned int STYLE_1_CHILDREN_NUMBER = 8;
-
-const float STYLE_1_BACKGROUND_IMAGE_OFFSET_Z = 1.0f;
-
-const float STYLE_1_CHILD_OFFSET_Z = 2.0f;
-const float STYLE_1_CHILD_GAP_FACTOR = 0.03f;
-const float STYLE_1_CHILD_SIZE_FACTOR[] = { 0.4f, 0.15f, 0.25f, 0.15f, 0.4f, 0.15f, 0.25f, 0.15f };
-const Vector3 STYLE_1_CHILD_POSITION_FACTOR[] = { Vector3(0.5f - STYLE_1_CHILD_SIZE_FACTOR[0] - STYLE_1_CHILD_GAP_FACTOR * 0.5f,
-                                                            0.5f - STYLE_1_CHILD_SIZE_FACTOR[0] - STYLE_1_CHILD_GAP_FACTOR * 0.5f,
-                                                            STYLE_1_CHILD_OFFSET_Z),
-                                                    Vector3(0.5f + STYLE_1_CHILD_GAP_FACTOR * 0.5f,
-                                                            0.5f - STYLE_1_CHILD_SIZE_FACTOR[1] - STYLE_1_CHILD_SIZE_FACTOR[2] - STYLE_1_CHILD_GAP_FACTOR * 1.5f,
-                                                            STYLE_1_CHILD_OFFSET_Z + 0.5f),
-                                                    Vector3(0.5f + STYLE_1_CHILD_GAP_FACTOR * 0.5f,
-                                                            0.5f - STYLE_1_CHILD_SIZE_FACTOR[2] - STYLE_1_CHILD_GAP_FACTOR * 0.5f,
-                                                            STYLE_1_CHILD_OFFSET_Z + 1.0f),
-                                                    Vector3(0.5f + STYLE_1_CHILD_SIZE_FACTOR[2] + STYLE_1_CHILD_GAP_FACTOR * 1.5f,
-                                                            0.5f - STYLE_1_CHILD_SIZE_FACTOR[3] - STYLE_1_CHILD_GAP_FACTOR * 0.5f,
-                                                            STYLE_1_CHILD_OFFSET_Z + 1.5f),
-                                                    Vector3(0.5f + STYLE_1_CHILD_GAP_FACTOR * 0.5f,
-                                                            0.5f + STYLE_1_CHILD_GAP_FACTOR * 0.5f,
-                                                            STYLE_1_CHILD_OFFSET_Z + 2.0f),
-                                                    Vector3(0.5f - STYLE_1_CHILD_SIZE_FACTOR[5] - STYLE_1_CHILD_GAP_FACTOR * 0.5f,
-                                                            0.5f + STYLE_1_CHILD_SIZE_FACTOR[6] + STYLE_1_CHILD_GAP_FACTOR * 1.5f,
-                                                            STYLE_1_CHILD_OFFSET_Z + 2.5f),
-                                                    Vector3(0.5f - STYLE_1_CHILD_SIZE_FACTOR[6] - STYLE_1_CHILD_GAP_FACTOR * 0.5f,
-                                                            0.5f + STYLE_1_CHILD_GAP_FACTOR * 0.5f,
-                                                            STYLE_1_CHILD_OFFSET_Z + 3.0f),
-                                                    Vector3(0.5f - STYLE_1_CHILD_SIZE_FACTOR[6] - STYLE_1_CHILD_SIZE_FACTOR[7] - STYLE_1_CHILD_GAP_FACTOR * 1.5f,
-                                                            0.5f + STYLE_1_CHILD_GAP_FACTOR * 0.5f,
-                                                            STYLE_1_CHILD_OFFSET_Z + 3.5f) };
-
-const Vector3 STYLE_1_TITLE_SIZE_FACTOR = Vector3(0.3f, 0.11f, 1.0f);
-const Vector3 STYLE_1_TITLE_POSITION_FACTOR = Vector3(0.5f - STYLE_1_CHILD_SIZE_FACTOR[0] - STYLE_1_CHILD_GAP_FACTOR * 0.5f,
-                                                        0.5f - STYLE_1_CHILD_SIZE_FACTOR[0] - STYLE_1_CHILD_GAP_FACTOR * 0.5f - STYLE_1_TITLE_SIZE_FACTOR.height + 0.02f,
-                                                        0.0f);
-const Vector3 STYLE_1_TITLE_POSITION_OFFSET = Vector3(0.0f, 0.0f, 8.0f);
-
-// Cluster style two
-
-const unsigned int STYLE_2_CHILDREN_NUMBER = 6;
-
-const float STYLE_2_BACKGROUND_IMAGE_OFFSET_Z = 1.0f;
-
-const float STYLE_2_CHILD_OFFSET_Z = 2.0f;
-const float STYLE_2_CHILD_GAP_FACTOR = 0.03f;
-const float STYLE_2_CHILD_SIZE_FACTOR[] = { 0.4f, 0.25f, 0.15f, 0.4f, 0.25f, 0.15f };
-const Vector3 STYLE_2_CHILD_POSITION_FACTOR[] = { Vector3(0.5f - STYLE_2_CHILD_SIZE_FACTOR[0] - STYLE_2_CHILD_GAP_FACTOR * 0.5f,
-                                                            0.5f - STYLE_2_CHILD_SIZE_FACTOR[0] * 0.75f,
-                                                            STYLE_2_CHILD_OFFSET_Z),
-                                                    Vector3(0.5f + STYLE_2_CHILD_GAP_FACTOR * 0.5f,
-                                                            0.5f - STYLE_2_CHILD_SIZE_FACTOR[1] - STYLE_2_CHILD_SIZE_FACTOR[3] * 0.25f - STYLE_2_CHILD_GAP_FACTOR,
-                                                            STYLE_2_CHILD_OFFSET_Z + 0.5f),
-                                                    Vector3(0.5f + STYLE_2_CHILD_SIZE_FACTOR[1] + STYLE_2_CHILD_GAP_FACTOR * 1.5f,
-                                                            0.5f - STYLE_2_CHILD_SIZE_FACTOR[2] - STYLE_2_CHILD_SIZE_FACTOR[3] * 0.25f - STYLE_2_CHILD_GAP_FACTOR,
-                                                            STYLE_2_CHILD_OFFSET_Z + 1.0f),
-                                                    Vector3(0.5f + STYLE_2_CHILD_GAP_FACTOR * 0.5f,
-                                                            0.5f - STYLE_2_CHILD_SIZE_FACTOR[3] * 0.25f,
-                                                            STYLE_2_CHILD_OFFSET_Z + 1.5f),
-                                                    Vector3(0.5f - STYLE_2_CHILD_SIZE_FACTOR[4] - STYLE_2_CHILD_GAP_FACTOR * 0.5f,
-                                                            0.5f + STYLE_2_CHILD_SIZE_FACTOR[0] * 0.25f + STYLE_2_CHILD_GAP_FACTOR,
-                                                            STYLE_2_CHILD_OFFSET_Z + 2.0f),
-                                                    Vector3(0.5f - STYLE_2_CHILD_SIZE_FACTOR[4] - STYLE_2_CHILD_SIZE_FACTOR[5] - STYLE_2_CHILD_GAP_FACTOR * 1.5f,
-                                                            0.5f + STYLE_2_CHILD_SIZE_FACTOR[0] * 0.25f + STYLE_2_CHILD_GAP_FACTOR,
-                                                            STYLE_2_CHILD_OFFSET_Z + 2.5f) };
-
-const Vector3 STYLE_2_TITLE_SIZE_FACTOR = Vector3(0.3f, 0.11f, 1.0f);
-const Vector3 STYLE_2_TITLE_POSITION_FACTOR = Vector3(0.5f - STYLE_2_CHILD_SIZE_FACTOR[0] - STYLE_2_CHILD_GAP_FACTOR * 0.5f,
-                                                        0.5f - STYLE_2_CHILD_SIZE_FACTOR[0] * 0.75f - STYLE_2_TITLE_SIZE_FACTOR.height + 0.02f,
-                                                        0.0f);
-const Vector3 STYLE_2_TITLE_POSITION_OFFSET = Vector3(0.0f, 0.0f, 8.0f);
-
-// Cluster style three
-
-const unsigned int STYLE_3_CHILDREN_NUMBER = 6;
-
-const Vector3 STYLE_3_TITLE_SIZE_FACTOR = Vector3(0.4f, 0.15f, 1.0f);
-
-const float STYLE_3_BACKGROUND_IMAGE_OFFSET_Z = 1.0f;
-
-const float STYLE_3_CHILD_OFFSET_Z = 2.0f;
-const float STYLE_3_CHILD_GAP_FACTOR = 0.03f;
-const float STYLE_3_CHILD_SIZE_FACTOR[] = { 0.4f, 0.4f, 0.15f, 0.25f, 0.25f, 0.15f };
-const float STYLE_3_CHILD_POSITION_OFFSET_Y = (1.0f - STYLE_3_CHILD_SIZE_FACTOR[0] - STYLE_3_CHILD_SIZE_FACTOR[3] - STYLE_3_CHILD_GAP_FACTOR - STYLE_3_TITLE_SIZE_FACTOR.height) * 0.5f;
-const Vector3 STYLE_3_CHILD_POSITION_FACTOR[] = { Vector3(0.5f - STYLE_3_CHILD_SIZE_FACTOR[0] - STYLE_3_CHILD_GAP_FACTOR * 0.5f,
-                                                              0.5f - STYLE_3_CHILD_SIZE_FACTOR[0] - STYLE_3_CHILD_GAP_FACTOR * 0.5f + STYLE_3_CHILD_POSITION_OFFSET_Y,
-                                                              STYLE_3_CHILD_OFFSET_Z),
-                                                      Vector3(0.5f + STYLE_3_CHILD_GAP_FACTOR * 0.5f,
-                                                              0.5f - STYLE_3_CHILD_SIZE_FACTOR[1] - STYLE_3_CHILD_GAP_FACTOR * 0.5f + STYLE_3_CHILD_POSITION_OFFSET_Y,
-                                                              STYLE_3_CHILD_OFFSET_Z + 0.5f),
-                                                      Vector3(0.5f + STYLE_3_CHILD_SIZE_FACTOR[3] + STYLE_3_CHILD_GAP_FACTOR * 1.5f,
-                                                              0.5f + STYLE_3_CHILD_GAP_FACTOR * 0.5f + STYLE_3_CHILD_POSITION_OFFSET_Y,
-                                                              STYLE_3_CHILD_OFFSET_Z + 1.0f),
-                                                      Vector3(0.5f + STYLE_3_CHILD_GAP_FACTOR * 0.5f,
-                                                              0.5f + STYLE_3_CHILD_GAP_FACTOR * 0.5f + STYLE_3_CHILD_POSITION_OFFSET_Y,
-                                                              STYLE_3_CHILD_OFFSET_Z + 1.5f),
-                                                      Vector3(0.5f - STYLE_3_CHILD_SIZE_FACTOR[4] - STYLE_3_CHILD_GAP_FACTOR * 0.5f,
-                                                              0.5f + STYLE_3_CHILD_GAP_FACTOR * 0.5f + STYLE_3_CHILD_POSITION_OFFSET_Y,
-                                                              STYLE_3_CHILD_OFFSET_Z + 2.0f),
-                                                      Vector3(0.5f - STYLE_3_CHILD_SIZE_FACTOR[4] - STYLE_3_CHILD_SIZE_FACTOR[5] - STYLE_3_CHILD_GAP_FACTOR * 1.5f,
-                                                              0.5f + STYLE_3_CHILD_GAP_FACTOR * 0.5f + STYLE_3_CHILD_POSITION_OFFSET_Y,
-                                                              STYLE_3_CHILD_OFFSET_Z + 2.5f) };
-
-const Vector3 STYLE_3_TITLE_POSITION_FACTOR = Vector3(0.5f - STYLE_3_CHILD_SIZE_FACTOR[0] - STYLE_3_CHILD_GAP_FACTOR * 0.5f,
-                                                          0.5f - STYLE_3_CHILD_SIZE_FACTOR[0] - STYLE_3_CHILD_GAP_FACTOR * 0.5f + STYLE_3_CHILD_POSITION_OFFSET_Y - STYLE_3_TITLE_SIZE_FACTOR.height + 0.02f,
-                                                          0.0f);
-const Vector3 STYLE_3_TITLE_POSITION_OFFSET = Vector3(0.0f, 0.0f, 8.0f);
-
-// Cluster style four
-
-const unsigned int STYLE_4_CHILDREN_NUMBER = 6;
-
-const float STYLE_4_BACKGROUND_IMAGE_OFFSET_Z = 1.0f;
-
-const float STYLE_4_CHILD_OFFSET_Z = 2.0f;
-const float STYLE_4_CHILD_GAP_FACTOR = 0.03f;
-const float STYLE_4_CHILD_SIZE_FACTOR[] = { 0.4f, 0.22f, 0.13f, 0.4f, 0.22f, 0.13f };
-const Vector3 STYLE_4_CHILD_POSITION_FACTOR[] = { Vector3(0.5f - STYLE_4_CHILD_SIZE_FACTOR[0] * 0.9f,
-                                                             0.5f - STYLE_4_CHILD_SIZE_FACTOR[0] - STYLE_4_CHILD_GAP_FACTOR * 0.5f,
-                                                             STYLE_4_CHILD_OFFSET_Z),
-                                                     Vector3(0.5f + STYLE_4_CHILD_SIZE_FACTOR[0] * 0.1f + STYLE_4_CHILD_GAP_FACTOR,
-                                                             0.5f - STYLE_4_CHILD_SIZE_FACTOR[1] - STYLE_4_CHILD_GAP_FACTOR * 0.5f,
-                                                             STYLE_4_CHILD_OFFSET_Z + 0.5f),
-                                                     Vector3(0.5f + STYLE_4_CHILD_SIZE_FACTOR[0] * 0.1f + STYLE_4_CHILD_SIZE_FACTOR[1] + STYLE_4_CHILD_GAP_FACTOR * 2.0f,
-                                                             0.5f - STYLE_4_CHILD_SIZE_FACTOR[2] - STYLE_4_CHILD_GAP_FACTOR * 0.5f,
-                                                             STYLE_4_CHILD_OFFSET_Z + 1.0f),
-                                                     Vector3(0.5f - STYLE_4_CHILD_SIZE_FACTOR[3] * 0.1f,
-                                                             0.5f + STYLE_4_CHILD_GAP_FACTOR * 0.5f,
-                                                             STYLE_4_CHILD_OFFSET_Z + 1.5f),
-                                                     Vector3(0.5f - STYLE_4_CHILD_SIZE_FACTOR[3] * 0.1f - STYLE_4_CHILD_SIZE_FACTOR[4] - STYLE_4_CHILD_GAP_FACTOR,
-                                                             0.5f + STYLE_4_CHILD_GAP_FACTOR * 0.5f,
-                                                             STYLE_4_CHILD_OFFSET_Z + 2.0f),
-                                                     Vector3(0.5f - STYLE_4_CHILD_SIZE_FACTOR[3] * 0.1f - STYLE_4_CHILD_SIZE_FACTOR[4] - STYLE_4_CHILD_SIZE_FACTOR[5] - STYLE_4_CHILD_GAP_FACTOR * 2.0f,
-                                                             0.5f + STYLE_4_CHILD_GAP_FACTOR * 0.5f,
-                                                             STYLE_4_CHILD_OFFSET_Z + 2.5f) };
-
-const Vector3 STYLE_4_TITLE_SIZE_FACTOR = Vector3(0.3f, 0.11f, 1.0f);
-const Vector3 STYLE_4_TITLE_POSITION_FACTOR = Vector3(0.5f - STYLE_4_CHILD_SIZE_FACTOR[0] * 0.9f,
-                                                         0.5f - STYLE_4_CHILD_SIZE_FACTOR[0] - STYLE_4_CHILD_GAP_FACTOR * 0.5f - STYLE_4_TITLE_SIZE_FACTOR.height + 0.02f,
-                                                         0.0f);
-const Vector3 STYLE_4_TITLE_POSITION_OFFSET = Vector3(0.0f, 0.0f, 8.0f);
-const unsigned int CLUSTER_RANDOM_SEED(0x17eac9f3);         ///< Random seed for cluster data.
-
-const int STYLE_RANDOM_CHILDREN_NUMBER = 16;
-
-Vector3 FirstOrderEquation( const Vector3& source, const Vector3& relative, const Vector3& offset = Vector3::ZERO  )
-{
-  return source * relative + offset;
-}
-
-// random data generator //////////////////////////////////////////////////////
-
-const unsigned int GEN_RAND_CONST = 0x15d9a373;
-
-unsigned int genRandom(unsigned int& seed, unsigned int offset)
-{
-  unsigned int shft = offset&31;
-
-  offset++;
-
-  seed^= (seed << (shft) | seed >> (32 - shft)) * (offset * GEN_RAND_CONST);
-
-  return seed;
-}
-
-float genRandomFloat(unsigned int& seed, unsigned int offset, float min, float max)
-{
-  const float f = static_cast<float>(genRandom(seed, offset)) / 0xffffffff;
-  return f * (max - min) + min;
-}
-
-} // unnamed namespace
-
-namespace Toolkit
-{
-
-namespace Internal
-{
-
-// ClusterStyle ///////////////////////////////////////////////////////////////
-
-ClusterStyle::ClusterStyle()
-: mMaxChildren(0),
-  mTitlePositionRelative(Vector3::ONE),
-  mTitlePositionOffset(Vector3::ZERO),
-  mTitleSize(Vector3::ONE),
-  mBackgroundPositionRelative(Vector3::ONE),
-  mBackgroundPositionOffset(Vector3::ZERO),
-  mBackgroundSize(Vector3::ONE),
-  mClusterSize( Vector3::ZERO )
-{
-}
-
-ClusterStyle::~ClusterStyle()
-{
-
-}
-
-void ClusterStyle::SetMaximumNumberOfChildren(unsigned int maxChildren)
-{
-  mMaxChildren = maxChildren;
-}
-
-unsigned int ClusterStyle::GetMaximumNumberOfChildren() const
-{
-  return mMaxChildren;
-}
-
-void ClusterStyle::ApplyStyleToBackground(Actor background, AlphaFunction alpha, const TimePeriod& durationSeconds)
-{
-  Apply( background,
-         FirstOrderEquation( GetClusterSize(), mBackgroundPositionRelative, mBackgroundPositionOffset ),
-         FirstOrderEquation( GetClusterSize(), mBackgroundSize ),
-         alpha,
-         durationSeconds);
-}
-
-void ClusterStyle::ApplyStyleToTitle(Actor title, AlphaFunction alpha, const TimePeriod& durationSeconds)
-{
-  Apply( title,
-         FirstOrderEquation( GetClusterSize(), mTitlePositionRelative, mTitlePositionOffset ),
-         FirstOrderEquation( GetClusterSize(), mTitleSize ),
-         alpha,
-         durationSeconds);
-}
-
-void ClusterStyle::SetTitleProperties(const Vector3& relativePosition,
-                                      const Vector3& offsetPosition,
-                                      const Vector3& size)
-{
-  mTitlePositionRelative = relativePosition;
-  mTitlePositionOffset = offsetPosition;
-  mTitleSize = size;
-}
-
-void ClusterStyle::SetBackgroundProperties(const Vector3& relativePosition,
-                                           const Vector3& offsetPosition,
-                                           const Vector3& size)
-{
-  mBackgroundPositionRelative = relativePosition;
-  mBackgroundPositionOffset = offsetPosition;
-  mBackgroundSize = size;
-}
-
-void ClusterStyle::SetClusterSize( const Vector3& clusterSize )
-{
-  mClusterSize = clusterSize;
-}
-
-Vector3 ClusterStyle::GetClusterSize() const
-{
-  return mClusterSize;
-}
-
-void ClusterStyle::Apply( Actor actor,
-                          const Vector3& position,
-                          const Vector3& size,
-                          AlphaFunction alpha,
-                          const TimePeriod& durationSeconds)
-{
-  float animationDuration = durationSeconds.delaySeconds + durationSeconds.durationSeconds;
-  if( animationDuration > 0.f )
-  {
-    Animation animation = Animation::New(animationDuration);
-    animation.AnimateTo( Property( actor, Actor::Property::POSITION ), position, alpha, TimePeriod( durationSeconds.delaySeconds, durationSeconds.durationSeconds ) );
-    animation.AnimateTo( Property( actor, Actor::Property::SIZE ), size, alpha, TimePeriod( durationSeconds.delaySeconds, durationSeconds.durationSeconds ) );
-    animation.Play();
-  }
-  else
-  {
-    actor.SetPosition( position );
-    actor.SetSize( size );
-  }
-}
-
-void ClusterStyle::Apply( Actor actor,
-                          const Vector3& position,
-                          const Vector3& size,
-                          const Quaternion& rotation,
-                          const Vector3& scale,
-                          AlphaFunction alpha,
-                          const TimePeriod& durationSeconds)
-{
-  float animationDuration = durationSeconds.delaySeconds + durationSeconds.durationSeconds;
-  if( animationDuration > 0.f )
-  {
-    Animation animation = Animation::New(animationDuration);
-    animation.AnimateTo( Property( actor, Actor::Property::POSITION ), position, alpha, TimePeriod( durationSeconds.delaySeconds, durationSeconds.durationSeconds ) );
-    animation.AnimateTo( Property( actor, Actor::Property::SIZE ), size, alpha, TimePeriod( durationSeconds.delaySeconds, durationSeconds.durationSeconds ) );
-    animation.AnimateTo( Property( actor, Actor::Property::ORIENTATION ), rotation, alpha, TimePeriod( durationSeconds.delaySeconds, durationSeconds.durationSeconds ) );
-    animation.AnimateTo( Property( actor, Actor::Property::SCALE ), scale, alpha, TimePeriod( durationSeconds.delaySeconds, durationSeconds.durationSeconds ) );
-    animation.Play();
-  }
-  else
-  {
-    actor.SetPosition( position );
-    actor.SetSize( size );
-    actor.SetOrientation( rotation );
-    actor.SetScale( scale );
-  }
-}
-
-// ClusterStyleStandard ///////////////////////////////////////////////////////
-
-ClusterStylePtr ClusterStyleStandard::New(StyleType style)
-{
-  ClusterStylePtr impl( new ClusterStyleStandard(style) );
-
-  return impl;
-}
-
-ClusterStyleStandard::ClusterStyleStandard(StyleType style)
-: ClusterStyle(),
-  mSizes(NULL),
-  mPositions(NULL)
-{
-  switch(style)
-  {
-    case Toolkit::ClusterStyleStandard::ClusterStyle1:
-    {
-      SetMaximumNumberOfChildren(STYLE_1_CHILDREN_NUMBER);
-      SetSizes(STYLE_1_CHILD_SIZE_FACTOR);
-      SetPositions(STYLE_1_CHILD_POSITION_FACTOR);
-      SetTitleProperties(STYLE_1_TITLE_POSITION_FACTOR,
-                         STYLE_1_TITLE_POSITION_OFFSET,
-                         STYLE_1_TITLE_SIZE_FACTOR);
-      SetBackgroundProperties(Vector3::ZERO,
-                              Vector3(0.0f, 0.0f, STYLE_1_BACKGROUND_IMAGE_OFFSET_Z),
-                              Vector3::ONE);
-      break;
-    }
-    case Toolkit::ClusterStyleStandard::ClusterStyle2:
-    {
-      SetMaximumNumberOfChildren(STYLE_2_CHILDREN_NUMBER);
-      SetSizes(STYLE_2_CHILD_SIZE_FACTOR);
-      SetPositions(STYLE_2_CHILD_POSITION_FACTOR);
-      SetTitleProperties(STYLE_2_TITLE_POSITION_FACTOR,
-                         STYLE_2_TITLE_POSITION_OFFSET,
-                         STYLE_2_TITLE_SIZE_FACTOR);
-      SetBackgroundProperties(Vector3::ZERO,
-                              Vector3(0.0f, 0.0f, STYLE_2_BACKGROUND_IMAGE_OFFSET_Z),
-                              Vector3::ONE);
-      break;
-    }
-    case Toolkit::ClusterStyleStandard::ClusterStyle3:
-    {
-      SetMaximumNumberOfChildren(STYLE_3_CHILDREN_NUMBER);
-      SetSizes(STYLE_3_CHILD_SIZE_FACTOR);
-      SetPositions(STYLE_3_CHILD_POSITION_FACTOR);
-      SetTitleProperties(STYLE_3_TITLE_POSITION_FACTOR,
-                         STYLE_3_TITLE_POSITION_OFFSET,
-                         STYLE_3_TITLE_SIZE_FACTOR);
-      SetBackgroundProperties(Vector3::ZERO,
-                              Vector3(0.0f, 0.0f, STYLE_3_BACKGROUND_IMAGE_OFFSET_Z),
-                              Vector3::ONE);
-      break;
-    }
-    case Toolkit::ClusterStyleStandard::ClusterStyle4:
-    {
-      SetMaximumNumberOfChildren(STYLE_4_CHILDREN_NUMBER);
-      SetSizes(STYLE_4_CHILD_SIZE_FACTOR);
-      SetPositions(STYLE_4_CHILD_POSITION_FACTOR);
-      SetTitleProperties(STYLE_4_TITLE_POSITION_FACTOR,
-                         STYLE_4_TITLE_POSITION_OFFSET,
-                         STYLE_4_TITLE_SIZE_FACTOR);
-      SetBackgroundProperties(Vector3::ZERO,
-                              Vector3(0.0f, 0.0f, STYLE_4_BACKGROUND_IMAGE_OFFSET_Z),
-                              Vector3::ONE);
-      break;
-    }
-    default:
-    {
-      DALI_ASSERT_ALWAYS(false && "Invalid Style");
-      break;
-    }
-  } // end switch
-}
-
-void ClusterStyleStandard::SetSizes(const float *sizes)
-{
-  mSizes = sizes;
-}
-
-void ClusterStyleStandard::SetPositions(const Vector3 *positions)
-{
-  mPositions = positions;
-}
-
-void ClusterStyleStandard::ApplyStyle(Actor child, unsigned int index, AlphaFunction alpha, const TimePeriod& durationSeconds)
-{
-  if(mPositions)
-  {
-    const float& size = mSizes[index];
-    // counter top-left parent origin and top-left anchor point.
-    const Vector3 position = mPositions[index] - Vector3(0.5f, 0.5f, 0.0f) + Vector3(size, size, 0.0f) * 0.5f;
-
-    Apply( child,
-           FirstOrderEquation( GetClusterSize(), Vector3(position.x, position.y, 0.0f), Vector3(0.0f, 0.0f, position.z) ),
-           FirstOrderEquation( GetClusterSize(), Vector3::ONE * size ),
-           Quaternion(),
-           Vector3::ONE,
-           alpha,
-           durationSeconds);
-  }
-}
-
-// ClusterStyleRandom /////////////////////////////////////////////////////////
-
-ClusterStylePtr ClusterStyleRandom::New()
-{
-  ClusterStylePtr impl( new ClusterStyleRandom() );
-
-  return impl;
-}
-
-ClusterStyleRandom::ClusterStyleRandom()
-: ClusterStyle()
-{
-  SetMaximumNumberOfChildren(STYLE_RANDOM_CHILDREN_NUMBER);
-  SetTitleProperties(Vector3::ZERO,
-                     Vector3::ZERO,
-                     Vector3::ONE);
-  SetBackgroundProperties(Vector3::ZERO,
-                          Vector3(0.0f, 0.0f, 0.0f),
-                          Vector3::ONE);
-}
-
-void ClusterStyleRandom::ApplyStyle(Actor child, unsigned int index, AlphaFunction alpha, const TimePeriod& durationSeconds)
-{
-  unsigned int seed = CLUSTER_RANDOM_SEED;
-  const float size = 0.5f;
-  const float rotation = genRandomFloat(seed, index, -1.0f, 1.0f) * Math::PI * 0.1; // +/- 18 degrees
-  const Vector3 position(genRandomFloat(seed, index, -0.1f, 0.1f),
-                         genRandomFloat(seed, index, -0.1f, 0.1f),
-                         0.0f);
-
-  Property::Index depthProperty = child.GetPropertyIndex(Toolkit::Cluster::CLUSTER_ACTOR_DEPTH);
-  float depthPropertyValue = child.GetProperty<float>( depthProperty );
-
-  Apply( child,
-         FirstOrderEquation( GetClusterSize(), Vector3(position.x, position.y, 0.0f), Vector3(0.0f, 0.0f, depthPropertyValue) ),
-         FirstOrderEquation( GetClusterSize(), Vector3::ONE * size),
-         Quaternion( Radian( rotation ), Vector3::ZAXIS ),
-         Vector3::ONE,
-         alpha,
-         durationSeconds);
-}
-
-} // namespace Internal
-
-} // namespace Toolkit
-
-} // namespace Dali
diff --git a/dali-toolkit/internal/controls/cluster/cluster-style-impl.h b/dali-toolkit/internal/controls/cluster/cluster-style-impl.h
deleted file mode 100644 (file)
index bf7b75d..0000000
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// EXTERNAL INCLUDES
-#include <dali/public-api/object/ref-object.h>
-#include <dali/public-api/common/dali-common.h>
-#include <dali/public-api/math/vector3.h>
-#include <dali/public-api/object/base-object.h>
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/cluster/cluster-style.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Internal
-{
-
-class ClusterStyle;
-
-typedef IntrusivePtr<ClusterStyle>       ClusterStylePtr;
-
-/**
- * ClusterStyle internal implementation
- */
-class ClusterStyle : public Dali::BaseObject
-{
-public:
-
-  /**
-   * @copydoc Toolkit::ClusterStyle::GetMaximumNumberOfChildren
-   */
-  unsigned int GetMaximumNumberOfChildren() const;
-
-  /**
-   * @copydoc Toolkit::ClusterStyle::ApplyStyle
-   */
-  virtual void ApplyStyle(Actor child, unsigned int index, AlphaFunction alpha, const TimePeriod& durationSeconds) = 0;
-
-  /**
-   * @copydoc Toolkit::ClusterStyle::ApplyStyleToBackground
-   */
-  virtual void ApplyStyleToBackground(Actor background, AlphaFunction alpha, const TimePeriod& durationSeconds);
-
-  /**
-   * @copydoc Toolkit::ClusterStyle::ApplyStyleToTitle
-   */
-  virtual void ApplyStyleToTitle(Actor title, AlphaFunction alpha, const TimePeriod& durationSeconds);
-
-  /**
-    * Set the size of cluster
-    */
-  void SetClusterSize( const Vector3& clusterSize );
-
-protected:
-
-  /**
-   * Set the maximum number of children this Style can handle.
-   * @param[in] The maximum number of children.
-   */
-  void SetMaximumNumberOfChildren(unsigned int children);
-
-  /**
-   * Set the title properties
-   * @param[in] relativePosition Relative position of the title
-   * @param[in] offsetPosition Offset position of the title
-   * @param[in] size The size of the title
-   */
-  void SetTitleProperties(const Vector3& relativePosition,
-                          const Vector3& offsetPosition,
-                          const Vector3& size);
-
-  /**
-   * Set the background properties
-   * @param[in] relativePosition Relative position of the background
-   * @param[in] offsetPosition Offset position of the background
-   * @param[in] size The size of the title
-   */
-  void SetBackgroundProperties(const Vector3& relativePosition,
-                               const Vector3& offsetPosition,
-                               const Vector3& size);
-
-  /**
-   * Get the size of cluster.
-   * @return the cluster size
-   */
-   Vector3 GetClusterSize() const;
-
-   /**
-    * Apply the given position & size to the actor
-    * @param[in] position The target position
-    * @param[in] size The target size
-    * @param[in] size The size to resize to
-    * @param[in] alpha The alpha function to use.
-    * @param[in] durationSeconds The time period to apply this style.
-    */
-   void Apply( Actor actor,
-               const Vector3& position,
-               const Vector3& size,
-               AlphaFunction alpha,
-               const TimePeriod& durationSeconds);
-   /**
-    * Apply the given position & size to the actor
-    * @param[in] actor The actor to apply the changes
-    * @param[in] position The target position
-    * @param[in] size The target size
-    * @param[in] rotation The target Quaternion value
-    * @param[in] scale The target scale
-    * @param[in] alpha The alpha function to use.
-    * @param[in] durationSeconds The time period to apply this style.
-    */
-   void Apply( Actor actor,
-               const Vector3& position,
-               const Vector3& size,
-               const Quaternion& rotation,
-               const Vector3& scale,
-               AlphaFunction alpha,
-               const TimePeriod& durationSeconds);
-
-protected:
-
-  /**
-   * Protected constructor see ClusterStyle::New().
-   */
-  ClusterStyle();
-
-  /**
-   * A reference counted object may only be deleted by calling Unreference()
-   */
-  virtual ~ClusterStyle();
-
-protected:
-
-  unsigned int mMaxChildren;                      ///< Maximum number of children that this style supports
-  Vector3 mTitlePositionRelative;                 ///< Title's position relative to size of cluster
-  Vector3 mTitlePositionOffset;                   ///< Title's position offset
-  Vector3 mTitleSize;                             ///< Title's size relative to size of cluster
-  Vector3 mBackgroundPositionRelative;            ///< Background's position relative to size of cluster
-  Vector3 mBackgroundPositionOffset;              ///< Background's position offset
-  Vector3 mBackgroundSize;                        ///< Background's size relative to size of cluster
-  Vector3 mClusterSize;                           ///< The size of cluster
-};
-
-/**
- * ClusterStyleStandard internal implementation
- */
-class ClusterStyleStandard : public ClusterStyle
-{
-public:
-
-  typedef Toolkit::ClusterStyleStandard::StyleType StyleType;
-
-public:
-
-  /**
-   * Create a new cluster style.
-   * @param[in] style The style type to create.
-   * @return A smart-pointer to the newly allocated ClusterStyle.
-   */
-  static ClusterStylePtr New(StyleType style);
-
-public:
-
-  /**
-   * @copydoc Toolkit::ClusterStyle::ApplyStyle
-   */
-  void ApplyStyle(Actor child, unsigned int index, AlphaFunction alpha, const TimePeriod& durationSeconds);
-
-private:
-
-  /**
-   * Set the relative sizes of the children
-   * @param[in] size The list of sizes for the children
-   */
-  void SetSizes(const float *sizes);
-
-  /**
-   * Set the relative positions of the children
-   * @param[in] positions The list of positions for the children
-   */
-  void SetPositions(const Vector3 *positions);
-
-protected:
-
-  /**
-   * Protected constructor see ClusterStyleRandom::New().
-   */
-  ClusterStyleStandard(StyleType style);
-
-private:
-
-  const float *mSizes;                            ///< List of sizes
-  const Vector3 *mPositions;                      ///< List of positions
-
-};
-
-/**
- * ClusterStyleRandom internal implementation
- */
-class ClusterStyleRandom : public ClusterStyle
-{
-public:
-
-  /**
-   * Create a new cluster style.
-   * @return A smart-pointer to the newly allocated ClusterStyle.
-   */
-  static ClusterStylePtr New();
-
-public:
-
-  /**
-   * @copydoc Toolkit::ClusterStyle::ApplyStyle
-   */
-  void ApplyStyle(Actor child, unsigned int index, AlphaFunction alpha, const TimePeriod& durationSeconds);
-
-protected:
-
-  /**
-   * Protected constructor see ClusterStyleRandom::New().
-   */
-  ClusterStyleRandom();
-
-private:
-
-};
-
-} // namespace Internal
-
-// Helpers for public-api forwarding methods
-
-inline Internal::ClusterStyle& GetImpl(Toolkit::ClusterStyle& pub)
-{
-  DALI_ASSERT_ALWAYS(pub);
-
-  Dali::RefObject& handle = pub.GetBaseObject();
-
-  return static_cast<Internal::ClusterStyle&>(handle);
-}
-
-inline const Internal::ClusterStyle& GetImpl(const Toolkit::ClusterStyle& pub)
-{
-  DALI_ASSERT_ALWAYS(pub);
-
-  const Dali::RefObject& handle = pub.GetBaseObject();
-
-  return static_cast<const Internal::ClusterStyle&>(handle);
-}
-
-} // namespace Toolkit
-
-} // namespace Dali
index 21b6e23..e0a5ea5 100644 (file)
@@ -112,7 +112,7 @@ Toolkit::EffectsView EffectsView::New()
 }
 
 EffectsView::EffectsView()
-: Control( CONTROL_BEHAVIOUR_NONE ),
+: Control( ControlBehaviour( ACTOR_BEHAVIOUR_NONE ) ),
   mEffectType( Toolkit::EffectsView::INVALID_TYPE ),
   mPixelFormat( EFFECTS_VIEW_DEFAULT_PIXEL_FORMAT ),
   mSpread(0.0f),
index 8a38163..f233cf4 100644 (file)
@@ -116,7 +116,7 @@ const char* const GAUSSIAN_BLUR_FRAGMENT_SOURCE =
 
 
 GaussianBlurView::GaussianBlurView()
-  : Control( CONTROL_BEHAVIOUR_NONE )
+  : Control( ControlBehaviour( DISABLE_SIZE_NEGOTIATION ) )
   , mNumSamples(GAUSSIAN_BLUR_VIEW_DEFAULT_NUM_SAMPLES)
   , mBlurBellCurveWidth( 0.001f )
   , mPixelFormat(GAUSSIAN_BLUR_VIEW_DEFAULT_RENDER_TARGET_PIXEL_FORMAT)
@@ -138,7 +138,7 @@ GaussianBlurView::GaussianBlurView()
 GaussianBlurView::GaussianBlurView( const unsigned int numSamples, const float blurBellCurveWidth, const Pixel::Format renderTargetPixelFormat,
                                     const float downsampleWidthScale, const float downsampleHeightScale,
                                     bool blurUserImage)
-  : Control( NO_SIZE_NEGOTIATION )
+  : Control( ControlBehaviour( DISABLE_SIZE_NEGOTIATION ) )
   , mNumSamples(numSamples)
   , mBlurBellCurveWidth( 0.001f )
   , mPixelFormat(renderTargetPixelFormat)
@@ -266,14 +266,12 @@ void GaussianBlurView::OnInitialize()
 
   // Create an ImageActor for performing a horizontal blur on the texture
   mImageActorHorizBlur = ImageActor::New();
-  mImageActorHorizBlur.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
   mImageActorHorizBlur.SetParentOrigin(ParentOrigin::CENTER);
   mImageActorHorizBlur.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) ); // FIXME
   mImageActorHorizBlur.SetShaderEffect( mHorizBlurShader );
 
   // Create an ImageActor for performing a vertical blur on the texture
   mImageActorVertBlur = ImageActor::New();
-  mImageActorVertBlur.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
   mImageActorVertBlur.SetParentOrigin(ParentOrigin::CENTER);
   mImageActorVertBlur.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) ); // FIXME
   mImageActorVertBlur.SetShaderEffect( mVertBlurShader );
@@ -285,7 +283,6 @@ void GaussianBlurView::OnInitialize()
   if(!mBlurUserImage)
   {
     mImageActorComposite = ImageActor::New();
-    mImageActorComposite.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
     mImageActorComposite.SetParentOrigin(ParentOrigin::CENTER);
     mImageActorComposite.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) ); // FIXME
     mImageActorComposite.SetOpacity(GAUSSIAN_BLUR_VIEW_DEFAULT_BLUR_STRENGTH); // ensure alpha is enabled for this object and set default value
@@ -296,7 +293,6 @@ void GaussianBlurView::OnInitialize()
 
     // Create an ImageActor for holding final result, i.e. the blurred image. This will get rendered to screen later, via default / user render task
     mTargetActor = ImageActor::New();
-    mTargetActor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
     mTargetActor.SetParentOrigin(ParentOrigin::CENTER);
     mTargetActor.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) ); // FIXME
 
index fc6f71a..29e5bec 100644 (file)
@@ -123,7 +123,7 @@ Dali::Toolkit::Magnifier Magnifier::New()
 }
 
 Magnifier::Magnifier()
-: Control( REQUIRES_TOUCH_EVENTS ),
+: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS ) ),
   mPropertySourcePosition(Property::INVALID_INDEX),
   mDefaultCameraDistance(1000.f),
   mActorSize(Vector3::ZERO),
@@ -247,11 +247,13 @@ void Magnifier::SetFrameVisibility(bool visible)
 
     Image image = ResourceImage::New( DEFAULT_FRAME_IMAGE_PATH );
     mFrame = ImageActor::New( image );
-    mFrame.SetRelayoutEnabled( false );
     mFrame.SetDrawMode(DrawMode::OVERLAY);
     mFrame.SetStyle( ImageActor::STYLE_NINE_PATCH );
     mFrame.SetPositionInheritanceMode(DONT_INHERIT_POSITION);
     mFrame.SetInheritScale(true);
+    mFrame.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::ALL_DIMENSIONS );
+    Vector3 sizeOffset(IMAGE_BORDER_INDENT*2.f - 2.f, IMAGE_BORDER_INDENT*2.f - 2.f, 0.0f);
+    mFrame.SetSizeModeFactor( sizeOffset );
 
     Constraint constraint = Constraint::New<Vector3>( mFrame, Actor::Property::POSITION, EqualToConstraint() );
     constraint.AddSource( ParentSource( Actor::Property::WORLD_POSITION ) );
@@ -259,9 +261,6 @@ void Magnifier::SetFrameVisibility(bool visible)
 
     mFrame.SetNinePatchBorder( Vector4::ONE * IMAGE_BORDER_INDENT );
     self.Add(mFrame);
-
-    Vector3 sizeOffset(IMAGE_BORDER_INDENT*2.f - 2.f, IMAGE_BORDER_INDENT*2.f - 2.f, 0.0f);
-    mFrame.SetSize(mActorSize + sizeOffset);
   }
   else if(!visible && mFrame)
   {
@@ -271,12 +270,6 @@ void Magnifier::SetFrameVisibility(bool visible)
 
 void Magnifier::OnControlSizeSet(const Vector3& targetSize)
 {
-  if( mFrame )
-  {
-    Vector3 sizeOffset(IMAGE_BORDER_INDENT*2.f - 2.f, IMAGE_BORDER_INDENT*2.f - 2.f, 0.0f);
-    mFrame.SetSize(targetSize + sizeOffset);
-  }
-
   // TODO: Once Camera/CameraActor properties function as proper animatable properties
   // this code can disappear.
   // whenever the size of the magnifier changes, the field of view needs to change
index ae6c948..0a30fdd 100644 (file)
@@ -22,7 +22,7 @@
 #include <string>
 
 // INTERNAL INCLUDES
-#include <dali/public-api/animation/alpha-functions.h>
+#include <dali/public-api/animation/alpha-function.h>
 #include <dali-toolkit/public-api/controls/table-view/table-view.h>
 #include <dali-toolkit/public-api/controls/navigation-frame/page.h>
 #include <dali-toolkit/public-api/controls/navigation-frame/navigation-bar-style.h>
index 26956dc..042fe35 100644 (file)
@@ -52,20 +52,20 @@ BaseHandle Create()
 // Setup properties, signals and actions using the type-registry.
 DALI_TYPE_REGISTRATION_BEGIN( Toolkit::NavigationControl, Toolkit::Control, Create )
 
-DALI_ACTION_REGISTRATION( NavigationControl, "push", ACTION_PUSH )
-DALI_ACTION_REGISTRATION( NavigationControl, "pop",  ACTION_POP  )
+DALI_ACTION_REGISTRATION( Toolkit, NavigationControl, "push", ACTION_PUSH )
+DALI_ACTION_REGISTRATION( Toolkit, NavigationControl, "pop",  ACTION_POP  )
 
 DALI_TYPE_REGISTRATION_END()
 
 }
 
 NavigationControl::NavigationControl()
-: Control( REQUIRES_TOUCH_EVENTS ),
+: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS ) ),
   mToolBar(NULL),
   mTitleBar(NULL),
   mOrientationAngle( 0 ),
   mOrientationAnimationDuration( 1.0f ),
-  mOrientationAnimationAlphaFunc( AlphaFunctions::EaseOut ),
+  mOrientationAnimationAlphaFunc( AlphaFunction::EASE_OUT ),
   mItemPositionCoefficient( Vector3( 0.0f, 1.0f, 0.0f) ),
   mItemPushedSignal( ),
   mItemPoppedSignal( )
index 7ca18c9..82fb886 100644 (file)
@@ -40,16 +40,16 @@ BaseHandle Create()
 }
 
 DALI_TYPE_REGISTRATION_BEGIN( Toolkit::Page, Toolkit::Control, Create )
+DALI_PROPERTY_REGISTRATION( Toolkit, Page, "title",     STRING, TITLE     )
+DALI_PROPERTY_REGISTRATION( Toolkit, Page, "sub-title", STRING, SUB_TITLE )
 DALI_TYPE_REGISTRATION_END()
 
 } // unnamed namespace
 
 Page::Page()
-: Control( CONTROL_BEHAVIOUR_NONE ),
+: Control( ControlBehaviour( ACTOR_BEHAVIOUR_NONE ) ),
   mTitle(""),
-  mSubTitle(""),
-  mPropertyTitle(Property::INVALID_INDEX),
-  mPropertySubTitle(Property::INVALID_INDEX)
+  mSubTitle("")
 {
 }
 
@@ -161,26 +161,54 @@ Toolkit::Popup Page::GetPopupMenu() const
   return mPopupMenu;
 }
 
-void Page::OnInitialize()
+void Page::SetProperty( BaseObject* object, Property::Index index, const Property::Value& value )
 {
-  Actor self = Self();
+  Toolkit::Page page = Toolkit::Page::DownCast( Dali::BaseHandle( object ) );
 
-  mPropertyTitle = self.RegisterProperty( Dali::Toolkit::Page::PROPERTY_TITLE, "", Property::READ_WRITE );
-  mPropertySubTitle = self.RegisterProperty( Dali::Toolkit::Page::PROPERTY_SUB_TITLE, "", Property::READ_WRITE );
+  if ( page )
+  {
+    switch ( index )
+    {
+      case Toolkit::Page::Property::TITLE:
+      {
+        GetImpl( page ).SetTitle( value.Get< std::string >() );
+        break;
+      }
+
+      case Toolkit::Page::Property::SUB_TITLE:
+      {
+        GetImpl( page ).SetSubTitle( value.Get< std::string >() );
+        break;
+      }
+    }
+  }
 }
 
-void Page::OnPropertySet( Property::Index index, Property::Value propertyValue )
+Property::Value Page::GetProperty( BaseObject* object, Property::Index propertyIndex )
 {
-  if( index == mPropertyTitle )
-  {
-    std::string title( propertyValue.Get<std::string>() );
-    SetTitle(title);
-  }
-  else if( index == mPropertySubTitle )
+  Property::Value value;
+
+  Toolkit::Page page = Toolkit::Page::DownCast( Dali::BaseHandle( object ) );
+
+  if ( page )
   {
-    std::string subTitle( propertyValue.Get<std::string>() );
-    SetSubTitle(subTitle);
+    switch ( propertyIndex )
+    {
+      case Toolkit::Page::Property::TITLE:
+      {
+        value = GetImpl( page ).mTitle;
+        break;
+      }
+
+      case Toolkit::Page::Property::SUB_TITLE:
+      {
+        value = GetImpl( page ).mSubTitle;
+        break;
+      }
+    }
   }
+
+  return value;
 }
 
 } // namespace Internal
index 333aada..8d2711d 100644 (file)
@@ -116,17 +116,23 @@ public:
    */
   Toolkit::Popup GetPopupMenu() const;
 
-private: // From Control
+  // Properties
 
   /**
-   * @copydoc Toolkit::Control::OnInitialize()
+   * Called when a property of an object of this type is set.
+   * @param[in] object The object whose property is set.
+   * @param[in] index The property index.
+   * @param[in] value The new property value.
    */
-  virtual void OnInitialize();
+  static void SetProperty( BaseObject* object, Property::Index index, const Property::Value& value );
 
   /**
-   * @copydoc Dali::CustomActorImpl::OnPropertySet()
+   * Called to retrieve a property of an object of this type.
+   * @param[in] object The object whose property is to be retrieved.
+   * @param[in] index The property index.
+   * @return The current value of the property.
    */
-  virtual void OnPropertySet( Property::Index index, Property::Value propertyValue );
+  static Property::Value GetProperty( BaseObject* object, Property::Index propertyIndex );
 
 private:
 
@@ -144,9 +150,6 @@ private:
 
   ActorContainer                        mTitleBarControls;
   Toolkit::Page::ControlOnBarContainer  mToolBarControls;
-
-  Property::Index  mPropertyTitle;       ///< Property index for title.
-  Property::Index  mPropertySubTitle;    ///< Property index for sub title.
 };
 
 } // namespace Internal
index ef5c223..6e2ffc7 100644 (file)
@@ -153,8 +153,8 @@ void PageTurnPortraitView::OnPossibleOutwardsFlick( const Vector2& panPosition,
 
     animation.AnimateTo( Property( mTurnEffect[mIndex], mTurnEffect[mIndex].PageTurnEffect::GetCurrentCenterPropertyName() ),
                          originalCenter,
-                         AlphaFunctions::EaseOut, PAGE_TURN_OVER_ANIMATION_DURATION*0.75f );
-    animation.AnimateBy( Property( actor, Actor::Property::ORIENTATION ), AngleAxis( Degree( 180.0f ), Vector3::YAXIS ) ,AlphaFunctions::EaseOut );
+                         AlphaFunction::EASE_OUT, TimePeriod(PAGE_TURN_OVER_ANIMATION_DURATION*0.75f) );
+    animation.AnimateBy( Property( actor, Actor::Property::ORIENTATION ), AngleAxis( Degree( 180.0f ), Vector3::YAXIS ) ,AlphaFunction::EASE_OUT );
     animation.Play();
     ImageActor::DownCast(actor).SetCullFace( CullBack );
     animation.FinishedSignal().Connect( this, &PageTurnPortraitView::OnTurnedOver );
index fc464ad..6ede563 100644 (file)
@@ -259,7 +259,7 @@ const int PageTurnView::NUMBER_OF_CACHED_PAGES = NUMBER_OF_CACHED_PAGES_EACH_SID
 const float PageTurnView::STATIC_PAGE_INTERVAL_DISTANCE = 1.0f;
 
 PageTurnView::PageTurnView( PageFactory& pageFactory, const Vector2& pageSize )
-: Control( REQUIRES_TOUCH_EVENTS ),
+: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS ) ),
   mPageFactory( pageFactory ),
   mPageSize( pageSize ),
   mTotalPageCount( 0 ),
@@ -953,9 +953,9 @@ void PageTurnView::PanFinished( const Vector2& gesturePosition, float gestureSpe
       float width = mPageSize.width*(1.f+PAGE_TURN_OVER_THRESHOLD_RATIO);
       Animation animation = Animation::New( std::max(0.1f,PAGE_TURN_OVER_ANIMATION_DURATION * (1.0f - mPanDisplacement / width)) );
       animation.AnimateTo( Property(self, mPropertyPanDisplacement[mIndex]),
-                           width,AlphaFunctions::EaseOutSine33);
+                           width,AlphaFunction::EASE_OUT_SINE);
       animation.AnimateTo( Property(self, mPropertyCurrentCenter[mIndex]),
-                           Vector2(-mPageSize.width, 0.5f*mPageSize.height), AlphaFunctions::EaseOutSine33);
+                           Vector2(-mPageSize.width, 0.5f*mPageSize.height), AlphaFunction::EASE_OUT_SINE);
       mAnimationActorPair[animation] = actor;
       mAnimationIndexPair[animation] = mIndex;
       animation.Play();
@@ -965,7 +965,7 @@ void PageTurnView::PanFinished( const Vector2& gesturePosition, float gestureSpe
     {
       Animation animation= Animation::New( PAGE_SLIDE_BACK_ANIMATION_DURATION * (mOriginalCenter.x - mCurrentCenter.x) / mPageSize.width / PAGE_TURN_OVER_THRESHOLD_RATIO );
       animation.AnimateTo( Property( mTurnEffect[mIndex], mTurnEffect[mIndex].PageTurnEffect::GetCurrentCenterPropertyName() ),
-                           mOriginalCenter, AlphaFunctions::Linear );
+                           mOriginalCenter, AlphaFunction::LINEAR );
       mAnimationActorPair[animation] = actor;
       mAnimationIndexPair[animation] = mIndex;
       animation.Play();
index a5aed9b..4ba3a03 100755 (executable)
@@ -61,8 +61,8 @@ BaseHandle Create()
 // Setup properties, signals and actions using the type-registry.
 DALI_TYPE_REGISTRATION_BEGIN( Toolkit::Popup, Toolkit::Control, Create )
 
-DALI_SIGNAL_REGISTRATION( Popup, "touched-outside", SIGNAL_TOUCHED_OUTSIDE )
-DALI_SIGNAL_REGISTRATION( Popup, "hidden",          SIGNAL_HIDDEN          )
+DALI_SIGNAL_REGISTRATION( Toolkit, Popup, "touched-outside", SIGNAL_TOUCHED_OUTSIDE )
+DALI_SIGNAL_REGISTRATION( Toolkit, Popup, "hidden",          SIGNAL_HIDDEN          )
 
 DALI_TYPE_REGISTRATION_END()
 
@@ -172,12 +172,6 @@ void Popup::OnInitialize()
   SetAsKeyboardFocusGroup(true);
 }
 
-void Popup::MarkDirtyForRelayout()
-{
-  // Flag all the popup controls for relayout as it is about to be hidden and miss the main flagging pass
-  mLayer.RelayoutRequestTree();
-}
-
 void Popup::OnPropertySet( Property::Index index, Property::Value propertyValue )
 {
   if( index == mPropertyTitle )
@@ -302,7 +296,6 @@ void Popup::CreateFooter()
     // Adds bottom background
     mBottomBg = Actor::New();
     mBottomBg.SetName( "POPUP_BOTTOM_BG" );
-    mBottomBg.SetRelayoutEnabled( true );
     mBottomBg.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
 
     mPopupLayout.SetFixedHeight( 2, mPopupStyle->bottomSize.height );   // Buttons
@@ -526,13 +519,13 @@ void Popup::HandleStateChange( Toolkit::Popup::PopupState state, float duration
 
     if(mShowing)
     {
-      mAnimation.AnimateTo( Property(mBacking, Actor::Property::COLOR_ALPHA), targetBackingAlpha, AlphaFunctions::EaseInOut, TimePeriod(0.0f, duration * 0.5f) );
-      mAnimation.AnimateTo( Property(self, Actor::Property::SCALE), targetSize, AlphaFunctions::EaseInOut, TimePeriod(duration * 0.5f, duration * 0.5f) );
+      mAnimation.AnimateTo( Property(mBacking, Actor::Property::COLOR_ALPHA), targetBackingAlpha, AlphaFunction::EASE_IN_OUT, TimePeriod(0.0f, duration * 0.5f) );
+      mAnimation.AnimateTo( Property(self, Actor::Property::SCALE), targetSize, AlphaFunction::EASE_IN_OUT, TimePeriod(duration * 0.5f, duration * 0.5f) );
     }
     else
     {
-      mAnimation.AnimateTo( Property(mBacking, Actor::Property::COLOR_ALPHA), targetBackingAlpha, AlphaFunctions::EaseInOut, TimePeriod(0.0f, duration * 0.5f) );
-      mAnimation.AnimateTo( Property(self, Actor::Property::SCALE), targetSize, AlphaFunctions::EaseInOut, TimePeriod(0.0f, duration * 0.5f) );
+      mAnimation.AnimateTo( Property(mBacking, Actor::Property::COLOR_ALPHA), targetBackingAlpha, AlphaFunction::EASE_IN_OUT, TimePeriod(0.0f, duration * 0.5f) );
+      mAnimation.AnimateTo( Property(self, Actor::Property::SCALE), targetSize, AlphaFunction::EASE_IN_OUT, TimePeriod(0.0f, duration * 0.5f) );
     }
     mAnimation.Play();
     mAnimation.FinishedSignal().Connect(this, &Popup::OnStateAnimationFinished);
index f695c74..9c67474 100755 (executable)
@@ -131,11 +131,6 @@ public:
    */
   PopupStylePtr GetStyle() const;
 
-  /**
-   * @copydoc Toolkit::Popup::MarkDirtyForRelayout
-   */
-  void MarkDirtyForRelayout();
-
 protected:
 
   /**
index 0d7b833..2bcca2f 100755 (executable)
@@ -117,12 +117,12 @@ BaseHandle Create()
 // Setup properties, signals and actions using the type-registry.
 DALI_TYPE_REGISTRATION_BEGIN( Toolkit::ScrollBar, Toolkit::ScrollComponent, Create );
 
-DALI_PROPERTY_REGISTRATION( ScrollBar, "indicator-height-policy", STRING, INDICATOR_HEIGHT_POLICY         )
-DALI_PROPERTY_REGISTRATION( ScrollBar, "indicator-fixed-height",  FLOAT,  INDICATOR_FIXED_HEIGHT          )
-DALI_PROPERTY_REGISTRATION( ScrollBar, "indicator-show-duration", FLOAT,  INDICATOR_SHOW_DURATION         )
-DALI_PROPERTY_REGISTRATION( ScrollBar, "indicator-hide-duration", FLOAT,  INDICATOR_HIDE_DURATION         )
+DALI_PROPERTY_REGISTRATION( Toolkit, ScrollBar, "indicator-height-policy", STRING, INDICATOR_HEIGHT_POLICY         )
+DALI_PROPERTY_REGISTRATION( Toolkit, ScrollBar, "indicator-fixed-height",  FLOAT,  INDICATOR_FIXED_HEIGHT          )
+DALI_PROPERTY_REGISTRATION( Toolkit, ScrollBar, "indicator-show-duration", FLOAT,  INDICATOR_SHOW_DURATION         )
+DALI_PROPERTY_REGISTRATION( Toolkit, ScrollBar, "indicator-hide-duration", FLOAT,  INDICATOR_HIDE_DURATION         )
 
-DALI_SIGNAL_REGISTRATION(   ScrollBar, "scroll-position-notified",        SCROLL_POSITION_NOTIFIED_SIGNAL )
+DALI_SIGNAL_REGISTRATION(   Toolkit, ScrollBar, "scroll-position-notified",        SCROLL_POSITION_NOTIFIED_SIGNAL )
 
 DALI_TYPE_REGISTRATION_END()
 
@@ -252,7 +252,7 @@ void ScrollBar::Show()
   if(mIndicatorShowDuration > 0.0f)
   {
     mAnimation = Animation::New( mIndicatorShowDuration );
-    mAnimation.AnimateTo( Property( self, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunctions::EaseIn );
+    mAnimation.AnimateTo( Property( self, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunction::EASE_IN );
     mAnimation.Play();
   }
   else
@@ -275,7 +275,7 @@ void ScrollBar::Hide()
   if(mIndicatorHideDuration > 0.0f)
   {
     mAnimation = Animation::New( mIndicatorHideDuration );
-    mAnimation.AnimateTo( Property( self, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunctions::EaseIn );
+    mAnimation.AnimateTo( Property( self, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunction::EASE_IN );
     mAnimation.Play();
   }
   else
index 4b7760e..933add8 100755 (executable)
@@ -534,8 +534,8 @@ void ScrollBarInternal::Show()
   }
 
   mAnimation = Animation::New( BAR_SHOW_TIME );
-  mAnimation.AnimateTo( Property( mSlider, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunctions::EaseIn );
-  mAnimation.AnimateTo( Property( mSliderWrap, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunctions::EaseIn );
+  mAnimation.AnimateTo( Property( mSlider, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunction::EASE_IN );
+  mAnimation.AnimateTo( Property( mSliderWrap, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunction::EASE_IN );
   mAnimation.Play();
 
   DestructTimer();
@@ -551,8 +551,8 @@ void ScrollBarInternal::Hide()
   }
 
   mAnimation = Animation::New( BAR_HIDE_TIME );
-  mAnimation.AnimateTo( Property( mSlider, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunctions::EaseIn );
-  mAnimation.AnimateTo( Property( mSliderWrap, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunctions::EaseIn );
+  mAnimation.AnimateTo( Property( mSlider, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunction::EASE_IN );
+  mAnimation.AnimateTo( Property( mSliderWrap, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunction::EASE_IN );
   mAnimation.Play();
 }
 
index 0fd1b69..5261f60 100644 (file)
@@ -50,7 +50,7 @@ namespace Internal
 
  *  // start the bouncing animation
  *  Animation anim = Animation::New(2.0f);
- *  anim.AnimateTo( Property( bounceActor, bouncePropertyIndex ), 1.f, AlphaFunctions::Sin );
+ *  anim.AnimateTo( Property( bounceActor, bouncePropertyIndex ), 1.f, AlphaFunction::SIN );
  *  anim.Play();
  * @endcode
  *
index a3f222e..a9f342c 100644 (file)
@@ -293,7 +293,7 @@ Dali::Toolkit::ItemView ItemView::New(ItemFactory& factory)
 }
 
 ItemView::ItemView(ItemFactory& factory)
-: Scrollable(),
+: Scrollable( ControlBehaviour( DISABLE_SIZE_NEGOTIATION | REQUIRES_MOUSE_WHEEL_EVENTS | REQUIRES_KEYBOARD_NAVIGATION_SUPPORT ) ),
   mItemFactory(factory),
   mActiveLayout(NULL),
   mAnimatingOvershootOn(false),
@@ -319,17 +319,12 @@ ItemView::ItemView(ItemFactory& factory)
   mItemsParentOrigin( ParentOrigin::CENTER),
   mItemsAnchorPoint( AnchorPoint::CENTER)
 {
-  SetRequiresMouseWheelEvents(true);
-  SetKeyboardNavigationSupport(true);
 }
 
 void ItemView::OnInitialize()
 {
   Actor self = Self();
 
-  // Disable size negotiation for item views
-  self.SetRelayoutEnabled( false );
-
   mScrollConnector = Dali::Toolkit::ScrollConnector::New();
   mScrollPositionObject = mScrollConnector.GetScrollPositionObject();
   mScrollConnector.ScrollPositionChangedSignal().Connect( this, &ItemView::OnScrollPositionChanged );
@@ -466,8 +461,8 @@ void ItemView::ActivateLayout(unsigned int layoutIndex, const Vector3& targetSiz
   {
     RemoveAnimation(mScrollAnimation);
     mScrollAnimation = Animation::New(durationSeconds);
-    mScrollAnimation.AnimateTo( Property( mScrollPositionObject, ScrollConnector::SCROLL_POSITION ), firstItemScrollPosition, AlphaFunctions::EaseOut );
-    mScrollAnimation.AnimateTo( Property(self, mPropertyPosition), GetScrollPosition(firstItemScrollPosition, targetSize), AlphaFunctions::EaseOut );
+    mScrollAnimation.AnimateTo( Property( mScrollPositionObject, ScrollConnector::SCROLL_POSITION ), firstItemScrollPosition, AlphaFunction::EASE_OUT );
+    mScrollAnimation.AnimateTo( Property(self, mPropertyPosition), GetScrollPosition(firstItemScrollPosition, targetSize), AlphaFunction::EASE_OUT );
     mScrollAnimation.FinishedSignal().Connect(this, &ItemView::OnLayoutActivationScrollFinished);
     mScrollAnimation.Play();
   }
@@ -1162,9 +1157,9 @@ void ItemView::OnPan( const PanGesture& gesture )
                                        , DEFAULT_MINIMUM_SWIPE_DURATION, DEFAULT_MAXIMUM_SWIPE_DURATION);
 
         mScrollAnimation = Animation::New(flickAnimationDuration);
-        mScrollAnimation.AnimateTo( Property( mScrollPositionObject, ScrollConnector::SCROLL_POSITION ), firstItemScrollPosition, AlphaFunctions::EaseOut );
-        mScrollAnimation.AnimateTo( Property(self, mPropertyPosition), GetScrollPosition(firstItemScrollPosition, layoutSize), AlphaFunctions::EaseOut );
-        mScrollAnimation.AnimateTo( Property(self, mPropertyScrollSpeed), 0.0f, AlphaFunctions::EaseOut );
+        mScrollAnimation.AnimateTo( Property( mScrollPositionObject, ScrollConnector::SCROLL_POSITION ), firstItemScrollPosition, AlphaFunction::EASE_OUT );
+        mScrollAnimation.AnimateTo( Property(self, mPropertyPosition), GetScrollPosition(firstItemScrollPosition, layoutSize), AlphaFunction::EASE_OUT );
+        mScrollAnimation.AnimateTo( Property(self, mPropertyScrollSpeed), 0.0f, AlphaFunction::EASE_OUT );
 
         mIsFlicking = true;
         // Check whether it has already scrolled to the end
@@ -1306,9 +1301,9 @@ Animation ItemView::DoAnchoring()
     float anchorPosition = mActiveLayout->GetClosestAnchorPosition( GetCurrentLayoutPosition(0) );
 
     anchoringAnimation = Animation::New(mAnchoringDuration);
-    anchoringAnimation.AnimateTo( Property( mScrollPositionObject, ScrollConnector::SCROLL_POSITION ), anchorPosition, AlphaFunctions::EaseOut );
-    anchoringAnimation.AnimateTo( Property(self, mPropertyPosition), GetScrollPosition(anchorPosition, self.GetCurrentSize()), AlphaFunctions::EaseOut );
-    anchoringAnimation.AnimateTo( Property(self, mPropertyScrollSpeed), 0.0f, AlphaFunctions::EaseOut );
+    anchoringAnimation.AnimateTo( Property( mScrollPositionObject, ScrollConnector::SCROLL_POSITION ), anchorPosition, AlphaFunction::EASE_OUT );
+    anchoringAnimation.AnimateTo( Property(self, mPropertyPosition), GetScrollPosition(anchorPosition, self.GetCurrentSize()), AlphaFunction::EASE_OUT );
+    anchoringAnimation.AnimateTo( Property(self, mPropertyScrollSpeed), 0.0f, AlphaFunction::EASE_OUT );
     if(!mIsFlicking)
     {
       AnimateScrollOvershoot(0.0f);
@@ -1368,8 +1363,8 @@ void ItemView::ScrollToItem(unsigned int itemId, float durationSeconds)
   {
     RemoveAnimation(mScrollAnimation);
     mScrollAnimation = Animation::New(durationSeconds);
-    mScrollAnimation.AnimateTo( Property( mScrollPositionObject, ScrollConnector::SCROLL_POSITION ), firstItemScrollPosition, AlphaFunctions::EaseOut );
-    mScrollAnimation.AnimateTo( Property(self, mPropertyPosition), GetScrollPosition(firstItemScrollPosition, layoutSize), AlphaFunctions::EaseOut );
+    mScrollAnimation.AnimateTo( Property( mScrollPositionObject, ScrollConnector::SCROLL_POSITION ), firstItemScrollPosition, AlphaFunction::EASE_OUT );
+    mScrollAnimation.AnimateTo( Property(self, mPropertyPosition), GetScrollPosition(firstItemScrollPosition, layoutSize), AlphaFunction::EASE_OUT );
     mScrollAnimation.FinishedSignal().Connect(this, &ItemView::OnScrollFinished);
     mScrollAnimation.Play();
   }
@@ -1485,8 +1480,8 @@ void ItemView::ScrollTo(const Vector3& position, float duration)
   {
     RemoveAnimation(mScrollAnimation);
     mScrollAnimation = Animation::New(duration);
-    mScrollAnimation.AnimateTo( Property( mScrollPositionObject, ScrollConnector::SCROLL_POSITION ), firstItemScrollPosition, AlphaFunctions::EaseOut );
-    mScrollAnimation.AnimateTo( Property(self, mPropertyPosition), GetScrollPosition(firstItemScrollPosition, layoutSize), AlphaFunctions::EaseOut );
+    mScrollAnimation.AnimateTo( Property( mScrollPositionObject, ScrollConnector::SCROLL_POSITION ), firstItemScrollPosition, AlphaFunction::EASE_OUT );
+    mScrollAnimation.AnimateTo( Property(self, mPropertyPosition), GetScrollPosition(firstItemScrollPosition, layoutSize), AlphaFunction::EASE_OUT );
     mScrollAnimation.FinishedSignal().Connect(this, &ItemView::OnScrollFinished);
     mScrollAnimation.Play();
   }
index a789981..9e8eb84 100644 (file)
@@ -40,8 +40,8 @@ namespace
 // Setup properties, signals and actions using the type-registry.
 DALI_TYPE_REGISTRATION_BEGIN( Toolkit::ScrollConnector, Dali::BaseHandle, NULL )
 
-DALI_SIGNAL_REGISTRATION( ScrollConnector, "domain-changed",          DOMAIN_CHANGED_SIGNAL_NAME          )
-DALI_SIGNAL_REGISTRATION( ScrollConnector, "scroll-position-changed", SCROLL_POSITION_CHANGED_SIGNAL_NAME )
+DALI_SIGNAL_REGISTRATION( Toolkit, ScrollConnector, "domain-changed",          DOMAIN_CHANGED_SIGNAL_NAME          )
+DALI_SIGNAL_REGISTRATION( Toolkit, ScrollConnector, "scroll-position-changed", SCROLL_POSITION_CHANGED_SIGNAL_NAME )
 
 DALI_TYPE_REGISTRATION_END()
 
index 44ceade..ffc7570 100644 (file)
@@ -40,6 +40,13 @@ ScrollBase::ScrollBase()
 {
 }
 
+ScrollBase::ScrollBase( ControlBehaviour behaviourFlags )
+: Scrollable( behaviourFlags ),
+  mParent(NULL),
+  mDelay(0.0f)
+{
+}
+
 void ScrollBase::SetParent(ScrollBase *parent)
 {
   mParent = parent;
index d4fe048..dcc5f74 100644 (file)
@@ -191,6 +191,13 @@ protected:
    */
   ScrollBase();
 
+  /**
+   * @brief Construct a new ScrollBase.
+   *
+   * @param[in] behaviourFlags Flags to enable
+   */
+  ScrollBase( ControlBehaviour behaviourFlags );
+
 protected:
 
   ScrollBase *mParent;                              ///< Pointer to ScrollBase parent, if exists.
index bf13222..ff6c6be 100644 (file)
@@ -20,7 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/animation/animation.h>
-#include <dali/public-api/animation/alpha-functions.h>
+#include <dali/public-api/animation/alpha-function.h>
 #include <dali/public-api/animation/time-period.h>
 #include <dali/public-api/object/ref-object.h>
 
index ecfce55..3d9e2d3 100644 (file)
@@ -20,7 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/animation/animation.h>
-#include <dali/public-api/animation/alpha-functions.h>
+#include <dali/public-api/animation/alpha-function.h>
 #include <dali/public-api/animation/time-period.h>
 #include <dali/public-api/object/ref-object.h>
 
index 8625530..80d4896 100644 (file)
@@ -20,7 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/animation/animation.h>
-#include <dali/public-api/animation/alpha-functions.h>
+#include <dali/public-api/animation/alpha-function.h>
 #include <dali/public-api/animation/time-period.h>
 #include <dali/public-api/object/ref-object.h>
 
index 496d20f..043ca8d 100644 (file)
@@ -209,19 +209,19 @@ BaseHandle Create()
 // Setup properties, signals and actions using the type-registry.
 DALI_TYPE_REGISTRATION_BEGIN( Toolkit::ScrollView, Toolkit::Scrollable, Create )
 
-DALI_ANIMATABLE_PROPERTY_REGISTRATION( ScrollView, "scroll-position", VECTOR3, SCROLL_POSITION)
-DALI_ANIMATABLE_PROPERTY_REGISTRATION( ScrollView, "scroll-pre-position", VECTOR3, SCROLL_PRE_POSITION)
-DALI_ANIMATABLE_PROPERTY_REGISTRATION( ScrollView, "overshoot-x", FLOAT, OVERSHOOT_X)
-DALI_ANIMATABLE_PROPERTY_REGISTRATION( ScrollView, "overshoot-y", FLOAT, OVERSHOOT_Y)
-DALI_ANIMATABLE_PROPERTY_REGISTRATION( ScrollView, "scroll-final", VECTOR3, SCROLL_FINAL)
-DALI_ANIMATABLE_PROPERTY_REGISTRATION( ScrollView, "wrap", BOOLEAN, WRAP)
-DALI_ANIMATABLE_PROPERTY_REGISTRATION( ScrollView, "panning", BOOLEAN, PANNING)
-DALI_ANIMATABLE_PROPERTY_REGISTRATION( ScrollView, "scrolling", BOOLEAN, SCROLLING)
-DALI_ANIMATABLE_PROPERTY_REGISTRATION( ScrollView, "scroll-domain-offset", VECTOR3, SCROLL_DOMAIN_OFFSET)
-DALI_ANIMATABLE_PROPERTY_REGISTRATION( ScrollView, "scroll-position-delta", VECTOR3, SCROLL_POSITION_DELTA)
-DALI_ANIMATABLE_PROPERTY_REGISTRATION( ScrollView, "start-page-position", VECTOR3, START_PAGE_POSITION)
-
-DALI_SIGNAL_REGISTRATION( ScrollView, "value-changed", SIGNAL_SNAP_STARTED )
+DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, ScrollView, "scroll-position",       VECTOR3, SCROLL_POSITION       )
+DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, ScrollView, "scroll-pre-position",   VECTOR3, SCROLL_PRE_POSITION   )
+DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, ScrollView, "overshoot-x",           FLOAT,   OVERSHOOT_X           )
+DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, ScrollView, "overshoot-y",           FLOAT,   OVERSHOOT_Y           )
+DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, ScrollView, "scroll-final",          VECTOR3, SCROLL_FINAL          )
+DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, ScrollView, "wrap",                  BOOLEAN, WRAP                  )
+DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, ScrollView, "panning",               BOOLEAN, PANNING               )
+DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, ScrollView, "scrolling",             BOOLEAN, SCROLLING             )
+DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, ScrollView, "scroll-domain-offset",  VECTOR3, SCROLL_DOMAIN_OFFSET  )
+DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, ScrollView, "scroll-position-delta", VECTOR3, SCROLL_POSITION_DELTA )
+DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, ScrollView, "start-page-position",   VECTOR3, START_PAGE_POSITION   )
+
+DALI_SIGNAL_REGISTRATION( Toolkit, ScrollView, "value-changed", SIGNAL_SNAP_STARTED )
 
 DALI_TYPE_REGISTRATION_END()
 
@@ -489,8 +489,8 @@ void InternalPositionDeltaConstraint( Vector3& current, const PropertyInputConta
  */
 struct InternalFinalConstraint
 {
-  InternalFinalConstraint(AlphaFunction functionX,
-                          AlphaFunction functionY)
+  InternalFinalConstraint(AlphaFunctionPrototype functionX,
+                          AlphaFunctionPrototype functionY)
   : mFunctionX(functionX),
     mFunctionY(functionY)
   {
@@ -507,8 +507,8 @@ struct InternalFinalConstraint
     current = inputs[0]->GetVector3() - offset;
   }
 
-  AlphaFunction mFunctionX;
-  AlphaFunction mFunctionY;
+  AlphaFunctionPrototype mFunctionX;
+  AlphaFunctionPrototype mFunctionY;
 };
 
 }
@@ -534,7 +534,7 @@ Dali::Toolkit::ScrollView ScrollView::New()
 }
 
 ScrollView::ScrollView()
-: ScrollBase(),
+: ScrollBase( ControlBehaviour( REQUIRES_MOUSE_WHEEL_EVENTS ) ),   // Enable size negotiation
   mTouchDownTime(0u),
   mGestureStackDepth(0),
   mScrollStateFlags(0),
@@ -543,13 +543,13 @@ ScrollView::ScrollView()
   mMaxOvershoot(Toolkit::ScrollView::DEFAULT_MAX_OVERSHOOT, Toolkit::ScrollView::DEFAULT_MAX_OVERSHOOT),
   mUserMaxOvershoot(Toolkit::ScrollView::DEFAULT_MAX_OVERSHOOT, Toolkit::ScrollView::DEFAULT_MAX_OVERSHOOT),
   mSnapOvershootDuration(Toolkit::ScrollView::DEFAULT_SNAP_OVERSHOOT_DURATION),
-  mSnapOvershootAlphaFunction(AlphaFunctions::EaseOut),
+  mSnapOvershootAlphaFunction(AlphaFunction::EASE_OUT),
   mSnapDuration(Toolkit::ScrollView::DEFAULT_SLOW_SNAP_ANIMATION_DURATION),
-  mSnapAlphaFunction(AlphaFunctions::EaseOut),
+  mSnapAlphaFunction(AlphaFunction::EASE_OUT),
   mMinFlickDistance(DEFAULT_MIN_FLICK_DISTANCE),
   mFlickSpeedThreshold(DEFAULT_MIN_FLICK_SPEED_THRESHOLD),
   mFlickDuration(Toolkit::ScrollView::DEFAULT_FAST_SNAP_ANIMATION_DURATION),
-  mFlickAlphaFunction(AlphaFunctions::EaseOut),
+  mFlickAlphaFunction(AlphaFunction::EASE_OUT),
   mAxisAutoLockGradient(Toolkit::ScrollView::DEFAULT_AXIS_AUTO_LOCK_GRADIENT),
   mFrictionCoefficient(Toolkit::ScrollView::DEFAULT_FRICTION_COEFFICIENT),
   mFlickSpeedCoefficient(Toolkit::ScrollView::DEFAULT_FLICK_SPEED_COEFFICIENT),
@@ -570,7 +570,6 @@ ScrollView::ScrollView()
   mCanScrollHorizontal(true),
   mCanScrollVertical(true)
 {
-  SetRequiresMouseWheelEvents(true);
 }
 
 void ScrollView::OnInitialize()
@@ -2091,7 +2090,7 @@ void ScrollView::AnimateInternalXTo( float position, float duration, AlphaFuncti
     mInternalXAnimation = Animation::New(duration);
     DALI_LOG_SCROLL_STATE("[0x%X], mInternalXAnimation[0x%X]", this, mInternalXAnimation.GetObjectPtr() );
     mInternalXAnimation.FinishedSignal().Connect(this, &ScrollView::OnScrollAnimationFinished);
-    mInternalXAnimation.AnimateTo( Property(self, Toolkit::ScrollView::Property::SCROLL_PRE_POSITION, 0), position, alpha, duration);
+    mInternalXAnimation.AnimateTo( Property(self, Toolkit::ScrollView::Property::SCROLL_PRE_POSITION, 0), position, alpha, TimePeriod(duration));
     mInternalXAnimation.Play();
 
     // erase current state flags
index 6f6cab6..b57ba4a 100644 (file)
@@ -20,7 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/animation/animation.h>
-#include <dali/public-api/animation/alpha-functions.h>
+#include <dali/public-api/animation/alpha-function.h>
 #include <dali/public-api/animation/time-period.h>
 #include <dali/public-api/object/ref-object.h>
 
index b0c74c1..5e1c5bd 100644 (file)
@@ -20,7 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/animation/animation.h>
-#include <dali/public-api/animation/alpha-functions.h>
+#include <dali/public-api/animation/alpha-function.h>
 #include <dali/public-api/animation/time-period.h>
 #include <dali/public-api/object/ref-object.h>
 
index 405223d..ec76adf 100644 (file)
@@ -20,7 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/animation/animation.h>
-#include <dali/public-api/animation/alpha-functions.h>
+#include <dali/public-api/animation/alpha-function.h>
 #include <dali/public-api/animation/time-period.h>
 #include <dali/public-api/object/ref-object.h>
 
index 573b792..6a2a9e6 100644 (file)
@@ -260,7 +260,7 @@ void ScrollViewWobbleEffect::ContinueAnimation(float endTime)
   Actor scrollView = GetScrollView();
 
   mAnimation = Animation::New(WOBBLEEFFECT_ANIMATION_MAX_TIME);
-  mAnimation.AnimateTo( Property(scrollView, mPropertyTime), endTime, AlphaFunctions::Linear );
+  mAnimation.AnimateTo( Property(scrollView, mPropertyTime), endTime, AlphaFunction::LINEAR );
   mAnimation.FinishedSignal().Connect(this, &ScrollViewWobbleEffect::OnAnimationFinished);
   mAnimation.Play();
 
index e8bf3b5..8aafda9 100644 (file)
@@ -20,7 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/animation/animation.h>
-#include <dali/public-api/animation/alpha-functions.h>
+#include <dali/public-api/animation/alpha-function.h>
 #include <dali/public-api/animation/time-period.h>
 #include <dali/public-api/object/ref-object.h>
 #include <dali/public-api/actors/custom-actor.h>
index 5f7cf72..36934c5 100644 (file)
@@ -47,19 +47,19 @@ BaseHandle Create()
 // Setup properties, signals and actions using the type-registry.
 DALI_TYPE_REGISTRATION_BEGIN( Toolkit::Scrollable, Toolkit::Control, Create );
 
-DALI_PROPERTY_REGISTRATION( Scrollable, "overshoot-effect-color",    VECTOR4, OVERSHOOT_EFFECT_COLOR    )
-DALI_PROPERTY_REGISTRATION( Scrollable, "overshoot-animation-speed", FLOAT,   OVERSHOOT_ANIMATION_SPEED )
+DALI_PROPERTY_REGISTRATION( Toolkit, Scrollable, "overshoot-effect-color",    VECTOR4, OVERSHOOT_EFFECT_COLOR    )
+DALI_PROPERTY_REGISTRATION( Toolkit, Scrollable, "overshoot-animation-speed", FLOAT,   OVERSHOOT_ANIMATION_SPEED )
 
-DALI_ANIMATABLE_PROPERTY_REGISTRATION( Scrollable, "scroll-relative-position", VECTOR3, SCROLL_RELATIVE_POSITION)
-DALI_ANIMATABLE_PROPERTY_REGISTRATION( Scrollable, "scroll-position-min",      VECTOR3, SCROLL_POSITION_MIN)
-DALI_ANIMATABLE_PROPERTY_REGISTRATION( Scrollable, "scroll-position-max",      VECTOR3, SCROLL_POSITION_MAX)
-DALI_ANIMATABLE_PROPERTY_REGISTRATION( Scrollable, "scroll-direction",         VECTOR3, SCROLL_DIRECTION)
-DALI_ANIMATABLE_PROPERTY_REGISTRATION( Scrollable, "can-scroll-vertical",      BOOLEAN, CAN_SCROLL_VERTICAL)
-DALI_ANIMATABLE_PROPERTY_REGISTRATION( Scrollable, "can-scroll-horizontal",    BOOLEAN, CAN_SCROLL_HORIZONTAL)
+DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, Scrollable, "scroll-relative-position", VECTOR3, SCROLL_RELATIVE_POSITION )
+DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, Scrollable, "scroll-position-min",      VECTOR3, SCROLL_POSITION_MIN      )
+DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, Scrollable, "scroll-position-max",      VECTOR3, SCROLL_POSITION_MAX      )
+DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, Scrollable, "scroll-direction",         VECTOR3, SCROLL_DIRECTION         )
+DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, Scrollable, "can-scroll-vertical",      BOOLEAN, CAN_SCROLL_VERTICAL      )
+DALI_ANIMATABLE_PROPERTY_REGISTRATION( Toolkit, Scrollable, "can-scroll-horizontal",    BOOLEAN, CAN_SCROLL_HORIZONTAL    )
 
-DALI_SIGNAL_REGISTRATION(   Scrollable, "scroll-started",                     SIGNAL_SCROLL_STARTED     )
-DALI_SIGNAL_REGISTRATION(   Scrollable, "scroll-completed",                   SIGNAL_SCROLL_COMPLETED   )
-DALI_SIGNAL_REGISTRATION(   Scrollable, "scroll-updated",                     SIGNAL_SCROLL_UPDATED     )
+DALI_SIGNAL_REGISTRATION(              Toolkit, Scrollable, "scroll-started",                    SIGNAL_SCROLL_STARTED    )
+DALI_SIGNAL_REGISTRATION(              Toolkit, Scrollable, "scroll-completed",                  SIGNAL_SCROLL_COMPLETED  )
+DALI_SIGNAL_REGISTRATION(              Toolkit, Scrollable, "scroll-updated",                    SIGNAL_SCROLL_UPDATED    )
 
 DALI_TYPE_REGISTRATION_END()
 
@@ -75,7 +75,15 @@ const float DEFAULT_OVERSHOOT_ANIMATION_SPEED(120.0f); // 120 pixels per second
 // Scrollable controls are not layout containers so they dont need size negotiation..
 // we dont want size negotiation while scrolling if we can avoid it
 Scrollable::Scrollable()
-: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_STYLE_CHANGE_SIGNALS | NO_SIZE_NEGOTIATION ) ),
+: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_STYLE_CHANGE_SIGNALS | DISABLE_SIZE_NEGOTIATION ) ),
+  mOvershootEffectColor(  DEFAULT_OVERSHOOT_COLOUR ),
+  mOvershootAnimationSpeed ( DEFAULT_OVERSHOOT_ANIMATION_SPEED ),
+  mOvershootEnabled(false)
+{
+}
+
+Scrollable::Scrollable( ControlBehaviour behaviourFlags )
+: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_STYLE_CHANGE_SIGNALS | behaviourFlags ) ),
   mOvershootEffectColor(  DEFAULT_OVERSHOOT_COLOUR ),
   mOvershootAnimationSpeed ( DEFAULT_OVERSHOOT_ANIMATION_SPEED ),
   mOvershootEnabled(false)
index eb9f377..1f876ad 100644 (file)
@@ -182,6 +182,13 @@ protected:
   Scrollable();
 
   /**
+   * @brief Construct a new Scrollable.
+   *
+   * @param[in] behaviourFlags Flags to enable
+   */
+  Scrollable( ControlBehaviour behaviourFlags );
+
+  /**
    * A reference counted object may only be deleted by calling Unreference()
    */
   virtual ~Scrollable();
index 2011b7f..8a24887 100644 (file)
@@ -108,7 +108,7 @@ const char* const RENDER_SHADOW_FRAGMENT_SOURCE =
 } // namespace
 
 ShadowView::ShadowView( float downsampleWidthScale, float downsampleHeightScale )
-: Control( CONTROL_BEHAVIOUR_NONE ),
+: Control( ControlBehaviour( ACTOR_BEHAVIOUR_NONE ) ),
   mChildrenRoot(Actor::New()),
   mCachedShadowColor(DEFAULT_SHADOW_COLOR),
   mCachedBackgroundColor(DEFAULT_SHADOW_COLOR.r, DEFAULT_SHADOW_COLOR.g, DEFAULT_SHADOW_COLOR.b, 0.0f),
@@ -226,7 +226,6 @@ void ShadowView::OnInitialize()
 {
   // root actor to parent all user added actors. Used as source actor for shadow render task.
   mChildrenRoot.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
-  mChildrenRoot.SetRelayoutEnabled( true );
   mChildrenRoot.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
 
   Vector2 stageSize = Stage::GetCurrent().GetSize();
@@ -263,7 +262,6 @@ void ShadowView::OnInitialize()
 
   mBlurRootActor = Actor::New();
   mBlurRootActor.SetName( "BLUR_ROOT_ACTOR" );
-  mBlurRootActor.SetRelayoutEnabled( true );
 
   // Turn off inheritance to ensure filter renders properly
   mBlurRootActor.SetPositionInheritanceMode(USE_PARENT_POSITION);
index 4c1b2fa..94d4bbe 100755 (executable)
@@ -52,29 +52,29 @@ BaseHandle Create()
 // Setup properties, signals and actions using the type-registry.
 DALI_TYPE_REGISTRATION_BEGIN( Toolkit::Slider, Toolkit::Control, Create )
 
-DALI_PROPERTY_REGISTRATION( Slider, "lower-bound",            FLOAT,    LOWER_BOUND            )
-DALI_PROPERTY_REGISTRATION( Slider, "upper-bound",            FLOAT,    UPPER_BOUND            )
-DALI_PROPERTY_REGISTRATION( Slider, "value",                  FLOAT,    VALUE                  )
-DALI_PROPERTY_REGISTRATION( Slider, "hit-region",             VECTOR2,  HIT_REGION             )
-DALI_PROPERTY_REGISTRATION( Slider, "backing-region",         VECTOR2,  BACKING_REGION         )
-DALI_PROPERTY_REGISTRATION( Slider, "handle-region",          VECTOR2,  HANDLE_REGION          )
-DALI_PROPERTY_REGISTRATION( Slider, "backing-image-name",     STRING,   BACKING_IMAGE_NAME     )
-DALI_PROPERTY_REGISTRATION( Slider, "handle-image-name",      STRING,   HANDLE_IMAGE_NAME      )
-DALI_PROPERTY_REGISTRATION( Slider, "progress-image-name",    STRING,   PROGRESS_IMAGE_NAME    )
-DALI_PROPERTY_REGISTRATION( Slider, "popup-image-name",       STRING,   POPUP_IMAGE_NAME       )
-DALI_PROPERTY_REGISTRATION( Slider, "popup-arrow-image-name", STRING,   POPUP_ARROW_IMAGE_NAME )
-DALI_PROPERTY_REGISTRATION( Slider, "disable-color",          VECTOR4,  DISABLE_COLOR          )
-DALI_PROPERTY_REGISTRATION( Slider, "popup-text-color",       VECTOR4,  POPUP_TEXT_COLOR       )
-DALI_PROPERTY_REGISTRATION( Slider, "value-precision",        INTEGER,  VALUE_PRECISION        )
-DALI_PROPERTY_REGISTRATION( Slider, "show-popup",             BOOLEAN,  SHOW_POPUP             )
-DALI_PROPERTY_REGISTRATION( Slider, "show-value",             BOOLEAN,  SHOW_VALUE             )
-DALI_PROPERTY_REGISTRATION( Slider, "enabled",                BOOLEAN,  ENABLED                )
-DALI_PROPERTY_REGISTRATION( Slider, "marks",                  ARRAY,    MARKS                  )
-DALI_PROPERTY_REGISTRATION( Slider, "snap-to-marks",          BOOLEAN,  SNAP_TO_MARKS          )
-DALI_PROPERTY_REGISTRATION( Slider, "mark-tolerance",         FLOAT,    MARK_TOLERANCE         )
-
-DALI_SIGNAL_REGISTRATION(   Slider, "value-changed",                    SIGNAL_VALUE_CHANGED   )
-DALI_SIGNAL_REGISTRATION(   Slider, "mark",                             SIGNAL_MARK            )
+DALI_PROPERTY_REGISTRATION( Toolkit, Slider, "lower-bound",            FLOAT,    LOWER_BOUND            )
+DALI_PROPERTY_REGISTRATION( Toolkit, Slider, "upper-bound",            FLOAT,    UPPER_BOUND            )
+DALI_PROPERTY_REGISTRATION( Toolkit, Slider, "value",                  FLOAT,    VALUE                  )
+DALI_PROPERTY_REGISTRATION( Toolkit, Slider, "hit-region",             VECTOR2,  HIT_REGION             )
+DALI_PROPERTY_REGISTRATION( Toolkit, Slider, "backing-region",         VECTOR2,  BACKING_REGION         )
+DALI_PROPERTY_REGISTRATION( Toolkit, Slider, "handle-region",          VECTOR2,  HANDLE_REGION          )
+DALI_PROPERTY_REGISTRATION( Toolkit, Slider, "backing-image-name",     STRING,   BACKING_IMAGE_NAME     )
+DALI_PROPERTY_REGISTRATION( Toolkit, Slider, "handle-image-name",      STRING,   HANDLE_IMAGE_NAME      )
+DALI_PROPERTY_REGISTRATION( Toolkit, Slider, "progress-image-name",    STRING,   PROGRESS_IMAGE_NAME    )
+DALI_PROPERTY_REGISTRATION( Toolkit, Slider, "popup-image-name",       STRING,   POPUP_IMAGE_NAME       )
+DALI_PROPERTY_REGISTRATION( Toolkit, Slider, "popup-arrow-image-name", STRING,   POPUP_ARROW_IMAGE_NAME )
+DALI_PROPERTY_REGISTRATION( Toolkit, Slider, "disable-color",          VECTOR4,  DISABLE_COLOR          )
+DALI_PROPERTY_REGISTRATION( Toolkit, Slider, "popup-text-color",       VECTOR4,  POPUP_TEXT_COLOR       )
+DALI_PROPERTY_REGISTRATION( Toolkit, Slider, "value-precision",        INTEGER,  VALUE_PRECISION        )
+DALI_PROPERTY_REGISTRATION( Toolkit, Slider, "show-popup",             BOOLEAN,  SHOW_POPUP             )
+DALI_PROPERTY_REGISTRATION( Toolkit, Slider, "show-value",             BOOLEAN,  SHOW_VALUE             )
+DALI_PROPERTY_REGISTRATION( Toolkit, Slider, "enabled",                BOOLEAN,  ENABLED                )
+DALI_PROPERTY_REGISTRATION( Toolkit, Slider, "marks",                  ARRAY,    MARKS                  )
+DALI_PROPERTY_REGISTRATION( Toolkit, Slider, "snap-to-marks",          BOOLEAN,  SNAP_TO_MARKS          )
+DALI_PROPERTY_REGISTRATION( Toolkit, Slider, "mark-tolerance",         FLOAT,    MARK_TOLERANCE         )
+
+DALI_SIGNAL_REGISTRATION(   Toolkit, Slider, "value-changed",                    SIGNAL_VALUE_CHANGED   )
+DALI_SIGNAL_REGISTRATION(   Toolkit, Slider, "mark",                             SIGNAL_MARK            )
 
 DALI_TYPE_REGISTRATION_END()
 
@@ -96,6 +96,7 @@ const float DEFAULT_WIDTH = 0.0f;
 const float DEFAULT_HEIGHT = 27.0f;
 const float DEFAULT_HIT_HEIGHT = 72.0f;
 const float DEFAULT_HANDLE_HEIGHT = DEFAULT_HIT_HEIGHT;
+const float POPUP_TEXT_PADDING = 10.0f;
 
 const char* SKINNED_BACKING_IMAGE_NAME = DALI_IMAGE_DIR "slider-skin.9.png";
 const char* SKINNED_HANDLE_IMAGE_NAME = DALI_IMAGE_DIR "slider-skin-handle.png";;
@@ -326,15 +327,7 @@ void Slider::DisplayValue( float value, bool raiseSignals )
   // Progress bar
   if( mProgress )
   {
-    if( clampledValue > 0.0f )
-    {
-      mProgress.SetVisible( true ); // Deliberately set this in case multiple SetValues are fired at once
-      mProgress.SetSize( x, GetBackingRegion().y );
-    }
-    else
-    {
-      mProgress.SetVisible( false );
-    }
+    mProgress.SetSize( x, GetBackingRegion().y );
   }
 
   // Signals
@@ -400,7 +393,6 @@ Actor Slider::CreateHitRegion()
 ImageActor Slider::CreateBacking()
 {
   ImageActor backing = ImageActor::New();
-  backing.SetRelayoutEnabled( false );
   backing.SetParentOrigin( ParentOrigin::CENTER );
   backing.SetAnchorPoint( AnchorPoint::CENTER );
   backing.SetZ( BACKING_Z );
@@ -430,7 +422,6 @@ std::string Slider::GetBackingImageName()
 ImageActor Slider::CreateProgress()
 {
   ImageActor progress = ImageActor::New();
-  progress.SetRelayoutEnabled( false );
   progress.SetParentOrigin( ParentOrigin::CENTER_LEFT );
   progress.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
   progress.SetZ( PROGRESS_Z );
@@ -506,7 +497,6 @@ void Slider::ResizeProgressRegion( const Vector2& region )
 ImageActor Slider::CreateHandle()
 {
   ImageActor handle = ImageActor::New();
-  handle.SetRelayoutEnabled( false );
   handle.SetParentOrigin( ParentOrigin::CENTER_LEFT );
   handle.SetAnchorPoint( AnchorPoint::CENTER );
   handle.SetZ( HANDLE_Z );
@@ -517,7 +507,6 @@ ImageActor Slider::CreateHandle()
 ImageActor Slider::CreatePopupArrow()
 {
   ImageActor arrow = ImageActor::New();
-  arrow.SetRelayoutEnabled( false );
   arrow.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
   arrow.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
   arrow.SetZ( HANDLE_Z );
@@ -530,18 +519,21 @@ Toolkit::TextLabel Slider::CreatePopupText()
   Toolkit::TextLabel textLabel = Toolkit::TextLabel::New();
   textLabel.SetParentOrigin( ParentOrigin::CENTER );
   textLabel.SetAnchorPoint( AnchorPoint::CENTER );
+  textLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
   textLabel.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
   textLabel.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
+  textLabel.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, DEFAULT_POPUP_TEXT_COLOR );
   textLabel.SetZ( VALUE_DISPLAY_TEXT_Z );
+  textLabel.SetPadding( Padding( POPUP_TEXT_PADDING, POPUP_TEXT_PADDING, 0.0f, 0.0f ) );
   return textLabel;
 }
 
 ImageActor Slider::CreatePopup()
 {
   ImageActor popup = ImageActor::New();
-  popup.SetRelayoutEnabled( false );
   popup.SetParentOrigin( ParentOrigin::TOP_CENTER );
   popup.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
+  popup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::WIDTH );
 
   mValueTextLabel = CreatePopupText();
   popup.Add( mValueTextLabel );
index f2b8a5f..008a0e5 100644 (file)
@@ -97,14 +97,14 @@ BaseHandle Create()
 // Setup properties, signals and actions using the type-registry.
 DALI_TYPE_REGISTRATION_BEGIN( Toolkit::SuperBlurView, Toolkit::Control, Create )
 
-DALI_PROPERTY_REGISTRATION( SuperBlurView, "image", MAP, IMAGE )
+DALI_PROPERTY_REGISTRATION( Toolkit, SuperBlurView, "image", MAP, IMAGE )
 
 DALI_TYPE_REGISTRATION_END()
 
 } // unnamed namespace
 
 SuperBlurView::SuperBlurView( unsigned int blurLevels )
-: Control( CONTROL_BEHAVIOUR_NONE ),
+: Control( ControlBehaviour( DISABLE_SIZE_NEGOTIATION ) ),
   mBlurLevels( blurLevels ),
   mBlurStrengthPropertyIndex(Property::INVALID_INDEX),
   mResourcesCleared( true ),
index ec8e324..3dc2be3 100644 (file)
@@ -126,11 +126,11 @@ BaseHandle Create()
 // Setup properties, signals and actions using the type-registry.
 DALI_TYPE_REGISTRATION_BEGIN( Toolkit::TableView, Toolkit::Control, Create );
 
-DALI_PROPERTY_REGISTRATION( TableView, "rows",           UNSIGNED_INTEGER, ROWS           )
-DALI_PROPERTY_REGISTRATION( TableView, "columns",        UNSIGNED_INTEGER, COLUMNS        )
-DALI_PROPERTY_REGISTRATION( TableView, "cell-padding",   VECTOR2,          CELL_PADDING   )
-DALI_PROPERTY_REGISTRATION( TableView, "layout-rows",    MAP,              LAYOUT_ROWS    )
-DALI_PROPERTY_REGISTRATION( TableView, "layout-columns", MAP,              LAYOUT_COLUMNS )
+DALI_PROPERTY_REGISTRATION( Toolkit, TableView, "rows",           UNSIGNED_INTEGER, ROWS           )
+DALI_PROPERTY_REGISTRATION( Toolkit, TableView, "columns",        UNSIGNED_INTEGER, COLUMNS        )
+DALI_PROPERTY_REGISTRATION( Toolkit, TableView, "cell-padding",   VECTOR2,          CELL_PADDING   )
+DALI_PROPERTY_REGISTRATION( Toolkit, TableView, "layout-rows",    MAP,              LAYOUT_ROWS    )
+DALI_PROPERTY_REGISTRATION( Toolkit, TableView, "layout-columns", MAP,              LAYOUT_COLUMNS )
 
 DALI_TYPE_REGISTRATION_END()
 
@@ -1461,10 +1461,11 @@ void TableView::CalculateFixedSizes( RowColumnArray& data, Dimension::Type dimen
         DALI_ASSERT_DEBUG( row < mCellData.GetRows() );
         DALI_ASSERT_DEBUG( column < mCellData.GetColumns() );
 
-        Actor& actor = mCellData[ row ][ column ].actor;
+        const CellData& cellData = mCellData[ row ][ column ];
+        const Actor& actor = cellData.actor;
         if( actor )
         {
-          if( FitToChild( actor, dimension ) )
+          if( FitToChild( actor, dimension ) && ( dimension == Dimension::WIDTH ) ? ( cellData.position.columnSpan == 1 ) : ( cellData.position.rowSpan == 1 )  )
           {
             maxActorHeight = std::max( maxActorHeight, actor.GetRelayoutSize( dimension ) + cellPadding.x + cellPadding.y );
           }
index f17ea34..d6e763d 100644 (file)
@@ -20,6 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <string>
+#include <cstring>
 #include <dali/public-api/adaptor-framework/key.h>
 #include <dali/public-api/common/stage.h>
 #include <dali/public-api/images/resource-image.h>
@@ -79,22 +80,37 @@ BaseHandle Create()
 // Setup properties, signals and actions using the type-registry.
 DALI_TYPE_REGISTRATION_BEGIN( Toolkit::TextField, Toolkit::Control, Create );
 
-DALI_PROPERTY_REGISTRATION( TextField, "rendering-backend",       INTEGER,   RENDERING_BACKEND       )
-DALI_PROPERTY_REGISTRATION( TextField, "placeholder-text",        STRING,    PLACEHOLDER_TEXT        )
-DALI_PROPERTY_REGISTRATION( TextField, "text",                    STRING,    TEXT                    )
-DALI_PROPERTY_REGISTRATION( TextField, "font-family",             STRING,    FONT_FAMILY             )
-DALI_PROPERTY_REGISTRATION( TextField, "font-style",              STRING,    FONT_STYLE              )
-DALI_PROPERTY_REGISTRATION( TextField, "point-size",              FLOAT,     POINT_SIZE              )
-DALI_PROPERTY_REGISTRATION( TextField, "exceed-policy",           INTEGER,   EXCEED_POLICY           )
-DALI_PROPERTY_REGISTRATION( TextField, "primary-cursor-color",    VECTOR4,   PRIMARY_CURSOR_COLOR    )
-DALI_PROPERTY_REGISTRATION( TextField, "secondary-cursor-color",  VECTOR4,   SECONDARY_CURSOR_COLOR  )
-DALI_PROPERTY_REGISTRATION( TextField, "enable-cursor-blink",     BOOLEAN,   ENABLE_CURSOR_BLINK     )
-DALI_PROPERTY_REGISTRATION( TextField, "cursor-blink-interval",   FLOAT,     CURSOR_BLINK_INTERVAL   )
-DALI_PROPERTY_REGISTRATION( TextField, "cursor-blink-duration",   FLOAT,     CURSOR_BLINK_DURATION   )
-DALI_PROPERTY_REGISTRATION( TextField, "grab-handle-image",       STRING,    GRAB_HANDLE_IMAGE       )
-DALI_PROPERTY_REGISTRATION( TextField, "decoration-bounding-box", RECTANGLE, DECORATION_BOUNDING_BOX )
-DALI_PROPERTY_REGISTRATION( TextField, "horizontal-alignment",    STRING,    HORIZONTAL_ALIGNMENT    )
-DALI_PROPERTY_REGISTRATION( TextField, "vertical-alignment",      STRING,    VERTICAL_ALIGNMENT      )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "rendering-backend",                    INTEGER,   RENDERING_BACKEND                    )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "placeholder-text",                     STRING,    PLACEHOLDER_TEXT                     )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "text",                                 STRING,    TEXT                                 )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "font-family",                          STRING,    FONT_FAMILY                          )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "font-style",                           STRING,    FONT_STYLE                           )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "point-size",                           FLOAT,     POINT_SIZE                           )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "max-length",                           INTEGER,   MAX_LENGTH                           )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "exceed-policy",                        INTEGER,   EXCEED_POLICY                        )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "horizontal-alignment",                 STRING,    HORIZONTAL_ALIGNMENT                 )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "vertical-alignment",                   STRING,    VERTICAL_ALIGNMENT                   )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "text-color",                           VECTOR4,   TEXT_COLOR                           )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "shadow-offset",                        VECTOR2,   SHADOW_OFFSET                        )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "shadow-color",                         VECTOR4,   SHADOW_COLOR                         )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "primary-cursor-color",                 VECTOR4,   PRIMARY_CURSOR_COLOR                 )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "secondary-cursor-color",               VECTOR4,   SECONDARY_CURSOR_COLOR               )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "enable-cursor-blink",                  BOOLEAN,   ENABLE_CURSOR_BLINK                  )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "cursor-blink-interval",                FLOAT,     CURSOR_BLINK_INTERVAL                )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "cursor-blink-duration",                FLOAT,     CURSOR_BLINK_DURATION                )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "grab-handle-image",                    STRING,    GRAB_HANDLE_IMAGE                    )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "grab-handle-pressed-image",            VECTOR4,   GRAB_HANDLE_PRESSED_IMAGE            )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "scroll-threshold",                     FLOAT,     SCROLL_THRESHOLD                     )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "scroll-speed",                         FLOAT,     SCROLL_SPEED                         )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "selection-handle-image-left",          STRING,    SELECTION_HANDLE_IMAGE_LEFT          )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "selection-handle-image-right",         STRING,    SELECTION_HANDLE_IMAGE_RIGHT         )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "selection-handle-pressed-image-left",  STRING,    SELECTION_HANDLE_PRESSED_IMAGE_LEFT  )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "selection-handle-pressed-image-right", STRING,    SELECTION_HANDLE_PRESSED_IMAGE_RIGHT )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "selection-highlight-color",            STRING,    SELECTION_HIGHLIGHT_COLOR            )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextField, "decoration-bounding-box",              RECTANGLE, DECORATION_BOUNDING_BOX              )
+
+DALI_SIGNAL_REGISTRATION( Toolkit, TextField, "max-length-reached", SIGNAL_MAX_LENGTH_REACHED )
+
 DALI_TYPE_REGISTRATION_END()
 
 } // namespace
@@ -185,7 +201,7 @@ void TextField::SetProperty( BaseObject* object, Property::Index index, const Pr
         {
           float pointSize = value.Get< float >();
 
-          if( impl.mController->GetDefaultPointSize() != pointSize /*TODO - epsilon*/ )
+          if( !Equals( impl.mController->GetDefaultPointSize(), pointSize ) )
           {
             impl.mController->SetDefaultPointSize( pointSize );
             impl.RequestTextRelayout();
@@ -198,6 +214,73 @@ void TextField::SetProperty( BaseObject* object, Property::Index index, const Pr
         impl.mExceedPolicy = value.Get< int >();
         break;
       }
+      case Toolkit::TextField::Property::HORIZONTAL_ALIGNMENT:
+      {
+        LayoutEngine& engine = impl.mController->GetLayoutEngine();
+        const LayoutEngine::HorizontalAlignment alignment = Scripting::GetEnumeration< Toolkit::Text::LayoutEngine::HorizontalAlignment >( value.Get< std::string >().c_str(),
+                                                                                                                                           HORIZONTAL_ALIGNMENT_STRING_TABLE,
+                                                                                                                                           HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT );
+
+        if( engine.GetHorizontalAlignment() != alignment )
+        {
+          engine.SetHorizontalAlignment( alignment );
+          impl.RequestTextRelayout();
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::VERTICAL_ALIGNMENT:
+      {
+        LayoutEngine& engine = impl.mController->GetLayoutEngine();
+        const LayoutEngine::VerticalAlignment alignment = Scripting::GetEnumeration< Toolkit::Text::LayoutEngine::VerticalAlignment >( value.Get< std::string >().c_str(),
+                                                                                                                                       VERTICAL_ALIGNMENT_STRING_TABLE,
+                                                                                                                                       VERTICAL_ALIGNMENT_STRING_TABLE_COUNT );
+
+        if( engine.GetVerticalAlignment() != alignment )
+        {
+          engine.SetVerticalAlignment( alignment );
+          impl.RequestTextRelayout();
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::TEXT_COLOR:
+      {
+        if ( impl.mController )
+        {
+          Vector4 textColor = value.Get< Vector4 >();
+          if ( impl.mController->GetTextColor() != textColor )
+          {
+            impl.mController->SetTextColor( textColor );
+            impl.RequestTextRelayout();
+          }
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::SHADOW_OFFSET:
+      {
+        if( impl.mController )
+        {
+          Vector2 shadowOffset = value.Get< Vector2 >();
+          if ( impl.mController->GetShadowOffset() != shadowOffset )
+          {
+            impl.mController->SetShadowOffset( shadowOffset );
+            impl.RequestTextRelayout();
+          }
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::SHADOW_COLOR:
+      {
+        if( impl.mController )
+        {
+          Vector4 shadowColor = value.Get< Vector4 >();
+          if ( impl.mController->GetShadowColor() != shadowColor )
+          {
+            impl.mController->SetShadowColor( shadowColor );
+            impl.RequestTextRelayout();
+          }
+        }
+        break;
+      }
       case Toolkit::TextField::Property::PRIMARY_CURSOR_COLOR:
       {
         if( impl.mDecorator )
@@ -244,43 +327,103 @@ void TextField::SetProperty( BaseObject* object, Property::Index index, const Pr
 
         if( impl.mDecorator )
         {
-          impl.mDecorator->SetGrabHandleImage( image );
+          impl.mDecorator->SetHandleImage( GRAB_HANDLE, HANDLE_IMAGE_RELEASED, image );
         }
         break;
       }
-      case Toolkit::TextField::Property::DECORATION_BOUNDING_BOX:
+      case Toolkit::TextField::Property::GRAB_HANDLE_PRESSED_IMAGE:
       {
+        ResourceImage image = ResourceImage::New( value.Get< std::string >() );
+
         if( impl.mDecorator )
         {
-          impl.mDecorator->SetBoundingBox( value.Get< Rect<int> >() );
+          impl.mDecorator->SetHandleImage( GRAB_HANDLE, HANDLE_IMAGE_PRESSED, image );
         }
         break;
       }
-      case Toolkit::TextField::Property::HORIZONTAL_ALIGNMENT:
+      case Toolkit::TextField::Property::SCROLL_THRESHOLD:
       {
-        LayoutEngine& engine = impl.mController->GetLayoutEngine();
-        const LayoutEngine::HorizontalAlignment alignment = Scripting::GetEnumeration< Toolkit::Text::LayoutEngine::HorizontalAlignment >( value.Get< std::string >().c_str(),
-                                                                                                                                           HORIZONTAL_ALIGNMENT_STRING_TABLE,
-                                                                                                                                           HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT );
+        float threshold = value.Get< float >();
 
-        if( engine.GetHorizontalAlignment() != alignment )
+        if( impl.mDecorator )
         {
-          engine.SetHorizontalAlignment( alignment );
-          impl.RequestTextRelayout();
+          impl.mDecorator->SetScrollThreshold( threshold );
         }
         break;
       }
-      case Toolkit::TextField::Property::VERTICAL_ALIGNMENT:
+      case Toolkit::TextField::Property::SCROLL_SPEED:
       {
-        LayoutEngine& engine = impl.mController->GetLayoutEngine();
-        const LayoutEngine::VerticalAlignment alignment = Scripting::GetEnumeration< Toolkit::Text::LayoutEngine::VerticalAlignment >( value.Get< std::string >().c_str(),
-                                                                                                                                       VERTICAL_ALIGNMENT_STRING_TABLE,
-                                                                                                                                       VERTICAL_ALIGNMENT_STRING_TABLE_COUNT );
+        float speed = value.Get< float >();
 
-        if( engine.GetVerticalAlignment() != alignment )
+        if( impl.mDecorator )
         {
-          engine.SetVerticalAlignment( alignment );
-          impl.RequestTextRelayout();
+          impl.mDecorator->SetScrollSpeed( speed );
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::SELECTION_HANDLE_IMAGE_LEFT:
+      {
+        ResourceImage image = ResourceImage::New( value.Get< std::string >() );
+
+        if( impl.mDecorator )
+        {
+          impl.mDecorator->SetHandleImage( LEFT_SELECTION_HANDLE, HANDLE_IMAGE_RELEASED, image );
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::SELECTION_HANDLE_IMAGE_RIGHT:
+      {
+        ResourceImage image = ResourceImage::New( value.Get< std::string >() );
+
+        if( impl.mDecorator )
+        {
+          impl.mDecorator->SetHandleImage( RIGHT_SELECTION_HANDLE, HANDLE_IMAGE_RELEASED, image );
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::SELECTION_HANDLE_PRESSED_IMAGE_LEFT:
+      {
+        ResourceImage image = ResourceImage::New( value.Get< std::string >() );
+
+        if( impl.mDecorator )
+        {
+          impl.mDecorator->SetHandleImage( LEFT_SELECTION_HANDLE, HANDLE_IMAGE_PRESSED, image );
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::SELECTION_HANDLE_PRESSED_IMAGE_RIGHT:
+      {
+        ResourceImage image = ResourceImage::New( value.Get< std::string >() );
+
+        if( impl.mDecorator )
+        {
+          impl.mDecorator->SetHandleImage( RIGHT_SELECTION_HANDLE, HANDLE_IMAGE_PRESSED, image );
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::SELECTION_HIGHLIGHT_COLOR:
+      {
+        Vector4 color = value.Get< Vector4 >();
+
+        if( impl.mDecorator )
+        {
+          impl.mDecorator->SetHighlightColor( color );
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::DECORATION_BOUNDING_BOX:
+      {
+        if( impl.mDecorator )
+        {
+          impl.mDecorator->SetBoundingBox( value.Get< Rect<int> >() );
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::MAX_LENGTH:
+      {
+        if( impl.mController )
+        {
+          impl.mController->SetMaximumNumberOfCharacters( value.Get< int >() );
         }
         break;
       }
@@ -330,6 +473,50 @@ Property::Value TextField::GetProperty( BaseObject* object, Property::Index inde
         value = impl.mExceedPolicy;
         break;
       }
+      case Toolkit::TextField::Property::HORIZONTAL_ALIGNMENT:
+      {
+        if( impl.mController )
+        {
+          value = std::string( Scripting::GetEnumerationName< Toolkit::Text::LayoutEngine::HorizontalAlignment >( impl.mController->GetLayoutEngine().GetHorizontalAlignment(),
+                                                                                                                  HORIZONTAL_ALIGNMENT_STRING_TABLE,
+                                                                                                                  HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT ) );
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::VERTICAL_ALIGNMENT:
+      {
+        if( impl.mController )
+        {
+          value = std::string( Scripting::GetEnumerationName< Toolkit::Text::LayoutEngine::VerticalAlignment >( impl.mController->GetLayoutEngine().GetVerticalAlignment(),
+                                                                                                                  VERTICAL_ALIGNMENT_STRING_TABLE,
+                                                                                                                  VERTICAL_ALIGNMENT_STRING_TABLE_COUNT ) );
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::TEXT_COLOR:
+      {
+        if ( impl.mController )
+        {
+          value = impl.mController->GetTextColor();
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::SHADOW_OFFSET:
+      {
+        if ( impl.mController )
+        {
+          value = impl.mController->GetShadowOffset();
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::SHADOW_COLOR:
+      {
+        if ( impl.mController )
+        {
+          value = impl.mController->GetShadowColor();
+        }
+        break;
+      }
       case Toolkit::TextField::Property::PRIMARY_CURSOR_COLOR:
       {
         if( impl.mDecorator )
@@ -367,31 +554,115 @@ Property::Value TextField::GetProperty( BaseObject* object, Property::Index inde
         }
         break;
       }
-      case Toolkit::TextField::Property::DECORATION_BOUNDING_BOX:
+      case Toolkit::TextField::Property::GRAB_HANDLE_IMAGE:
       {
         if( impl.mDecorator )
         {
-          value = impl.mDecorator->GetBoundingBox();
+          ResourceImage image = ResourceImage::DownCast( impl.mDecorator->GetHandleImage( GRAB_HANDLE, HANDLE_IMAGE_RELEASED ) );
+          if( image )
+          {
+            value = image.GetUrl();
+          }
         }
         break;
       }
-      case Toolkit::TextField::Property::HORIZONTAL_ALIGNMENT:
+      case Toolkit::TextField::Property::GRAB_HANDLE_PRESSED_IMAGE:
       {
-        if( impl.mController )
+        if( impl.mDecorator )
         {
-          value = std::string( Scripting::GetEnumerationName< Toolkit::Text::LayoutEngine::HorizontalAlignment >( impl.mController->GetLayoutEngine().GetHorizontalAlignment(),
-                                                                                                                  HORIZONTAL_ALIGNMENT_STRING_TABLE,
-                                                                                                                  HORIZONTAL_ALIGNMENT_STRING_TABLE_COUNT ) );
+          ResourceImage image = ResourceImage::DownCast( impl.mDecorator->GetHandleImage( GRAB_HANDLE, HANDLE_IMAGE_PRESSED ) );
+          if( image )
+          {
+            value = image.GetUrl();
+          }
         }
         break;
       }
-      case Toolkit::TextField::Property::VERTICAL_ALIGNMENT:
+      case Toolkit::TextField::Property::SCROLL_THRESHOLD:
+      {
+        if( impl.mDecorator )
+        {
+          value = impl.mDecorator->GetScrollThreshold();
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::SCROLL_SPEED:
+      {
+        if( impl.mDecorator )
+        {
+          value = impl.mDecorator->GetScrollSpeed();
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::SELECTION_HANDLE_IMAGE_LEFT:
+      {
+        if( impl.mDecorator )
+        {
+          ResourceImage image = ResourceImage::DownCast( impl.mDecorator->GetHandleImage( LEFT_SELECTION_HANDLE, HANDLE_IMAGE_RELEASED ) );
+          if( image )
+          {
+            value = image.GetUrl();
+          }
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::SELECTION_HANDLE_IMAGE_RIGHT:
+      {
+        if( impl.mDecorator )
+        {
+          ResourceImage image = ResourceImage::DownCast( impl.mDecorator->GetHandleImage( RIGHT_SELECTION_HANDLE, HANDLE_IMAGE_RELEASED ) );
+          if( image )
+          {
+            value = image.GetUrl();
+          }
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::SELECTION_HANDLE_PRESSED_IMAGE_LEFT:
+      {
+        if( impl.mDecorator )
+        {
+          ResourceImage image = ResourceImage::DownCast( impl.mDecorator->GetHandleImage( LEFT_SELECTION_HANDLE, HANDLE_IMAGE_PRESSED ) );
+          if( image )
+          {
+            value = image.GetUrl();
+          }
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::SELECTION_HANDLE_PRESSED_IMAGE_RIGHT:
+      {
+        if( impl.mDecorator )
+        {
+          ResourceImage image = ResourceImage::DownCast( impl.mDecorator->GetHandleImage( RIGHT_SELECTION_HANDLE, HANDLE_IMAGE_PRESSED ) );
+          if( image )
+          {
+            value = image.GetUrl();
+          }
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::SELECTION_HIGHLIGHT_COLOR:
+      {
+        if( impl.mDecorator )
+        {
+          value = impl.mDecorator->GetHighlightColor();
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::DECORATION_BOUNDING_BOX:
+      {
+        if( impl.mDecorator )
+        {
+          value = impl.mDecorator->GetBoundingBox();
+        }
+        break;
+      }
+      case Toolkit::TextField::Property::MAX_LENGTH:
       {
         if( impl.mController )
         {
-          value = std::string( Scripting::GetEnumerationName< Toolkit::Text::LayoutEngine::VerticalAlignment >( impl.mController->GetLayoutEngine().GetVerticalAlignment(),
-                                                                                                                  VERTICAL_ALIGNMENT_STRING_TABLE,
-                                                                                                                  VERTICAL_ALIGNMENT_STRING_TABLE_COUNT ) );
+          value = impl.mController->GetMaximumNumberOfCharacters();
         }
         break;
       }
@@ -401,6 +672,31 @@ Property::Value TextField::GetProperty( BaseObject* object, Property::Index inde
   return value;
 }
 
+bool TextField::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
+{
+  Dali::BaseHandle handle( object );
+
+  bool connected( true );
+  Toolkit::TextField field = Toolkit::TextField::DownCast( handle );
+
+  if( 0 == strcmp( signalName.c_str(), SIGNAL_MAX_LENGTH_REACHED ) )
+  {
+    field.MaxLengthReachedSignal().Connect( tracker, functor );
+  }
+  else
+  {
+    // signalName does not match any signal
+    connected = false;
+  }
+
+  return connected;
+}
+
+Toolkit::TextField::MaxLengthReachedSignalType& TextField::MaxLengthReachedSignal()
+{
+  return mMaxLengthReachedSignal;
+}
+
 void TextField::OnInitialize()
 {
   Actor self = Self();
@@ -450,14 +746,9 @@ void TextField::OnRelayout( const Vector2& size, RelayoutContainer& container )
   if( mController->Relayout( size ) ||
       !mRenderer )
   {
-    const Vector2& scrollPosition = mController->GetScrollPosition();
-    const Vector2& alignmentOffset = mController->GetAlignmentOffset();
-
-    Vector2 offset = scrollPosition + alignmentOffset;
-
     if( mDecorator )
     {
-      mDecorator->Relayout( size, offset );
+      mDecorator->Relayout( size );
     }
 
     if( !mRenderer )
@@ -481,6 +772,8 @@ void TextField::OnRelayout( const Vector2& size, RelayoutContainer& container )
 
     if( mRenderableActor )
     {
+      const Vector2 offset = mController->GetScrollPosition() + mController->GetAlignmentOffset();
+
       mRenderableActor.SetPosition( offset.x, offset.y );
 
       // Make sure the actor is parented correctly with/without clipping
@@ -514,6 +807,8 @@ void TextField::OnKeyInputFocusGained()
   }
 
   mController->KeyboardFocusGainEvent();
+
+  EmitKeyInputFocusSignal( true ); // Calls back into the Control hence done last.
 }
 
 void TextField::OnKeyInputFocusLost()
@@ -533,6 +828,8 @@ void TextField::OnKeyInputFocusLost()
   }
 
   mController->KeyboardFocusLostEvent();
+
+  EmitKeyInputFocusSignal( false ); // Calls back into the Control hence done last.
 }
 
 void TextField::OnTap( const TapGesture& gesture )
@@ -590,6 +887,12 @@ void TextField::RequestTextRelayout()