[dali_1.0.17] Merge branch 'tizen' 69/30269/1
authorNick Holland <nick.holland@partner.samsung.com>
Thu, 13 Nov 2014 11:37:08 +0000 (11:37 +0000)
committerNick Holland <nick.holland@partner.samsung.com>
Thu, 13 Nov 2014 11:37:12 +0000 (11:37 +0000)
Change-Id: I5fe6b0ab05561b913733db15e4857b99f16573d7

114 files changed:
automated-tests/README.md [new file with mode: 0644]
automated-tests/scripts/add_style.pl
automated-tests/src/dali-toolkit-unmanaged/CMakeLists.txt
automated-tests/src/dali-toolkit-unmanaged/utc-Dali-AlbumLayout.cpp [deleted file]
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.h
automated-tests/src/dali-toolkit/utc-Dali-ScrollViewEffect.cpp
base/dali-toolkit/internal/builder/builder-actor.cpp
base/dali-toolkit/internal/builder/builder-animations.cpp
base/dali-toolkit/internal/builder/builder-impl.cpp
base/dali-toolkit/internal/builder/builder-signals.cpp
base/dali-toolkit/internal/controls/alignment/alignment-impl.cpp
base/dali-toolkit/internal/controls/buttons/button-impl.cpp
base/dali-toolkit/internal/controls/buttons/button-impl.h
base/dali-toolkit/internal/controls/buttons/check-box-button-impl.cpp
base/dali-toolkit/internal/controls/buttons/check-box-button-impl.h
base/dali-toolkit/internal/controls/buttons/push-button-impl.cpp
base/dali-toolkit/internal/controls/buttons/push-button-impl.h
base/dali-toolkit/internal/controls/popup/popup-impl.cpp
base/dali-toolkit/internal/controls/popup/popup-style-impl.cpp
base/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp
base/dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.cpp
base/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp
base/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.h
base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.cpp
base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-custom-effect-impl.cpp
base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-depth-effect-impl.cpp
base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp
base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.h
base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-slide-effect-impl.cpp
base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-slide-effect-impl.h
base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-twist-effect-impl.cpp [deleted file]
base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-twist-effect-impl.h [deleted file]
base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-wobble-effect-impl.cpp
base/dali-toolkit/internal/controls/scrollable/scrollable-impl.cpp
base/dali-toolkit/internal/controls/table-view/table-view-impl.cpp
base/dali-toolkit/internal/controls/text-input/text-input-decorator-impl.cpp
base/dali-toolkit/internal/controls/text-input/text-input-decorator-impl.h
base/dali-toolkit/internal/controls/text-input/text-input-handles-impl.cpp
base/dali-toolkit/internal/controls/text-input/text-input-impl.cpp
base/dali-toolkit/internal/controls/text-input/text-input-impl.h
base/dali-toolkit/internal/controls/text-input/text-input-popup-impl.cpp
base/dali-toolkit/internal/controls/text-input/text-input-popup-new-impl.h
base/dali-toolkit/internal/controls/text-input/text-input-text-highlight-impl.cpp
base/dali-toolkit/internal/controls/text-view/text-view-impl.cpp
base/dali-toolkit/internal/controls/text-view/text-view-impl.h
base/dali-toolkit/internal/file.list
base/dali-toolkit/internal/focus-manager/focus-manager-impl.cpp
base/dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp
base/dali-toolkit/internal/styling/style-manager-impl.cpp
base/dali-toolkit/public-api/controls/control-impl.cpp
base/dali-toolkit/public-api/controls/control-impl.h
base/dali-toolkit/public-api/controls/scrollable/item-view/album-layout.cpp [deleted file]
base/dali-toolkit/public-api/controls/scrollable/item-view/album-layout.h [deleted file]
base/dali-toolkit/public-api/controls/scrollable/item-view/depth-layout.cpp
base/dali-toolkit/public-api/controls/scrollable/item-view/grid-layout.cpp
base/dali-toolkit/public-api/controls/scrollable/item-view/navigation-layout.cpp
base/dali-toolkit/public-api/controls/scrollable/item-view/roll-layout.cpp
base/dali-toolkit/public-api/controls/scrollable/item-view/spiral-layout.cpp
base/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-twist-effect.cpp [deleted file]
base/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-twist-effect.h [deleted file]
base/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.cpp
base/dali-toolkit/public-api/file.list
base/dali-toolkit/public-api/shader-effects/bouncing-effect.cpp
base/dali-toolkit/public-api/shader-effects/image-region-effect.cpp
build/tizen/docs/dali.doxy.in
docs/content/main-page.h
docs/content/programming-guide/script-howto.h
optional/dali-toolkit/dali-toolkit.h
optional/dali-toolkit/internal/controls/bubble-effect/bubble-emitter-impl.cpp
optional/dali-toolkit/internal/controls/cluster/cluster-impl.cpp
optional/dali-toolkit/internal/controls/cluster/cluster-impl.h
optional/dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp
optional/dali-toolkit/internal/controls/image-view/image-view-impl.cpp
optional/dali-toolkit/internal/controls/image-view/masked-image-view-impl.cpp
optional/dali-toolkit/internal/controls/image-view/masked-image-view-impl.h
optional/dali-toolkit/internal/controls/magnifier/magnifier-impl.cpp
optional/dali-toolkit/internal/controls/navigation-frame/navigation-control-impl.cpp
optional/dali-toolkit/internal/controls/navigation-frame/navigation-control-impl.h
optional/dali-toolkit/internal/controls/navigation-frame/page-impl.cpp
optional/dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.cpp
optional/dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.h
optional/dali-toolkit/internal/controls/selectors/rotating-selector-impl.cpp
optional/dali-toolkit/internal/controls/slider/slider-impl.cpp
optional/dali-toolkit/internal/controls/slider/slider-impl.h
optional/dali-toolkit/internal/filters/blur-two-pass-filter.cpp
optional/dali-toolkit/internal/filters/emboss-filter.cpp
optional/dali-toolkit/internal/filters/spread-filter.cpp
optional/dali-toolkit/internal/shader-effects/page-turn-effect-impl.cpp
optional/dali-toolkit/internal/transition-effects/cube-transition-cross-effect-impl.cpp
optional/dali-toolkit/internal/transition-effects/cube-transition-effect-impl.h
optional/dali-toolkit/internal/transition-effects/cube-transition-wave-effect-impl.cpp
optional/dali-toolkit/public-api/controls/cluster/cluster-style.cpp
optional/dali-toolkit/public-api/controls/page-turn-view/page-factory.cpp
optional/dali-toolkit/public-api/dali-toolkit-version.cpp
optional/dali-toolkit/public-api/shader-effects/alpha-discard-effect.cpp
optional/dali-toolkit/public-api/shader-effects/blind-effect.cpp
optional/dali-toolkit/public-api/shader-effects/bubble-effect/bubble-effect.cpp
optional/dali-toolkit/public-api/shader-effects/carousel-effect.cpp
optional/dali-toolkit/public-api/shader-effects/displacement-effect.cpp
optional/dali-toolkit/public-api/shader-effects/dissolve-effect.cpp
optional/dali-toolkit/public-api/shader-effects/dissolve-local-effect.cpp
optional/dali-toolkit/public-api/shader-effects/distance-field-effect.cpp
optional/dali-toolkit/public-api/shader-effects/iris-effect.cpp
optional/dali-toolkit/public-api/shader-effects/mirror-effect.cpp
optional/dali-toolkit/public-api/shader-effects/motion-blur-effect.cpp
optional/dali-toolkit/public-api/shader-effects/motion-stretch-effect.cpp
optional/dali-toolkit/public-api/shader-effects/nine-patch-mask-effect.cpp
optional/dali-toolkit/public-api/shader-effects/page-turn-book-spine-effect.cpp
optional/dali-toolkit/public-api/shader-effects/ripple2d-effect.cpp
optional/dali-toolkit/public-api/shader-effects/spot-effect.cpp
optional/dali-toolkit/public-api/shader-effects/square-dissolve-effect.cpp
optional/dali-toolkit/public-api/shader-effects/swirl-effect.cpp
packaging/dali-toolkit.spec

diff --git a/automated-tests/README.md b/automated-tests/README.md
new file mode 100644 (file)
index 0000000..19e7203
--- /dev/null
@@ -0,0 +1,225 @@
+Testing environment   {#auto_testing}
+===================
+
+The new test environment from Tizen is the Web-TCT test suite. This was written for testing web components, but can easily be used for testing Dali.
+
+Each of the DALi repositories, **dali-core**, **dali-adaptor** and **dali-toolkit**, have their own test suites under the `automated-tests` folder. Within the src folder are a number of secondary folders - these correspond to 'managed' tests (for testing the frozen API for products), unmanaged tests (tests for other APIs) and internal (for desktop testing only)
+
+Installation
+------------
+
+There are usage instructions and installation instructions on the Tizen.org website [here](http://download.tizen.org/tct/2.2.1/Manual/Web_TCT_2.2.1_User_Guide_v1.0.pdf)
+
+These are device specific instructions, however, installing the test suite will also provide the relevant packages for running tests on Ubuntu ( follow the first block of quickstart instructions below ).
+
+If you are planning on running tests on device, then flash your handset with latest image, or turn off ssh: `set_usb_debug.sh --mtp-sdb` and plug it in, then follow the quickstart instructions repeated below.
+
+Quickstart
+----------
+
+For target or desktop testing:
+
+    cd ~/Packages
+    wget http://download.tizen.org/tct/2.2.1/2.2.1_r1/web-tct_2.2.1_r1.tar.gz
+    sudo tar xzf web-tct_2.2.1_r1.tar.gz
+    cd web-tct_2.2.1_r1/tools
+    sudo -E ./tct-config-host.sh
+
+
+If you are planning on running tests on device, then plug in your freshly flashed device and run the following commands:
+
+    sudo apt-get install sdb
+    ./tct-config-device.sh
+
+**NOTE:** After flashing a handset, you will need to run this step of the installation again.
+
+Testing on desktop
+==================
+
+Building libraries with coverage options
+----------------------------------------
+
+Building dali core:
+
+    cd dali-core  # the location of your dali-core repository
+    cd build/tizen
+    export CC=gcc
+    export CXX=g++
+    git clean -fxd . # Only do this in the build folder
+    autoreconf --install
+    CXXFLAGS='-g -O0 --coverage' LDFLAGS='--coverage' ./configure --prefix=$DESKTOP_PREFIX --enable-debug
+    make -j8 install
+
+Repeat for dali-adaptor and toolkit.
+
+Note, you __must__ use a local build and not a distributed build, and you __must__ also build with debug enabled to allow *DALI_ASSERT_DEBUG* to trigger on wrong behaviour ( Which should always be a test case failure! )
+
+Building the tests
+------------------
+
+Run the following commands:
+
+    cd automated-tests
+    ./build.sh
+
+This will build dali, dali-unmanaged and dali-internal test sets.
+
+Test sets can be built individually:
+
+    ./build.sh dali-unmanaged
+
+They can also be built without regenerating test case scripts (Useful for quicker rebuilds)
+
+    ./build.sh -n dali-internal
+
+Or without cleaning down the build area (Useful for fast build/run/debug cycles)
+
+    ./build.sh -n -r dali-internal
+
+
+Executing the tests
+-------------------
+
+To execute tests, cd into automated-tests and run
+
+    ./execute.sh
+
+This will execute dali, dali-unmanaged and dali-internal test sets. Note that the output summary for the first will be printed before running the second.
+
+To execute a subset of tests, you can run individual test sets, e.g.
+
+    ./execute.sh dali
+
+or for finer granularity, specify a test source file:
+
+    ./execute.sh dali utc-Dali-Actor.cpp
+
+To see the results, you can open the summary.xml in firefox.
+
+    firefox --new-window summary.xml
+
+To get coverage output, run
+
+    ./coverage.sh
+
+
+Testing on target
+=================
+
+To build for target, first build and install dali-core, dali-adaptor and dali-toolkit, then build dali-capi without --keep-packs option.
+
+You will need to install libconfig-tiny-perl:
+
+sudo apt-get install libconfig-tiny-perl
+
+If you use a non-standard `GBS_ROOT` then you will need to edit the tcbuild script to match your configuration - change line 96 and add a -B option with your GBS-ROOT path (line 96 = `gbs build -A armv7l --spec core-$1-tests.spec --include-all --keep-packs` ).
+To install on device from a non-standard GBS_ROOT, also modify line 28 (`RPM_DIR="$HOME/GBS-ROOT/local/repos/$PROFILE/armv7l/RPMS"`).
+
+For core Dali cd into automated-tests, and use:
+
+sudo ./tcbuild build dali
+
+    sudo ./tcbuild build dali-unmanaged
+    ./tcbuild install dali
+    ./tcbuild install dali-unmanaged
+
+For Dali Adaptor, cd into automated-tests, and use:
+
+    sudo ./tcbuild build dali-adaptor
+    sudo ./tcbuild build dali-adaptor-unmanaged # < Currently failing as needs a ".spec" file.
+    sudo ./tcbuild build dali-platform-abstraction
+    ./tcbuild install dali-adaptor
+    ./tcbuild install dali-adaptor-unmanaged
+    ./tcbuild install dali-platform-abstraction
+
+Ensure your handset's filesystem is writable:
+
+    sdb shell su -c "change-booting-mode.sh --update"
+
+To execute tests, cd into automated-tests and run
+
+    tct-mgr
+
+This will bring up the java test suite program. You should see the Plan pane with a list of all tests in. Select the tct-dali-core-tests and tct-dali-unmanaged-tests. and you will be offered a dialog to choose a test plan: either create a new one or use temp.
+Select dali test suite, and click Run, then "Create a new plan", and call it "Dali-Core" or some such. It will now run the dali-test suite.
+
+You can find the output files under /opt/tct/manager/result/
+
+
+Adding tests
+============
+
+To Managed API
+--------------
+
+If you are adding test cases for new or existing managed API (CAPI), you need to add your changes to the src/dali mirror, and copy your change to the managed test suite in core-api. You need to inform HQ of your update.
+
+To Unmanaged API
+----------------
+
+If you are adding test cases for unmanaged API, you need to add your changes to the src/dali-unmanaged test suite.
+
+For internal API
+----------------
+
+If you are adding tests for internal API, then this will only work on desktop, and you should add your tests to the src/dali-internal test suite.
+
+General
+-------
+
+If you are adding test cases to existing files, then all you need to do is create functions with the method signature
+
+    int UtcTestcase(void)
+    {
+      TestApplication application;
+      ...
+      END_TEST;
+    }
+
+
+Note that **there must be no extra whitespace in the method signature** (i.e., it must violate our coding convention and follow __exactly__ this pattern: `int UtcDaliMyTestcaseName(void)`), as it's parsed by an awk script to auto-generate the testcase arrays in the main header file.
+
+You can contine to use the TET api, e.g. `tet_infoline`, `tet_result` and our test check methods `DALI_TEST_CHECK`, `DALI_TEST_EQUALS`, etc.
+
+If you need any non-test methods or variables, ensure they are wrapped in an anonymous namespace.
+
+If you are adding new test files, then you need to add the filename to the SET(TC_SOURCES...
+section of CMakeLists.txt (this is also parsed by an awk script prior to building)
+
+Debugging
+=========
+
+On desktop, you can debug the tests by running gdb on the test program:
+
+    $ cd automated-tests
+    $ gdb build/src/dali/tct-dali-core
+    gdb> r <TestCase>
+
+replace `<TestCase>` with the name of the failing testcase.
+
+For example, using testcase UtcDaliNinePatch01 from the dali-core unmanaged test suite:
+
+    $ gdb build/src/dali-unmanaged/tct-dali-unmanaged-core
+    gdb> r UtcDaliNinePatch01
+
+
+On target, you can re-install the test RPM and associated debug RPMs manually using
+
+    sdb push <test-package>.rpm /tmp
+
+After installing the rpm and it's debug RPMs, you can find the executable in /opt/usr/bin/tct-dali-core. First ensure you have smack permissions set:
+
+    chsmack -e "^" /usr/bin/gdb
+    chsmack -e "^" /opt/usr/bin/tct-dali-core/tct-dali-core
+
+then run it under gdb as above.
+
+
+Troubleshooting
+===============
+
+If when running tct-mgr tests, if "Health-Check get" fails and leaves a white screen on the device, you will need to run `tct-config-device.sh` from your `web-tct/tools` directory (wherever you untarred it) and power cycle your handset. If that still fails, you can work-around the issue by running "`mkdir â€“p /opt/usr/media/Documents/tct/`" on target â€“ you may also need to kill the getCapabilities app from App Manager on the handset)
+
+If the test results show that the test cases fail with "Undefined reference to XXX", it means you have probably failed to update the dali packages on target.
+
+If all the tests are failing then make sure that you have enabled the engineering mode on the target with the 'change-booting-mode.sh --update' command in sdb shell, as the tests may not have installed correctly.
index 95888f9..e958842 100755 (executable)
@@ -19,7 +19,10 @@ print RESULTS_OUT $fline;
 print RESULTS_OUT "<?xml-stylesheet type=\"text/xsl\" href=\"./style/testresult.xsl\"?>\n";
 while(<RESULTS>)
 {
-    print RESULTS_OUT $_;
+    if( ! /xml-stylesheet/ )
+    {
+        print RESULTS_OUT $_;
+    }
 }
 close RESULTS_OUT;
 close RESULTS;
index c58d7f2..457b71b 100644 (file)
@@ -7,7 +7,6 @@ SET(CAPI_LIB "dali-toolkit-unmanaged")
 
 # List of test case sources (Only these get parsed for test cases)
 SET(TC_SOURCES
- utc-Dali-AlbumLayout.cpp
  utc-Dali-BendyEffect.cpp
  utc-Dali-BlindEffect.cpp
  utc-Dali-BloomView.cpp
diff --git a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-AlbumLayout.cpp b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-AlbumLayout.cpp
deleted file mode 100644 (file)
index f902dbb..0000000
+++ /dev/null
@@ -1,360 +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;
-
-using namespace std;
-
-
-namespace
-{
-
-Vector3 AlbumLayoutItemSizeFunction(const Vector3& layoutSize)
-{
-  float width = layoutSize.width * 0.2f;
-  return Vector3(width, width, width);
-}
-
-float AlbumLayoutAlbumRadiusFunction(const Vector3& layoutSize)
-{
-  return layoutSize.width * 0.5f;
-}
-} // namespace
-
-
-void album_layout_startup(void)
-{
-  test_return_value = TET_UNDEF;
-}
-
-void album_layout_cleanup(void)
-{
-  test_return_value = TET_PASS;
-}
-
-int UtcDaliAlbumLayoutNew(void)
-{
-  ToolkitTestApplication application;
-
-  // Create a album layout
-  AlbumLayoutPtr albumLayout = AlbumLayout::New();
-
-  DALI_TEST_CHECK(albumLayout);
-  END_TEST;
-}
-
-int UtcDaliAlbumSetAndGetItemSizeFunction(void)
-{
-  ToolkitTestApplication application;
-
-  // Create a album layout
-  AlbumLayoutPtr albumLayout = AlbumLayout::New();
-
-  // Set the item size function
-  albumLayout->SetItemSizeFunction(AlbumLayoutItemSizeFunction);
-
-  // Check whether we get the correct item size function
-  DALI_TEST_CHECK(albumLayout->GetItemSizeFunction() == AlbumLayoutItemSizeFunction);
-  END_TEST;
-}
-
-int UtcDaliAlbumSetAndGetScrollSpeedFactor(void)
-{
-  ToolkitTestApplication application;
-
-  // Create a album layout
-  AlbumLayoutPtr albumLayout = AlbumLayout::New();
-
-  // Set the scroll speed factor
-  albumLayout->SetScrollSpeedFactor(0.05f);
-
-  // Check whether we get the correct scroll speed factor
-  DALI_TEST_EQUALS( albumLayout->GetScrollSpeedFactor(), 0.05f, TEST_LOCATION );
-  END_TEST;
-}
-
-int UtcDaliAlbumSetAndGetMaximumSwipeSpeed(void)
-{
-  ToolkitTestApplication application;
-
-  // Create a album layout
-  AlbumLayoutPtr albumLayout = AlbumLayout::New();
-
-  // Set the maximum swipe speed
-  albumLayout->SetMaximumSwipeSpeed(50.0f);
-
-  // Check whether we get the correct maximum swipe speed
-  DALI_TEST_EQUALS( albumLayout->GetMaximumSwipeSpeed(), 50.0f, TEST_LOCATION );
-  END_TEST;
-}
-
-int UtcDaliAlbumLayoutSetAndGetItemFlickAnimationDuration(void)
-{
-  ToolkitTestApplication application;
-
-  // Create a album layout
-  AlbumLayoutPtr albumLayout = AlbumLayout::New();
-
-  // Set the flick animaiton duration
-  albumLayout->SetItemFlickAnimationDuration(0.35f);
-
-  // Check whether we get the correct flick animaiton duration
-  DALI_TEST_EQUALS( albumLayout->GetItemFlickAnimationDuration(), 0.35f, TEST_LOCATION );
-  END_TEST;
-}
-
-int UtcDaliAlbumSetNumOfItems(void)
-{
-  AlbumLayoutPtr albumLayout = AlbumLayout::New();
-
-  albumLayout->SetNumOfItems(15);
-
-  DALI_TEST_CHECK(albumLayout->GetNumOfItems() == 15);
-  END_TEST;
-}
-
-int UtcDaliAlbumSetStackNum(void)
-{
-  AlbumLayoutPtr albumLayout = AlbumLayout::New();
-
-  albumLayout->SetStackNum(30);
-
-  DALI_TEST_CHECK(albumLayout->GetStackNum() == 30);
-  END_TEST;
-}
-
-int UtcDaliAlbumSetPosition(void)
-{
-  AlbumLayoutPtr albumLayout = AlbumLayout::New();
-
-  std::vector<Vector3> position_list;
-
-  /*(0.0f)*/
-  Vector3 pos = Vector3(850.0f,-250.0f,0.0);
-  position_list.push_back(pos);
-
-  /*(1.0f)*/
-  pos = Vector3(700.0f,50.0f,0.0);
-  position_list.push_back(pos);
-
-  /*(2.0f)*/
-  pos = Vector3(440.0f,227.0f,0.0);
-  position_list.push_back(pos);
-
-  /*(4.0f)*/
-  pos = Vector3(-440.0f,227.0f,0.0);
-  position_list.push_back(pos);
-
-  /*(5.0f)*/
-  pos = Vector3(-700.0f,50.0f,0.0);
-  position_list.push_back(pos);
-
-  /*(6.0f)*/
-  pos = Vector3(-850.0f,-250.0f,0.0);
-  position_list.push_back(pos);
-
-  albumLayout->SetPosition(position_list);
-
-  DALI_TEST_CHECK(albumLayout->GetPosition() == position_list);
-  END_TEST;
-}
-
-int UtcDaliAlbumSetRotationX(void)
-{
-  AlbumLayoutPtr albumLayout = AlbumLayout::New();
-
-  albumLayout->SetRotationX(Math::PI/4.0f);
-
-  DALI_TEST_CHECK(albumLayout->GetRotationX() == Math::PI/4.0f);
-  END_TEST;
-}
-
-int UtcDaliAlbumSetRotationZ(void)
-{
-  AlbumLayoutPtr albumLayout = AlbumLayout::New();
-
-  std::vector<float> rotation_list;
-
-  /*(0.0f)*/
-  float rotate = Math::PI/6.0f;
-  rotation_list.push_back(rotate);
-
-  /*(1.0f)*/
-  rotate = 0.0f;
-  rotation_list.push_back(rotate);
-
-  /*(2.0f)*/
-  rotate = Math::PI/6.0f;
-  rotation_list.push_back(rotate);
-
-  /*(4.0f)*/
-  rotate = -Math::PI/6.0f;
-  rotation_list.push_back(rotate);
-
-  /*(5.0f)*/
-  rotate = 0.0f;
-  rotation_list.push_back(rotate);
-
-  /*(6.0f)*/
-  rotate = -Math::PI/6.0f;
-  rotation_list.push_back(rotate);
-
-  albumLayout->SetRotationZ(rotation_list);
-
-  DALI_TEST_CHECK(albumLayout->GetRotationZ() == rotation_list);
-  END_TEST;
-}
-
-int UtcDaliAlbumSetScale(void)
-{
-  AlbumLayoutPtr albumLayout = AlbumLayout::New();
-
-  std::vector<float> scale_list;
-
-  /*(0.0f)*/
-  float scale = 1.0f;
-  scale_list.push_back(scale);
-
-  /*(1.0f)*/
-  scale = 0.0f;
-  scale_list.push_back(scale);
-
-  /*(2.0f)*/
-  scale = Math::PI/6.0f;
-  scale_list.push_back(scale);
-
-  /*(4.0f)*/
-  scale = -Math::PI/6.0f;
-  scale_list.push_back(scale);
-
-  /*(5.0f)*/
-  scale = 0.0f;
-  scale_list.push_back(scale);
-
-  /*(6.0f)*/
-  scale = -Math::PI/6.0f;
-  scale_list.push_back(scale);
-
-  albumLayout->SetScale(scale_list);
-
-  DALI_TEST_CHECK(albumLayout->GetScale() == scale_list);
-  END_TEST;
-}
-
-int UtcDaliAlbumSetColor(void)
-{
-  // Create a album layout
-  AlbumLayoutPtr albumLayout = AlbumLayout::New();
-
-  std::vector<Vector2> color_list;
-
-  /*(0.0f)*/
-  Vector2 color = Vector2(1.0f,1.0f);
-  color_list.push_back(color);
-
-  /*(1.0f)*/
-  color = Vector2(1.0f,1.0f);
-  color_list.push_back(color);
-
-  /*(2.0f)*/
-  color = Vector2(1.0f,1.0f);
-  color_list.push_back(color);
-
-  /*(4.0f)*/
-  color = Vector2(1.0f,1.0f);
-  color_list.push_back(color);
-
-  /*(5.0f)*/
-  color = Vector2(1.0f,1.0f);
-  color_list.push_back(color);
-
-  /*(6.0f)*/
-  color = Vector2(1.0f,1.0f);
-  color_list.push_back(color);
-
-  albumLayout->SetColor(color_list);
-
-  DALI_TEST_CHECK(albumLayout->GetColor() == color_list);
-  END_TEST;
-}
-
-int UtcDaliAlbumSetCenterPosition(void)
-{
-  AlbumLayoutPtr albumLayout = AlbumLayout::New();
-
-  albumLayout->SetCenterPosition(Vector3( 0.0f,-80.0f,100.0f));
-
-  DALI_TEST_CHECK(albumLayout->GetCenterPosition() == Vector3( 0.0f,-80.0f,100.0f));
-  END_TEST;
-}
-
-int UtcDaliAlbumSetSetCenterScale(void)
-{
-  AlbumLayoutPtr albumLayout = AlbumLayout::New();
-
-  albumLayout->SetCenterScale(1.75f);
-
-  DALI_TEST_CHECK(albumLayout->GetCenterScale() == 1.75f);
-  END_TEST;
-}
-
-int UtcDaliAlbumSetSetCenterColor(void)
-{
-  AlbumLayoutPtr albumLayout = AlbumLayout::New();
-
-  albumLayout->SetCenterColor(Vector2(1.0f,1.0f));
-
-  DALI_TEST_CHECK(albumLayout->GetCenterColor() == Vector2(1.0f,1.0f));
-  END_TEST;
-}
-
-int UtcDaliAlbumSetStackPosition(void)
-{
-  AlbumLayoutPtr albumLayout = AlbumLayout::New();
-
-  albumLayout->SetStackPosition(Vector3(750.0f,-500.0f,0.0f),Vector3(-750.0f,-500.0f,0.0f));
-
-  DALI_TEST_CHECK(albumLayout->GetRightStackPosition() == Vector3(750.0f,-500.0f,0.0f) && albumLayout->GetLeftStackPosition() == Vector3(-750.0f,-500.0f,0.0f));
-  END_TEST;
-}
-
-int UtcDaliAlbumSetSetStackScale(void)
-{
-  AlbumLayoutPtr albumLayout = AlbumLayout::New();
-
-  albumLayout->SetStackScale(1.0f,1.0f);
-
-  DALI_TEST_CHECK(albumLayout->GetRightStackScale() == 1.0f && albumLayout->GetLeftStackScale() == 1.0f);
-  END_TEST;
-}
-
-int UtcDaliAlbumSetStackColor(void)
-{
-  AlbumLayoutPtr albumLayout = AlbumLayout::New();
-
-  albumLayout->SetStackColor(Vector2(1.0f,1.0f),Vector2(1.0f,1.0f));
-
-  DALI_TEST_CHECK(albumLayout->GetRightStackColor() == Vector2(1.0f,1.0f) && albumLayout->GetLeftStackColor() == Vector2(1.0f,1.0f));
-  END_TEST;
-}
index 49fe95b..7f784b6 100644 (file)
@@ -114,10 +114,10 @@ DummyControlImplOverride::~DummyControlImplOverride() { }
 void DummyControlImplOverride::OnInitialize() { initializeCalled = true; }
 void DummyControlImplOverride::OnThemeChange(StyleManager change) { themeChangeCalled = true;}
 void DummyControlImplOverride::OnFontChange(bool defaultFontChange, bool defaultFontSizeChange) { fontChangeCalled = true; }
-void DummyControlImplOverride::OnPinch(PinchGesture pinch) { pinchCalled = true; }
-void DummyControlImplOverride::OnPan(PanGesture pan) { panCalled = true; }
-void DummyControlImplOverride::OnTap(TapGesture tap) { tapCalled = true; }
-void DummyControlImplOverride::OnLongPress(LongPressGesture longPress) { longPressCalled = true; }
+void DummyControlImplOverride::OnPinch(const PinchGesture& pinch) { pinchCalled = true; }
+void DummyControlImplOverride::OnPan(const PanGesture& pan) { panCalled = true; }
+void DummyControlImplOverride::OnTap(const TapGesture& tap) { tapCalled = true; }
+void DummyControlImplOverride::OnLongPress(const LongPressGesture& longPress) { longPressCalled = true; }
 void DummyControlImplOverride::OnStageConnection() { stageConnectionCalled = true; }
 void DummyControlImplOverride::OnStageDisconnection() { stageDisconnectionCalled = true; }
 void DummyControlImplOverride::OnChildAdd(Actor& child) { childAddCalled = true; }
index 0ebf48c..96f10b2 100644 (file)
@@ -105,10 +105,10 @@ private: // From Internal::Control
   virtual void OnInitialize();
   virtual void OnThemeChange( StyleManager styleManager );
   virtual void OnFontChange(bool defaultFontChange, bool defaultFontSizeChange);
-  virtual void OnPinch(PinchGesture pinch);
-  virtual void OnPan(PanGesture pan);
-  virtual void OnTap(TapGesture tap);
-  virtual void OnLongPress(LongPressGesture longPress);
+  virtual void OnPinch(const PinchGesture& pinch);
+  virtual void OnPan(const PanGesture& pan);
+  virtual void OnTap(const TapGesture& tap);
+  virtual void OnLongPress(const LongPressGesture& longPress);
 
 private: // From CustomActorImpl
 
index 553dc7a..02d0df1 100644 (file)
@@ -307,24 +307,6 @@ int UtcDaliScrollViewSlideEffectSetup(void)
   END_TEST;
 }
 
-int UtcDaliScrollViewTwistEffectSetup(void)
-{
-  tet_infoline(" UtcDaliScrollViewTwistEffectSetup");
-
-  ScrollViewTwistEffect effect;
-
-  DALI_TEST_CHECK( !effect );
-
-  BaseHandle handle = ScrollViewTwistEffect::New();
-
-  DALI_TEST_CHECK( handle );
-
-  effect = ScrollViewTwistEffect::DownCast(handle);
-
-  DALI_TEST_CHECK( effect );
-  END_TEST;
-}
-
 int UtcDaliScrollViewCubeEffectTest(void)
 {
   ToolkitTestApplication application;
@@ -440,46 +422,6 @@ int UtcDaliScrollViewSlideEffectTest(void)
   END_TEST;
 }
 
-int UtcDaliScrollViewTwistEffectTest(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline(" UtcDaliScrollViewTwistEffectTest");
-
-  Vector2 size = Stage::GetCurrent().GetSize();
-
-  ScrollView scrollView = SetupTestScrollView(1, 3, size);
-  Actor testPage = gPages[1];
-  Wait(application, 500);
-
-  ScrollViewTwistEffect effect = ScrollViewTwistEffect::New();
-  float shrinkDist = 0.2f;
-  effect.SetMinimumDistanceForShrink(shrinkDist);
-  DALI_TEST_CHECK((shrinkDist - effect.GetMinimumDistanceForShrink()) < Math::MACHINE_EPSILON_0);
-  effect.EnableEffect(true);
-  scrollView.ApplyEffect(effect);
-
-  Actor actor = AddActorToPage(testPage, 0.5f, 0.5f, 3, 3);
-  Wait(application);
-  Vector3 actorPrePosition = actor.GetCurrentPosition();
-
-  effect.ApplyToActor( actor,
-      true,
-      Vector2(Math::PI_2, Math::PI_2),
-      0.0f);
-
-  scrollView.ScrollTo(1);
-  while(!gOnScrollCompleteCalled)
-  {
-    Wait(application);
-  }
-  // test that the first page has reached centre of screen
-  Vector3 actorPostPosition = actor.GetCurrentPosition();
-  // just check the actor has moved
-  DALI_TEST_CHECK((actorPostPosition - actorPrePosition).Length() > Math::MACHINE_EPSILON_1);
-  CleanupTest();
-  END_TEST;
-}
-
 int UtcDaliScrollViewCustomEffectTest(void)
 {
   ToolkitTestApplication application;
index c453839..d8271e4 100644 (file)
@@ -87,7 +87,7 @@ Actor SetupActor( const TreeNode& child, Actor& actor, const Replacement& consta
       {
         if( Property::INVALID_INDEX == index )
         {
-          index = actor.RegisterProperty( key, value );
+          actor.RegisterProperty( key, value );
         }
         else
         {
index de6b380..7714541 100644 (file)
@@ -96,7 +96,6 @@ Property::Value GetPropertyValue( const Property::Type& propType, const TreeNode
     default:
     {
       DALI_ASSERT_ALWAYS( !"Property type incorrect" );
-      return Property::Value();
     }
   }
 }
index d85fdec..ba3678b 100644 (file)
@@ -851,8 +851,6 @@ Animation Builder::CreateAnimation( const std::string& animationName )
 
 void Builder::LoadFromString( std::string const& data, Dali::Toolkit::Builder::UIFormat format )
 {
-  DALI_ASSERT_ALWAYS( format == Dali::Toolkit::Builder::JSON && "Currently only JSON is supported" );
-
   // parser to get constants and includes only
   Dali::Toolkit::JsonParser parser = Dali::Toolkit::JsonParser::New();
 
index 3124c46..c323fab 100644 (file)
@@ -49,7 +49,7 @@ struct ChildActorAction
   std::string actorName;
   std::string actionName;
   std::string childAlias;
-  std::vector<Property::Value> parameters;
+  PropertyValueContainer parameters;
 
   void operator()(void)
   {
@@ -110,7 +110,7 @@ struct GenericAction
 {
   std::string actorName;
   std::string actionName;
-  std::vector<Property::Value> parameters;
+  PropertyValueContainer parameters;
 
   void operator()(void)
   {
@@ -194,7 +194,7 @@ Property::Value GetPropertyValue(const TreeNode &child)
  * Gets Parmeter list from child
  * params is be cleared before insertion
  */
-void GetParameters(const TreeNode &child, std::vector<Property::Value> &params)
+void GetParameters(const TreeNode& child, PropertyValueContainer& params)
 {
   if( OptionalChild c = IsChild(child, "parameters") )
   {
@@ -322,15 +322,10 @@ float GetConditionArg0(const TreeNode &child)
   {
     f = IsFloat( IsChild(child, "min") );
   }
+
   DALI_ASSERT_ALWAYS(f && "Notification condition for arg0 not specified");
-  if(f)
-  {
-    return *f;
-  }
-  else
-  {
-    return 0.f;
-  }
+
+  return *f;
 }
 
 /**
@@ -344,15 +339,10 @@ float GetConditionArg1(const TreeNode &child)
   {
     f = IsFloat( IsChild(child, "max") );
   }
+
   DALI_ASSERT_ALWAYS(f && "Notification condition for arg1 not specified");
-  if(f)
-  {
-    return *f;
-  }
-  else
-  {
-    return 0.f;
-  }
+
+  return *f;
 }
 
 
index 095b278..48ae00e 100644 (file)
@@ -54,14 +54,6 @@ struct ScaleToFillConstraint
   {}
 
   /**
-   * CopyConstructor. Used by Boost.
-   * @param rhs Copying from.
-   */
-  ScaleToFillConstraint( const ScaleToFillConstraint& rhs )
-  : mPadding( rhs.mPadding )
-  {}
-
-  /**
    * Called by render thread
    */
   Vector3 operator()( const Vector3& currentSize,
@@ -100,16 +92,6 @@ struct ScaleToFitKeepAspectConstraint
   {}
 
   /**
-   * CopyConstructor. Used by Boost.
-   * @param rhs Copying from.
-   */
-  ScaleToFitKeepAspectConstraint( const ScaleToFitKeepAspectConstraint& rhs )
-  : mPadding( rhs.mPadding ),
-    mSizeStored( rhs.mSizeStored ),
-    mOriginalSize( rhs.mOriginalSize )
-  {}
-
-  /**
    * Called by render thread
    */
   Vector3 operator()( const Vector3& currentSize,
@@ -158,16 +140,6 @@ struct ScaleToFillKeepAspectConstraint
   { }
 
   /**
-   * CopyConstructor. Used by Boost.
-   * @param rhs Copying from.
-   */
-  ScaleToFillKeepAspectConstraint( const ScaleToFillKeepAspectConstraint& rhs )
-  : mPadding( rhs.mPadding ),
-    mSizeStored( rhs.mSizeStored ),
-    mOriginalSize( rhs.mOriginalSize )
-  {}
-
-  /**
    * Called by render thread
    */
   Vector3 operator()( const Vector3& currentSize,
@@ -216,16 +188,6 @@ struct ShrinkToFitConstraint
   {}
 
   /**
-   * CopyConstructor. Used by Boost.
-   * @param rhs Copying from.
-   */
-  ShrinkToFitConstraint( const ShrinkToFitConstraint& rhs )
-  : mPadding( rhs.mPadding ),
-    mSizeStored( rhs.mSizeStored ),
-    mOriginalSize( rhs.mOriginalSize )
-  { }
-
-  /**
    * Called by render thread
    */
   Vector3 operator()( const Vector3& currentSize,
@@ -277,16 +239,6 @@ struct ShrinkToFitKeepAspectConstraint
   {}
 
   /**
-   * CopyConstructor. Used by Boost.
-   * @param rhs Copying from.
-   */
-  ShrinkToFitKeepAspectConstraint( const ShrinkToFitKeepAspectConstraint& rhs )
-  : mPadding( rhs.mPadding ),
-    mSizeStored( rhs.mSizeStored ),
-    mOriginalSize( rhs.mOriginalSize )
-  { }
-
-  /**
    * Called by render thread
    */
   Vector3 operator()( const Vector3& currentSize,
@@ -340,16 +292,6 @@ struct PositionConstraint
   {}
 
   /**
-   * CopyConstructor. Used by Boost.
-   * @param rhs Copying from.
-   */
-  PositionConstraint( const PositionConstraint& rhs )
-  : mPadding( rhs.mPadding ),
-    mHorizontalAlignment( rhs.mHorizontalAlignment ),
-    mVerticalAlignment( rhs.mVerticalAlignment )
-  {}
-
-  /**
    * Called by render thread.
    */
   Vector3 operator()( const Vector3& currentPosition,
index 4f4d3b3..fc1373d 100644 (file)
@@ -232,7 +232,7 @@ void Button::OnControlSizeSet(const Vector3& targetSize)
   }
 }
 
-void Button::OnTap(Actor actor, TapGesture tap)
+void Button::OnTap(Actor actor, const TapGesture& tap)
 {
   // Do nothing.
 }
index 4ad9bd0..166f315 100644 (file)
@@ -211,7 +211,7 @@ private:
    * @param[in]  actor  The tapped actor.
    * @param[in]  tap    The tap gesture.
    */
-  void OnTap(Actor actor, TapGesture tap);
+  void OnTap(Actor actor, const TapGesture& tap);
 
 private:
 
index f5093a8..85fe1a6 100644 (file)
@@ -217,7 +217,7 @@ float CheckBoxButton::OnAnimationTimeRequested() const
 void CheckBoxButton::OnActivated()
 {
   // When the button is activated, it performs the click action
-  std::vector<Property::Value> attributes;
+  PropertyValueContainer attributes;
   DoClickAction(attributes);
 }
 
@@ -233,7 +233,7 @@ void CheckBoxButton::DoClickAction(const PropertyValueContainer& attributes)
   }
 }
 
-bool CheckBoxButton::DoAction(BaseObject* object, const std::string& actionName, const std::vector<Property::Value>& attributes)
+bool CheckBoxButton::DoAction(BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes)
 {
   bool ret = false;
 
@@ -253,7 +253,9 @@ bool CheckBoxButton::DoAction(BaseObject* object, const std::string& actionName,
 CheckBoxButton::CheckBoxButton()
 : Button(),
   mChecked( false ),
-  mClickActionPerforming(false)
+  mClickActionPerforming(false),
+  mUseFadeAnimationProperty(Property::INVALID_INDEX),
+  mUseCheckAnimationProperty(Property::INVALID_INDEX)
 {
   // Creates specific painter.
   mPainter = new CheckBoxButtonDefaultPainter();
index b607050..ad2494b 100644 (file)
@@ -178,7 +178,7 @@ public:
    * @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 std::vector<Property::Value>& attributes);
+  static bool DoAction(BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes);
 
 protected: // From Button
 
index 8a28fcf..9f8452c 100644 (file)
@@ -713,7 +713,7 @@ bool PushButton::AutoRepeatingSlot()
 void PushButton::OnActivated()
 {
   // When the button is activated, it performs the click action
-  std::vector<Property::Value> attributes;
+  PropertyValueContainer attributes;
   DoClickAction(attributes);
 }
 
@@ -794,7 +794,7 @@ void PushButton::DoClickAction(const PropertyValueContainer& attributes)
   }
 }
 
-bool PushButton::DoAction(BaseObject* object, const std::string& actionName, const std::vector<Property::Value>& attributes)
+bool PushButton::DoAction(BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes)
 {
   bool ret = false;
 
index 873b3e7..d27927a 100644 (file)
@@ -351,7 +351,7 @@ public:
    * @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 std::vector<Property::Value>& attributes);
+  static bool DoAction(BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes);
 
   /**
    * Construct a new PushButton.
index 173554b..f5179d7 100755 (executable)
@@ -37,7 +37,6 @@
 #include <dali-toolkit/public-api/focus-manager/focus-manager.h>
 
 using namespace Dali;
-using namespace std;
 
 namespace
 {
@@ -183,7 +182,9 @@ Popup::Popup(PopupStyle& style)
   mShowing(false),
   mState(Toolkit::Popup::POPUP_NONE), // Initially, the popup state should not be set, it's set in OnInitialize
   mAlterAddedChild(false),
-  mPopupStyle(PopupStylePtr(&style))
+  mPopupStyle(PopupStylePtr(&style)),
+  mPropertyTitle(Property::INVALID_INDEX),
+  mPropertyState(Property::INVALID_INDEX)
 {
   SetKeyboardNavigationSupport( true );
 }
index 7ce77b1..7a97456 100644 (file)
@@ -19,7 +19,6 @@
 
 using namespace Dali;
 using namespace Dali::Toolkit;
-using namespace std;
 
 namespace // unnamed namespace
 {
index c7d99ce..1191db6 100755 (executable)
@@ -155,7 +155,8 @@ ScrollBar::ScrollBar()
   mIsPanning(false),
   mCurrentScrollPosition(0.0f),
   mIndicatorHeightPolicy(Toolkit::ScrollBar::Variable),
-  mIndicatorFixedHeight(DEFAULT_INDICATOR_FIXED_HEIGHT)
+  mIndicatorFixedHeight(DEFAULT_INDICATOR_FIXED_HEIGHT),
+  mPropertyIndicatorPosition(Property::INVALID_INDEX)
 {
 }
 
index 237e81a..7301a8b 100644 (file)
@@ -100,7 +100,7 @@ Actor CreateBouncingEffectActor( Property::Index& bouncePropertyIndex )
   meshActor.SetAffectedByLighting(false);
 
   Dali::ShaderEffect shaderEffect = Dali::ShaderEffect::New( "", MESH_FRAGMENT_SHADER,
-                                                             GEOMETRY_TYPE_MESH,
+                                                             GEOMETRY_TYPE_UNTEXTURED_MESH,
                                                              Dali::ShaderEffect::HINT_BLENDING );
   meshActor.SetShaderEffect(shaderEffect);
 
index 0011dff..231f85c 100644 (file)
@@ -337,6 +337,7 @@ ItemView::ItemView(ItemFactory& factory)
   mRefreshOrderHint(true/*Refresh item 0 first*/),
   mMinimumSwipeSpeed(DEFAULT_MINIMUM_SWIPE_SPEED),
   mMinimumSwipeDistance(DEFAULT_MINIMUM_SWIPE_DISTANCE),
+  mMouseWheelScrollDistanceStep(0.0f),
   mScrollDistance(0.0f),
   mScrollSpeed(0.0f),
   mTotalPanDisplacement(Vector2::ZERO),
@@ -344,6 +345,9 @@ ItemView::ItemView(ItemFactory& factory)
   mIsFlicking(false),
   mGestureState(Gesture::Clear),
   mAddingItems(false),
+  mPropertyPosition(Property::INVALID_INDEX),
+  mPropertyMinimumLayoutPosition(Property::INVALID_INDEX),
+  mPropertyScrollSpeed(Property::INVALID_INDEX),
   mRefreshEnabled(true),
   mItemsParentOrigin( ParentOrigin::CENTER),
   mItemsAnchorPoint( AnchorPoint::CENTER)
@@ -626,7 +630,7 @@ float ItemView::GetAnchoringDuration() const
 
 void ItemView::SetRefreshInterval(float intervalLayoutPositions)
 {
-  if(mRefreshIntervalLayoutPositions != intervalLayoutPositions)
+  if( !Equals(mRefreshIntervalLayoutPositions, intervalLayoutPositions) )
   {
     mRefreshIntervalLayoutPositions = intervalLayoutPositions;
 
@@ -1110,7 +1114,7 @@ float ItemView::ClampFirstItemPosition(float targetPosition, const Vector3& targ
   return clamppedPosition;
 }
 
-void ItemView::OnPan(PanGesture gesture)
+void ItemView::OnPan( const PanGesture& gesture )
 {
   Actor self = Self();
   const Vector3 layoutSize = Self().GetCurrentSize();
@@ -1643,8 +1647,16 @@ Vector3 ItemView::GetItemsAnchorPoint() const
 
 void ItemView::GetItemsRange(ItemRange& range)
 {
-  range.begin = mItemPool.begin()->first;
-  range.end = mItemPool.rbegin()->first + 1;
+  if( !mItemPool.empty() )
+  {
+    range.begin = mItemPool.begin()->first;
+    range.end = mItemPool.rbegin()->first + 1;
+  }
+  else
+  {
+    range.begin = 0;
+    range.end = 0;
+  }
 }
 
 void ItemView::OnScrollPositionChanged( float position )
index e10c1b7..dba4629 100644 (file)
@@ -444,7 +444,7 @@ private:
    *
    * @param[in] gesture The gesture event.
    */
-  void OnPan(PanGesture pan);
+  void OnPan( const PanGesture& pan );
 
   /**
    * Helper to handle anchoring animations.
index fd63390..e6876dc 100644 (file)
@@ -357,8 +357,7 @@ void ScrollOvershootEffectRipple::SetOvershoot(float amount, bool animate)
       {
         mScrollOvershootAnimation.FinishedSignal().Disconnect( this, &ScrollOvershootEffectRipple::OnOvershootAnimFinished );
         mScrollOvershootAnimation.Stop();
-        mScrollOvershootAnimation.Clear();
-        mScrollOvershootAnimation = NULL;
+        mScrollOvershootAnimation.Reset();
       }
       mScrollOvershootAnimation = Animation::New(duration);
       mScrollOvershootAnimation.FinishedSignal().Connect( this, &ScrollOvershootEffectRipple::OnOvershootAnimFinished );
@@ -391,8 +390,7 @@ void ScrollOvershootEffectRipple::OnOvershootAnimFinished(Animation& animation)
   }
   mScrollOvershootAnimation.FinishedSignal().Disconnect( this, &ScrollOvershootEffectRipple::OnOvershootAnimFinished );
   mScrollOvershootAnimation.Stop();
-  mScrollOvershootAnimation.Clear();
-  mScrollOvershootAnimation = NULL;
+  mScrollOvershootAnimation.Reset();
   mAnimationStateFlags = 0;
   if( animateOff )
   {
index a6d1cde..91966bf 100644 (file)
@@ -88,16 +88,23 @@ public:
     mSwingAnchorAlphaFunctionIn(swingAnchorAlphaFunctionIn), mSwingAnchorAlphaFunctionOut(swingAnchorAlphaFunctionOut),
     mTranslateAlphaFunctionIn(translateAlphaFunctionIn), mTranslateAlphaFunctionOut(translateAlphaFunctionOut),
     mOpacityAlphaFunctionIn(opacityAlphaFunctionIn), mOpacityAlphaFunctionOut(opacityAlphaFunctionOut),
+    mWrap(false),
     mPanning(false),
     mScrolling(false),
     mWasOutsideView(true),
+    mIsStraightOnView(false),
+    mWasStraightOnView(false),
     mWrapped(false),
     mWasWrapped(false),
+    mCanChangeDirection(false),
     mSkipConstraints(false),
     mPassedCentreThisFrame(false),
     mForceDirectionUpdate(true),
+    mDirectionChanged(false),
     mDirectionFlags(0),
     mLastDirectionFlags(0),
+    mCurrentSwingAngle(0.f),
+    mCurrentOpacity(0.f),
     mCurrentOpacityAlphaFunction(NULL)
   {
   }
index 9c63f2c..f48e4c2 100644 (file)
@@ -116,25 +116,22 @@ struct ScrollDepthScaleConstraint
     }
 
     const Vector3& pageSize = pageSizeProperty.GetVector3();
+
     // Don't have enough parameters, to provide Wrap mode (need a way of having 'uniforms' instead of scrollWrap.GetBoolean())
-    const bool wrap = true;
 
-    if(wrap)
-    {
-      const Vector3& min = scrollPositionMin.GetVector3();
-      const Vector3& max = scrollPositionMax.GetVector3();
+    const Vector3& min = scrollPositionMin.GetVector3();
+    const Vector3& max = scrollPositionMax.GetVector3();
 
-      if(fabsf(min.x - max.x) > Math::MACHINE_EPSILON_1)
-      {
-        // WRAP X (based on the position of the right side)
-        position.x = WrapInDomain(position.x + pageSize.x, min.x, max.x) - pageSize.x;
-      }
+    if(fabsf(min.x - max.x) > Math::MACHINE_EPSILON_1)
+    {
+      // WRAP X (based on the position of the right side)
+      position.x = WrapInDomain(position.x + pageSize.x, min.x, max.x) - pageSize.x;
+    }
 
-      if(fabsf(min.y - max.y) > Math::MACHINE_EPSILON_1)
-      {
-        // WRAP Y (based on the position of the bottom side)
-        position.y = WrapInDomain(position.y + pageSize.y, min.y, max.y) - pageSize.y;
-      }
+    if(fabsf(min.y - max.y) > Math::MACHINE_EPSILON_1)
+    {
+      // WRAP Y (based on the position of the bottom side)
+      position.y = WrapInDomain(position.y + pageSize.y, min.y, max.y) - pageSize.y;
     }
 
     // short circuit: for pages outside of view.
index 1f1f118..792f33a 100644 (file)
@@ -2435,7 +2435,7 @@ void ScrollView::GestureContinuing(const Vector2& panDelta)
 // TODO: Upgrade to use a more powerful gesture detector (one that supports multiple touches on pan - so works as pan and flick gesture)
 // BUG: Gesture::Finished doesn't always return velocity on release (due to
 // timeDelta between last two events being 0 sometimes, or posiiton being the same)
-void ScrollView::OnPan(PanGesture gesture)
+void ScrollView::OnPan( const PanGesture& gesture )
 {
   // Guard against destruction during signal emission
   // Note that Emit() methods are called indirectly e.g. from within ScrollView::OnGestureEx()
index 84723bb..d0ab90a 100644 (file)
@@ -696,7 +696,7 @@ private:
    *
    * @param[in] gesture The gesture event.
    */
-  void OnPan(PanGesture pan);
+  void OnPan( const PanGesture& pan);
 
   /**
    * Extension of the above gestures.
index f00411a..778db0e 100644 (file)
@@ -186,9 +186,9 @@ private:
 
   ScrollSlideInfoPtr mScrollSlideInfo;                  ///< Info structure to keep track of common properties amongst many constraints.
   ActiveConstraint mInfoUpdateConstraint;               ///< Constraint applied to scroll-view to update Info structure.
-  Animation mAnimation;                                 ///< Animation Timer to drive the twist effect constraint.
+  Animation mAnimation;                                 ///< Animation Timer to drive the slide effect constraint.
   Animation mAnimationSnap;                             ///< Animation Snap (this animates from from 1.0 to 0.0 when contents snap)
-  Property::Index mPropertyTime;                        ///< Time property used by twist effect constraint to calculate timePassed.
+  Property::Index mPropertyTime;                        ///< Time property used by slide effect constraint to calculate timePassed.
   Property::Index mPropertyReference;                   ///< Reference point in scroll-contents, this point has no delay.
                                                         ///< The further out from this point, the further the delay.
   Property::Index mPropertyActive;                      ///< Property indicates the progress of the scrolling from 1.0f (scrolling) to 0.0f (fully snapped)
diff --git a/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-twist-effect-impl.cpp b/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-twist-effect-impl.cpp
deleted file mode 100755 (executable)
index c93d264..0000000
+++ /dev/null
@@ -1,738 +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 <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-effect-impl.h>
-#include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-twist-effect-impl.h>
-
-using namespace Dali;
-
-namespace // unnamed namespace
-{
-
-const char * const EFFECT_TIME( "ScrollViewTwistEffect::EFFECT_TIME" );
-const char * const EFFECT_REFERENCE( "ScrollViewTwistEffect::EFFECT_REFERENCE" );
-const char * const EFFECT_DEPTH( "ScrollViewTwistEffect::EFFECT_DEPTH");
-const char * const EFFECT_ACTIVATE( "ScrollViewTwistEffect::EFFECT_ACTIVATE");
-
-const float TWISTEFFECT_ANIMATION_MAX_TIME = 60.0f;         ///< Animation time (every time finishes, checks if it needs to go again)
-const float TWISTEFFECT_DEFAULT_DROPOFF = 0.7f;             ///< Default drop off amount
-const float TWISTEFFECT_DEFAULT_DROPOFF_DISTANCE_X = 720.0f;  ///< Default drop off distance
-const float TWISTEFFECT_DEFAULT_DROPOFF_DISTANCE_Y = 1280.0f;  ///< Default drop off distance
-
-// Hop Easing equation.
-// Starts with a -ve cosine ranging from 0 to pi.
-// Then plateaus.
-// Then finishes with a -ve cosine ranging from pi to 0
-// 0......(RISE).....PI (SUSTAIN) PI.....(FALL)......0
-//                xxxxxxxxxxxxxxxxxxxxx
-//              x                       x
-//            x                           x
-//           x                             x
-//           x                             x
-//          x                               x
-//        x                                   x
-// xxxxxx                                       xxxxxx
-
-const float HOP_RISE(0.25f);
-const float HOP_FALL(0.5f);
-const float DELAY(0.5f);
-
-float HopEasing(float progress)
-{
-  // progress from 0.0 - HOP_RISE (go from 0.0 to 1.0)
-  if(progress < HOP_RISE)
-  {
-    return 0.5f - cosf(progress/HOP_RISE * Math::PI) * 0.5f;
-  }
-
-  progress += HOP_FALL - 1.0f;
-
-  // progress from 0.0 - HOP_FALL (go from 1.0 to 0.0)
-  if(progress > 0.0f )
-  {
-    return 0.5f + cosf(progress/HOP_FALL * Math::PI) * 0.5f;
-  }
-
-  // progress at plateau.
-  return 1.0f;
-}
-
-/**
- * Gets a property index. If the property doesn't already exist, then
- * it will create the property.
- * @param[in] handle The handle that owns or will own the property
- * @param[in] name The name for this property
- * @param[in] propertyValue The initial value for this property
- * @return The property index for this property is returned.
- */
-Property::Index SafeRegisterProperty( Handle& handle, const std::string& name, Property::Value propertyValue )
-{
-  Property::Index index = handle.GetPropertyIndex( name );
-
-  if(index == Property::INVALID_INDEX)
-  {
-    index = handle.RegisterProperty( name, propertyValue );
-  }
-
-  return index;
-}
-
-/**
- * Re-scales input value x from x0 - x1, to linearly map
- * over the values y0 - y1. Values outside of this range
- * will also conform to the trend (gradient) set.
- * @param[in] x input X value
- * @param[in] x0 input minimum bound
- * @param[in] x1 input maximum bound
- * @param[in] y0 output minimum bound
- * @param[in] y1 output maximum bound
- * @return The result of the mapping is returned.
- */
-float Rescale(float x, float x0, float x1, float y0, float y1)
-{
-  return y0 + (y1 - y0) * (x - x0) / (x1-x0);
-}
-
-/**
- * Returns the value of x chasing target.
- * returns a value of x which is closer to target.
- * but limited by maxDelta. #
- * For example:
- * x = 10.0f
- * target = 50.0f
- * maxDelta = 20.0f
- * result is 30.0f (x is 20.0f units closer to target)
- * However, if x is already within maxDelta units
- * of target, x will equal target.
- * For example:
- * x = 55.0f
- * target = 50.0f
- * maxDelta = 20.0f
- * result is 50.0f (x was already within 20.0f units of target)
- */
-float Chase( float x, float target, float maxDelta )
-{
-  float delta = target - x;
-
-  if(delta > 0.0f)
-  {
-    x = std::min( x + maxDelta, target );
-  }
-  else
-  {
-    x = std::max( x - maxDelta, target );
-  }
-
-  return x;
-}
-
-// constraints ////////////////////////////////////////////////////////////////
-
-/**
- * ScrollTwistRotationConstraint
- *
- * Rotate constraint adjusts the angle of the Actors
- * based on actor's world-position relative to the middle of the screen.
- * When at middle of screen Angles on X and Y Axes is 0.
- * When one screen away from the middle Angle is 90 degrees (pi/2)
- */
-struct ScrollDropoffTwistRotationConstraint
-{
-  /**
-   * Constraint constructor
-   * @param[in] angleSwing The amount the Actor should revolve in radians
-   * for a given page worth of distance.
-   */
-  ScrollDropoffTwistRotationConstraint(const Vector2& angleSwing, const Vector2& dropOff, const Vector2& distance, AlphaFunction function)
-  : mAngleSwing(angleSwing),
-    mDropOff(dropOff),
-    mDropOffDistance(distance),
-    mDropOffFunction(function)
-  {
-  }
-
-  /**
-   * @param[in] current The current orientation of this Actor
-   * @param[in] actorPositionProperty The actor's world-position property
-   * @param[in] scrollOvershootXProperty The scroll-view's overshoot property (SCROLL_OVERSHOOT_X_PROPERTY_NAME)
-   * @param[in] scrollOvershootYProperty The scroll-view's overshoot property (SCROLL_OVERSHOOT_Y_PROPERTY_NAME)
-   * @param[in] pageSizeProperty The size of the page. (scrollView SIZE)
-   * @return The new orientation of this Actor.
-   */
-  Quaternion operator()(const Quaternion& current,
-                        const PropertyInput& actorPositionProperty,
-                        const PropertyInput& scrollablePositionProperty,
-                        const PropertyInput& scrollOvershootXProperty,
-                        const PropertyInput& scrollOvershootYProperty,
-                        const PropertyInput& pageSizeProperty)
-  {
-    const Vector3& position = actorPositionProperty.GetVector3();
-    const Vector3& parentPosition = scrollablePositionProperty.GetVector3();
-    const Vector3& pageSize = pageSizeProperty.GetVector3();
-    const Vector2 overshoot(scrollOvershootXProperty.GetFloat(), scrollOvershootYProperty.GetFloat());
-
-    if(fabsf(overshoot.x) < Math::MACHINE_EPSILON_0 && fabsf(overshoot.y) < Math::MACHINE_EPSILON_0)
-    {
-      return current;
-    }
-
-    // get distance from centre of scrollable container
-    Vector2 distance = position.GetVectorXY() - parentPosition.GetVectorXY();
-
-    if( overshoot.x > 0.0f )
-    {
-      distance.x += pageSize.x * 0.5f;
-    }
-    else
-    {
-      distance.x -= pageSize.x * 0.5f;
-    }
-    distance.x = Clamp(fabsf(distance.x), 0.0f, mDropOffDistance.x);
-
-    if( overshoot.y > 0.0f )
-    {
-      distance.y += pageSize.y * 0.5f;
-    }
-    else
-    {
-      distance.y -= pageSize.y * 0.5f;
-    }
-    distance.y = Clamp(fabsf(distance.y), 0.0f, mDropOffDistance.y);
-
-    Vector2 angleMod = distance / mDropOffDistance;
-    if(mDropOffFunction)
-    {
-      angleMod.x = mDropOffFunction(angleMod.x);
-      angleMod.y = mDropOffFunction(angleMod.y);
-    }
-    angleMod = Vector2::ONE - (angleMod * mDropOff);
-
-    Vector2 angle = angleMod * mAngleSwing * overshoot;
-
-    Quaternion rotation = Quaternion(angle.x, Vector3::YAXIS) *
-                          Quaternion(-angle.y, Vector3::XAXIS) *
-                          current;
-
-    return rotation;
-  }
-
-  const Vector2 mAngleSwing;                                    ///< Maximum amount in X and Y axes to rotate.
-  const Vector2 mDropOff;
-  const Vector2 mDropOffDistance;
-  AlphaFunction mDropOffFunction;
-};
-
-/**
- * ScrollTwistRotationConstraint
- *
- * Rotate constraint adjusts the angle of the Actors
- * based on actor's world-position relative to the middle of the screen.
- * When at middle of screen Angles on X and Y Axes is 0.
- * When one screen away from the middle Angle is 90 degrees (pi/2)
- */
-struct ScrollTwistRotationConstraint
-{
-  /**
-   * Constraint constructor
-   * @param[in] angleSwing The amount the Actor should revolve in radians
-   * for a given page worth of distance.
-   */
-  ScrollTwistRotationConstraint(const Vector2& angleSwing)
-  : mAngleSwing(angleSwing)
-  {
-  }
-
-  /**
-   * @param[in] current The current orientation of this Actor
-   * @param[in] actorPositionProperty The actor's world-position property
-   * @param[in] scrollOvershootXProperty The scroll-view's overshoot property (SCROLL_OVERSHOOT_X_PROPERTY_NAME)
-   * @param[in] scrollOvershootYProperty The scroll-view's overshoot property (SCROLL_OVERSHOOT_Y_PROPERTY_NAME)
-   * @param[in] pageSizeProperty The size of the page. (scrollView SIZE)
-   * @return The new orientation of this Actor.
-   */
-  Quaternion operator()(const Quaternion& current,
-                        const PropertyInput& scrollOvershootXProperty,
-                        const PropertyInput& scrollOvershootYProperty)
-  {
-    const Vector2 overshoot(scrollOvershootXProperty.GetFloat(), scrollOvershootYProperty.GetFloat());
-
-    if( fabsf(overshoot.x) < Math::MACHINE_EPSILON_0 && fabsf(overshoot.y) < Math::MACHINE_EPSILON_0 )
-    {
-      return current;
-    }
-
-    Quaternion rotation = Quaternion(overshoot.x * mAngleSwing.x, Vector3::YAXIS) *
-                          Quaternion(-overshoot.y * mAngleSwing.y, Vector3::XAXIS) *
-                          current;
-
-    return rotation;
-  }
-
-  const Vector2 mAngleSwing;
-};
-
-/**
- * ScrollTwistPositionConstraint
- *
- * Position constraint adjusts the position of the Actors
- * based on their parent page's position relative to the middle of the screen.
- * When at middle of the screen the position is not altered.
- * When one screen away from middle the position is rotated about it's origin + mAnchor
- */
-struct ScrollTwistPositionConstraint
-{
-  /**
-   * Constraint constructor
-   */
-  ScrollTwistPositionConstraint(float delayMin, float delayMax)
-  : mDelayMin(delayMin),
-    mDelayMax(delayMax),
-    mCurrentDelayFactor(0.0f)
-  {
-  }
-
-  /**
-   * @param[in] current The current position
-   * @param[in] scrollPositionProperty The scroll-view's position property (SCROLL_POSITION_PROPERTY_NAME)
-   * @param[in] effectReferenceProperty The point in the scroll-view where the user touched the screen
-   * @param[in] effectTimeProperty The current timer. Starting from 0.0 when scroll animation/dragging
-   * commences. Ensures that constraint is applied and processed every frame (to achieve the delay effect)
-   * @param[in] sizeProperty The size of the ScrollView.
-   * @return The new position of this Actor.
-   */
-  Vector3 operator()(const Vector3& current,
-                     const PropertyInput& pagePositionProperty,
-                     const PropertyInput& scrollPositionProperty,
-                     const PropertyInput& effectReferenceProperty,
-                     const PropertyInput& effectTimeProperty,
-                     const PropertyInput& sizeProperty,
-                     const PropertyInput& activateProperty)
-  {
-    const Vector3& scrollPosition = scrollPositionProperty.GetVector3();
-    const float& activate = activateProperty.GetFloat();
-
-    if(activate < Math::MACHINE_EPSILON_0)
-    {
-      mScrollPosition = scrollPosition;
-      return current + mScrollPosition;
-    }
-    const Vector3& pagePosition = pagePositionProperty.GetVector3();
-    const Vector3& referencePoint = effectReferenceProperty.GetVector3();
-    // Determine the relative position of the actor from the scrolling reference point.
-    // (the further away from the refernce, the longer the delay should be)
-    Vector3 relativePosition = pagePosition + current - referencePoint;
-    float f = relativePosition.x;
-
-    // f represents this absolute distance. Get as a relative distance and inverse exponential
-    // (as delay equation is has an exponential effect i.e. the closer delayFactor to 1.0f,
-    // the longer the delay would appear exponentially)
-    f = fabsf(f / sizeProperty.GetVector3().width);
-    f = std::min(f, 1.0f);
-    f = 1.0f - (1.0f - f) * (1.0f - f);
-    // at center delay factor is mDelayMin, at maximum (1.0) it is mDelayMax
-    f = Rescale(f, 0.0f, 1.0f, mDelayMin, mDelayMax);
-
-    // Will take 0.25s for current delay factor to equal target delay factor
-    // This prevents users quickly dragging from different points and noticing a jerk.
-    mCurrentDelayFactor = Chase( mCurrentDelayFactor, f, 4.0f/60.0f );
-    float delay = activate * mCurrentDelayFactor;
-    mScrollPosition = mScrollPosition * delay + scrollPosition * (1.0f-delay);
-
-    return current + mScrollPosition;
-  }
-
-private:
-
-  Vector3 mScrollPosition;              ///< The current scroll position
-  float mDelayMin;
-  float mDelayMax;
-  float mCurrentDelayFactor;
-
-};
-
-/**
- * ScrollTwistScaleConstraint
- *
- * Scale constraint adjusts the scale of the Actors
- * based on a supplied depth property value.
- */
-struct ScrollTwistScaleConstraint
-{
-  /**
-   * Constraint constructor
-   */
-  ScrollTwistScaleConstraint(float scaleAmount)
-  : mScaleAmount(scaleAmount)
-  {
-  }
-
-  /**
-   * @param[in] current The current position
-   * @param[in] scrollPositionProperty The scroll-view's position property (SCROLL_POSITION_PROPERTY_NAME)
-   * @return The new position of this Actor.
-   */
-  Vector3 operator()(const Vector3& current,
-                     const PropertyInput& depthProperty)
-  {
-    float depth = depthProperty.GetFloat();
-
-    return current * (1.0f - depth * mScaleAmount); // contract by mScaleAmount of original size.
-  }
-
-private:
-
-  float mScaleAmount;
-};
-
-} // unnamed namespace
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Internal
-{
-
-ScrollViewTwistEffect::ScrollViewTwistEffect()
-: mFlags(DefaultFlags),
-  mPropertyTime(Property::INVALID_INDEX),
-  mEnableEffect(true),
-  mAdditionalEffects(false),
-  mPropertyReference(Property::INVALID_INDEX),
-  mPropertyActivate(Property::INVALID_INDEX),
-  mMinimumDistanceForShrink(Toolkit::ScrollViewTwistEffect::DEFAULT_MINIMUM_DISTANCE_FOR_SHRINK),
-  mMaxSwingAngle(Math::PI_2, Math::PI_2),
-  mDropOff(TWISTEFFECT_DEFAULT_DROPOFF, TWISTEFFECT_DEFAULT_DROPOFF),
-  mDropOffDistance(TWISTEFFECT_DEFAULT_DROPOFF_DISTANCE_X, TWISTEFFECT_DEFAULT_DROPOFF_DISTANCE_Y),
-  mDropOffFunction(NULL)
-{
-}
-
-ScrollViewTwistEffect::~ScrollViewTwistEffect()
-{
-}
-
-
-float ScrollViewTwistEffect::GetMinimumDistanceForShrink() const
-{
-  return mMinimumDistanceForShrink;
-}
-
-void ScrollViewTwistEffect::SetMinimumDistanceForShrink(float distance)
-{
-  mMinimumDistanceForShrink = distance;
-}
-
-void ScrollViewTwistEffect::EnableEffect(bool enableFlag)
-{
-  mEnableEffect = enableFlag;
-}
-
-void ScrollViewTwistEffect::ApplyToActor(Actor child,
-                                         bool additionalEffects,
-                                         const Vector2& angleSwing,
-                                         float scaleAmount,
-                                         float delayMin,
-                                         float delayMax)
-{
-  mMaxSwingAngle = angleSwing;
-  mAdditionalEffects = additionalEffects;
-  mScaleFactor = scaleAmount;
-  mDelayMin = delayMin;
-  mDelayMax = delayMax;
-  if(mFlags & FlagDefaultDropOff)
-  {
-    Vector3 size = GetScrollView().GetCurrentSize();
-    // size may still be 0 if the effect is applied before scroll view hits the stage
-    if(size.x > Math::MACHINE_EPSILON_1)
-    {
-      mDropOffDistance.x = size.x;
-    }
-    if(size.y > Math::MACHINE_EPSILON_1)
-    {
-      mDropOffDistance.y = size.y;
-    }
-  }
-  if(scaleAmount > Math::MACHINE_EPSILON_0)
-  {
-    mFlags |= FlagScale;
-  }
-  else
-  {
-    mFlags = mFlags & ~FlagScale;
-  }
-  if(mMaxSwingAngle.LengthSquared() > Math::MACHINE_EPSILON_0)
-  {
-    mFlags |= FlagTwist;
-  }
-  else
-  {
-    mFlags = mFlags & ~FlagTwist;
-  }
-  Apply(child);
-}
-
-void ScrollViewTwistEffect::Apply(Actor child)
-{
-  // Apply constraints to these actors //
-  Constraint constraint;
-
-  Toolkit::ScrollView scrollView = GetScrollView();
-
-  if( mFlags & FlagScale )
-  {
-    constraint = Constraint::New<Vector3>( Actor::SCALE,
-                                           Source(scrollView, scrollView.GetPropertyIndex( EFFECT_DEPTH ) ),
-                                           ScrollTwistScaleConstraint(mScaleFactor) );
-    constraint.SetRemoveAction( Constraint::Discard );
-    child.ApplyConstraint( constraint );
-  }
-
-  constraint = Constraint::New<Vector3>( Actor::POSITION,
-                                          ParentSource(Actor::POSITION),
-                                          Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_PROPERTY_NAME ) ),
-                                          Source(scrollView, scrollView.GetPropertyIndex( EFFECT_REFERENCE ) ),
-                                          Source(scrollView, scrollView.GetPropertyIndex( EFFECT_TIME ) ),
-                                          Source(scrollView, Actor::SIZE),
-                                          Source(scrollView, scrollView.GetPropertyIndex( EFFECT_ACTIVATE) ),
-                                         ScrollTwistPositionConstraint(mDelayMin, mDelayMax) );
-  constraint.SetRemoveAction( Constraint::Discard );
-  child.ApplyConstraint( constraint );
-
-  // use actor position to affect rotation
-  if(mFlags & FlagTwist)
-  {
-    if(mFlags & FlagDropOff)
-    {
-      constraint = Constraint::New<Quaternion>( Actor::ROTATION,
-                                                LocalSource(Actor::WORLD_POSITION),
-                                                Source(scrollView, Actor::WORLD_POSITION ),
-                                                Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_OVERSHOOT_X_PROPERTY_NAME ) ),
-                                                Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_OVERSHOOT_Y_PROPERTY_NAME ) ),
-                                                Source(scrollView, Actor::SIZE ),
-                                                ScrollDropoffTwistRotationConstraint(mMaxSwingAngle, mDropOff, mDropOffDistance, mDropOffFunction) );
-    }
-    else
-    {
-      constraint = Constraint::New<Quaternion>( Actor::ROTATION,
-                                                Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_OVERSHOOT_X_PROPERTY_NAME ) ),
-                                                Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_OVERSHOOT_Y_PROPERTY_NAME ) ),
-                                                ScrollTwistRotationConstraint(mMaxSwingAngle) );
-    }
-    constraint.SetRemoveAction( Constraint::Discard );
-    child.ApplyConstraint( constraint );
-  }
-}
-
-void ScrollViewTwistEffect::SetMaxSwingAngle(const Vector2& maxSwingAngle)
-{
-  mMaxSwingAngle = maxSwingAngle;
-}
-
-Vector2 ScrollViewTwistEffect::GetMaxSwingAngle() const
-{
-  return mMaxSwingAngle;
-}
-
-void ScrollViewTwistEffect::SetSwingDropOff(const Vector2& dropOff, const Vector2& distance, AlphaFunction function)
-{
-  if( distance.LengthSquared() > Math::MACHINE_EPSILON_1 && dropOff.LengthSquared() > Math::MACHINE_EPSILON_1 )
-  {
-    mFlags |= FlagDropOff;
-    mDropOff = dropOff;
-    mDropOffDistance = distance;
-    mDropOffFunction = function;
-  }
-  else
-  {
-    mFlags = mFlags & ~FlagDropOff;
-  }
-  // can no longer use default dop off
-  mFlags = mFlags & ~FlagDefaultDropOff;
-}
-
-void ScrollViewTwistEffect::GetSwingDropOff( Vector2& dropOff, Vector2& distance, AlphaFunction& function ) const
-{
-  dropOff = mDropOff;
-  distance = mDropOffDistance;
-  function = mDropOffFunction;
-}
-
-void ScrollViewTwistEffect::OnAttach(Toolkit::ScrollView& scrollView)
-{
-  // Create effect-time property if not already created.
-  if(mPropertyTime == Property::INVALID_INDEX)
-  {
-    mPropertyTime = SafeRegisterProperty( scrollView, EFFECT_TIME, 0.0f );
-    mPropertyReference = SafeRegisterProperty( scrollView, EFFECT_REFERENCE, Vector3::ZERO );
-    mPropertyDepth = SafeRegisterProperty( scrollView, EFFECT_DEPTH, 0.0f);
-    mPropertyActivate = SafeRegisterProperty(scrollView, EFFECT_ACTIVATE, 0.0f);
-  }
-  // currently cant change overshoot snap back duration, use the constant one from ScrollView
-  mActivationTime = Toolkit::ScrollView::DEFAULT_SNAP_OVERSHOOT_DURATION;
-
-  // Connect to the scroll view signals
-  scrollView.ScrollStartedSignal().Connect(this, &ScrollViewTwistEffect::OnScrollStart);
-  scrollView.SnapStartedSignal().Connect(this, &ScrollViewTwistEffect::OnScrollSnap);
-  scrollView.ScrollUpdatedSignal().Connect(this, &ScrollViewTwistEffect::OnScrollUpdate);
-  scrollView.ScrollCompletedSignal().Connect(this, &ScrollViewTwistEffect::OnScrollComplete);
-
-  AttachActor(scrollView);
-}
-
-void ScrollViewTwistEffect::OnDetach(Toolkit::ScrollView& scrollView)
-{
-  scrollView.ScrollStartedSignal().Disconnect(this, &ScrollViewTwistEffect::OnScrollStart);
-  scrollView.SnapStartedSignal().Disconnect(this, &ScrollViewTwistEffect::OnScrollSnap);
-  scrollView.ScrollUpdatedSignal().Disconnect(this, &ScrollViewTwistEffect::OnScrollUpdate);
-  scrollView.ScrollCompletedSignal().Disconnect(this, &ScrollViewTwistEffect::OnScrollComplete);
-
-  if(mAnimation)
-  {
-    mAnimation.FinishedSignal().Disconnect(this, &ScrollViewTwistEffect::OnAnimationFinished);
-    mAnimation.Clear();
-    mAnimation.Reset();
-  }
-}
-
-void ScrollViewTwistEffect::AttachActor(Actor actor)
-{
-
-}
-
-void ScrollViewTwistEffect::DetachActor(Actor actor)
-{
-  // TODO: remove the specific constraint defined in AttachActor (and possibly
-  // unregister property) - neither functionality exists in Dali.
-}
-
-void ScrollViewTwistEffect::ContinueAnimation(float endTime)
-{
-  // continue animating
-  if(mAnimation)
-  {
-    mAnimation.FinishedSignal().Disconnect(this, &ScrollViewTwistEffect::OnAnimationFinished);
-    mAnimation.Clear();
-  }
-
-  Actor scrollView = GetScrollView();
-
-  mAnimation = Animation::New(TWISTEFFECT_ANIMATION_MAX_TIME);
-  mAnimation.AnimateTo( Property(scrollView, mPropertyTime), endTime, AlphaFunctions::Linear );
-  mAnimation.FinishedSignal().Connect(this, &ScrollViewTwistEffect::OnAnimationFinished);
-  mAnimation.Play();
-}
-
-void ScrollViewTwistEffect::OnScrollStart( const Vector3& position )
-{
-  if(mActivateAnimation)
-  {
-    // if the animation after Scroll complete not terminate before another scroll action, stop the animation before start again
-    mActivateAnimation.Stop();
-    mActivateAnimation.Clear();
-    mActivateAnimation = NULL;
-  }
-
-  GetScrollView().SetProperty(mPropertyTime, 0.0f);
-  if(mEnableEffect)
-  {
-    GetScrollView().SetProperty(mPropertyActivate, 1.0f);
-  }
-  else
-  {
-    GetScrollView().SetProperty(mPropertyActivate, 0.0f);
-  }
-  GetScrollView().SetProperty(mPropertyReference, position);
-
-  ContinueAnimation(TWISTEFFECT_ANIMATION_MAX_TIME);
-}
-
-void ScrollViewTwistEffect::OnScrollUpdate( const Vector3& position )
-{
-  // nothing to do
-}
-
-void ScrollViewTwistEffect::OnScrollComplete( const Vector3& position )
-{
-  if(!mEnableEffect)
-  {
-    OnActivateAnimationFinished(mAnimation);
-    return;
-  }
-  Actor scrollView = GetScrollView();
-  scrollView.SetProperty(mPropertyActivate, 1.0f);
-  mActivateAnimation = Animation::New(mActivationTime);
-  mActivateAnimation.AnimateTo( Property(scrollView, mPropertyActivate), 0.0f, AlphaFunctions::Linear);
-  mActivateAnimation.FinishedSignal().Connect(this, &ScrollViewTwistEffect::OnActivateAnimationFinished);
-  mActivateAnimation.Play();
-}
-
-void ScrollViewTwistEffect::OnScrollSnap( const Toolkit::ScrollView::SnapEvent& event )
-{
-  // If a Flicking snap is occuring and the distance is more than mMinimumDistanceForShrink
-  // then animate depth effect i.e. shrink actors and then bring back in to regular size.
-  // NOTE: ScrollView Snap returns a value opposite of GetCurrentScrollPosition
-  // i.e. if you've "scrolled 100 pixels right" (so content on screen has shifted 100 pixels left)
-  // then GetCurrentScrollPosition returns a positive value (100.0f, 0.0f) (position of where you're
-  // look, not where content has been moved to).
-  // event.position returns a negative value (-100.0f, 0.0f)
-  // Would be a good idea to change SnapEvent in the API so it reflects GetCurrentScrollPosition.
-  // TODO: Change scroll-view API, check if anything uses SnapEvent and change them correspondingly
-  Vector3 targetScrollPosition(-event.position);
-
-  Vector3 delta = targetScrollPosition - GetScrollView().GetCurrentScrollPosition();
-
-  if(event.type==Flick && delta.Length() > mMinimumDistanceForShrink)
-  {
-    Actor scrollView = GetScrollView();
-
-    Animation animation = Animation::New(event.duration);
-    animation.AnimateTo( Property(scrollView, mPropertyDepth), 1.0f, HopEasing);
-    animation.Play();
-  }
-}
-
-void ScrollViewTwistEffect::OnAnimationFinished( Animation& animation )
-{
-  // still unstable, so continue animating.
-  // TODO: Requires an instability check to ensure time animation finishes when delay is
-  // less noticeable. i.e. all present scrollPositions are approx the same as mScrollPosition in constraints.
-  // best solution for this is to switch to a single history vector of scroll position, and compare if
-  // position has not deviated >= 0.5 pixel for the past 1 second.
-  float endTime = GetScrollView().GetProperty<float>(mPropertyTime) + TWISTEFFECT_ANIMATION_MAX_TIME;
-  ContinueAnimation(endTime);
-}
-
-void ScrollViewTwistEffect::OnActivateAnimationFinished( Animation& animation )
-{
-  if(mAnimation)
-  {
-    mAnimation.FinishedSignal().Disconnect(this, &ScrollViewTwistEffect::OnAnimationFinished);
-    mAnimation.Clear();
-    mAnimation.Reset();
-  }
-}
-
-
-} // namespace Internal
-
-} // namespace Toolkit
-
-} // namespace Dali
diff --git a/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-twist-effect-impl.h b/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-twist-effect-impl.h
deleted file mode 100644 (file)
index 5aca6a0..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-#ifndef __DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_TWIST_EFFECT_H__
-#define __DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_TWIST_EFFECT_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.
- *
- */
-
-// INTERNAL INCLUDES
-#include <dali/public-api/animation/animation.h>
-#include <dali/public-api/animation/alpha-functions.h>
-#include <dali/public-api/animation/time-period.h>
-#include <dali/public-api/object/ref-object.h>
-#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h>
-#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h>
-#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-twist-effect.h>
-
-namespace Dali
-{
-
-class Animation;
-
-namespace Toolkit
-{
-
-class ScrollView;
-
-namespace Internal
-{
-
-class ScrollViewEffect;
-
-/**
- * @copydoc Toolkit::ScrollViewTwistEffect
- */
-class ScrollViewTwistEffect : public ScrollViewEffect
-{
-
-public:
-  enum Flag
-  {
-    FlagTwist = 0x01,
-    FlagScale = 0x02,
-    FlagDropOff = 0x04,
-    FlagDefaultDropOff = 0x08,
-    DefaultFlags = FlagTwist | FlagDropOff | FlagDefaultDropOff
-  };
-
-  /**
-   * Constructor
-   */
-  ScrollViewTwistEffect();
-
-public:
-
-  /**
-   * @copydoc ScrollViewEffect::GetMinimumDistanceForShrink
-   */
-  float GetMinimumDistanceForShrink() const;
-
-  /**
-   * @copydoc ScrollViewEffect::SetMinimumDistanceForShrink
-   */
-  void SetMinimumDistanceForShrink(float distance);
-
-  /**
-   * enable or disable this effect
-   * @param[in] enable when enableFlag is true, disable when enableFlag is false.
-   */
-  void EnableEffect(bool enableFlag);
-
-  /**
-   * @copydoc ScrollViewEffect::ApplyToActor
-   */
-  void ApplyToActor( Actor child,
-                     bool additionalEffects,
-                     const Vector2& angleSwing,
-                     float scaleAmount,
-                     float delayMin,
-                     float delayMax );
-
-  /**
-   * @copydoc Toolkit::ScrollViewEffect::Apply
-   */
-  void Apply(Actor child);
-
-  /**
-   * @copydoc Toolkit::ScrollViewEffect::SetMaxSwingAngle
-   */
-  void SetMaxSwingAngle(const Vector2& maxSwingAngle);
-
-  /**
-   * @copydoc Toolkit::ScrollViewEffect::GetMaxSwingAngle
-   */
-  Vector2 GetMaxSwingAngle() const;
-
-  /**
-   * @copydoc Toolkit::ScrollViewEffect::SetSwingDropOff
-   */
-  void SetSwingDropOff(const Vector2& dropOff, const Vector2& distance, AlphaFunction function = NULL);
-
-  /**
-   * @copydoc Toolkit::ScrollViewEffect::GetSwingDropOff
-   */
-  void GetSwingDropOff( Vector2& dropOff, Vector2& distance, AlphaFunction& function ) const;
-
-public:
-
-  /**
-   * @copydoc ScrollViewEffect::OnAttach
-   */
-  virtual void OnAttach(Toolkit::ScrollView& scrollView);
-
-  /**
-   * @copydoc ScrollViewEffect::OnDetach
-   */
-  virtual void OnDetach(Toolkit::ScrollView& scrollView);
-
-protected:
-
-  /**
-   * A reference counted object may only be deleted by calling Unreference()
-   */
-  virtual ~ScrollViewTwistEffect();
-
-private:
-
-  /**
-   * Signal handler, called when the ScrollView starts to move
-   *
-   * @param[in] position The current scroll position
-   */
-  void OnScrollStart( const Vector3& position );
-
-  /**
-   * Signal handler, called when the ScrollView is moving
-   *
-   * @param[in] position The current scroll positionApply
-   */
-  void OnScrollUpdate( const Vector3& position );
-
-  /**
-   * Signal handler, called when the ScrollView has completed movement
-   *
-   * @param[in] position The current scroll position
-   */
-  void OnScrollComplete( const Vector3& position );
-
-  void OnScrollSnap( const Toolkit::ScrollView::SnapEvent& event );
-
-  /**
-   * Signal handler, called when the Wobble Effect animation has completed.
-   *
-   * @param[in] animation The animation.
-   */
-  void OnAnimationFinished( Animation& animation );
-
-  void OnActivateAnimationFinished( Animation& animation );
-  /**
-   * Attaches effect to Scroll Actor (ScrollView)
-   *
-   * Applies the same wobble effect to each Scroll Actor.
-   *
-   * @param[in] actor The attached Actor
-   */
-  void AttachActor(Actor actor);
-
-  /**
-   * Detaches effect from Scroll Actor (ScrollView)
-   *
-   * @param[in] actor The attached Actor
-   */
-  void DetachActor(Actor actor);
-
-  /**
-   * Continues Animation to time reaches endTime
-   *
-   * @param[in] endTime the target time to reach.
-   */
-  void ContinueAnimation(float endTime);
-
-private:
-
-  ushort mFlags;
-  Animation mAnimation;                         ///< Animation Timer to drive the twist effect constraint.
-  float     mActivationTime;                    ///< Time taken for overshoot to reach zero, which is the time we need to allow effect to be active
-  Animation mActivateAnimation;
-  Property::Index mPropertyTime;                ///< Time property used by twist effect constraint to calculate timePassed.
-  bool mEnableEffect;                           ///< flag that decide whether enable or disable the twist effect.
-  bool mAdditionalEffects;                      ///< whether we want to apply extra effects
-  Property::Index mPropertyReference;           ///< Reference point in scroll-contents, this point has no delay.
-  Property::Index mPropertyActivate;                                              ///::< The further out from this point, the further the delay.
-  Property::Index mPropertyDepth;               ///< Depth property used by twist effect constraint to shrink Actors.
-  float mMinimumDistanceForShrink;              ///< Scrolling animation must last for longer than this amount to do shrink effect.s
-  Vector2 mMaxSwingAngle;                       ///< Maximum swing angle to be applied to x and y axes
-  Vector2 mDropOff;                             ///< Amount to drop off the angle on each axis of drop off distance
-  Vector2 mDropOffDistance;                     ///< Distance to apply the full drop off over
-  AlphaFunction mDropOffFunction;                      ///< Function to adjust how drop off is aplied over the distance, NULL for linear
-  float mScaleFactor;                           ///< Amount to scale by during translation
-  float mDelayMin;
-  float mDelayMax;
-};
-
-} // namespace Internal
-
-// Helpers for public-api forwarding methods
-
-inline Internal::ScrollViewTwistEffect& GetImpl(Dali::Toolkit::ScrollViewTwistEffect& obj)
-{
-  DALI_ASSERT_ALWAYS(obj);
-
-  Dali::RefObject& handle = obj.GetBaseObject();
-
-  return static_cast<Internal::ScrollViewTwistEffect&>(handle);
-}
-
-inline const Internal::ScrollViewTwistEffect& GetImpl(const Dali::Toolkit::ScrollViewTwistEffect& obj)
-{
-  DALI_ASSERT_ALWAYS(obj);
-
-  const Dali::RefObject& handle = obj.GetBaseObject();
-
-  return static_cast<const Internal::ScrollViewTwistEffect&>(handle);
-}
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // __DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_TWIST_EFFECT_H__
index a4f21c0..faa2275 100644 (file)
@@ -175,9 +175,10 @@ struct ScrollViewWobbleEffectConstraint
 };
 
 ScrollViewWobbleEffect::ScrollViewWobbleEffect()
-: mPropertyTime(Property::INVALID_INDEX)
+: mPropertyTime(Property::INVALID_INDEX),
+  mStableCurrent(0),
+  mAnimationCycleId(0)
 {
-
 }
 
 ScrollViewWobbleEffect::~ScrollViewWobbleEffect()
index 95d22b5..27bd343 100644 (file)
@@ -277,9 +277,10 @@ Toolkit::ScrollComponent Scrollable::NewScrollComponent(Toolkit::Scrollable& scr
       instance = static_cast<Toolkit::ScrollComponent>(Toolkit::ScrollBarInternal::New(scrollable, false));
       break;
     }
-    default:
+    case Toolkit::Scrollable::OvershootIndicator:
     {
-      DALI_ASSERT_ALWAYS(true && "Unrecognized component type");
+      DALI_ASSERT_ALWAYS(!"Unrecognized component type");
+      break;
     }
   }
 
index 4db1a13..85099f5 100644 (file)
@@ -20,7 +20,6 @@
 
 // EXTERNAL INCLUDES
 #include <sstream>
-#include <dali/public-api/adaptor-framework/physical-keyboard.h>
 #include <dali/public-api/animation/constraint.h>
 #include <dali/public-api/animation/time-period.h>
 #include <dali/public-api/object/ref-object.h>
 #include <dali/public-api/scripting/scripting.h>
 #include <dali/integration-api/debug.h>
 
-// INTERNAL INCLUDES
-#include <dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h>
-
 using namespace Dali;
-using namespace std;
 
 namespace
 {
@@ -119,7 +114,7 @@ void PrintArray( Array2d<Size>& array )
 }
 // debugging support, very useful when new features are added or bugs are hunted down
 // currently not called from code so compiler will optimize these away, kept here for future debugging
-void PrintVector( vector<float>& array )
+void PrintVector( std::vector<float>& array )
 {
   TV_LOG( "vector, size [%d]\n", array.size() );
   // print values
@@ -364,14 +359,14 @@ void TableView::InsertRow( unsigned int rowIndex )
 
 void TableView::DeleteRow( unsigned int rowIndex )
 {
-  vector< Actor > ignored;
+  std::vector< Actor > ignored;
   DeleteRow( rowIndex, ignored );
 }
 
-void TableView::DeleteRow( unsigned int rowIndex, vector<Actor>& removed )
+void TableView::DeleteRow( unsigned int rowIndex, std::vector<Actor>& removed )
 {
   RelayoutingLock lock( *this );
-  vector< CellData > lost;
+  std::vector< CellData > lost;
   mCellData.DeleteRow( rowIndex, lost );
   // need to update the cellinfos for the items that moved
   const unsigned int rowCount = mCellData.GetRows();
@@ -451,14 +446,14 @@ void TableView::InsertColumn( unsigned int columnIndex )
 
 void TableView::DeleteColumn( unsigned int columnIndex )
 {
-  vector< Actor > ignored;
+  std::vector< Actor > ignored;
   DeleteColumn( columnIndex, ignored );
 }
 
-void TableView::DeleteColumn( unsigned int columnIndex, vector<Actor>& removed )
+void TableView::DeleteColumn( unsigned int columnIndex, std::vector<Actor>& removed )
 {
   RelayoutingLock lock( *this );
-  vector< CellData > lost;
+  std::vector< CellData > lost;
   mCellData.DeleteColumn( columnIndex, lost );
   // need to update the cellinfos for the items that moved
   const unsigned int rowCount = mCellData.GetRows();
@@ -502,17 +497,17 @@ void TableView::DeleteColumn( unsigned int columnIndex, vector<Actor>& removed )
 
 void TableView::Resize( unsigned int rows, unsigned int columns )
 {
-  vector< Actor > ignored;
+  std::vector< Actor > ignored;
   Resize( rows, columns, ignored );
 }
 
-void TableView::Resize( unsigned int rows, unsigned int columns, vector<Actor>& removed )
+void TableView::Resize( unsigned int rows, unsigned int columns, std::vector<Actor>& removed )
 {
   RelayoutingLock lock( *this );
   unsigned int oldRows = GetRows();
   unsigned int oldColumns = GetColumns();
   // resize data array
-  vector< CellData > lost;
+  std::vector< CellData > lost;
   ResizeContainers( rows, columns, lost );
   // calculate if we lost rows or columns
   unsigned int rowsRemoved = 0;
@@ -975,11 +970,11 @@ void TableView::OnInitialize()
 
 void TableView::ResizeContainers( unsigned int rows, unsigned int columns )
 {
-  vector<CellData> ignored;
+  std::vector<CellData> ignored;
   ResizeContainers( rows, columns, ignored );
 }
 
-void TableView::ResizeContainers( unsigned int rows, unsigned int columns, vector<CellData>& removed )
+void TableView::ResizeContainers( unsigned int rows, unsigned int columns, std::vector<CellData>& removed )
 {
   mCellData.Resize( rows, columns, removed );
   // we dont care if these go smaller, data will be regenerated or is not needed anymore
@@ -990,11 +985,11 @@ void TableView::ResizeContainers( unsigned int rows, unsigned int columns, vecto
   mRelativeWidths.resize( columns );
 }
 
-void TableView::RemoveAndGetLostActors( const vector<CellData>& lost, vector<Actor>& removed,
+void TableView::RemoveAndGetLostActors( const std::vector<CellData>& lost, std::vector<Actor>& removed,
                                         unsigned int rowsRemoved, unsigned int columnsRemoved )
 {
   // iterate through all lost cells
-  vector< CellData >::const_iterator iter = lost.begin();
+  std::vector< CellData >::const_iterator iter = lost.begin();
   for( ; iter != lost.end(); ++iter )
   {
     // if it is a valid actor
@@ -1170,12 +1165,12 @@ void TableView::SetHeightOrWidthProperty(TableView& tableViewImpl,
     {
       Property::Value& item = map.GetValue(i);
 
-      if( istringstream(map.GetKey(i)) >> rowIndex  // the key is a number
+      if( std::istringstream(map.GetKey(i)) >> rowIndex  // the key is a number
           && Property::MAP == item.GetType())
       {
         if( item.HasKey( "policy" ) && item.HasKey( "value" ) )
         {
-          Toolkit::TableView::LayoutPolicy policy = Scripting::GetEnumeration< Toolkit::TableView::LayoutPolicy >( item.GetValue("policy").Get<string>(), LAYOUT_POLICY_STRING_TABLE, LAYOUT_POLICY_STRING_TABLE_COUNT );
+          Toolkit::TableView::LayoutPolicy policy = Scripting::GetEnumeration< Toolkit::TableView::LayoutPolicy >( item.GetValue("policy").Get<std::string>(), LAYOUT_POLICY_STRING_TABLE, LAYOUT_POLICY_STRING_TABLE_COUNT );
           if( policy == Toolkit::TableView::Fixed )
           {
             (tableViewImpl.*funcFixed)( rowIndex, item.GetValue("value").Get<float>() );
@@ -1206,29 +1201,25 @@ Property::Value TableView::GetColumnWidthsPropertyValue()
 
 void TableView::GetMapPropertyValue( const std::vector<float>& fixedSize, const std::vector<float>& relativeSize, Property::Map& map )
 {
-  string fixedPolicy( Scripting::GetEnumerationName< Toolkit::TableView::LayoutPolicy >( Toolkit::TableView::Fixed, LAYOUT_POLICY_STRING_TABLE, LAYOUT_POLICY_STRING_TABLE_COUNT ) );
-  string relativePolicy( Scripting::GetEnumerationName< Toolkit::TableView::LayoutPolicy >( Toolkit::TableView::Relative, LAYOUT_POLICY_STRING_TABLE, LAYOUT_POLICY_STRING_TABLE_COUNT ) );
-  Property::StringValuePair fixedPolicyPair( "policy", fixedPolicy );
-  Property::StringValuePair relativePolicyPair( "policy", relativePolicy );
+  std::string fixedPolicy( Scripting::GetEnumerationName< Toolkit::TableView::LayoutPolicy >( Toolkit::TableView::Fixed, LAYOUT_POLICY_STRING_TABLE, LAYOUT_POLICY_STRING_TABLE_COUNT ) );
+  std::string relativePolicy( Scripting::GetEnumerationName< Toolkit::TableView::LayoutPolicy >( Toolkit::TableView::Relative, LAYOUT_POLICY_STRING_TABLE, LAYOUT_POLICY_STRING_TABLE_COUNT ) );
 
   size_t count = fixedSize.size();
   for( size_t index = 0; index < count; index++ )
   {
     if( ! EqualsZero( fixedSize[index] ) )
     {
-      Property::StringValuePair valuePair( "value", fixedSize[index] );
       Property::Map item;
-      item[ fixedPolicyPair.first ] = fixedPolicyPair.second;
-      item[ valuePair.first ] = valuePair.second;
+      item[ "policy" ] = fixedPolicy;
+      item[ "value" ] = fixedSize[index];
 
       map[ static_cast<std::ostringstream*>( &(std::ostringstream() << index ) )->str() ] = item;
     }
     else if( ! EqualsZero( relativeSize[index] ) )
     {
-      Property::StringValuePair valuePair( "value", relativeSize[index] );
       Property::Map item;
-      item[ relativePolicyPair.first ] = relativePolicyPair.second;
-      item[ valuePair.first ] = valuePair.second;
+      item[ "policy" ] = relativePolicy;
+      item[ "value" ] = relativeSize[index];
 
       map[ static_cast<std::ostringstream*>( &(std::ostringstream() << index ) )->str() ] = item;
     }
index a529f37..6ac183f 100644 (file)
@@ -83,10 +83,16 @@ namespace Internal
 Decorator::Decorator( TextViewCharacterPositioning& textViewManager, TextInputTextStyle& textStyle ):
   mTextViewCharacterPositioning( textViewManager ),
   mTextStyle( textStyle ),
+  mSelectionHandleOnePosition(0),
+  mSelectionHandleTwoPosition(0),
+  mGrabHandlePosition(0),
   mCursorPosition( 0 ),
   mTextHighlight( textViewManager ),
   mCursorBlinkStatus( true ),
   mCursorVisibility( true ),
+  mCursorRTLEnabled( false ),
+  mIsGrabHandleInScrollArea( false ),
+  mIsCursorInScrollArea( false ),
   mGrabHandleEnabled( true )
 {
 }
@@ -122,7 +128,7 @@ Vector4 Decorator::GetBoundingBox() const
 /**
  * Selection Handles
  */
-void Decorator::OnHandlePan(Actor actor, PanGesture gesture)
+void Decorator::OnHandlePan(Actor actor, const PanGesture& gesture)
 {
   Actor selectionHandleOne = mTextInputHandles.GetSelectionHandleOne();
   Actor selectionHandleTwo = mTextInputHandles.GetSelectionHandleTwo();
@@ -238,17 +244,6 @@ Vector3 Decorator::PositionSelectionHandle( Actor selectionHandle, Vector3& actu
 
   selectionHandle.SetPosition( actualPosition += DEFAULT_HANDLE_OFFSET );
 
-  if( mTextViewCharacterPositioning.IsScrollEnabled() )
-  {
-    const Vector3 controlSize = mTextViewCharacterPositioning.GetTextView().GetCurrentSize();
-    const Size cursorSize( GetCursorSizeAt( position ) );
-    bool handleVisible = IsPositionWithinControl( actualPosition, Vector2(DEFAULT_HANDLE_OFFSET.width, DEFAULT_HANDLE_OFFSET.height), controlSize );
-
-    DALI_LOG_INFO(gLogFilter, Debug::Verbose, "TextInputDecorationLayouter::PositionSelectionHandle controlSize[%f,%f] cursorSize[%f,%f] actualPos[%f,%f] visible[%s] \n",
-              controlSize.x, controlSize.y, cursorSize.x, cursorSize.y, actualPosition.x, actualPosition.y, ( handleVisible )?"true":"false" );
-
-    selectionHandle.SetVisible( handleVisible );
-  }
   return actualPosition;
 }
 
@@ -276,7 +271,7 @@ Vector3 Decorator::MoveSelectionHandle( Actor selectionHandle,
 {
   Vector3 actualHandlePosition;
   actualSelectionHandlePosition.x += displacement.x * selectionHandle.GetCurrentScale().x;
-  actualSelectionHandlePosition.y += displacement.y * selectionHandle.GetCurrentScale().y;;
+  actualSelectionHandlePosition.y += displacement.y * selectionHandle.GetCurrentScale().y;
 
   // Selection handles should jump to the nearest character
   std::size_t newHandlePosition = 0;
@@ -289,47 +284,6 @@ Vector3 Decorator::MoveSelectionHandle( Actor selectionHandle,
 
   bool handleVisible = true;
 
-  Vector2 min, max;
-  if( mTextViewCharacterPositioning.IsScrollEnabled() )
-  {
-    const Vector3 controlSize = mTextViewCharacterPositioning.GetTextView().GetCurrentSize();
-    const Size cursorSize( GetCursorSizeAt( newHandlePosition ) );
-
-    handleVisible = IsPositionWithinControl( actualHandlePosition,
-                                             cursorSize,
-                                             controlSize );
-
-    if( handleVisible )
-    {
-      StopScrollTimer();
-      mCurrentHandlePosition = actualHandlePosition;
-      mScrollDisplacement = Vector2::ZERO;
-    }
-    else
-    {
-
-      if( ( actualHandlePosition.x < SCROLL_THRESHOLD ) && ( displacement.x <= 0.f ) )
-      {
-        mScrollDisplacement.x = -SCROLL_SPEED;
-      }
-      else if( ( actualHandlePosition.x > controlSize.width - SCROLL_THRESHOLD ) && ( displacement.x >= 0.f ) )
-      {
-        mScrollDisplacement.x = SCROLL_SPEED;
-      }
-      if( ( actualHandlePosition.y < SCROLL_THRESHOLD ) && ( displacement.y <= 0.f ) )
-      {
-        mScrollDisplacement.y = -SCROLL_SPEED;
-      }
-      else if( ( actualHandlePosition.y > controlSize.height - SCROLL_THRESHOLD ) && ( displacement.y >= 0.f ) )
-      {
-        mScrollDisplacement.y = SCROLL_SPEED;
-      }
-      DALI_LOG_INFO(gLogFilter, Debug::Verbose, "TextInputDecorationLayouter::MoveSelectionHandle Handle not visible scroll displacement [%f]\n", mScrollDisplacement.x);
-
-      StartScrollTimer();
-   }
-  }
-
   if ( handleVisible &&                                          // Ensure the handle is visible.
      ( newHandlePosition != currentSelectionHandlePosition ) &&  // Ensure the handle has moved.
      ( newHandlePosition != mSelectionHandleTwoPosition ) &&     // Ensure new handle position not the same position as an existing handle.
@@ -381,46 +335,7 @@ void Decorator::MoveGrabHandle( const Vector2& displacement /*, std::size_t curr
 
   bool handleVisible = true;
 
-  if( mTextViewCharacterPositioning.IsScrollEnabled() )
-  {
-    const Vector3 controlSize = mTextViewCharacterPositioning.GetTextView().GetCurrentSize();
-    const Size cursorSize( GetCursorSizeAt( newHandlePosition ) );
-    // Scrolls the text if the handle is not in a visible position
-    handleVisible = IsPositionWithinControl( actualHandlePosition,
-                                                cursorSize,
-                                                controlSize );
-
-    DALI_LOG_INFO(gLogFilter, Debug::Verbose, "TextInputDecorationLayouter::MoveGrabHandle handleVisible[%s]\n", ( handleVisible )?"true":"false");
-
-    if( handleVisible )
-    {
-      StopScrollTimer();
-      mCurrentHandlePosition = actualHandlePosition;
-      mScrollDisplacement = Vector2::ZERO;
-    }
-    else
-    {
-      if( ( actualHandlePosition.x < SCROLL_THRESHOLD ) && ( displacement.x <= 0.f ) )
-      {
-        mScrollDisplacement.x = -SCROLL_SPEED;
-      }
-      else if( ( actualHandlePosition.x > controlSize.width - SCROLL_THRESHOLD ) && ( displacement.x >= 0.f ) )
-      {
-        mScrollDisplacement.x = SCROLL_SPEED;
-      }
-      if( ( actualHandlePosition.y < SCROLL_THRESHOLD ) && ( displacement.y <= 0.f ) )
-      {
-        mScrollDisplacement.y = -SCROLL_SPEED;
-      }
-      else if( ( actualHandlePosition.y > controlSize.height - SCROLL_THRESHOLD ) && ( displacement.y >= 0.f ) )
-      {
-        mScrollDisplacement.y = SCROLL_SPEED;
-      }
-      StartScrollTimer();
-    }
-  }
-
-    if( ( newHandlePosition != mGrabHandlePosition ) &&                           // Only redraw cursor and do updates if position changed
+  if( ( newHandlePosition != mGrabHandlePosition ) &&                           // Only redraw cursor and do updates if position changed
         ( handleVisible ) )// and the new position is visible (if scroll is not enabled, it's always true).
     {
       mActualGrabHandlePosition = actualHandlePosition;
@@ -440,8 +355,6 @@ void Decorator::MoveGrabHandle( const Vector2& displacement /*, std::size_t curr
       if ( !mTextViewCharacterPositioning.IsStyledTextEmpty()  && ( cursorPosition > 0 ) )
       {
         DALI_ASSERT_DEBUG( ( 0 <= cursorPosition-1 ) && ( cursorPosition-1 < mTextViewCharacterPositioning.StyledTextSize() ) );
-        const TextStyle inputStyle = mTextViewCharacterPositioning.GetStyleAt( cursorPosition-1 );
-        mTextStyle.SetInputStyle( inputStyle );
       }
     }
 }
@@ -513,16 +426,9 @@ void Decorator::DrawCursor(const std::size_t nthChar)
 
   // Get height of cursor and set its size
   Size size( CURSOR_THICKNESS, 0.0f );
-  if ( !mTextViewCharacterPositioning.IsTextEmpty() )
-  {
-    Vector2 min, max; // out parameters for GetRowRectFromCharacterPosition
-    size.height = mTextViewCharacterPositioning.GetRowRectFromCharacterPosition( mTextViewCharacterPositioning.GetVisualPosition( cursorPosition ), min, max  ).height;
-  }
-  else
-  {
-    // Measure Font so know how big text will be if no initial text to measure.
-    size.height = mTextViewCharacterPositioning.GetLineHeight( nthChar );
-  }
+
+  Vector2 min, max; // out parameters for GetRowRectFromCharacterPosition
+  size.height = mTextViewCharacterPositioning.GetRowRectFromCharacterPosition( mTextViewCharacterPositioning.GetVisualPosition( cursorPosition ), min, max  ).height;
 
   mCursor.SetSize(size);
 
@@ -544,28 +450,7 @@ void Decorator::DrawCursor(const std::size_t nthChar)
 
     SetAltCursorEnabled( altPositionValid );
 
-    if(!altPositionValid)
-    {
-      mCursor.SetPosition( position + UI_OFFSET );
-    }
-    else
-    {
-      size.height *= 0.5f;
-      mCursor.SetSize(size);
-      mCursor.SetPosition( position + UI_OFFSET - Vector3(0.0f, directionRTL ? 0.0f : size.height, 0.0f) );
-      Vector2 min, max; // out parameters for GetRowRectFromCharacterPosition
-      Size rowSize = mTextViewCharacterPositioning.GetRowRectFromCharacterPosition( mTextViewCharacterPositioning.GetVisualPosition( cursorPosition ), min, max );
-      size.height = rowSize.height * 0.5f;
-      mCursorRTL.SetSize(size);
-      mCursorRTL.SetPosition( altPosition + UI_OFFSET - Vector3(0.0f, directionRTL ? size.height : 0.0f, 0.0f) );
-    }
-
-    if( mTextViewCharacterPositioning.IsScrollEnabled() )
-    {
-      // Whether cursor and grab handle are inside the boundaries of the text-input when text scroll is enabled.
-      const Vector3& controlSize = mTextViewCharacterPositioning.GetTextView().GetCurrentSize();
-      mIsCursorInScrollArea = mIsGrabHandleInScrollArea = IsPositionWithinControl( position, size, controlSize );
-    }
+    mCursor.SetPosition( position + UI_OFFSET );
   }
 }
 
@@ -943,10 +828,6 @@ void Decorator::ShowPopupCutCopyPaste()
 
 void Decorator::HidePopUp( bool animate, bool signalFinished )
 {
-  if ( ( mPopUpPanel.GetState() == TextInputPopupNew::StateShowing ) || ( mPopUpPanel.GetState() == TextInputPopupNew::StateShown )  )
-  {
-    mPopUpPanel.Hide( animate );
-  }
 }
 
 void Decorator::AddPopupOption(const std::string& name, const std::string& caption, const Image icon, bool finalOption)
@@ -1114,12 +995,6 @@ bool Decorator::OnScrollTimerTick()
       scrollPosition += scrollDelta;
       mTextViewCharacterPositioning.SetScrollPosition( scrollPosition );
 
-      // If scroll position goes too far TextView will trim it to fit.
-      if ( mTextViewCharacterPositioning.IsScrollPositionTrimmed() )
-      {
-        StopScrollTimer();
-      }
-
       mActualGrabHandlePosition = mTextViewCharacterPositioning.GetActualPositionFromCharacterPosition( newGrabHandlePosition ).GetVectorXY();
     }
   }
@@ -1143,11 +1018,6 @@ bool Decorator::OnScrollTimerTick()
       scrollPosition += scrollDelta;
       mTextViewCharacterPositioning.SetScrollPosition( scrollPosition );
 
-      if( mTextViewCharacterPositioning.IsScrollPositionTrimmed() )
-      {
-        StopScrollTimer();
-      }
-
       mSelectionHandleOnePosition = newHandleOnePosition;
       mSelectionHandleOneActualPosition = mTextViewCharacterPositioning.GetActualPositionFromCharacterPosition( mSelectionHandleOnePosition ).GetVectorXY();
     }
@@ -1169,11 +1039,6 @@ bool Decorator::OnScrollTimerTick()
       scrollPosition += scrollDelta;
       mTextViewCharacterPositioning.SetScrollPosition( scrollPosition );
 
-      if( mTextViewCharacterPositioning.IsScrollPositionTrimmed() )
-      {
-        StopScrollTimer();
-      }
-
       mSelectionHandleTwoPosition = newHandleTwoPosition;
       mCurrentHandlePosition = mTextViewCharacterPositioning.GetActualPositionFromCharacterPosition( mSelectionHandleTwoPosition ).GetVectorXY();
 
index e1b3787..7d316da 100644 (file)
@@ -107,7 +107,7 @@ public:
    * @param actor Handle of the selection or grab handle.
    * @param gesture Data structure with the parameters of the gesture.
    */
-  void OnHandlePan(Actor actor, PanGesture gesture);
+  void OnHandlePan(Actor actor, const PanGesture& gesture);
 
   // Selection Handles
 
index 43b8217..90dd6d5 100644 (file)
@@ -37,7 +37,6 @@
 #include <dali-toolkit/public-api/controls/alignment/alignment.h>
 #include <dali-toolkit/public-api/controls/default-controls/solid-color-actor.h>
 
-using namespace std;
 using namespace Dali;
 
 // Local Data
@@ -1207,7 +1206,7 @@ float TextInput::GetHeightForWidth( float width )
 
 // Private Internal methods
 
-void TextInput::OnHandlePan(Actor actor, PanGesture gesture)
+void TextInput::OnHandlePan(Actor actor, const PanGesture& gesture)
 {
   switch (gesture.state)
   {
@@ -1332,7 +1331,7 @@ bool TextInput::OnHandleTwoTouched(Dali::Actor actor, const TouchEvent& touch)
   return false;
 }
 
-void TextInput::OnDoubleTap(Dali::Actor actor, Dali::TapGesture tap)
+void TextInput::OnDoubleTap(Dali::Actor actor, const Dali::TapGesture& tap)
 {
    // If text exists then select nearest word.
    if ( !mStyledText.empty())
@@ -1397,7 +1396,7 @@ void TextInput::OnDoubleTap(Dali::Actor actor, Dali::TapGesture tap)
 }
 
 // TODO: Change the function name to be more general.
-void TextInput::OnTextTap(Dali::Actor actor, Dali::TapGesture tap)
+void TextInput::OnTextTap(Dali::Actor actor, const Dali::TapGesture& tap)
 {
   DALI_LOG_INFO( gLogFilter, Debug::General, "OnTap mPreEditFlag[%s] mEditOnTouch[%s] mEditModeActive[%s] ", (mPreEditFlag)?"true":"false"
                                                                                                            , (mEditOnTouch)?"true":"false"
@@ -1519,7 +1518,7 @@ void TextInput::OnTextTap(Dali::Actor actor, Dali::TapGesture tap)
   }
 }
 
-void TextInput::OnLongPress(Dali::Actor actor, Dali::LongPressGesture longPress)
+void TextInput::OnLongPress(Dali::Actor actor, const Dali::LongPressGesture& longPress)
 {
   DALI_LOG_INFO( gLogFilter, Debug::General, "OnLongPress\n" );
 
@@ -1767,7 +1766,6 @@ bool TextInput::OnKeyDownEvent(const KeyEvent& event)
     {
       // Some text is selected so erase it before adding space.
       DeleteHighlightedText( true );
-      update = true;
     }
 
     mCursorPosition = mCursorPosition + InsertAt(Text(keyString), mCursorPosition, 0);
@@ -3528,7 +3526,6 @@ void TextInput::GetVisualTextSelection( std::vector<bool>& selectedVisualText, s
 TextInput::HighlightInfo TextInput::CalculateHighlightInfo()
 {
   // At the moment there is no public API to modify the block alignment option.
-  const bool blockAlignEnabled = true;
 
   mNewHighlightInfo.mQuadList.clear(); // clear last quad information.
 
@@ -3597,7 +3594,7 @@ TextInput::HighlightInfo TextInput::CalculateHighlightInfo()
           float rowTop = rowBottom - rowSize.height;
 
           // Still selected, and block-align mode then set rowRight to max, so it can be clamped afterwards
-          if(charSelected && blockAlignEnabled)
+          if(charSelected)
           {
             rowRight = std::numeric_limits<float>::max();
           }
@@ -3609,7 +3606,7 @@ TextInput::HighlightInfo TextInput::CalculateHighlightInfo()
           if( charSelected )
           {
             // if block-align mode then set rowLeft to min, so it can be clamped afterwards
-            rowLeft = blockAlignEnabled ? 0.0f : charInfo.mPosition.x - mTextLayoutInfo.mScrollOffset.x;
+            rowLeft = 0.0f;
             rowRight = ( charInfo.mPosition.x - mTextLayoutInfo.mScrollOffset.x ) + charInfo.mSize.width;
             selectionState = SelectionStarted;
           }
@@ -3654,8 +3651,6 @@ TextInput::HighlightInfo TextInput::CalculateHighlightInfo()
     mNewHighlightInfo.Clamp2D( topLeft, bottomRight );
 
     // For block-align align Further Clamp quads to max left and right extents
-    if(blockAlignEnabled)
-    {
       // BlockAlign: Will adjust highlight to block:
       // i.e.
       //   H[ello] (top row right = max of all rows right)
@@ -3670,9 +3665,7 @@ TextInput::HighlightInfo TextInput::CalculateHighlightInfo()
       // [is some]
       // [text]
       // (common in regular text editors/web browser selection)
-
       mNewHighlightInfo.Clamp2D( Vector2(maxRowLeft, topLeft.y), Vector2(maxRowRight, bottomRight.y ) );
-    }
 
     // Finally clamp quads again so they don't exceed the boundry of the control.
     const Vector3& controlSize = GetControlSize();
@@ -4183,7 +4176,7 @@ bool TextInput::ReturnClosestIndex(const Vector2& source, std::size_t& closestIn
         ++closestIndex;
       }
     }
-    else if( closestIndex == numeric_limits<std::size_t>::max() ) // -1 RTL (after last arabic character on line)
+    else if( closestIndex == std::numeric_limits<std::size_t>::max() ) // -1 RTL (after last arabic character on line)
     {
       closestIndex = mTextLayoutInfo.mCharacterVisualToLogicalMap.size();
     }
index cc46e41..76160de 100644 (file)
@@ -621,7 +621,7 @@ private:
     * @param actor Handle of the selection or grab handle.
     * @param gesture Data structure with the parameters of the gesture.
     */
-   void OnHandlePan(Actor actor, PanGesture gesture);
+   void OnHandlePan(Actor actor, const PanGesture& gesture);
 
    /**
     * Callback for touch down on Grab handle
@@ -649,21 +649,21 @@ private:
     * @param[in] actor
     * @param[in] tap touch event
     */
-   void OnTextTap(Dali::Actor actor, Dali::TapGesture tap);
+   void OnTextTap(Dali::Actor actor, const Dali::TapGesture& tap);
 
    /**
     * Callback for double tap on TextInput
     * @param[in] actor
     * @param[in] tap touch event
     */
-   void OnDoubleTap(Dali::Actor actor, Dali::TapGesture tap);
+   void OnDoubleTap(Dali::Actor actor, const Dali::TapGesture& tap);
 
     /**
      * Callback for long press on TextInput
      * @param[in] actor
      * @param[in] longPress long press event
      */
-   void OnLongPress(Dali::Actor actor, Dali::LongPressGesture longPress);
+   void OnLongPress(Dali::Actor actor, const Dali::LongPressGesture& longPress);
 
    /**
     * Callback for the ClipboardEventNotifier when text is selected in the clipboard window.
index 046041f..63c82fe 100644 (file)
@@ -25,7 +25,6 @@
 #include <dali-toolkit/public-api/controls/buttons/push-button.h>
 #include <dali-toolkit/public-api/controls/default-controls/solid-color-actor.h>
 
-using namespace std;
 using namespace Dali;
 
 #define GET_LOCALE_TEXT(string) dgettext("sys_string", string)
@@ -424,12 +423,6 @@ void TextInputPopup::CreateOrderedListOfOptions()
         currentButton = CreateRequiredButton( ButtonsClipboard, mClipboardOptionPriority, OPTION_CLIPBOARD, GET_LOCALE_TEXT("IDS_COM_BODY_CLIPBOARD"), clipboardIcon, false );
         break;
       }
-      case ButtonsEnumEnd:
-      {
-        DALI_ASSERT_DEBUG( "ButtonsEnumEnd used but an invalid choice");
-        currentButton.orderOfPriority = 0;
-        break;
-      }
     }
 
     bool match = false;
index ce316f2..dd28daa 100644 (file)
@@ -89,7 +89,9 @@ public:
    * Default constructor
    * Creates an empty popup base actor (no content i.e. invisible)
    */
-  TextInputPopupNew(){};
+  TextInputPopupNew()
+  : mState(StateHidden)
+  { };
 
   /**
    * Destructor
index 90a799d..469c0aa 100644 (file)
@@ -28,7 +28,6 @@
 // INTERNAL INCLUDES
 
 using namespace Dali;
-using namespace std;
 
 namespace
 {
@@ -101,7 +100,6 @@ void TextHighlight::GetVisualTextSelection(std::vector<bool>& selectedVisualText
 TextHighlight::HighlightInfo TextHighlight::CalculateHighlightInfo( std::size_t handlePositionStart, std::size_t handlePositionEnd, Toolkit::TextView::TextLayoutInfo& textLayoutInfo )
 {
   // At the moment there is no public API to modify the block alignment option.
-  const bool blockAlignEnabled = true;
 
   TextHighlight::HighlightInfo newHighlightInfo;
   //newHighlightInfo.mQuadList.clear(); // clear last quad information.
@@ -171,7 +169,7 @@ TextHighlight::HighlightInfo TextHighlight::CalculateHighlightInfo( std::size_t
           float rowTop = rowBottom - rowSize.height;
 
           // Still selected, and block-align mode then set rowRight to max, so it can be clamped afterwards
-          if(charSelected && blockAlignEnabled)
+          if(charSelected)
           {
             rowRight = std::numeric_limits<float>::max();
           }
@@ -183,7 +181,7 @@ TextHighlight::HighlightInfo TextHighlight::CalculateHighlightInfo( std::size_t
           if( charSelected )
           {
             // if block-align mode then set rowLeft to min, so it can be clamped afterwards
-            rowLeft = blockAlignEnabled ? 0.0f : charInfo.mPosition.x - textLayoutInfo.mScrollOffset.x;
+            rowLeft = 0.0f;
             rowRight = ( charInfo.mPosition.x - textLayoutInfo.mScrollOffset.x ) + charInfo.mSize.width;
             selectionState = SelectionStarted;
           }
@@ -206,7 +204,7 @@ TextHighlight::HighlightInfo TextHighlight::CalculateHighlightInfo( std::size_t
       {
         // finished selection.
         Vector2 min, max;
-        if(lastIt->mIsNewParagraphChar)
+        if(lastIt != end && lastIt->mIsNewParagraphChar)
         {
           lastIt = std::max( textLayoutInfo.mCharacterLayoutInfoTable.begin(), lastIt - 1 );
         }
@@ -228,8 +226,6 @@ TextHighlight::HighlightInfo TextHighlight::CalculateHighlightInfo( std::size_t
     newHighlightInfo.Clamp2D( topLeft, bottomRight );
 
     // For block-align align Further Clamp quads to max left and right extents
-    if(blockAlignEnabled)
-    {
       // BlockAlign: Will adjust highlight to block:
       // i.e.
       //   H[ello] (top row right = max of all rows right)
@@ -244,9 +240,8 @@ TextHighlight::HighlightInfo TextHighlight::CalculateHighlightInfo( std::size_t
       // [is some]
       // [text]
       // (common in regular text editors/web browser selection)
-
       newHighlightInfo.Clamp2D( Vector2(maxRowLeft, topLeft.y), Vector2(maxRowRight, bottomRight.y ) );
-    }
+
   }
 
   return newHighlightInfo;
index 3e08d27..e69956e 100644 (file)
@@ -129,7 +129,8 @@ TextView::TextViewProcessorMetadata::TextViewProcessorMetadata()
 : mType( TextView::TextSet ),
   mPosition( 0u ),
   mNumberOfCharacters( 0u ),
-  mText()
+  mText(),
+  mStyleMask(TextStyle::NONE)
 {
 }
 
@@ -926,6 +927,7 @@ bool TextView::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface*
 
 TextView::LayoutParameters::LayoutParameters()
 : mMultilinePolicy( Toolkit::TextView::SplitByNewLineChar ),
+  mExceedPolicy( TextView::Original ),
   mWidthExceedPolicy( Toolkit::TextView::Original ),
   mHeightExceedPolicy( Toolkit::TextView::Original ),
   mHorizontalAlignment( Toolkit::Alignment::HorizontalCenter ),
@@ -948,6 +950,7 @@ TextView::LayoutParameters::LayoutParameters( Toolkit::TextView::MultilinePolicy
                                               float                                lineHeightOffset,
                                               bool                                 markUpEnabled )
 : mMultilinePolicy( multilinePolicy ),
+  mExceedPolicy( TextView::Original ),
   mWidthExceedPolicy( widthExceedPolicy ),
   mHeightExceedPolicy( heightExceedPolicy ),
   mHorizontalAlignment(),
@@ -970,6 +973,7 @@ TextView::LayoutParameters::LayoutParameters( Toolkit::TextView::MultilinePolicy
 
 TextView::LayoutParameters::LayoutParameters( const TextView::LayoutParameters& layoutParameters )
 : mMultilinePolicy( layoutParameters.mMultilinePolicy ),
+  mExceedPolicy( TextView::Original ),
   mWidthExceedPolicy( layoutParameters.mWidthExceedPolicy ),
   mHeightExceedPolicy( layoutParameters.mHeightExceedPolicy ),
   mHorizontalAlignment( layoutParameters.mHorizontalAlignment ),
@@ -1671,7 +1675,7 @@ void TextView::DestroyOffscreenRenderingResources()
   }
 }
 
-void TextView::OnTextPan( Actor actor, PanGesture gesture )
+void TextView::OnTextPan( Actor actor, const PanGesture& gesture )
 {
   if( 1u == gesture.numberOfTouches )
   {
index e1cbc42..8c02e38 100644 (file)
@@ -497,7 +497,7 @@ private:
    * @param[in] actor Handle of the text-view.
    * @param[in] gesture Data structure with the parameters of the gesture.
    */
-  void OnTextPan( Actor actor, PanGesture gesture );
+  void OnTextPan( Actor actor, const PanGesture& gesture );
 
   /**
    * Ensures the text-view's boundaries are fully covered of text.
index 5e8af9c..5083694 100644 (file)
@@ -33,7 +33,6 @@ toolkit_base_src_files = \
    $(toolkit_base_src_dir)/controls/scrollable/scroll-view/scroll-view-page-carousel-effect-impl.cpp \
    $(toolkit_base_src_dir)/controls/scrollable/scroll-view/scroll-view-page-spiral-effect-impl.cpp \
    $(toolkit_base_src_dir)/controls/scrollable/scroll-view/scroll-view-slide-effect-impl.cpp \
-   $(toolkit_base_src_dir)/controls/scrollable/scroll-view/scroll-view-twist-effect-impl.cpp \
    $(toolkit_base_src_dir)/controls/scrollable/scroll-view/scroll-view-wobble-effect-impl.cpp \
    $(toolkit_base_src_dir)/controls/table-view/table-view-impl.cpp \
    $(toolkit_base_src_dir)/controls/text-input/text-input-decorator-impl.cpp \
index d76476f..b72eb82 100644 (file)
@@ -503,7 +503,7 @@ void FocusManager::SetFocusGroup(Actor actor, bool isFocusGroup)
     Property::Index propertyIsFocusGroup = actor.GetPropertyIndex(IS_FOCUS_GROUP);
     if(propertyIsFocusGroup == Property::INVALID_INDEX)
     {
-      propertyIsFocusGroup = actor.RegisterProperty(IS_FOCUS_GROUP, isFocusGroup);
+      actor.RegisterProperty(IS_FOCUS_GROUP, isFocusGroup);
     }
     else
     {
@@ -646,7 +646,7 @@ void FocusManager::SetFocusable(Actor actor, bool focusable)
     Property::Index propertyActorFocusable = actor.GetPropertyIndex(ACTOR_FOCUSABLE);
     if(propertyActorFocusable == Property::INVALID_INDEX)
     {
-      propertyActorFocusable = actor.RegisterProperty(ACTOR_FOCUSABLE, focusable);
+      actor.RegisterProperty(ACTOR_FOCUSABLE, focusable);
     }
     else
     {
index 47e2898..f766b0b 100644 (file)
@@ -390,7 +390,7 @@ void KeyboardFocusManager::SetAsFocusGroup(Actor actor, bool isFocusGroup)
     Property::Index propertyIsFocusGroup = actor.GetPropertyIndex(IS_FOCUS_GROUP_PROPERTY_NAME);
     if(propertyIsFocusGroup == Property::INVALID_INDEX)
     {
-      propertyIsFocusGroup = actor.RegisterProperty(IS_FOCUS_GROUP_PROPERTY_NAME, isFocusGroup);
+      actor.RegisterProperty(IS_FOCUS_GROUP_PROPERTY_NAME, isFocusGroup);
     }
     else
     {
index c368a58..1ee0e9e 100644 (file)
@@ -347,11 +347,16 @@ void StyleManager::RequestDefaultTheme()
 void StyleManager::SetTheme()
 {
   mThemeBuilder = CreateBuilder( mThemeBuilderConstants );
-  LoadJSON( mThemeBuilder, mThemeFile );
-
-  StyleChange change;
-  change.themeChange = true;
-  mStyleChangeSignal.Emit( Toolkit::StyleManager::Get(), change );
+  if ( LoadJSON( mThemeBuilder, mThemeFile ) )
+  {
+    StyleChange change;
+    change.themeChange = true;
+    mStyleChangeSignal.Emit( Toolkit::StyleManager::Get(), change );
+  }
+  else
+  {
+    mThemeBuilder.Reset();
+  }
 }
 
 Toolkit::Builder StyleManager::FindCachedBuilder( const std::string& key )
index 65e0aa8..2666cd7 100644 (file)
@@ -271,22 +271,22 @@ public:
 
   // Gesture Detection Methods
 
-  void PinchDetected(Actor actor, PinchGesture pinch)
+  void PinchDetected(Actor actor, const PinchGesture& pinch)
   {
     mControlImpl.OnPinch(pinch);
   }
 
-  void PanDetected(Actor actor, PanGesture pan)
+  void PanDetected(Actor actor, const PanGesture& pan)
   {
     mControlImpl.OnPan(pan);
   }
 
-  void TapDetected(Actor actor, TapGesture tap)
+  void TapDetected(Actor actor, const TapGesture& tap)
   {
     mControlImpl.OnTap(tap);
   }
 
-  void LongPressDetected(Actor actor, LongPressGesture longPress)
+  void LongPressDetected(Actor actor, const LongPressGesture& longPress)
   {
     mControlImpl.OnLongPress(longPress);
   }
@@ -749,7 +749,7 @@ void Control::SetBackground( Image image )
   {
     // Remove Current actor, unset AFTER removal so that we do not inform deriving classes
     Self().Remove( background.actor );
-    background.actor = NULL;
+    background.actor.Reset();
   }
 
   ImageActor imageActor = ImageActor::New( image );
@@ -787,7 +787,7 @@ void Control::OnThemeChange( Toolkit::StyleManager styleManager )
   GetImpl( styleManager ).ApplyThemeStyle( GetOwner() );
 }
 
-void Control::OnPinch(PinchGesture pinch)
+void Control::OnPinch(const PinchGesture& pinch)
 {
   if( !( mImpl->mStartingPinchScale ) )
   {
@@ -803,6 +803,18 @@ void Control::OnPinch(PinchGesture pinch)
   Self().SetScale( *( mImpl->mStartingPinchScale ) * pinch.scale );
 }
 
+void Control::OnPan( const PanGesture& pan )
+{
+}
+
+void Control::OnTap(const TapGesture& tap)
+{
+}
+
+void Control::OnLongPress( const LongPressGesture& longPress )
+{
+}
+
 void Control::OnStageConnection()
 {
   RelayoutRequest();
@@ -949,7 +961,7 @@ Actor Control::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit:
   return Actor();
 }
 
-bool Control::DoAction(BaseObject* object, const std::string& actionName, const std::vector<Property::Value>& attributes)
+bool Control::DoAction(BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes)
 {
   bool ret = false;
 
index f79bb8b..470fb27 100644 (file)
@@ -26,6 +26,7 @@
 #include <dali/public-api/events/pinch-gesture.h>
 #include <dali/public-api/events/tap-gesture.h>
 #include <dali/public-api/object/property-index.h>
+#include <dali/public-api/object/type-info.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control.h>
@@ -182,7 +183,7 @@ public:
    * @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 std::vector<Property::Value>& attributes);
+  static bool DoAction(BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes);
 
   /**
    * Connects a callback function with the object's signals.
@@ -343,7 +344,7 @@ private: // For derived classes to override
    * @param[in]  pinch  The pinch gesture.
    * @see EnableGestureDetection
    */
-  virtual void OnPinch(PinchGesture pinch);
+  virtual void OnPinch(const PinchGesture& pinch);
 
   /**
    * @brief Called whenever a pan gesture is detected on this control.
@@ -356,7 +357,7 @@ private: // For derived classes to override
    * @param[in]  pan  The pan gesture.
    * @see EnableGestureDetection
    */
-  virtual void OnPan(PanGesture pan) { }
+  virtual void OnPan( const PanGesture& pan );
 
   /**
    * @brief Called whenever a tap gesture is detected on this control.
@@ -369,7 +370,7 @@ private: // For derived classes to override
    * @param[in]  tap  The tap gesture.
    * @see EnableGestureDetection
    */
-  virtual void OnTap(TapGesture tap) { }
+  virtual void OnTap( const TapGesture& tap );
 
   /**
    * @brief Called whenever a long press gesture is detected on this control.
@@ -382,7 +383,7 @@ private: // For derived classes to override
    * @param[in]  longPress  The long press gesture.
    * @see EnableGestureDetection
    */
-  virtual void OnLongPress(LongPressGesture longPress) { }
+  virtual void OnLongPress( const LongPressGesture& longPress );
 
   /**
    * @brief Called whenever the control is added to the stage.
diff --git a/base/dali-toolkit/public-api/controls/scrollable/item-view/album-layout.cpp b/base/dali-toolkit/public-api/controls/scrollable/item-view/album-layout.cpp
deleted file mode 100755 (executable)
index c89ff91..0000000
+++ /dev/null
@@ -1,1399 +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/public-api/controls/scrollable/item-view/album-layout.h>
-
-// EXTERNAL INCLUDES
-#include <algorithm>
-#include <dali/public-api/animation/animation.h>
-#include <dali/public-api/math/random.h>
-
-using namespace Dali;
-using namespace Dali::Toolkit;
-using namespace std;
-
-namespace // unnamed namespace
-{
-const float DEFAULT_SCROLL_SPEED_FACTOR = 0.005f;
-const float DEFAULT_MAXIMUM_SWIPE_SPEED = 3.0f;
-const float DEFAULT_ITEM_FLICK_ANIMATION_DURATION = 0.25f;
-
-const float SELECTED_RIGHT = 2.5f;
-const float SELECTED_LEFT = 3.5f;
-const float SELECTED_CENTER = 3.0f;
-
-const float LAYOUT_POSITION_NAGATIVE_1 = -1.0f;
-const float LAYOUT_POSITION_0 = 0.0f;
-const float LAYOUT_POSITION_2 = 2.0f;
-const float LAYOUT_POSITION_3 = 3.0f;
-const float LAYOUT_POSITION_4 = 4.0f;
-const float LAYOUT_POSITION_6 = 6.0f;
-const float LAYOUT_POSITION_7 = 7.0f;
-
-const Vector3 POSITION_0 = Vector3(850.0f,-250.0f,0.0f);
-const Vector3 POSITION_1 = Vector3(700.0f,50.0f,0.0f);
-const Vector3 POSITION_2 = Vector3(440.0f,227.0f,0.0f);
-const Vector3 POSITION_4 = Vector3(-440.0f,227.0f,0.0f);
-const Vector3 POSITION_5 = Vector3(-700.0f,50.0f,0.0f);
-const Vector3 POSITION_6 = Vector3(-850.0f,-250.0f,0.0f);
-
-const float ROTATION_0 = Math::PI/6.0f;
-const float ROTATION_1 = 0.0f;
-const float ROTATION_2 = Math::PI/6.0f;
-const float ROTATION_4 = -Math::PI/6.0f;
-const float ROTATION_5 = 0.0f;
-const float ROTATION_6 = -Math::PI/6.0f;
-
-const float SCALE = 1.0f;
-
-const Vector2 COLOR = Vector2(1.0f,1.0f);
-
-const Vector3 SELECTED_ITEM_POSITION = Vector3( 0.0f,-80.0f,140.0f);
-const float SELECETED_ITEM_SCALE = 1.72f;
-const Vector2 SELECTED_ITEM_COLOR = Vector2(1.0f,1.0f);
-const Vector3 VIRTUAL_ITEM_POSITION_RIGHT = Vector3( 280.0f,130.0f,130.0f);
-const Vector3 VIRTUAL_ITEM_POSITION_LEFT = Vector3( -280.0f,130.0f,130.0f);
-const float ROTATION_X = Math::PI/4.0f;
-const float SCALE_RIGHT = 1.0f;
-const float SCALE_LEFT = 1.0f;
-const Vector2 COLOR_RIGHT = Vector2(1.0f,1.0f);
-const Vector2 COLOR_LEFT = Vector2(1.0f,1.0f);
-const Vector3 POSITION_RIGHT = Vector3(710.0f,-450.0f,0.0f);
-const Vector3 POSITION_LEFT = Vector3(-710.0f,-450.0f,0.0f);
-const float ROTATION_RIGHT = -Math::PI / 6.0f;
-const float ROTATION_LEFT = Math::PI / 6.0f;
-
-const float ALBUM_HIGHT = 7.0f;
-const float ALPHA = 1.1f;
-const float ALPHA_OF_SIZE = 0.35f;
-const float LINE_OF_BOTTOM = 360.0f;
-
-const float CHANCE_OF_RANDOM_ROTATION_OF_STACK = 0.5f;
-const float RANGE_OF_RANDOM_ROTATION_OF_STACK = 0.5f;
-
-const float THRESHHOLD_OF_MOVING = 0.02f;
-const int NUM_OF_FRAME_FILTERED = 5;
-
-const unsigned int SPREAD_ITEM_NUM = 6;
-
-typedef enum
-{
- SCROLL_LEFT = 1,
- SCROLL_NONE = 0,
- SCROLL_RIGHT = -1
-}ScrollDirection;
-
-struct DefaultItemSizeFunction
-{
-  Vector3 operator()(const Vector3& layoutSize)
-  {
-    float width = layoutSize.height * ALPHA_OF_SIZE;
-    return Vector3(width, width, width);
-  }
-};
-
-struct AlbumScaleConstraint
-{
-  AlbumScaleConstraint(const float scaleRight, const float scaleLeft, const float selectedItemScale, vector<float> scaleSpread)
-  {
-     mScaleRight = scaleRight;
-     mScaleLeft = scaleLeft;
-     mSelectedItemScale = selectedItemScale;
-
-    if(scaleSpread.size() == SPREAD_ITEM_NUM)
-    {
-      mScaleVecSpread = scaleSpread;
-    }
-  }
-
-  Vector3 operator()(const Vector3& current, const float& layoutPosition, const float& scrollSpeed, const Vector3& layoutSize)
-  {
-    int begin = 0;
-    int end = 0;
-    float beginScale = 0.0f;
-    float endScale = 0.0f;
-    float scale = 0.0f;
-    float pos = layoutPosition + SELECTED_CENTER;
-
-    if(pos <= LAYOUT_POSITION_NAGATIVE_1)/*items of right stack*/
-    {
-      scale = mScaleRight;
-    }
-    else if(pos > LAYOUT_POSITION_NAGATIVE_1 && pos < LAYOUT_POSITION_0)/*items between -1.0f and 0.0f*/
-    {
-      beginScale = mScaleVecSpread.at(0);
-      endScale = mScaleRight;
-
-      scale = (endScale - beginScale) * fabs(pos) + beginScale;
-    }
-    else if(pos >= LAYOUT_POSITION_0 && pos < SELECTED_RIGHT)/*items between 0.0f and center*/
-    {
-      if(int(pos) < pos)
-      {
-        begin = int(pos);
-        end = int(pos) + 1;
-
-        beginScale = mScaleVecSpread.at(begin);
-        endScale = mScaleVecSpread.at(end);
-
-        scale = (endScale - beginScale) * fabs(pos - int(pos)) + beginScale;
-      }
-      else
-      {
-        scale = mScaleVecSpread.at(int(pos));
-      }
-    }
-    else if(pos >= SELECTED_RIGHT && pos <= SELECTED_LEFT)/*items of center*/
-    {
-      scale = mSelectedItemScale;
-    }
-    else if(pos > SELECTED_LEFT && pos <= LAYOUT_POSITION_6)/*items between center and 6.0f*/
-    {
-      if(int(pos) < pos)
-      {
-        begin = int(pos)-1;
-        end = int(pos);
-
-        beginScale = mScaleVecSpread.at(begin);
-        endScale = mScaleVecSpread.at(end);
-
-        scale = (endScale - beginScale) * fabs(pos - int(pos)) + beginScale;
-      }
-      else
-      {
-        scale = mScaleVecSpread.at(int(pos)-1);
-      }
-    }
-    else if(pos > LAYOUT_POSITION_6 && pos < LAYOUT_POSITION_7)/*items between 6.0f and 7.0f*/
-    {
-      beginScale = mScaleVecSpread.at(5);
-      endScale = mScaleLeft;
-
-      scale = (endScale - beginScale) * fabs(pos - int(pos)) + beginScale;
-    }
-    else if(pos >= LAYOUT_POSITION_7)/*items of left stack*/
-    {
-      scale = mScaleLeft;
-    }
-    else
-    {
-      scale = 1.0f;
-    }
-
-    return Vector3(scale,scale,1.0f);
-  }
-
-  float mScaleRight;
-  float mScaleLeft;
-  float mSelectedItemScale;
-  vector<float> mScaleVecSpread;
-};
-
-Vector3 CalculatePosition(Vector3 pos, float rotateX)
-{
-  pos.z = pos.z - fabs(pos.y - LINE_OF_BOTTOM) * sinf(rotateX) / cosf(rotateX);
-  return pos;
-}
-
-Vector3 CalculateStackPosition(Vector3 pos, float rotateX, int num, bool left)
-{
-  pos.z = pos.z - fabs(pos.y - LINE_OF_BOTTOM) * sinf(rotateX) / cosf(rotateX);
-
-  if(left)
-  {
-    pos.x = pos.x + num * ALPHA;
-  }
-  else
-  {
-    pos.x = pos.x - num * ALPHA;
-  }
-
-  pos.y -= num * ALBUM_HIGHT * sinf(rotateX);
-  pos.z += num * ALBUM_HIGHT * cosf(rotateX);
-
-  return pos;
-}
-
-Vector3 GetPosition(float layoutPos, Vector3 posRight, Vector3 posLeft, Vector3 posSelectedItem, vector<Vector3> posVecSpread, float rotateX)
-{
-  int begin =0;
-  int end = 0;
-
-  float alpha = 0.0f;
-
-  Vector3 beginPos =  Vector3::ZERO;
-  Vector3 endPos = Vector3::ZERO;
-
-  Vector3 pos = Vector3::ZERO;
-
-  if(layoutPos <= LAYOUT_POSITION_NAGATIVE_1)/*items of right stack*/
-  {
-    if(int(layoutPos) > layoutPos)
-    {
-      begin = int(layoutPos);
-      end = int(layoutPos)-1;
-
-      beginPos = CalculateStackPosition(posRight, rotateX, int(LAYOUT_POSITION_NAGATIVE_1) - int(layoutPos),false);
-
-      endPos = CalculateStackPosition(posRight, rotateX, - int(layoutPos),false);
-
-      alpha = fabs(layoutPos - int(layoutPos));
-
-      pos.x = (endPos.x - beginPos.x) * alpha + beginPos.x;
-      pos.y = (endPos.y - beginPos.y) * alpha + beginPos.y;
-      pos.z = (endPos.z - beginPos.z) * alpha + beginPos.z;
-
-      return pos;
-    }
-    else
-    {
-      return CalculateStackPosition(posRight,rotateX,int(LAYOUT_POSITION_NAGATIVE_1) - int(layoutPos),false);
-    }
-  }
-  else if(layoutPos < LAYOUT_POSITION_0 && layoutPos > LAYOUT_POSITION_NAGATIVE_1)/*items between -1.0f and 0.0f*/
-  {
-    beginPos = CalculatePosition(posVecSpread.at(int(LAYOUT_POSITION_0)),rotateX);
-    endPos = CalculateStackPosition(posRight, rotateX, int(layoutPos),false);
-
-    alpha = -layoutPos;
-
-    pos.x = (endPos.x - beginPos.x) * alpha + beginPos.x;
-    pos.y = (endPos.y - beginPos.y) * alpha + beginPos.y;
-    pos.z = (endPos.z - beginPos.z) * alpha + beginPos.z;
-
-    return pos;
-  }
-  else if(layoutPos >= LAYOUT_POSITION_0 && layoutPos <= LAYOUT_POSITION_2)/*items between 0.0f and 2.0f*/
-  {
-    if(int(layoutPos) < layoutPos)
-    {
-      begin = int(layoutPos);
-      end = int(layoutPos) + 1;
-
-      beginPos = posVecSpread.at(begin);
-      endPos = posVecSpread.at(end);
-
-      alpha = fabs(layoutPos - int(layoutPos));
-
-      pos.x = (endPos.x - beginPos.x) * alpha + beginPos.x;
-      pos.y = (endPos.y - beginPos.y) * alpha + beginPos.y;
-      pos.z = (endPos.z - beginPos.z) * alpha + beginPos.z;
-    }
-    else
-    {
-      pos = posVecSpread.at(int(layoutPos));
-    }
-  }
-  else if(layoutPos >LAYOUT_POSITION_2 && layoutPos<SELECTED_RIGHT)/*items between 2.0f and center*/
-  {
-    beginPos = posVecSpread.at(int(LAYOUT_POSITION_2));
-    endPos = VIRTUAL_ITEM_POSITION_RIGHT;
-
-    alpha = (layoutPos - LAYOUT_POSITION_2) / (SELECTED_RIGHT - LAYOUT_POSITION_2);
-
-    pos.x = (endPos.x - beginPos.x) * alpha + beginPos.x;
-    pos.y = (endPos.y - beginPos.y) * alpha + beginPos.y;
-    pos.z = (endPos.z - beginPos.z) * alpha + beginPos.z;
-  }
-  else if(layoutPos > SELECTED_LEFT && layoutPos < LAYOUT_POSITION_4)/*items between center and 4.0f*/
-  {
-    beginPos = posVecSpread.at(int(LAYOUT_POSITION_3));
-    endPos = VIRTUAL_ITEM_POSITION_LEFT;
-
-    alpha = (LAYOUT_POSITION_4 - layoutPos) / (LAYOUT_POSITION_4 - SELECTED_LEFT);
-
-    pos.x = (endPos.x - beginPos.x) * alpha + beginPos.x;
-    pos.y = (endPos.y - beginPos.y) * alpha + beginPos.y;
-    pos.z = (endPos.z - beginPos.z) * alpha + beginPos.z;
-  }
-  else if(layoutPos >= LAYOUT_POSITION_4 && layoutPos <= LAYOUT_POSITION_6)/*items between 4.0f and 6.0f*/
-  {
-    if(int(layoutPos) < layoutPos)
-    {
-      begin = int(layoutPos);
-      end = int(layoutPos) + 1;
-
-      beginPos = posVecSpread.at(begin - 1);
-      endPos = posVecSpread.at(end - 1);
-
-      alpha = fabs(layoutPos - int(layoutPos));
-
-      pos.x = (endPos.x - beginPos.x) * alpha + beginPos.x;
-      pos.y = (endPos.y - beginPos.y) * alpha + beginPos.y;
-      pos.z = (endPos.z - beginPos.z) * alpha + beginPos.z;
-    }
-    else
-    {
-      pos = posVecSpread.at(int(layoutPos) -1);
-    }
-  }
-  else if(layoutPos > LAYOUT_POSITION_6 && layoutPos < LAYOUT_POSITION_7)/*items between 6.0f and 7.0f*/
-  {
-    beginPos = CalculatePosition(posVecSpread.at(int(LAYOUT_POSITION_6) - 1),rotateX);
-    endPos = CalculateStackPosition(posLeft, rotateX, int(layoutPos) + 1 - int(LAYOUT_POSITION_7),true);
-
-    alpha = fabs(layoutPos - int(layoutPos));
-
-    pos.x = (endPos.x - beginPos.x) * alpha + beginPos.x;
-    pos.y = (endPos.y - beginPos.y) * alpha + beginPos.y;
-    pos.z = (endPos.z - beginPos.z) * alpha + beginPos.z;
-
-    return pos;
-  }
-  else if(layoutPos >= LAYOUT_POSITION_7)/*items of left stack*/
-  {
-    if(int(layoutPos) < layoutPos)
-    {
-      begin = int(layoutPos);
-      end = int(layoutPos) + 1;
-
-      beginPos = CalculateStackPosition(posLeft, rotateX, int(layoutPos) - int(LAYOUT_POSITION_7),true);
-
-      endPos = CalculateStackPosition(posLeft, rotateX, int(layoutPos) + 1 - int(LAYOUT_POSITION_7),true);
-
-      alpha = fabs(layoutPos - int(layoutPos));
-
-      pos.x = (endPos.x - beginPos.x) * alpha + beginPos.x;
-      pos.y = (endPos.y - beginPos.y) * alpha + beginPos.y;
-      pos.z = (endPos.z - beginPos.z) * alpha + beginPos.z;
-
-      return pos;
-    }
-    else
-    {
-      return CalculateStackPosition(posLeft, rotateX, int(layoutPos) - int(LAYOUT_POSITION_7),true);
-    }
-  }
-
-  return CalculatePosition(pos,rotateX);
-}
-
-struct AlbumPositionConstraint
-{
-  AlbumPositionConstraint(const Vector3 posRight, const Vector3 posLeft, const Vector3 posSelectedItem, const vector<Vector3> posVecSpread, float rotateX)
-  {
-    mPositionRight = posRight;
-    mPositionLeft = posLeft;
-    mSelectedItemPosition = posSelectedItem;
-    mRotationX = rotateX;
-
-    if(posVecSpread.size() == SPREAD_ITEM_NUM)
-    {
-      mPositionVecSpread = posVecSpread;
-    }
-  }
-
-  Vector3 operator()(const Vector3& current, const float& layoutPosition, const float& scrollSpeed, const Vector3& layoutSize)
-  {
-    float pos = layoutPosition + SELECTED_CENTER;
-
-    /*handle if the item is selected item(in the center)*/
-    if(pos >= SELECTED_RIGHT && pos <= SELECTED_LEFT)
-    {
-      return SELECTED_ITEM_POSITION;
-    }
-
-    /*get the spread items position*/
-    return GetPosition(pos,mPositionRight,mPositionLeft,mSelectedItemPosition,mPositionVecSpread,mRotationX);
-  }
-
-  Vector3 mPositionRight;
-  Vector3 mPositionLeft;
-  Vector3 mSelectedItemPosition;
-  vector<Vector3> mPositionVecSpread;
-  float mRotationX;
- };
-
-Quaternion GetRotation(float layoutPos, vector<float> rotateVecStack, vector<float> rotateVecSpread, float rotateX)
-{
-  int begin =0;
-  int end = 0;
-
-  float alpha = 0.0f;
-
-  float beginRotation = 0.0f;
-  float endRotation = 0.0f;
-
-  float rotation = 0.0f;
-  if(layoutPos <= LAYOUT_POSITION_NAGATIVE_1)/*items of right stack*/
-  {
-    if(int(layoutPos) > layoutPos)
-    {
-      begin = int(layoutPos) + 1;
-      end = int(layoutPos);
-
-      begin *= -1;
-      end *= -1;
-
-      beginRotation = rotateVecStack.at(begin);
-      endRotation = rotateVecStack.at(end);
-
-      alpha = fabs(layoutPos - int(layoutPos));
-
-      rotation = (endRotation - beginRotation) * alpha + beginRotation;
-    }
-    else
-    {
-      rotation = rotateVecStack.at(-int(layoutPos)-1);
-    }
-  }
-  else if(layoutPos > LAYOUT_POSITION_NAGATIVE_1 && layoutPos < LAYOUT_POSITION_0)/*items between -1.0f and 0.0f*/
-  {
-    begin = 0;
-    end = 0;
-
-    beginRotation = rotateVecSpread.at(begin);
-    endRotation = rotateVecStack.at(end);
-
-    alpha = fabs(layoutPos);
-
-    rotation = (endRotation - beginRotation) * alpha + beginRotation;
-  }
-  else if(layoutPos >= LAYOUT_POSITION_0 && layoutPos < LAYOUT_POSITION_3)
-  {
-    if(int(layoutPos) < layoutPos)
-    {
-      begin = int(layoutPos);
-      end = int(layoutPos) + 1;
-
-      beginRotation = rotateVecSpread.at(begin);
-      endRotation = rotateVecSpread.at(end);
-
-      alpha = fabs(layoutPos - int(layoutPos));
-
-      rotation = (endRotation - beginRotation) * alpha + beginRotation;
-    }
-    else
-    {
-      rotation = rotateVecSpread.at(int(layoutPos));
-    }
-  }
-  else if(layoutPos > LAYOUT_POSITION_3 && layoutPos <= LAYOUT_POSITION_6)
-  {
-    if(int(layoutPos) < layoutPos)
-    {
-      begin = int(layoutPos) - 1;
-      end = int(layoutPos);
-
-      beginRotation = rotateVecSpread.at(begin);
-      endRotation = rotateVecSpread.at(end);
-
-      alpha = fabs(layoutPos - int(layoutPos));
-
-      rotation = (endRotation - beginRotation) * alpha + beginRotation;
-    }
-    else
-    {
-      rotation = rotateVecSpread.at(int(layoutPos)-1);
-    }
-  }
-  else if(layoutPos > LAYOUT_POSITION_6 && layoutPos < LAYOUT_POSITION_7)
-  {
-    begin = 5;
-    end = 0;
-
-    beginRotation = rotateVecSpread.at(begin);
-    endRotation = rotateVecStack.at(end);
-
-    alpha = fabs(layoutPos - int(LAYOUT_POSITION_6));
-
-    rotation = (endRotation - beginRotation) * alpha + beginRotation;
-  }
-  else if(layoutPos >= LAYOUT_POSITION_7)
-  {
-    if(int(layoutPos) < layoutPos)
-    {
-      begin = int(layoutPos) - int(LAYOUT_POSITION_7);
-      end = int(layoutPos) - int(LAYOUT_POSITION_7) + 1;
-
-      beginRotation = rotateVecStack.at(begin);
-      endRotation = rotateVecStack.at(end);
-
-      alpha = fabs(layoutPos - int(layoutPos));
-
-      rotation = (endRotation - beginRotation) * alpha + beginRotation;
-    }
-    else
-    {
-      rotation = rotateVecStack.at(int(layoutPos)-int(LAYOUT_POSITION_7));
-    }
-  }
-
-  return Quaternion(rotateX, Vector3::XAXIS) * Quaternion(rotation, Vector3::ZAXIS);
-}
-
-struct AlbumRotationConstraint
-{
-  AlbumRotationConstraint(const vector<float> rotatVecSpread, const vector<float> rotatVecStack, const float rotateX, int num)
-  {
-    mRotationX = rotateX;
-    mNumOfItems = num;
-    mIndex = 0;
-    mLastIndex = 0;
-    mLeft = SCROLL_NONE;
-    mLastPosition = 0.0f;
-    mTimes = 0;
-
-    if(rotatVecSpread.size() == SPREAD_ITEM_NUM)
-    {
-      mRotationVecSpread = rotatVecSpread;
-    }
-
-    mRotationVecStack = rotatVecStack;
-  }
-
-  Quaternion operator()(const Quaternion& current, const float& layoutPosition, const float& scrollSpeed, const Vector3& layoutSize)
-  {
-    float pos = layoutPosition + SELECTED_CENTER;
-
-    if(mIndex == mNumOfItems)
-    {
-      mIndex = 0;
-    }
-
-    mIndex ++;
-
-    if(mLastIndex != mIndex)
-    {
-      mLastIndex = mIndex;
-
-      if(mLeft == SCROLL_RIGHT)
-      {
-        if(pos > mLastPosition + THRESHHOLD_OF_MOVING)
-        {
-          mTimes = 0;
-          mLeft = SCROLL_LEFT;
-        }
-        else if(pos < mLastPosition)
-        {
-          mTimes = 0;
-          mLeft = SCROLL_RIGHT;
-        }
-        else
-        {
-          mTimes++;
-          if(mTimes > NUM_OF_FRAME_FILTERED)
-          {
-            mTimes = 0;
-            mLeft = SCROLL_NONE;
-          }
-        }
-      }
-      else if(mLeft == SCROLL_LEFT)
-      {
-        if(pos > mLastPosition)
-        {
-          mTimes = 0;
-          mLeft = SCROLL_LEFT;
-        }
-        else if(pos < mLastPosition - THRESHHOLD_OF_MOVING)
-        {
-          mTimes = 0;
-          mLeft = SCROLL_RIGHT;
-        }
-        else
-        {
-          mTimes++;
-          if(mTimes > NUM_OF_FRAME_FILTERED)
-          {
-            mTimes = 0;
-            mLeft = SCROLL_NONE;
-          }
-        }
-      }
-      else
-      {
-        if(pos < mLastPosition)
-        {
-          mLeft = SCROLL_RIGHT;
-        }
-        else if(pos > mLastPosition)
-        {
-          mLeft = SCROLL_LEFT;
-        }
-        else
-        {
-          mLeft = SCROLL_NONE;
-        }
-      }
-
-      mLastPosition = pos;
-
-     /*rotation for the selected item(center)*/
-     if(pos >= SELECTED_RIGHT && pos < SELECTED_LEFT)
-     {
-       if(mLeft == SCROLL_LEFT)
-       {
-         return Quaternion(-fabs(SELECTED_CENTER - pos), Vector3::YAXIS);
-       }
-       else if(mLeft == SCROLL_RIGHT)
-       {
-         return Quaternion(fabs(pos - SELECTED_CENTER), Vector3::YAXIS);
-       }
-       else
-       {
-         return Quaternion(0.0f, Vector3::YAXIS);
-       }
-     }
-    }
-
-    /*rotation for the spread item*/
-    return GetRotation(pos,mRotationVecStack,mRotationVecSpread,mRotationX);
-  }
-
-  vector<float> mRotationVecSpread;
-  vector<float> mRotationVecStack;
-  float mRotationX;
-  Actor mScrollDirectionActor;
-  int mLastIndex;
-  int mIndex;
-  int mNumOfItems;
-  int mTimes;
-  ScrollDirection mLeft;
-  float mLastPosition;
-};
-
-struct AlbumColorConstraint
-{
-  AlbumColorConstraint(const Vector2 colorRight, const Vector2 colorLeft, const Vector2 colorSelectedItem, const vector<Vector2> spreadVecColor, const int stackNum)
-  {
-    mColorRight = colorRight;
-    mColorLeft = colorLeft;
-    mSelectedItemColor = colorSelectedItem;
-    mStackNum = stackNum;
-
-    if(spreadVecColor.size() == SPREAD_ITEM_NUM)
-    {
-      mColorVecSpread = spreadVecColor;
-    }
-  }
-
-  Vector4 operator()(const Vector4& current, const float& layoutPosition, const float& scrollSpeed, const Vector3& layoutSize)
-  {
-    float black = 1.0f;
-    Vector4 color = current;
-    float pos = layoutPosition + SELECTED_CENTER;
-    Vector2 temp = Vector2(0.0f,0.0f);
-
-    int begin = 0;
-    int end = 0;
-
-    Vector2 beginColor = Vector2(0.0f,0.0f);
-    Vector2 endColor = Vector2(0.0f,0.0f);
-
-    if(pos <= -mStackNum-1)
-    {
-      color.w = 0.0f;
-      black = 0.0f;
-    }
-    else if(pos > -mStackNum-1 && pos < -mStackNum)
-    {
-      beginColor = mColorRight;
-      endColor = Vector2(0.0f,0.0f);
-
-      color.w = (endColor.x - beginColor.x) * fabs(pos - int(pos)) + beginColor.x;
-      black = (endColor.y - beginColor.y) * fabs(pos - int(pos)) + beginColor.y;
-    }
-    else if(pos <= LAYOUT_POSITION_NAGATIVE_1 && pos >= -mStackNum)
-    {
-      color.w = mColorRight.x;
-      black = mColorRight.y;
-    }
-    else if(pos > LAYOUT_POSITION_NAGATIVE_1 && pos < LAYOUT_POSITION_0)
-    {
-      beginColor = mColorVecSpread.at(int(LAYOUT_POSITION_0));
-      endColor = mColorRight;
-
-      color.w = (endColor.x - beginColor.x) * fabs(pos) + beginColor.x;
-      black = (endColor.y - beginColor.y) * fabs(pos) + beginColor.y;
-    }
-    else if(pos >= LAYOUT_POSITION_0 && pos  <= LAYOUT_POSITION_2)
-    {
-      if(int(pos) < pos)
-      {
-        begin = int(pos);
-        end = int(pos) + 1;
-
-        beginColor = mColorVecSpread.at(begin);
-        endColor = mColorVecSpread.at(end);
-
-        temp = (endColor - beginColor) * fabs(pos - int(pos)) + beginColor;
-
-        color.w = temp.x;
-        black = temp.y;
-      }
-      else
-      {
-        beginColor = mColorVecSpread.at(int(pos));
-
-        color.w = beginColor.x;
-        black = beginColor.y;
-      }
-    }
-    else if(pos  > LAYOUT_POSITION_2 && pos < SELECTED_RIGHT)/*items between 2.0f and center*/
-    {
-      beginColor = mColorVecSpread.at(int(LAYOUT_POSITION_2));
-      endColor = Vector2(0.0f,0.0f);
-
-      temp = (endColor - beginColor) * (pos - LAYOUT_POSITION_2)/(SELECTED_RIGHT - LAYOUT_POSITION_2) + beginColor;
-
-      color.w = temp.x;
-      black = temp.y;
-    }
-    else if(pos >= SELECTED_RIGHT && pos <= SELECTED_LEFT)/*items of center*/
-    {
-      color.w = mSelectedItemColor.x;
-      black = mSelectedItemColor.y;
-    }
-    else if(pos  > SELECTED_LEFT && pos < LAYOUT_POSITION_4)/*items between center and 4.0f*/
-    {
-      beginColor = Vector2(0.0f,0.0f);
-      endColor = mColorVecSpread.at(int(LAYOUT_POSITION_3));
-
-      temp = (endColor - beginColor) * (pos - SELECTED_LEFT)/(LAYOUT_POSITION_4 - SELECTED_LEFT) + beginColor;
-
-      color.w = temp.x;
-      black = temp.y;
-    }
-    else if(pos >= LAYOUT_POSITION_4 && pos <= LAYOUT_POSITION_6)/*items between 4.0f and 6.0f*/
-    {
-      if(int(pos) < pos)
-      {
-        begin = int(pos) - 1;
-        end = int(pos);
-
-        beginColor = mColorVecSpread.at(begin);
-        endColor = mColorVecSpread.at(end);
-
-        temp = (endColor - beginColor) * fabs(pos - int(pos)) + beginColor;
-
-        color.w = temp.x;
-        black = temp.y;
-      }
-      else
-      {
-        beginColor = mColorVecSpread.at(int(pos) -  1);
-
-        color.w = beginColor.x;
-        black = beginColor.y;
-      }
-    }
-    else if(pos > LAYOUT_POSITION_6 && pos < LAYOUT_POSITION_7)/*items between 6.0f and 7.0f*/
-    {
-      beginColor = mColorVecSpread.at(int(LAYOUT_POSITION_6) - 1);
-      endColor = mColorLeft;
-
-      color.w = (endColor.x - beginColor.x) * fabs(pos - int(pos)) + beginColor.x;
-      black = (endColor.y - beginColor.y) * fabs(pos - int(pos)) + beginColor.y;
-    }
-    else if(pos >= LAYOUT_POSITION_7 && pos <= mStackNum + int(LAYOUT_POSITION_7))/*items of left stack*/
-    {
-      color.w = mColorLeft.x;
-      black = mColorLeft.y;
-    }
-    else if(pos > mStackNum + int(LAYOUT_POSITION_7) && pos < mStackNum + int(LAYOUT_POSITION_7) + 1)
-    {
-      beginColor = mColorLeft;
-      endColor = Vector2(0.0f,0.0f);
-
-      color.w = (endColor.x - beginColor.x) * fabs(pos - int(pos)) + beginColor.x;
-      black = (endColor.y - beginColor.y) * fabs(pos - int(pos)) + beginColor.y;
-    }
-    else if(pos >= mStackNum + int(LAYOUT_POSITION_7) +1)
-    {
-      color.w = 0.0f;
-      black = 0.0f;
-    }
-
-    color.r = color.r * black;
-    color.g = color.g * black;
-    color.b = color.b * black;
-
-    return color;
-  }
-
-  int mStackNum;
-  Vector2 mColorRight;
-  Vector2 mColorLeft;
-  Vector2 mSelectedItemColor;
-  vector<Vector2> mColorVecSpread;
-};
-
-struct AlbumVisibilityConstraintPortrait
-{
-  AlbumVisibilityConstraintPortrait()
-  {
-  }
-
-  bool operator()(const bool& current, const float& layoutPosition, const float& scrollSpeed, const Vector3& layoutSize)
-  {
-    return true;
-  }
-};
-
-} // unnamed namespace
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-struct AlbumLayout::Impl
-{
-  Impl()
-  : mItemSizeFunction(DefaultItemSizeFunction()),
-    mScrollSpeedFactor(DEFAULT_SCROLL_SPEED_FACTOR),
-    mMaximumSwipeSpeed(DEFAULT_MAXIMUM_SWIPE_SPEED),
-    mItemFlickAnimationDuration(DEFAULT_ITEM_FLICK_ANIMATION_DURATION),
-    mNumOfItems(0)
-  {
-    /*Initialize the variables*/
-    mSelectedItemScale = SELECETED_ITEM_SCALE;
-    mRotationX = ROTATION_X;
-    mScaleRight = SCALE_RIGHT;
-    mScaleLeft = SCALE_LEFT;
-    mRotationRight = ROTATION_RIGHT;
-    mRotationLeft = ROTATION_LEFT;
-    mSelectedItemColor = SELECTED_ITEM_COLOR;
-    mSelectedItemPosition = SELECTED_ITEM_POSITION;
-    mColorRight = COLOR_RIGHT;
-    mColorLeft = COLOR_LEFT;
-    mPositionRight = POSITION_RIGHT;
-    mPositionLeft = POSITION_LEFT;
-    mStackNum = 50;
-
-    /*Initialize the position of spread items*/
-    mPositionVecSpread.push_back(POSITION_0);
-    mPositionVecSpread.push_back(POSITION_1);
-    mPositionVecSpread.push_back(POSITION_2);
-    mPositionVecSpread.push_back(POSITION_4);
-    mPositionVecSpread.push_back(POSITION_5);
-    mPositionVecSpread.push_back(POSITION_6);
-
-    /*Initialize the rotation of spread items*/
-    mRotationVecSpread.push_back(ROTATION_0);
-    mRotationVecSpread.push_back(ROTATION_1);
-    mRotationVecSpread.push_back(ROTATION_2);
-    mRotationVecSpread.push_back(ROTATION_4);
-    mRotationVecSpread.push_back(ROTATION_5);
-    mRotationVecSpread.push_back(ROTATION_6);
-
-    /*Initialize the scale of spread items*/
-    for(unsigned int i=0; i<SPREAD_ITEM_NUM; i++)
-    {
-      mScaleVecSpread.push_back(SCALE);
-    }
-
-    /*Initialize the color of spread items*/
-    for(unsigned int i=0; i<SPREAD_ITEM_NUM; i++)
-    {
-      mColorVecSpread.push_back(COLOR);
-    }
-  }
-
-  void SetPosition(vector<Vector3> positionList)
-  {
-    if(positionList.size() == SPREAD_ITEM_NUM)
-    {
-      mPositionVecSpread = positionList;
-    }
-  }
-
-  vector<Vector3> GetPosition() const
-  {
-    return mPositionVecSpread;
-  }
-
-  void SetColor(vector<Vector2> colorList)
-  {
-    if(colorList.size() == SPREAD_ITEM_NUM)
-    {
-      mColorVecSpread = colorList;
-    }
-  }
-
-  vector<Vector2> GetColor() const
-  {
-    return mColorVecSpread;
-  }
-
-  void SetScale(vector<float> scaleList)
-  {
-    if(scaleList.size() == SPREAD_ITEM_NUM)
-    {
-      mScaleVecSpread = scaleList;
-    }
-  }
-
-  vector<float> GetScale() const
-  {
-    return mScaleVecSpread;
-  }
-
-  void SetRotationX(float rotat_x)
-  {
-    mRotationX = rotat_x;
-  }
-
-  float GetRotationX() const
-  {
-    return mRotationX;
-  }
-
-  void SetRotationZ(vector<float> rotationList)
-  {
-    if(rotationList.size() == SPREAD_ITEM_NUM)
-    {
-      mRotationVecSpread = rotationList;
-    }
-  }
-
-  vector<float> GetRotationZ() const
-  {
-    return mRotationVecSpread;
-  }
-
-  void SetCenterPosition(Vector3 pos)
-  {
-    mSelectedItemPosition = pos;
-  }
-
-  Vector3 GetCenterPosition() const
-  {
-    return mSelectedItemPosition;
-  }
-
-  void SetCenterScale(float scale)
-  {
-    mSelectedItemScale = scale;
-  }
-
-  float GetCenterScale() const
-  {
-    return mSelectedItemScale;
-  }
-
-  void SetCenterColor(Vector2 color)
-  {
-    mSelectedItemColor = color;
-  }
-
-  Vector2 GetCenterColor() const
-  {
-    return mSelectedItemColor;
-  }
-
-  void SetStackPosition(Vector3 rightPos, Vector3 leftPos)
-  {
-    mPositionRight = rightPos;
-    mPositionLeft = leftPos;
-  }
-
-  Vector3 GetRightStackPosition() const
-  {
-    return mPositionRight;
-  }
-
-  Vector3 GetLeftStackPosition() const
-  {
-    return mPositionLeft;
-  }
-
-  void SetStackScale(float rightScale, float leftScale)
-  {
-    mScaleRight = rightScale;
-    mScaleLeft = leftScale;
-  }
-
-  float GetRightStackScale() const
-  {
-    return mScaleRight;
-  }
-
-  float GetLeftStackScale() const
-  {
-    return mScaleLeft;
-  }
-
-  void SetStackColor(Vector2 rightColor, Vector2 leftColor)
-  {
-    mColorRight = rightColor;
-    mColorLeft = leftColor;
-  }
-
-  Vector2 GetRightStackColor() const
-  {
-    return mColorRight;
-  }
-
-  Vector2 GetLeftStackColor() const
-  {
-    return mColorLeft;
-  }
-
-  void SetNumOfItems(int num)
-  {
-    mNumOfItems = num;
-
-    /*Initialize the rotation of stack items*/
-    for(int i=0; i<mNumOfItems; i++)
-    {
-      if(Random::Chance(CHANCE_OF_RANDOM_ROTATION_OF_STACK))
-      {
-        mRotationVecStack.push_back(Random::Range(-RANGE_OF_RANDOM_ROTATION_OF_STACK,RANGE_OF_RANDOM_ROTATION_OF_STACK));
-      }
-      else
-      {
-        mRotationVecStack.push_back(0.0f);
-      }
-    }
-  }
-
-  int GetNumOfItems() const
-  {
-    return mNumOfItems;
-  }
-
-  void SetStackNum(int num)
-  {
-    mStackNum = num;
-  }
-
-  int GetStackNum() const
-  {
-    return mStackNum;
-  }
-
-  ItemSizeFunction mItemSizeFunction;
-
-  float mScrollSpeedFactor;
-  float mMaximumSwipeSpeed;
-  float mItemFlickAnimationDuration;
-
-  Vector3 mSelectedItemPosition;/*position of selected item*/
-  float mSelectedItemScale;/*scale of selected item*/
-  Vector2 mSelectedItemColor;/*color of selected item*/
-
-  float mRotationX;/*rotation around X*/
-
-  vector<Vector3> mPositionVecSpread;/*positions of the spread items*/
-  vector<float> mRotationVecSpread;/*rotations of the spread items*/
-  vector<float> mScaleVecSpread;/*scales of the spread items*/
-  vector<Vector2> mColorVecSpread;/*colors of the spread items*/
-
-  vector<float> mRotationVecStack;/*rotations of the stack items*/
-
-  float mRotationRight;/*rotation of right album stack*/
-  float mRotationLeft;/*rotation of left album stack*/
-
-  float mScaleRight;/*scale of right album stack*/
-  float mScaleLeft;/*scale of left album stack*/
-
-  Vector2 mColorRight;/*color of right album stack*/
-  Vector2 mColorLeft;/*color of left album stack*/
-
-  Vector3 mPositionRight;/*position of right album stack*/
-  Vector3 mPositionLeft;/*position of left album stack*/
-
-  int mNumOfItems;/*num of items*/
-  int mStackNum;/*num of items of stack*/
-};
-
-AlbumLayoutPtr AlbumLayout::New()
-{
-  return AlbumLayoutPtr(new AlbumLayout());
-}
-
-AlbumLayout::~AlbumLayout()
-{
-  delete mImpl;
-}
-
-void AlbumLayout::SetItemSizeFunction(ItemSizeFunction function)
-{
-  mImpl->mItemSizeFunction = function;
-}
-
-AlbumLayout::ItemSizeFunction AlbumLayout::GetItemSizeFunction() const
-{
-  return mImpl->mItemSizeFunction;
-}
-
-void AlbumLayout::SetScrollSpeedFactor(float scrollSpeed)
-{
-  mImpl->mScrollSpeedFactor = scrollSpeed;
-}
-
-void AlbumLayout::SetMaximumSwipeSpeed(float speed)
-{
-  mImpl->mMaximumSwipeSpeed = speed;
-}
-
-void AlbumLayout::SetItemFlickAnimationDuration(float durationSeconds)
-{
-  mImpl->mItemFlickAnimationDuration = durationSeconds;
-}
-
-float AlbumLayout::GetScrollSpeedFactor() const
-{
-  return mImpl->mScrollSpeedFactor;
-}
-
-float AlbumLayout::GetMaximumSwipeSpeed() const
-{
-  return mImpl->mMaximumSwipeSpeed;
-}
-
-float AlbumLayout::GetItemFlickAnimationDuration() const
-{
-  return mImpl->mItemFlickAnimationDuration;
-}
-
-float AlbumLayout::GetMinimumLayoutPosition(unsigned int numberOfItems, Vector3 layoutSize) const
-{
-  return - static_cast<float>(numberOfItems) + 1;
-}
-
-float AlbumLayout::GetClosestAnchorPosition(float layoutPosition) const
-{
-  return round(layoutPosition);
-}
-
-float AlbumLayout::GetItemScrollToPosition(unsigned int itemId) const
-{
-  return -(static_cast<float>(itemId));
-}
-
-ItemRange AlbumLayout::GetItemsWithinArea(float firstItemPosition, Vector3 layoutSize) const
-{
-  return ItemRange(0, mImpl->mNumOfItems);
-}
-
-unsigned int AlbumLayout::GetReserveItemCount(Vector3 layoutSize) const
-{
-  return 0;
-}
-
-bool AlbumLayout::GetItemSize(unsigned int itemId, Vector3 layoutSize, Vector3& itemSize) const
-{
-  itemSize = mImpl->mItemSizeFunction(layoutSize);
-  return true;
-}
-
-void AlbumLayout::GetResizeAnimation(Animation& animation, Actor actor, Vector3 size, float durationSeconds) const
-{
-  if(animation)
-  {
-    animation.Resize(actor, size);
-  }
-}
-
-bool AlbumLayout::GetPositionConstraint(unsigned int itemId, ItemLayout::Vector3Function& constraint) const
-{
-  constraint = AlbumPositionConstraint(mImpl->mPositionRight,mImpl->mPositionLeft,mImpl->mSelectedItemPosition,mImpl->mPositionVecSpread,mImpl->mRotationX);
-  return true;
-}
-
-bool AlbumLayout::GetRotationConstraint(unsigned int itemId, ItemLayout::QuaternionFunction& constraint) const
-{
-  constraint = AlbumRotationConstraint(mImpl->mRotationVecSpread,mImpl->mRotationVecStack,mImpl->mRotationX,mImpl->mNumOfItems);
-  return true;
-}
-
-bool AlbumLayout::GetScaleConstraint(unsigned int itemId, ItemLayout::Vector3Function& constraint) const
-{
-  constraint = AlbumScaleConstraint(mImpl->mScaleRight,mImpl->mScaleLeft,mImpl->mSelectedItemScale,mImpl->mScaleVecSpread);
-  return true;
-}
-
-bool AlbumLayout::GetColorConstraint(unsigned int itemId, ItemLayout::Vector4Function& constraint) const
-{
-  constraint = AlbumColorConstraint(mImpl->mColorRight,mImpl->mColorLeft,mImpl->mSelectedItemColor,mImpl->mColorVecSpread,mImpl->mStackNum);
-  return true;
-}
-
-bool AlbumLayout::GetVisibilityConstraint(unsigned int itemId, ItemLayout::BoolFunction& constraint) const
-{
-  constraint = AlbumVisibilityConstraintPortrait();
-  return true;
-}
-
-Degree AlbumLayout::GetScrollDirection() const
-{
-  Degree scrollDirection(0);
-
-  scrollDirection = -90.0f;
-
-  return scrollDirection;
-}
-
-void AlbumLayout::SetNumOfItems(int num)
-{
-  mImpl->SetNumOfItems(num);
-}
-
-int AlbumLayout::GetNumOfItems() const
-{
-  return mImpl->GetNumOfItems();
-}
-
-void AlbumLayout::SetStackNum(int num)
-{
-  mImpl->SetStackNum(num);
-}
-
-int AlbumLayout::GetStackNum() const
-{
-  return mImpl->GetStackNum();
-}
-
-void AlbumLayout::SetPosition(vector<Vector3> positionList)
-{
-  mImpl->SetPosition(positionList);
-}
-
-vector<Vector3> AlbumLayout::GetPosition() const
-{
-  return mImpl->GetPosition();
-}
-
-void AlbumLayout::SetScale(vector<float> scaleList)
-{
-  mImpl->SetScale(scaleList);
-}
-
-vector<float> AlbumLayout::GetScale() const
-{
-  return mImpl->GetScale();
-}
-
-void AlbumLayout::SetColor(vector<Vector2> colorList)
-{
-  mImpl->SetColor(colorList);
-}
-
-vector<Vector2> AlbumLayout::GetColor() const
-{
-  return mImpl->GetColor();
-}
-
-void AlbumLayout::SetRotationX(float rotation)
-{
-  mImpl->SetRotationX(rotation);
-}
-
-float AlbumLayout::GetRotationX() const
-{
-  return mImpl->GetRotationX();
-}
-
-void AlbumLayout::SetRotationZ(vector<float> rotationList)
-{
-  mImpl->SetRotationZ(rotationList);
-}
-
-vector<float> AlbumLayout::GetRotationZ() const
-{
-  return mImpl->GetRotationZ();
-}
-
-void AlbumLayout::SetCenterPosition(Vector3 pos)
-{
-  mImpl->SetCenterPosition(pos);
-}
-
-Vector3 AlbumLayout::GetCenterPosition() const
-{
-  return mImpl->GetCenterPosition();
-}
-
-void AlbumLayout::SetCenterScale(float scale)
-{
-  mImpl->SetCenterScale(scale);
-}
-
-float AlbumLayout::GetCenterScale() const
-{
-  return mImpl->GetCenterScale();
-}
-
-void AlbumLayout::SetCenterColor(Vector2 color)
-{
-  mImpl->SetCenterColor(color);
-}
-
-Vector2 AlbumLayout::GetCenterColor() const
-{
-  return mImpl->GetCenterColor();
-}
-
-void AlbumLayout::SetStackPosition(Vector3 rightPos, Vector3 leftPos)
-{
-  mImpl->SetStackPosition(rightPos, leftPos);
-}
-
-Vector3 AlbumLayout::GetRightStackPosition() const
-{
-  return mImpl->GetRightStackPosition();
-}
-
-Vector3 AlbumLayout::GetLeftStackPosition() const
-{
-  return mImpl->GetLeftStackPosition();
-}
-
-void AlbumLayout::SetStackScale(float rightScale, float leftScale)
-{
-  mImpl->SetStackScale(rightScale,leftScale);
-}
-
-float AlbumLayout::GetRightStackScale() const
-{
-  return mImpl->GetRightStackScale();
-}
-
-float AlbumLayout::GetLeftStackScale() const
-{
-  return mImpl->GetLeftStackScale();
-}
-
-void AlbumLayout::SetStackColor(Vector2 rightColor, Vector2 leftColor)
-{
-  mImpl->SetStackColor(rightColor, leftColor);
-}
-
-Vector2 AlbumLayout::GetRightStackColor() const
-{
-  return mImpl->GetRightStackColor();
-}
-
-Vector2 AlbumLayout::GetLeftStackColor() const
-{
-  return mImpl->GetLeftStackColor();
-}
-
-AlbumLayout::AlbumLayout()
-: mImpl(NULL)
-{
-  mImpl = new Impl();
-}
-
-} // namespace Toolkit
-
-} // namespace Dali
diff --git a/base/dali-toolkit/public-api/controls/scrollable/item-view/album-layout.h b/base/dali-toolkit/public-api/controls/scrollable/item-view/album-layout.h
deleted file mode 100755 (executable)
index a7ca49b..0000000
+++ /dev/null
@@ -1,370 +0,0 @@
-#ifndef __DALI_TOOLKIT_ALBUM_LAYOUT_H__
-#define __DALI_TOOLKIT_ALBUM_LAYOUT_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.
- *
- */
-
-/*
-Note:This layout is customized for music player application, so there are some limitations:
-1.This layout can only be used with 1280x720 mode (not 720x1280);
-2.Need promram in application layer to support it(EX.SetNum).
-*/
-
-// EXTERNAL INCLUDES
-#include <boost/function.hpp>
-#include <dali/public-api/common/vector-wrapper.h>
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-class AlbumLayout;
-
-typedef IntrusivePtr<AlbumLayout> AlbumLayoutPtr;
-
-/**
- * An ItemView layout which arranges items in a album.
- */
-class DALI_IMPORT_API AlbumLayout : public ItemLayout
-{
-public:
-
-  typedef boost::function<Vector3 (const Vector3& layoutSize)> ItemSizeFunction;
-  typedef boost::function<float   (const Vector3& layoutSize)> AlbumRadiusFunction;
-
-  /**
-   * Create a new album layout
-   */
-  static AlbumLayoutPtr New();
-
-  /**
-   * Virtual destructor.
-   */
-  virtual ~AlbumLayout();
-
-  /**
-   * Set the function used to calculate the item-size, for a given layout-size.
-   * @param[in] function The item-size function.
-   */
-  void SetItemSizeFunction(ItemSizeFunction function);
-
-  /**
-   * Get the function used to calculate the item-size
-   * @return The item-size function.
-   */
-  ItemSizeFunction GetItemSizeFunction() const;
-
-  /**
-   * Set the function used to calculate the album radius, for a given layout-size.
-   * @param[in] function The spiral-radius function.
-   */
-  void SetAlbumRadiusFunction(AlbumRadiusFunction function);
-
-  /**
-   * Get the function used to calculate the album radius.
-   * @return The album-radius function.
-   */
-  AlbumRadiusFunction GetAlbumRadiusFunction() const;
-
-  /**
-   * Set the factor used to customise the scroll speed while dragging and swiping the layout.
-   * @param[in] scrollSpeed The scroll speed factor.
-   */
-  void SetScrollSpeedFactor(float scrollSpeed);
-
-  /**
-   * Set the maximum swipe speed in pixels per second.
-   * @param[in] speed The maximum swipe speed.
-   */
-  void SetMaximumSwipeSpeed(float speed);
-
-  /**
-   * Set the duration of the flick animation in second. This is the time taken to animate each
-   * item to its next layout position (e.g. from 1.0 to 2.0) when a flick animation is triggered
-   * by a swipe gesture.
-   * @pre durationSeconds must be greater than zero.
-   * @param[in] durationSeconds The duration of flick animation in seconds.
-   */
-  void SetItemFlickAnimationDuration(float durationSeconds);
-
-  /**
-   * @copydoc ItemLayout::GetScrollSpeedFactor()
-   */
-  virtual float GetScrollSpeedFactor() const;
-
-  /**
-   * @copydoc ItemLayout::GetMaximumSwipeSpeed()
-   */
-  virtual float GetMaximumSwipeSpeed() const;
-
-  /**
-   * @copydoc ItemLayout::GetItemFlickAnimationDuration()
-   */
-  virtual float GetItemFlickAnimationDuration() const;
-
-  /**
-   * Set the num of items.
-   * @param[in] num The number of items.
-   */
-  void SetNumOfItems(int num);
-
-  /**
-   * Get the num of items.
-   */
-  int GetNumOfItems() const;
-
-  /**
-   * Set the items num of stack.
-   * @param[in] num The number of items on the stack.
-   */
-  void SetStackNum(int num);
-
-  /**
-   * Get the items num of stack.
-   */
-  int GetStackNum() const;
-
-  /**
-   * Set the position of each item.
-   * @param[in] positionList The vector which contains the position for each item.
-   */
-  void SetPosition(std::vector<Vector3> positionList);
-
-  /**
-   * Get the position of each item.
-   */
-  std::vector<Vector3> GetPosition() const;
-
-  /**
-   * Set the rotation of each item.
-   * @param[in] rotation around X, the vector which contains the rotation for each item.
-   */
-  void SetRotationX(float rotation);
-
-  /**
-   * Set the rotation of each item.
-   */
-  float GetRotationX() const;
-
-  /**
-   * Set the rotation of each item.
-   * @param[in] rotationList around Z, the vector which contains the rotation for each item.
-   */
-  void SetRotationZ(std::vector<float> rotationList);
-
-  /**
-   * Get the rotation of each item.
-   */
-  std::vector<float> GetRotationZ() const;
-
-  /**
-   * Set the scale of each item.
-   * @param[in] scaleList The vector which contains the scale for each item.
-   */
-  void SetScale(std::vector<float> scaleList);
-
-  /**
-   * Get the scale of each item.
-   */
-  std::vector<float> GetScale() const;
-
-  /**
-   * Set the color of each item.
-   * @param[in] colorList The vector which contains the color for each item.
-   */
-  void SetColor(std::vector<Vector2> colorList);
-
-  /**
-   * Get the color of each item.
-   */
-  std::vector<Vector2> GetColor() const;
-
-  /**
-   * Set the position of center(selected) item.
-   * @param[in] pos The positon to set.
-   */
-  void SetCenterPosition(Vector3 pos);
-
-
-  /**
-   * Get the position of center(selected) item.
-   */
-  Vector3 GetCenterPosition() const;
-
-  /**
-   * Set the scale of center(selected) item.
-   * @param[in] scale The scale to set.
-   */
-  void SetCenterScale(float scale);
-
-  /**
-   * Get the scale of center(selected) item.
-   */
-  float GetCenterScale() const;
-
-  /**
-    * Set the color of center(selected) item.
-    * @param[in] color The color to set.
-   */
-  void SetCenterColor(Vector2 color);
-
-  /**
-   * Get the color of center(selected) item.
-   */
-  Vector2 GetCenterColor() const;
-
-  /**
-    * Set the postion of stack item(right stack and left stack).
-    * @param[in] rightPos The position of right stack.
-    * @param[in] leftPos The position of left stack,.
-   */
-  void SetStackPosition(Vector3 rightPos, Vector3 leftPos);
-
-  /**
-   * Get the postion of right stack .
-   */
-  Vector3 GetRightStackPosition() const;
-
-  /**
-   * Get the postion of left stack .
-   */
-  Vector3 GetLeftStackPosition() const;
-
-  /**
-    * Set the scale of stack item(right stack and left stack).
-    * @param[in] rightScale The scale of right stack.
-    * @param[in] leftScale The scale of left stack,.
-   */
-  void SetStackScale(float rightScale, float leftScale);
-
-  /**
-   * Get the scale of right stack.
-   */
-  float GetRightStackScale() const;
-
-  /**
-   * Get the scale of left stack.
-   */
-  float GetLeftStackScale() const;
-
-  /**
-    * Set the color of stack item(right stack and left stack).
-    * @param[in] rightColor The color of right stack.
-    * @param[in] leftColor The color of left stack.
-   */
-  void SetStackColor(Vector2 rightColor, Vector2 leftColor);
-
-  /**
-    * Get the color of right stack.
-    */
-  Vector2 GetRightStackColor() const;
-
-  /**
-   * Get the color of left stack.
-   */
-  Vector2 GetLeftStackColor() const;
-
-private:
-
-  /**
-   * @copydoc ItemLayout::GetMinimumLayoutPosition()
-   */
-  virtual float GetMinimumLayoutPosition(unsigned int numberOfItems, Vector3 layoutSize) const;
-
-  /**
-   * @copydoc ItemLayout::GetClosestAnchorPosition()
-   */
-  virtual float GetClosestAnchorPosition(float layoutPosition) const;
-
-  /**
-   * @copydoc ItemLayout::GetItemScrollToPosition()
-   */
-  virtual float GetItemScrollToPosition(unsigned int itemId) const;
-
-  /**
-   * @copydoc ItemLayout::GetItemsWithinArea()
-   */
-  virtual ItemRange GetItemsWithinArea(float firstItemPosition, Vector3 layoutSize) const;
-
-  /**
-   * @copydoc ItemLayout::GetReserveItemCount()
-   */
-  virtual unsigned int GetReserveItemCount(Vector3 layoutSize) const;
-
-  /**
-   * @copydoc ItemLayout::GetItemSize()
-   */
-  virtual bool GetItemSize(unsigned int itemId, Vector3 layoutSize, Vector3& itemSize) const;
-
-  /**
-   * @copydoc ItemLayout::GetResizeAnimation()
-   */
-  virtual void GetResizeAnimation(Animation& animation, Actor actor, Vector3 size, float durationSeconds) const;
-
-  /**
-   * @copydoc ItemLayout::GetPositionConstraint()
-   */
-  virtual bool GetPositionConstraint(unsigned int itemId, ItemLayout::Vector3Function& constraint) const;
-
-  /**
-   * @copydoc ItemLayout::GetRotationConstraint()
-   */
-  virtual bool GetRotationConstraint(unsigned int itemId, ItemLayout::QuaternionFunction& constraint) const;
-
-  /**
-   * @copydoc ItemLayout::GetScaleConstraint()
-   */
-  virtual bool GetScaleConstraint(unsigned int itemId, ItemLayout::Vector3Function& constraint) const;
-
-  /**
-   * @copydoc ItemLayout::GetColorConstraint()
-   */
-  virtual bool GetColorConstraint(unsigned int itemId, ItemLayout::Vector4Function& constraint) const;
-
-  /**
-   * @copydoc ItemLayout::GetVisibilityConstraint()
-   */
-  virtual bool GetVisibilityConstraint(unsigned int itemId, ItemLayout::BoolFunction& constraint) const;
-
-  /**
-   * @copydoc ItemLayout::GetScrollDirection()
-   */
-  virtual Degree GetScrollDirection() const;
-
-protected:
-
-  /**
-   * Protected constructor; see also AlbumLayout::New()
-   */
-  AlbumLayout();
-
-private:
-
-  struct Impl;
-  Impl* mImpl;
-};
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // __DALI_TOOLKIT_ALBUM_LAYOUT_H__
index 95ee8c3..cce79c0 100644 (file)
@@ -24,7 +24,6 @@
 
 using namespace Dali;
 using namespace Dali::Toolkit;
-using namespace std;
 
 namespace // unnamed namespace
 {
@@ -60,7 +59,7 @@ struct GetColumnPositionDefaultFunction
                    float layoutWidth)
   {
     // Share the available space between margins & column spacings
-    float availableSpace = max(0.0f, (layoutWidth - itemSize.width*numberOfColumns));
+    float availableSpace = std::max(0.0f, (layoutWidth - itemSize.width*numberOfColumns));
 
     float leftMargin = availableSpace/numberOfColumns * 0.5f;
 
@@ -312,7 +311,7 @@ struct DepthColorConstraint
 
     if (row < 0.0f)
     {
-      darkness = alpha = max(0.0f, 1.0f + row);
+      darkness = alpha = std::max(0.0f, 1.0f + row);
     }
     else
     {
@@ -327,7 +326,7 @@ struct DepthColorConstraint
 
       if (row > (mNumberOfRows-1.0f))
       {
-        alpha = max(0.0f, 1.0f - (row-(mNumberOfRows-1.0f)));
+        alpha = std::max(0.0f, 1.0f - (row-(mNumberOfRows-1.0f)));
       }
     }
 
@@ -551,8 +550,8 @@ ItemRange DepthLayout::GetItemsWithinArea(float firstItemPosition, Vector3 layou
   float firstRow = -(firstItemPosition/mImpl->mNumberOfColumns);
   float lastRow = firstRow + mImpl->mNumberOfRows * 0.5f;
 
-  unsigned int firstItem = static_cast<unsigned int>(max(0.0f, firstRow * mImpl->mNumberOfColumns));
-  unsigned int lastItem  = static_cast<unsigned int>(max(0.0f, lastRow  * mImpl->mNumberOfColumns));
+  unsigned int firstItem = static_cast<unsigned int>(std::max(0.0f, firstRow * mImpl->mNumberOfColumns));
+  unsigned int lastItem  = static_cast<unsigned int>(std::max(0.0f, lastRow  * mImpl->mNumberOfColumns));
 
   return ItemRange(firstItem, lastItem+1);
 }
index 2bb91e9..efb16e2 100644 (file)
@@ -24,7 +24,6 @@
 
 using namespace Dali;
 using namespace Dali::Toolkit;
-using namespace std;
 
 namespace // unnamed namespace
 {
@@ -311,6 +310,7 @@ struct GridLayout::Impl
     mTopMargin(DEFAULT_TOP_MARGIN),
     mBottomMargin(DEFAULT_BOTTOM_MARGIN),
     mSideMargin(DEFAULT_SIDE_MARGIN),
+    mZGap(0.f),
     mScrollSpeedFactor(DEFAULT_SCROLL_SPEED_FACTOR),
     mMaximumSwipeSpeed(DEFAULT_MAXIMUM_SWIPE_SPEED),
     mItemFlickAnimationDuration(DEFAULT_ITEM_FLICK_ANIMATION_DURATION),
@@ -619,8 +619,8 @@ void GridLayout::GetResizeAnimation(Animation& animation, Actor actor, Vector3 s
     Vector3 currentSize( actor.GetCurrentSize() );
     Vector3 shrink( currentSize );
 
-    shrink.width = min(size.width, currentSize.width);
-    shrink.height = min(size.height, currentSize.height);
+    shrink.width = std::min(size.width, currentSize.width);
+    shrink.height = std::min(size.height, currentSize.height);
 
     // Do a nonlinear size animation to shrink the actor first when the actor size changes,
     // so that we can avoid the actors overlapping during orientation change.
index f492280..d415d5e 100755 (executable)
@@ -20,7 +20,6 @@
 #include <dali-toolkit/public-api/controls/scrollable/item-view/navigation-layout.h>
 using namespace Dali;
 using namespace Dali::Toolkit;
-using namespace std;
 
 namespace // unnamed namespace
 {
index 65986db..966b665 100644 (file)
@@ -24,7 +24,6 @@
 
 using namespace Dali;
 using namespace Dali::Toolkit;
-using namespace std;
 
 namespace // unnamed namespace
 {
@@ -69,13 +68,13 @@ struct RollPositionConstraint0
     }
     else
     {
-      float yStep = max(50.0f, min(itemSize.y, scrollSpeedFactor));
+      float yStep = std::max(50.0f, std::min(itemSize.y, scrollSpeedFactor));
       y = adjustedLayoutPosition < Math::MACHINE_EPSILON_0 ? adjustedLayoutPosition * yStep : (layoutSize.height * 0.5f + adjustedRowSpacing) + (adjustedLayoutPosition - 1.0f) * yStep;
       y += itemSize.y * 0.5f - layoutSize.height * 0.5f;
     }
 
     float z = adjustedLayoutPosition * (10.0f + scrollSpeedFactor);
-    z -= min(3000.0f, scrollSpeedFactor * 2.0f);
+    z -= std::min(3000.0f, scrollSpeedFactor * 2.0f);
 
     return Vector3(itemSize.x * 0.5f - layoutSize.x * 0.5f, y, z);
   }
@@ -112,13 +111,13 @@ struct RollPositionConstraint90
     }
     else
     {
-      float xStep = max(50.0f, min(itemSize.y, scrollSpeedFactor));
+      float xStep = std::max(50.0f, std::min(itemSize.y, scrollSpeedFactor));
       x = adjustedLayoutPosition < Math::MACHINE_EPSILON_0 ? adjustedLayoutPosition * xStep : (layoutSize.width * 0.5f + adjustedRowSpacing) + (adjustedLayoutPosition - 1.0f) * xStep;
       x += itemSize.y * 0.5f - layoutSize.width * 0.5f;
     }
 
     float z = adjustedLayoutPosition * (10.0f + scrollSpeedFactor);
-    z -= min(3000.0f, scrollSpeedFactor * 2.0f);
+    z -= std::min(3000.0f, scrollSpeedFactor * 2.0f);
 
     return Vector3(x, itemSize.x * 0.5f - layoutSize.y * 0.5f, z);
   }
@@ -155,13 +154,13 @@ struct RollPositionConstraint180
     }
     else
     {
-      float yStep = max(50.0f, min(itemSize.y, scrollSpeedFactor));
+      float yStep = std::max(50.0f, std::min(itemSize.y, scrollSpeedFactor));
       y = adjustedLayoutPosition < Math::MACHINE_EPSILON_0 ? adjustedLayoutPosition * yStep : (layoutSize.height * 0.5f + adjustedRowSpacing) + (adjustedLayoutPosition - 1.0f) * yStep;
       y += itemSize.y * 0.5f - layoutSize.height * 0.5f;
     }
 
     float z = adjustedLayoutPosition * (10.0f + scrollSpeedFactor);
-    z -= min(3000.0f, scrollSpeedFactor * 2.0f);
+    z -= std::min(3000.0f, scrollSpeedFactor * 2.0f);
 
 
     return Vector3(-(itemSize.x * 0.5f - layoutSize.x * 0.5f),
@@ -201,13 +200,13 @@ struct RollPositionConstraint270
     }
     else
     {
-      float xStep = max(50.0f, min(itemSize.y, scrollSpeedFactor));
+      float xStep = std::max(50.0f, std::min(itemSize.y, scrollSpeedFactor));
       x = adjustedLayoutPosition < Math::MACHINE_EPSILON_0 ? adjustedLayoutPosition * xStep : (layoutSize.width * 0.5f + adjustedRowSpacing) + (adjustedLayoutPosition - 1.0f) * xStep;
       x += itemSize.y * 0.5f - layoutSize.width * 0.5f;
     }
 
     float z = adjustedLayoutPosition * (10.0f + scrollSpeedFactor);
-    z -= min(3000.0f, scrollSpeedFactor * 2.0f);
+    z -= std::min(3000.0f, scrollSpeedFactor * 2.0f);
 
     return Vector3(-x,
                    itemSize.x * 0.5f - layoutSize.y * 0.5f,
@@ -267,10 +266,10 @@ struct RollScaleConstraint
       factor = adjustedLayoutPosition - 1.0f;
     }
 
-    float scale = min(1.0f, max(0.1f, 1.0f - 0.1f * factor));
+    float scale = std::min(1.0f, std::max(0.1f, 1.0f - 0.1f * factor));
     if(scrollSpeed > 0.0f)
     {
-      scale *= min(1.0f, max(0.1f, 1.0f / (scrollSpeed * 0.05f)));
+      scale *= std::min(1.0f, std::max(0.1f, 1.0f / (scrollSpeed * 0.05f)));
     }
 
     return Vector3(scale, scale, scale);
@@ -293,8 +292,8 @@ struct RollColorConstraint
       factor = adjustedLayoutPosition - 1.0f;
     }
 
-    float darkness = min(1.0f, max(0.5f, 1.0f - 0.5f * factor));
-    float alpha = min(1.0f, max(0.0f, 1.0f - 0.9f * factor));
+    float darkness = std::min(1.0f, std::max(0.5f, 1.0f - 0.5f * factor));
+    float alpha = std::min(1.0f, std::max(0.0f, 1.0f - 0.9f * factor));
     return Vector4(darkness, darkness, darkness, alpha);
   }
 };
index 80eda13..471574c 100644 (file)
@@ -24,7 +24,6 @@
 
 using namespace Dali;
 using namespace Dali::Toolkit;
-using namespace std;
 
 namespace // unnamed namespace
 {
@@ -372,7 +371,7 @@ void SpiralLayout::SetItemSpacing(Radian itemSpacing)
 {
   mImpl->mItemSpacingRadians = itemSpacing;
 
-  float itemsPerSpiral = max(1.0f, (2.0f*(float)Math::PI) / mImpl->mItemSpacingRadians);
+  float itemsPerSpiral = std::max(1.0f, (2.0f*(float)Math::PI) / mImpl->mItemSpacingRadians);
   mImpl->mItemDescent = mImpl->mRevolutionDistance / itemsPerSpiral;
 }
 
@@ -385,7 +384,7 @@ void SpiralLayout::SetRevolutionDistance(float distance)
 {
   mImpl->mRevolutionDistance = distance;
 
-  float itemsPerSpiral = max(1.0f, (2.0f*(float)Math::PI) / mImpl->mItemSpacingRadians);
+  float itemsPerSpiral = std::max(1.0f, (2.0f*(float)Math::PI) / mImpl->mItemSpacingRadians);
   mImpl->mItemDescent = mImpl->mRevolutionDistance / itemsPerSpiral;
 }
 
@@ -464,10 +463,10 @@ ItemRange SpiralLayout::GetItemsWithinArea(float firstItemPosition, Vector3 layo
   float layoutHeight = IsHorizontal(mOrientation) ? layoutSize.width : layoutSize.height;
   float itemsPerSpiral = layoutHeight / mImpl->mItemDescent;
   float itemsCachedBeforeTopItem = layoutHeight * (mImpl->mTopItemAlignment + 0.5f) / mImpl->mItemDescent;
-  float itemsViewable = min(itemsPerSpiral, itemsPerSpiral - itemsCachedBeforeTopItem - firstItemPosition + 1.0f);
+  float itemsViewable = std::min(itemsPerSpiral, itemsPerSpiral - itemsCachedBeforeTopItem - firstItemPosition + 1.0f);
 
-  unsigned int firstItem = static_cast<unsigned int>(max(0.0f, -firstItemPosition - itemsCachedBeforeTopItem - 1.0f));
-  unsigned int lastItem  = static_cast<unsigned int>(max(0.0f, firstItem + itemsViewable));
+  unsigned int firstItem = static_cast<unsigned int>(std::max(0.0f, -firstItemPosition - itemsCachedBeforeTopItem - 1.0f));
+  unsigned int lastItem  = static_cast<unsigned int>(std::max(0.0f, firstItem + itemsViewable));
 
   return ItemRange(firstItem, lastItem+1);
 }
diff --git a/base/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-twist-effect.cpp b/base/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-twist-effect.cpp
deleted file mode 100644 (file)
index 0472917..0000000
+++ /dev/null
@@ -1,105 +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 <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h>
-#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-twist-effect.h>
-#include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-effect-impl.h>
-#include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-twist-effect-impl.h>
-
-using namespace Dali;
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-const float ScrollViewTwistEffect::DEFAULT_MINIMUM_DISTANCE_FOR_SHRINK( 0.0f );
-
-ScrollViewTwistEffect ScrollViewTwistEffect::New()
-{
-  return ScrollViewTwistEffect(new Internal::ScrollViewTwistEffect());
-}
-
-ScrollViewTwistEffect::ScrollViewTwistEffect()
-{
-
-}
-
-ScrollViewTwistEffect::ScrollViewTwistEffect(Internal::ScrollViewTwistEffect *impl)
-: ScrollViewEffect(impl)
-{
-}
-
-ScrollViewTwistEffect ScrollViewTwistEffect::DownCast( BaseHandle handle )
-{
-  return ScrollViewTwistEffect( dynamic_cast<Internal::ScrollViewTwistEffect*>(handle.GetObjectPtr()) );
-}
-
-float ScrollViewTwistEffect::GetMinimumDistanceForShrink() const
-{
-  return GetImpl(*this).GetMinimumDistanceForShrink();
-}
-
-void ScrollViewTwistEffect::SetMinimumDistanceForShrink(float distance)
-{
-  GetImpl(*this).SetMinimumDistanceForShrink( distance );
-}
-
-void ScrollViewTwistEffect::EnableEffect(bool enableFlag)
-{
-  GetImpl(*this).EnableEffect(enableFlag);
-}
-
-void ScrollViewTwistEffect::ApplyToActor( Actor child,
-                                          bool additionalEffects,
-                                          const Vector2& angleSwing,
-                                          float scaleAmount,
-                                          float delayMin,
-                                          float delayMax )
-{
-  GetImpl(*this).ApplyToActor( child,
-                               additionalEffects,
-                               angleSwing,
-                               scaleAmount,
-                               delayMin,
-                               delayMax );
-}
-
-void ScrollViewTwistEffect::SetMaxSwingAngle(const Vector2& maxSwingAngle)
-{
-  GetImpl(*this).SetMaxSwingAngle(maxSwingAngle);
-}
-
-Vector2 ScrollViewTwistEffect::GetMaxSwingAngle() const
-{
-  return GetImpl( *this ).GetMaxSwingAngle();
-}
-
-void ScrollViewTwistEffect::SetSwingDropOff(const Vector2& dropOff, const Vector2& distance, AlphaFunction function)
-{
-  GetImpl(*this).SetSwingDropOff(dropOff, distance, function);
-}
-
-void ScrollViewTwistEffect::GetSwingDropOff( Vector2& dropOff, Vector2& distance, AlphaFunction& function ) const
-{
-  GetImpl(*this).GetSwingDropOff(dropOff, distance, function);
-}
-
-} // namespace Toolkit
-
-} // namespace Dali
diff --git a/base/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-twist-effect.h b/base/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-twist-effect.h
deleted file mode 100644 (file)
index d07839d..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-#ifndef __DALI_TOOLKIT_SCROLL_VIEW_TWIST_EFFECT_H__
-#define __DALI_TOOLKIT_SCROLL_VIEW_TWIST_EFFECT_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/animation/alpha-functions.h>
-
-// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h>
-
-namespace Dali
-{
-
-class Actor;
-
-namespace Toolkit
-{
-
-class ScrollViewEffect;
-
-namespace Internal DALI_INTERNAL
-{
-class ScrollViewTwistEffect;
-}
-
-/**
- * @brief ScrollView effect that twists pages onto screen when transitioning.
- */
-class DALI_IMPORT_API ScrollViewTwistEffect : public ScrollViewEffect
-{
-
-public:
-
-  static const float DEFAULT_MINIMUM_DISTANCE_FOR_SHRINK; ///< The min distance for shrink
-
-public:
-
-  /**
-   * @brief Create an initialized ScrollViewTwistEffect.
-   *
-   * @return A handle to a newly allocated Dali resource.
-   */
-  static ScrollViewTwistEffect New();
-
-  /**
-   * @brief Create an uninitialized ScrollViewTwistEffect; this can be initialized with ScrollViewTwistEffect::New().
-   *
-   * Calling member functions with an uninitialized Toolkit::ScrollViewTwistEffect is not allowed.
-   */
-  ScrollViewTwistEffect();
-
-  /**
-   * @brief Downcast an Object handle to ScrollViewTwistEffect.
-   *
-   * If handle points to a ScrollViewTwistEffect the
-   * downcast produces valid handle. If not the returned handle is left uninitialized.
-   * @param[in] handle Handle to an object
-   * @return handle to a ScrollViewTwistEffect or an uninitialized handle
-   */
-  static ScrollViewTwistEffect DownCast( BaseHandle handle );
-
-  /**
-   * @brief Gets the minimum animation distance for the shrink effect to
-   * occur.
-   *
-   * @return The minimum distance in seconds is returned.
-   */
-  float GetMinimumDistanceForShrink() const;
-
-  /**
-   * @brief Sets the minimum animation distance for the shrink effect
-   * to occur.
-   *
-   * @param[in] distance The minimum distance in pixels (default = 0.0)
-   * i.e. any flick will result in shrinking.
-   */
-  void SetMinimumDistanceForShrink(float distance);
-
-  /**
-   * @brief Enable or disable this effect.
-   *
-   * @param[in] enableFlag Set to true if the effect should be enabled.
-   */
-  void EnableEffect(bool enableFlag);
-
-  /**
-   * @brief Manually apply effect to an Actor.
-   *
-   * @param[in] child The child Actor to be affected by this effect.
-   * @param[in] additionalEffects Whether just the basic effect (delay)
-   * should be applied. Or all effects (delay, rotation, scaling).
-   * For all effects set to true. Default is true i.e. apply all effects.
-   * @param[in] angleSwing The maximum amount the child actor should
-   * rotate in radians for each axis (X and Y) if the scrollview reaches
-   * overshoot. Default is PI/2 i.e. 90 degrees rotation.
-   * @param[in] scaleAmount The relative amount to shrink Actors as they
-   * are panned fast (flick animation). default is 0.125 (12.5% shrinkage)
-   * @param[in] delayMin The minimum delay coefficient for Actors at the
-   * scroll-view center. Set to 0 for instantaneous, and 1 for infinite delay.
-   * Default is 0.0f
-   * @param[in] delayMax The maximum delay coefficient for Actors at the
-   * scroll-view approx 1 ScrollView size from the center. Set to 0 for
-   * instantaneous, and 1 for infinite delay. Default is 0.9f (a slight delay)
-   */
-  void ApplyToActor( Actor child,
-                     bool additionalEffects = true,
-                     const Vector2& angleSwing = Vector2( Math::PI_4, Math::PI_4 ),
-                     float scaleAmount = 0.125f,
-                     float delayMin = 0.0f,
-                     float delayMax = 0.9f );
-
-  /**
-   * @brief Set the maximum swing angle when at zero drop off.
-   *
-   * @param[in] maxSwingAngle maximum swing angle for x and y axes
-   */
-  void SetMaxSwingAngle(const Vector2& maxSwingAngle);
-
-  /**
-   * @brief Retrieve the maximum swing angle when at zero drop off.
-   *
-   * @return The maximum swing angle for x and y axes
-   */
-  Vector2 GetMaxSwingAngle() const;
-
-  /**
-   * @brief Set the drop off values to affect the amount of swing
-   * angle applied to an actor the further it is from the scroll
-   * position.
-   *
-   * A drop off of 0.0f means no angle drop off while 1.0f will reduce
-   * the angle to zero over the distance supplied for that axis.
-   *
-   * Example maxSwingAngle.x is Pi, dropOff.x is 0.5f and distance.x is 100.0f:
-   *    The angle on the x axis will reduce to (0.5f * Pi) over 100 pixels
-   *
-   * @param[in] dropOff amount to reduce swing angle by in the range [0.0f, 1.0f]. 0.0f
-   * @param[in] distance distance to apply dropOff in pixels
-   * @param[in] function Alpha Function to affect how drop off is applied over distance, NULL for linear application
-   */
-  void SetSwingDropOff(const Vector2& dropOff, const Vector2& distance, AlphaFunction function = NULL);
-
-  /**
-   * @brief Get the drop off values that affect the amount of swing angle that is applied to an actor.
-   *
-   * @param[out]  dropOff   The current drop-off amount.
-   * @param[out]  distance  The current distance to apply drop-off in pixels.
-   * @param[out]  function  The current alpha function used to affect how the drop iff is applied over the distance.
-   */
-  void GetSwingDropOff( Vector2& dropOff, Vector2& distance, AlphaFunction& function ) const;
-
-protected:
-
-  /**
-   * @brief This constructor is used by Dali New() methods.
-   *
-   * @param [in] impl A pointer to a newly allocated Dali resource
-   */
-  explicit DALI_INTERNAL ScrollViewTwistEffect(Internal::ScrollViewTwistEffect *impl);
-
-};
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // __DALI_TOOLKIT_SCROLL_VIEW_TWIST_EFFECT_H__
index 5007fdc..03f9d38 100644 (file)
@@ -188,6 +188,11 @@ unsigned int DefaultRuler::GetTotalPages() const
 FixedRuler::FixedRuler(float spacing)
 : mSpacing(spacing)
 {
+  if(fabsf(mSpacing) <= Math::MACHINE_EPSILON_1)
+  {
+    DALI_LOG_ERROR( "Page spacing too small (%f).", double(spacing) );
+    mSpacing = spacing >= 0.0f ? Math::MACHINE_EPSILON_1 : -Math::MACHINE_EPSILON_1;
+  }
   mType = Fixed;
 }
 
@@ -203,7 +208,7 @@ float FixedRuler::GetPositionFromPage(unsigned int page, unsigned int &volume, b
   volume = 0;
 
   // spacing must be present.
-  if(mEnabled && fabsf(mSpacing) > Math::MACHINE_EPSILON_1)
+  if( mEnabled )
   {
     unsigned int column = page;
 
@@ -237,7 +242,7 @@ unsigned int FixedRuler::GetPageFromPosition(float position, bool wrap) const
   unsigned int page = 0;
 
   // spacing must be present.
-  if(mEnabled && fabsf(mSpacing) > Math::MACHINE_EPSILON_1)
+  if( mEnabled )
   {
     if( wrap )
     {
@@ -248,6 +253,12 @@ unsigned int FixedRuler::GetPageFromPosition(float position, bool wrap) const
     if(wrap)
     {
       unsigned int pagesPerVolume = mDomain.GetSize() / mSpacing;
+      // Defensive check to avoid a divide by zero below when the ruler is in an invalid state (entire domain smaller than spacing between pages of it):
+      if(pagesPerVolume < 1u)
+      {
+        pagesPerVolume = 1u;
+        DALI_LOG_ERROR("Ruler domain(%f) is smaller than its spacing(%f).", mDomain.GetSize() * 1.0, mSpacing * 1.0 );
+      }
       page %= pagesPerVolume;
     }
   }
@@ -260,7 +271,7 @@ unsigned int FixedRuler::GetTotalPages() const
   unsigned int pagesPerVolume = 1;
 
   // spacing must be present.
-  if(mEnabled && fabsf(mSpacing) > Math::MACHINE_EPSILON_1)
+  if( mEnabled )
   {
     pagesPerVolume = mDomain.GetSize() / mSpacing;
   }
index d497cea..60c1699 100755 (executable)
@@ -22,7 +22,6 @@ public_api_base_src_files = \
   $(public_api_base_src_dir)/controls/scrollable/item-view/navigation-layout.cpp \
   $(public_api_base_src_dir)/controls/scrollable/item-view/roll-layout.cpp \
   $(public_api_base_src_dir)/controls/scrollable/item-view/spiral-layout.cpp \
-  $(public_api_base_src_dir)/controls/scrollable/item-view/album-layout.cpp \
   $(public_api_base_src_dir)/controls/scrollable/scrollable.cpp \
   $(public_api_base_src_dir)/controls/scrollable/scroll-connector.cpp \
   $(public_api_base_src_dir)/controls/scrollable/scroll-component-impl.cpp \
@@ -38,7 +37,6 @@ public_api_base_src_files = \
   $(public_api_base_src_dir)/controls/scrollable/scroll-view/scroll-view-page-carousel-effect.cpp \
   $(public_api_base_src_dir)/controls/scrollable/scroll-view/scroll-view-page-spiral-effect.cpp \
   $(public_api_base_src_dir)/controls/scrollable/scroll-view/scroll-view-slide-effect.cpp \
-  $(public_api_base_src_dir)/controls/scrollable/scroll-view/scroll-view-twist-effect.cpp \
   $(public_api_base_src_dir)/controls/scrollable/scroll-view/scroll-view-wobble-effect.cpp \
   $(public_api_base_src_dir)/controls/table-view/table-view.cpp \
   $(public_api_base_src_dir)/controls/text-input/text-input.cpp \
@@ -82,12 +80,11 @@ public_api_base_item_view_header_files = \
   $(public_api_base_src_dir)/controls/scrollable/item-view/roll-layout.h \
   $(public_api_base_src_dir)/controls/scrollable/item-view/spiral-layout.h \
   $(public_api_base_src_dir)/controls/scrollable/item-view/navigation-layout.h \
-  $(public_api_base_src_dir)/controls/scrollable/item-view/album-layout.h \
   $(public_api_base_src_dir)/controls/scrollable/item-view/grid-layout.h \
   $(public_api_base_src_dir)/controls/scrollable/item-view/item-factory.h \
   $(public_api_base_src_dir)/controls/scrollable/item-view/item-layout.h \
   $(public_api_base_src_dir)/controls/scrollable/item-view/item-view.h \
-  $(public_api_base_src_dir)/controls/scrollable/item-view/item-view-declarations.h 
+  $(public_api_base_src_dir)/controls/scrollable/item-view/item-view-declarations.h
 
 public_api_base_popup_header_files = \
   $(public_api_base_src_dir)/controls/popup/popup.h
@@ -113,8 +110,7 @@ public_api_base_scroll_view_header_files = \
   $(public_api_base_src_dir)/controls/scrollable/scroll-view/scroll-view-custom-effect.h \
   $(public_api_base_src_dir)/controls/scrollable/scroll-view/scroll-view-cube-effect.h \
   $(public_api_base_src_dir)/controls/scrollable/scroll-view/scroll-view-page-spiral-effect.h \
-  $(public_api_base_src_dir)/controls/scrollable/scroll-view/scroll-view-slide-effect.h \
-  $(public_api_base_src_dir)/controls/scrollable/scroll-view/scroll-view-twist-effect.h
+  $(public_api_base_src_dir)/controls/scrollable/scroll-view/scroll-view-slide-effect.h
 
 public_api_base_table_view_header_files = \
   $(public_api_base_src_dir)/controls/table-view/table-view.h
index c0433f5..9961fdf 100644 (file)
@@ -48,6 +48,7 @@ BouncingEffect::~BouncingEffect()
 BouncingEffect BouncingEffect::New( const Vector4& color )
 {
   std::string fragmentShader = MAKE_STRING(
+      precision mediump float;\n
       uniform float uProgressRate;\n
       uniform vec4 uAssignedColor;\n
       void main()\n
@@ -81,7 +82,8 @@ BouncingEffect BouncingEffect::New( const Vector4& color )
   );
 
   ShaderEffect shaderEffect;
-  shaderEffect = ShaderEffect::New( "", fragmentShader, GeometryType( GEOMETRY_TYPE_IMAGE),
+  shaderEffect = ShaderEffect::New( "", fragmentShader,
+                                    GeometryType( GEOMETRY_TYPE_IMAGE),
                                     ShaderEffect::GeometryHints( ShaderEffect::HINT_BLENDING ) );
   BouncingEffect handle( shaderEffect );
 
index b597c92..ee9b256 100644 (file)
@@ -49,11 +49,11 @@ ImageRegionEffect::~ImageRegionEffect()
 ImageRegionEffect ImageRegionEffect::New()
 {
   std::string vertexShader(
-    "uniform vec2 uTopLeft;\n"
-    "uniform vec2 uBottomRight;\n"
+    "uniform mediump vec2 uTopLeft;\n"
+    "uniform mediump vec2 uBottomRight;\n"
     "void main()\n"
     "{\n"
-    "  vec4 position = vec4(aPosition,1.0);\n"
+    "  mediump vec4 position = vec4(aPosition,1.0);\n"
     "  gl_Position = uMvpMatrix * position;\n"
     // The line below is doing the same as the following commented lines:
     //"  vec2 imageSize = sTextureRect.zw - sTextureRect.xy;\n"
@@ -98,4 +98,3 @@ const std::string& ImageRegionEffect::GetBottomRightPropertyName() const
 } // namespace Toolkit
 
 } // namespace Dali
-
index ba01ad5..762e66c 100644 (file)
@@ -554,6 +554,7 @@ WARN_LOGFILE           =
 INPUT                  = @DOXYGEN_DOCS_DIR@/content \
                          ../../../../dali-toolkit/base/dali-toolkit/public-api \
                          ../../../../dali-toolkit/optional/dali-toolkit/public-api \
+                         ../../../automated-tests/README.md \
                          @prefix@/include/dali
 
 # This tag can be used to specify the character encoding of the source files
@@ -595,6 +596,7 @@ FILE_PATTERNS          = *.c \
                          *.php3 \
                          *.inc \
                          *.m \
+                         *.md \
                          *.mm \
                          *.dox \
                          *.py \
index 61619dd..1d2b483 100644 (file)
@@ -69,6 +69,8 @@
  * - \link texture-atlases Texture Atlases  \endlink
  * - \link Texture_Compression Compressing Textures \endlink
  *
+ * \section Testing
+ * See [Automated Tests](@ref auto_testing) for instructions.
  */
 
 /*! \page scene-graph
index 915269e..9a1632b 100644 (file)
@@ -55,7 +55,7 @@
  *   return connection ;
  * }
  *
- * bool MyActor::DoActionCustom(BaseObject* object, const std::string& actionName, const std::vector<Property::Value>& attributes)
+ * bool MyActor::DoActionCustom(BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes)
  * {
  *   bool actioned = false ;
  *
index 0f49da3..b0a7a40 100644 (file)
@@ -43,7 +43,6 @@
 #include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h>
 #include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-page-spiral-effect.h>
 #include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-slide-effect.h>
-#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-twist-effect.h>
 #include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h>
 #include <dali-toolkit/public-api/controls/scrollable/scrollable.h>
 #include <dali-toolkit/public-api/controls/super-blur-view/super-blur-view.h>
@@ -85,7 +84,6 @@
 #include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
 #include <dali-toolkit/public-api/controls/scrollable/scroll-component.h>
 #include <dali-toolkit/public-api/controls/scrollable/scroll-component-impl.h>
-#include <dali-toolkit/public-api/controls/scrollable/item-view/album-layout.h>
 #include <dali-toolkit/public-api/controls/scrollable/item-view/depth-layout.h>
 #include <dali-toolkit/public-api/controls/scrollable/item-view/navigation-layout.h>
 #include <dali-toolkit/public-api/controls/scrollable/item-view/roll-layout.h>
index 787f842..1faf68c 100644 (file)
@@ -47,6 +47,17 @@ BubbleEmitter::BubbleEmitter( const Vector2& movementArea,
   mCurrentUniform( 0 ),
   mDensity( 5 )
 {
+  // Calculate how many BubbleEffect shaders are required
+  if( mTotalNumOfBubble>100 )
+  {
+    mNumBubblePerShader = 100;
+    mNumShader = mTotalNumOfBubble / 100;
+  }
+  else
+  {
+    mNumBubblePerShader = mTotalNumOfBubble;
+    mNumShader = 1;
+  }
 }
 
 BubbleEmitter::~BubbleEmitter()
@@ -83,18 +94,6 @@ void BubbleEmitter::OnInitialize()
   // Generate the material object, which is used by all meshActors
   GenMaterial();
 
-  // Calculate how many BubbleEffect shaders are required
-  if( mTotalNumOfBubble>100 )
-  {
-    mNumBubblePerShader = 100;
-    mNumShader = mTotalNumOfBubble / 100;
-  }
-  else
-  {
-    mNumBubblePerShader = mTotalNumOfBubble;
-    mNumShader = 1;
-  }
-
   mMesh.resize( mNumShader );
   mMeshActor.resize( mNumShader );
   mEffect.resize( mNumShader );
index db40398..fa9ee42 100644 (file)
@@ -27,7 +27,6 @@
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/cluster/cluster-style.h>
 
-using namespace std;
 using namespace Dali;
 
 namespace // unnamed namespace
@@ -141,7 +140,7 @@ void Cluster::AddChildInfoAt( ChildInfo childInfo, unsigned int index )
     Property::Index depthProperty = child.GetPropertyIndex(Toolkit::Cluster::CLUSTER_ACTOR_DEPTH);
     if(depthProperty == Property::INVALID_INDEX)
     {
-      depthProperty = child.RegisterProperty(Toolkit::Cluster::CLUSTER_ACTOR_DEPTH, depth);
+      child.RegisterProperty(Toolkit::Cluster::CLUSTER_ACTOR_DEPTH, depth);
     }
 
     // not added prior
@@ -530,7 +529,7 @@ void Cluster::OnControlChildRemove(Actor& child)
   child.RemoveConstraints();
 }
 
-bool Cluster::DoAction(BaseObject* object, const std::string& actionName, const std::vector<Property::Value>& attributes)
+bool Cluster::DoAction(BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes)
 {
   bool ret = false;
 
index 863417f..398b6a2 100644 (file)
@@ -247,7 +247,7 @@ public:
    * @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 std::vector<Property::Value>& attributes);
+  static bool DoAction(BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes);
 
 private: // From Control
 
index 371fded..0aed88f 100644 (file)
@@ -97,8 +97,8 @@ const float GAUSSIAN_BLUR_VIEW_DEFAULT_DOWNSAMPLE_HEIGHT_SCALE = 0.5f;
 const float ARBITRARY_FIELD_OF_VIEW = Math::PI / 4.0f;
 
 const char* const GAUSSIAN_BLUR_FRAGMENT_SOURCE =
-    "uniform vec2 uSampleOffsets[NUM_SAMPLES];\n"
-    "uniform float uSampleWeights[NUM_SAMPLES];\n"
+    "uniform mediump vec2 uSampleOffsets[NUM_SAMPLES];\n"
+    "uniform mediump float uSampleWeights[NUM_SAMPLES];\n"
 
     "void main()\n"
     "{\n"
index 4c54138..45ab799 100644 (file)
@@ -94,7 +94,8 @@ Dali::Toolkit::ImageView ImageView::New()
 }
 
 ImageView::ImageView()
-: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_STYLE_CHANGE_SIGNALS ) )
+: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_STYLE_CHANGE_SIGNALS ) ),
+  mPropertyDetail( Property::INVALID_INDEX )
 {
 }
 
index 0ebdb0c..ed9d27b 100644 (file)
@@ -355,7 +355,7 @@ void MaskedImageView::OnPropertySet( Property::Index index, Property::Value prop
   }
 }
 
-void MaskedImageView::OnPan(Actor source, PanGesture gesture)
+void MaskedImageView::OnPan(Actor source, const PanGesture& gesture)
 {
   // Used to flag whether edit mode is setting properties
   mSelfPropertySetting = true;
@@ -380,7 +380,7 @@ void MaskedImageView::OnPan(Actor source, PanGesture gesture)
   mSelfPropertySetting = false;
 }
 
-void MaskedImageView::OnPinch(Actor actor, PinchGesture pinch)
+void MaskedImageView::OnPinch(Actor actor, const PinchGesture& pinch)
 {
   // Used to flag whether edit mode is setting properties
   mSelfPropertySetting = true;
index 00c0853..f9af407 100644 (file)
@@ -149,12 +149,12 @@ protected:
   /**
    * Helper for edit mode.
    */
-  void OnPan( Actor source, PanGesture gesture );
+  void OnPan( Actor source, const PanGesture& gesture );
 
   /**
    * Helper for edit mode.
    */
-  void OnPinch( Actor actor, PinchGesture pinch );
+  void OnPinch( Actor actor, const PinchGesture& pinch );
 
   /**
    * Construct a new MaskedImageView.
index 597a4c2..0cf34a0 100644 (file)
@@ -155,6 +155,7 @@ Dali::Toolkit::Magnifier Magnifier::New()
 Magnifier::Magnifier()
 : Control( REQUIRES_TOUCH_EVENTS ),
   mPropertySourcePosition(Property::INVALID_INDEX),
+  mDefaultCameraDistance(1000.f),
   mActorSize(Vector3::ZERO),
   mMagnificationFactor(1.0f)
 {
index da5ee5b..be4245f 100644 (file)
@@ -413,7 +413,7 @@ Toolkit::NavigationControl::ItemPoppedSignalV2& NavigationControl::ItemPoppedSig
   return mItemPoppedSignal;
 }
 
-bool NavigationControl::DoAction(BaseObject* object, const std::string& actionName, const std::vector<Property::Value>& attributes)
+bool NavigationControl::DoAction(BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes)
 {
   bool ret = false;
 
index f722836..8221a8f 100644 (file)
@@ -122,7 +122,7 @@ public:
    * @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 std::vector<Property::Value>& attributes);
+  static bool DoAction(BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes);
 
 public:
 
index ea7d405..615f3a6 100644 (file)
@@ -48,7 +48,9 @@ TypeRegistration mType( typeid(Toolkit::Page), typeid(CustomActor), Create );
 Page::Page()
 : Control( CONTROL_BEHAVIOUR_NONE ),
   mTitle(""),
-  mSubTitle("")
+  mSubTitle(""),
+  mPropertyTitle(Property::INVALID_INDEX),
+  mPropertySubTitle(Property::INVALID_INDEX)
 {
 }
 
index 1c6ee40..c844d88 100644 (file)
@@ -260,13 +260,19 @@ PageTurnView::PageTurnView( PageFactory& pageFactory, const Vector2& pageSize )
 : Control( REQUIRES_TOUCH_EVENTS ),
   mPageFactory( pageFactory ),
   mPageSize( pageSize ),
+  mTotalPageCount( 0 ),
   mIsEditMode( false ),
+  mNeedOffscreenRendering( false ),
   mPanning( false ),
   mSpineShadowParameter( DEFAULT_SPINE_SHADOW_PARAMETER ),
   mCurrentPageIndex( 0 ),
   mIndex( 0 ),
   mPress( false ),
   mPageUpdated( true ),
+  mDistanceUpCorner( 0.f ),
+  mDistanceBottomCorner( 0.f ),
+  mPanDisplacement( 0.f ),
+  mConstraints( false ),
   mPageTurnStartedSignal(),
   mPageTurnFinishedSignal(),
   mPagePanStartedSignal(),
@@ -660,7 +666,7 @@ void PageTurnView::RefreshCurrentPage()
   RenderPage( mCurrentPageIndex );
 }
 
-void PageTurnView::OnPan( PanGesture gesture )
+void PageTurnView::OnPan( const PanGesture& gesture )
 {
   if( mIsEditMode )
   {
index 27f9778..d36ab2f 100644 (file)
@@ -191,7 +191,7 @@ private: // from Control
   /**
    * @copydoc Toolkit::Control::OnPan
    */
-  virtual void OnPan( PanGesture gesture );
+  virtual void OnPan( const PanGesture& gesture );
 
   /**
    * @copydoc Toolkit::Control::OnInitialize
index 0521bec..a95ee7c 100644 (file)
@@ -27,8 +27,6 @@
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/selectors/rotating-selector.h>
 
-using namespace std;
-
 namespace
 {
 const float TOUCH_OPACITY_THRESHOLD = 0.1f;
@@ -112,6 +110,7 @@ RotatingSelector::RotatingSelector()
 : Control( REQUIRES_TOUCH_EVENTS ),
   mSelected(false),
   mSelectable(true),
+  mPressed(false),
   mIsAnimating(false)
 {
 }
index 7f82bc3..76db7ca 100755 (executable)
@@ -28,7 +28,6 @@
 #include <sstream>
 
 using namespace Dali;
-using namespace std;
 
 namespace Dali
 {
@@ -273,7 +272,7 @@ bool Slider::OnTouchEvent(Actor actor, const TouchEvent& event)
   return true;
 }
 
-void Slider::OnPan( Actor actor, PanGesture gesture )
+void Slider::OnPan( Actor actor, const PanGesture& gesture )
 {
   // gesture.position is in local actor coordinates
   if( mState != DISABLED )
@@ -384,7 +383,7 @@ void Slider::DisplayValue( float value, bool raiseSignals )
   {
     std::stringstream ss;
     ss.precision( GetValuePrecision() );
-    ss << fixed << clampledValue;
+    ss << std::fixed << clampledValue;
     mHandleValueTextView.SetText( ss.str() );
   }
 }
@@ -1052,7 +1051,7 @@ void Slider::DisplayPopup( float value )
   {
     std::stringstream ss;
     ss.precision( GetValuePrecision() );
-    ss << fixed << value;
+    ss << std::fixed << value;
     mValueTextView.SetText( ss.str() );
     TextStyle style;
     style.SetTextColor( GetPopupTextColor() );
index 20ac87a..d4ac718 100755 (executable)
@@ -350,7 +350,7 @@ private:
    * @param[in] actor The actor the event is raised for
    * @param[in] gesture The pan event info
    */
-  void OnPan( Actor actor, PanGesture gestur );
+  void OnPan( Actor actor, const PanGesture& gesture );
 
   /**
    * Map a position onto a domain and return the result as a percentage
index b9cd038..6544046 100644 (file)
@@ -60,6 +60,7 @@ const float ARBITRARY_FIELD_OF_VIEW = Math::PI / 4.0f;
 
 const char* BLUR_TWO_PASS_FRAGMENT_SOURCE =
 {
+ "precision highp float;\n"
  "uniform vec2 uSampleOffsets[NUM_SAMPLES];\n"
  "uniform float uSampleWeights[NUM_SAMPLES];\n"
  "void main()\n"
index 9601b0b..b715e11 100644 (file)
@@ -43,6 +43,7 @@ const float ARBITRARY_FIELD_OF_VIEW = Math::PI / 4.0f;
 
 const char* EMBOSS_FRAGMENT_SOURCE1 =
 {
+ "precision highp float;\n"
  "uniform vec2 uTexScale;\n"
  "\n"
  "void main()\n"
@@ -72,6 +73,7 @@ const char* EMBOSS_FRAGMENT_SOURCE1 =
 
 const char* EMBOSS_FRAGMENT_SOURCE2 =
 {
+ "precision highp float;\n"
  "uniform vec2 uTexScale;\n"
  "\n"
  "void main()\n"
index ac230cc..b04d173 100644 (file)
@@ -42,6 +42,7 @@ const float ARBITRARY_FIELD_OF_VIEW = Math::PI / 4.0f;
 
 const char* const SPREAD_FRAGMENT_SOURCE =
 {
+ "precision highp float;\n"
  "uniform float uSpread;\n"
  "uniform vec2 uTexScale;\n"
  "void main()\n"
index 9996db4..d3d5ecf 100644 (file)
@@ -129,6 +129,8 @@ struct CommonParametersConstraint
 }//namespace
 
 PageTurnEffect::PageTurnEffect()
+: mOriginalCenterPropertyIndex(Property::INVALID_INDEX),
+  mCurrentCenterPropertyIndex(Property::INVALID_INDEX)
 {
 }
 
@@ -156,6 +158,7 @@ Toolkit::PageTurnEffect PageTurnEffect::CreateShaderEffect( bool enableBlending
      * ([3][2]) float curveHeight: The height of the interpolated hermite curve.
      * ([3][3]) float currentLength: The length from the current center to the curveEnd.
      */
+    precision mediump float;\n
     uniform mat4 uCommonParameters;\n
     \n
     uniform vec2 uPageSize;\n
@@ -319,6 +322,7 @@ Toolkit::PageTurnEffect PageTurnEffect::CreateShaderEffect( bool enableBlending
   std::string vertexShaderEnd("}");
 
   std::string fragmentShaderPartOne = MAKE_STRING(
+    precision mediump float;\n
     uniform vec2 uPageSize;\n
     uniform vec2 uSpineShadowParameter;\n
     varying vec3 vNormal;\n
index 0dbc80f..4b7ad4a 100644 (file)
@@ -28,7 +28,8 @@ namespace Internal
 {
 
 CubeTransitionCrossEffect::CubeTransitionCrossEffect( unsigned int numRows, unsigned int numColumns, Size viewAreaSize )
-: CubeTransitionEffect( numRows, numColumns, viewAreaSize)
+: CubeTransitionEffect( numRows, numColumns, viewAreaSize),
+  mDisplacementRatio( 1.f )
 {
 }
 
index bad335a..b2a0312 100644 (file)
@@ -69,7 +69,7 @@ public:
   static FullAreaImageCreator New()
   {
     std::string vertexShader(
-      "uniform vec4 uRegion; \n"
+      "uniform mediump vec4 uRegion; \n"
        "void main() \n"
       "{\n"
       "  gl_Position = uProjection * uModelView * vec4(aPosition, 1.0);\n"
@@ -79,7 +79,7 @@ public:
     );
 
     std::string fragmentShader(
-      "uniform vec4 uRegion; \n"
+      "uniform mediump vec4 uRegion; \n"
       "void main() \n"
       "{\n"
       "  if( vTexCoord.s > 0.0 && vTexCoord.s < 1.0 && vTexCoord.t > 0.0 && vTexCoord.t < 1.0) \n"
index d066d24..d483ff1 100644 (file)
@@ -28,7 +28,10 @@ namespace Internal
 {
 
 CubeTransitionWaveEffect::CubeTransitionWaveEffect( unsigned int numRows, unsigned int numColumns, Size viewAreaSize )
-: CubeTransitionEffect( numRows, numColumns, viewAreaSize)
+: CubeTransitionEffect( numRows, numColumns, viewAreaSize),
+  mSaddleAA( 1.f ),
+  mSaddleBB( 1.f ),
+  mSaddleB( 1.f )
 {
 }
 
index 620be2c..8bde850 100644 (file)
@@ -50,7 +50,7 @@ void PageFactory::SetActorHittability( Actor actor, bool hittable )
   Property::Index propertyActorHittable = actor.GetPropertyIndex(ACTOR_HITTABLE);
   if(propertyActorHittable == Property::INVALID_INDEX && hittable)
   {
-    propertyActorHittable = actor.RegisterProperty(ACTOR_HITTABLE, true);
+    actor.RegisterProperty(ACTOR_HITTABLE, true);
   }
   else
   {
index b0849b0..e872060 100644 (file)
@@ -31,7 +31,7 @@ namespace Toolkit
 
 const unsigned int TOOLKIT_MAJOR_VERSION = 1;
 const unsigned int TOOLKIT_MINOR_VERSION = 0;
-const unsigned int TOOLKIT_MICRO_VERSION = 16;
+const unsigned int TOOLKIT_MICRO_VERSION = 17;
 const char * const TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 86e8da0..c09f7c0 100644 (file)
@@ -37,7 +37,7 @@ AlphaDiscardEffect AlphaDiscardEffect::New()
   const char* ALPHA_DISCARD_FRAGMENT_SHADER_SOURCE =
       "void main()                                                    \n"
       "{                                                              \n"
-      "  vec4 color = texture2D( sTexture, vTexCoord );               \n"
+      "  mediump vec4 color = texture2D( sTexture, vTexCoord );       \n"
       "  if(color.a <= 0.0001)                                        \n"
       "  {                                                            \n"
       "    discard;                                                   \n"
index 4e2abc3..f2b74d9 100644 (file)
@@ -48,14 +48,14 @@ BlindEffect::~BlindEffect()
 BlindEffect BlindEffect::New()
 {
   std::string fragmentShader(
-    "uniform float uStep;                                                                \n"
+    "uniform mediump float uStep;                                                        \n"
     "void main()                                                                         \n"
     "{                                                                                   \n"
-    "    vec4 alphaColor;                                                                \n"
-    "    vec4 baseColor;                                                                 \n"
+    "    mediump vec4 alphaColor;                                                        \n"
+    "    mediump vec4 baseColor;                                                         \n"
     "    baseColor = texture2D( sTexture, vTexCoord);                                    \n"
     "    alphaColor = vec4(0.1,0.1,0.1,1.0);                                             \n"
-    "    float index = 0.0;                                                              \n"
+    "    lowp float index = 0.0;                                                         \n"
     "    index = floor(vTexCoord.y/0.1);                                                 \n"
     "    if((vTexCoord.y < (index * 0.1 + uStep * 0.005)) && (vTexCoord.y > index * 0.1))\n"
     "    {                                                                               \n"
index 63ee87e..d335d37 100644 (file)
@@ -57,6 +57,7 @@ BubbleEffect BubbleEffect::New( unsigned int numberOfBubble, const std::string&
   std::ostringstream vertexShaderStringStream;
   vertexShaderStringStream << "#define NUMBER_OF_BUBBLE "<< numberOfBubble << "\n";
   std::string vertexShader(
+    "  precision mediump float;\n"
     // the gravity applied to the y direction
     "  uniform float uGravity; \n"
     // Width of the texture in pixels
@@ -127,6 +128,7 @@ BubbleEffect BubbleEffect::New( unsigned int numberOfBubble, const std::string&
   vertexShaderStringStream << vertexShader;
 
   std::string fragmentShader(
+    "  precision mediump float;\n"
     "  varying float vPercentage;\n"
     "  varying vec2  vEffectTexCoord;\n"
     "\n"
@@ -140,15 +142,17 @@ BubbleEffect BubbleEffect::New( unsigned int numberOfBubble, const std::string&
     "    gl_FragColor = fragColor;\n"
     "  }\n");
 
-  ShaderEffect shaderEffect = ShaderEffect::New( vertexShaderStringStream.str(), fragmentShader,
-                                                 GeometryType( GEOMETRY_TYPE_TEXTURED_MESH),
-                                                 ShaderEffect::GeometryHints( ShaderEffect::HINT_BLENDING ) );
+  ShaderEffect shaderEffect = ShaderEffect::New(
+    vertexShaderStringStream.str(),
+    fragmentShader,
+    GeometryType( GEOMETRY_TYPE_TEXTURED_MESH),
+    ShaderEffect::GeometryHints( ShaderEffect::HINT_BLENDING ) );
+
   BubbleEffect handle( shaderEffect );
 
   handle.mNumberOfBubbles = numberOfBubble;
   handle.SetMovementArea( Stage::GetCurrent().GetSize() );
 
-
   handle.SetUniform( "uGravity", 50.f );
   handle.SetUniform( "uMagnification", 1.f );
   handle.SetUniform( "uDynamicScale", 1.f );
index 5b1e324..9e360c2 100644 (file)
@@ -57,10 +57,10 @@ CarouselEffect CarouselEffect::New()
               "\n"
               "void main()\n"
               "{\n"
-              "    vec4 world = uModelView * vec4(aPosition,1.0);\n"
-              "    vec2 d = (world.xy - uCenter) * uAnglePerUnit;\n"
-              "    float a = length(d);\n"
-              "    float cs = cos(radians(a));\n"
+              "    mediump vec4 world = uModelView * vec4(aPosition,1.0);\n"
+              "    mediump vec2 d = (world.xy - uCenter) * uAnglePerUnit;\n"
+              "    mediump float a = length(d);\n"
+              "    mediump float cs = cos(radians(a));\n"
               "    world.z -= cs * uRadius;\n"
               "    gl_Position = uProjection * world;\n"
               "    \n"
index 7e3158c..c0c142c 100644 (file)
@@ -80,7 +80,7 @@ DisplacementEffect DisplacementEffect::New(Type type)
 
     "void main()\n"
     "{\n"
-    "   vec4 col = texture2D(sTexture, vTexCoord);\n"
+    "  vec4 col = texture2D(sTexture, vTexCoord);\n"
     // calc lighting
     "  float intensity = dot(uLightDirection, uFixedNormal);"
     "  vec3 lighting = (intensity * uDiffuseLightColor) + uAmbientLightColor;\n"
@@ -238,4 +238,3 @@ void DisplacementEffect::SetFixedNormalProperty(const Vector3 fixedNormal)
 }
 
 }
-
index 149e225..70d2f5c 100644 (file)
@@ -90,13 +90,13 @@ DissolveEffect DissolveEffect::New( bool useHighPrecision )
   Dali::ShaderEffect shaderEffectCustom;
   if( useHighPrecision )
   {
-    shaderEffectCustom =  Dali::ShaderEffect::New( vertexShader, prefixHighPrecision + fragmentShader,
+    shaderEffectCustom =  Dali::ShaderEffect::New( prefixHighPrecision+vertexShader, prefixHighPrecision + fragmentShader,
                                                GeometryType( GEOMETRY_TYPE_IMAGE),
                                                ShaderEffect::GeometryHints( ShaderEffect::HINT_GRID | ShaderEffect::HINT_BLENDING ) );
   }
   else
   {
-    shaderEffectCustom =  Dali::ShaderEffect::New( vertexShader, prefixMediumPrecision + fragmentShader,
+    shaderEffectCustom =  Dali::ShaderEffect::New( prefixMediumPrecision+vertexShader, prefixMediumPrecision + fragmentShader,
                                                GeometryType( GEOMETRY_TYPE_IMAGE),
                                                ShaderEffect::GeometryHints( ShaderEffect::HINT_GRID | ShaderEffect::HINT_BLENDING ) );
   }
index e63f6be..5d85ebf 100644 (file)
@@ -36,12 +36,14 @@ namespace
 }
 
 DissolveLocalEffect::DissolveLocalEffect()
+: mNumberOfDimples( 1 )
 {
 }
 
 //Call the Parent copy constructor to add reference to the implementation for this object
 DissolveLocalEffect::DissolveLocalEffect( ShaderEffect handle )
-: ShaderEffect( handle )
+: ShaderEffect( handle ),
+  mNumberOfDimples( 1 )
 {
 }
 
@@ -54,6 +56,7 @@ DissolveLocalEffect DissolveLocalEffect::New( unsigned int numberOfDimples )
   std::ostringstream vertexShaderStringStream;
   vertexShaderStringStream << "#define NUMBER_OF_DIMPLE "<< numberOfDimples << "\n";
   std::string vertexShader(
+    "precision highp float;\n"
     "uniform vec2 uCenter[ NUMBER_OF_DIMPLE ];\n"
     "uniform float uRadius[ NUMBER_OF_DIMPLE ]; \n"
     "uniform float uPercentage[ NUMBER_OF_DIMPLE ]; \n"
index 5c37f36..6c120b2 100644 (file)
@@ -112,7 +112,7 @@ DistanceFieldEffect DistanceFieldEffect::New()
       "\n"
       "  else // (uDoShadow > 0.0)\n"
       "  {\n"
-      "    float shadowDistance = texture2D(sTexture, vTexCoord - uShadowOffset).a;\n"
+      "    mediump float shadowDistance = texture2D(sTexture, vTexCoord - uShadowOffset).a;\n"
       "    mediump float inText = alphaFactor;\n"
       "    mediump float inShadow = smoothstep(uSmoothing - smoothWidth, uSmoothing + smoothWidth, shadowDistance);\n"
       "\n"
index 635caab..38a83dd 100644 (file)
@@ -48,11 +48,11 @@ IrisEffect IrisEffect::New()
   // append the default version
   std::string vertexShader(
               "uniform mediump vec2 uCenter;\n"
-              "varying vec2 vRelativePosition;\n"
+              "varying mediump vec2 vRelativePosition;\n"
               "\n"
               "void main()\n"
               "{\n"
-              "    vec4 world = uModelView * vec4(aPosition,1.0);\n"
+              "    mediump vec4 world = uModelView * vec4(aPosition,1.0);\n"
               "    gl_Position = uProjection * world;\n"
               "    \n"
               "    vTexCoord = aTexCoord;\n"
@@ -60,12 +60,12 @@ IrisEffect IrisEffect::New()
               "}\n");
 
   std::string fragmentShader(
-              "uniform float uRadius;                                                           \n"
-              "uniform float uBlendFactor;                                                      \n"
-              "varying vec2 vRelativePosition;                                                  \n"
+              "uniform mediump float uRadius;                                                           \n"
+              "uniform mediump float uBlendFactor;                                                      \n"
+              "varying mediump vec2 vRelativePosition;                                                  \n"
               "void main()                                                                      \n"
               "{                                                                                \n"
-              "   float delta = (length(vRelativePosition) - uRadius);                          \n"
+              "   mediump float delta = (length(vRelativePosition) - uRadius);                          \n"
               "   delta = clamp(0.0 - delta * uBlendFactor, 0.0, 1.0);                          \n"
               "   gl_FragColor = texture2D(sTexture, vTexCoord) * uColor;                       \n"
               "   gl_FragColor.a *= delta;                                                      \n"
@@ -118,4 +118,3 @@ const std::string& IrisEffect::GetCenterPropertyName() const
 
 }
 }
-
index 2663567..8a11c06 100644 (file)
@@ -48,20 +48,19 @@ MirrorEffect::~MirrorEffect()
 MirrorEffect MirrorEffect::New()
 {
 
-  std::string vertextShader(
-      "precision mediump float;                     \n"
+  std::string vertexShader(
       "void main()                                  \n"
       "{                                            \n"
-      "  vec3 pos = aPosition;                      \n"
+      "  mediump vec3 pos = aPosition;              \n"
       "  pos.y = pos.y * 3.0;                       \n"
-      "  vec4 world = uModelView * vec4(pos,1.0);   \n"
+      "  mediump vec4 world = uModelView * vec4(pos,1.0); \n"
       "  gl_Position = uProjection * world;         \n"
       "  vTexCoord = aTexCoord;                     \n"
       "}                                            \n" );
 
   std::string fragmentShader(
-      "uniform  float  uDepth;                      \n"
-      "uniform  float  uAlpha;                      \n"
+      "uniform  mediump float  uDepth;              \n"
+      "uniform  mediump float  uAlpha;              \n"
       "void main()                                  \n"
       "{                                            \n"
       " if(vTexCoord.y < 1.0 / 3.0)                 \n"
@@ -75,9 +74,9 @@ MirrorEffect MirrorEffect::New()
       " }                                           \n"
       " else                                        \n"
       " {                                           \n"
-      "   float darkness = 3.0 - vTexCoord.y * 3.0;                                                   \n"
+      "   highp float darkness = 3.0 - vTexCoord.y * 3.0;                                                   \n"
       "   darkness = (1.0 - 1.0 / uDepth + darkness * 1.0/ uDepth) * 0.65;                            \n"
-      "   vec4 color = texture2D(sTexture, vec2(vTexCoord.x, -vTexCoord.y *3.0 + 3.0)) * uColor;      \n"
+      "   highp vec4 color = texture2D(sTexture, vec2(vTexCoord.x, -vTexCoord.y *3.0 + 3.0)) * uColor;      \n"
       "   color.a *= uAlpha;                                                                          \n"
       "   gl_FragColor = color * vec4(darkness, darkness, darkness, darkness);                        \n"
       " }                                           \n"
@@ -85,7 +84,7 @@ MirrorEffect MirrorEffect::New()
 
   // Create the implementation, temporarily owned on stack,
   Dali::ShaderEffect shaderEffectCustom =  Dali::ShaderEffect::New(
-      vertextShader,
+      vertexShader,
       fragmentShader,
       GeometryType( GEOMETRY_TYPE_IMAGE ),
       ShaderEffect::GeometryHints( ShaderEffect::HINT_BLENDING ));
index 0eb84a9..1b77466 100644 (file)
@@ -114,6 +114,7 @@ MotionBlurEffect MotionBlurEffect::New( unsigned int numBlurSamples )
   // varying   vec2  vTexCoord;
   std::string vertexSource;
   vertexSource =
+    "precision mediump float;\n"
     "uniform mat4 uModelLastFrame;\n"
     "uniform float uTimeDelta;\n"
 
@@ -186,7 +187,6 @@ MotionBlurEffect MotionBlurEffect::New( unsigned int numBlurSamples )
   std::string fragmentSource;
   fragmentSource =
     "precision mediump float;\n"
-
     "uniform vec2 uObjectFadeStart;\n"
     "uniform vec2 uObjectFadeEnd;\n"
     "uniform float uAlphaScale;\n"
@@ -227,8 +227,7 @@ MotionBlurEffect MotionBlurEffect::New( unsigned int numBlurSamples )
     "}\n";
 
   // NOTE: we must turn on alpha blending for the actor (HINT_BLENDING)
-  ShaderEffect shader = ShaderEffect::New( vertexSource,
-                                           fragmentSource,
+  ShaderEffect shader = ShaderEffect::New( vertexSource, fragmentSource,
                                            GEOMETRY_TYPE_IMAGE,
                                            ShaderEffect::GeometryHints( ShaderEffect::HINT_BLENDING | ShaderEffect::HINT_GRID) );
 
@@ -331,4 +330,3 @@ const std::string& MotionBlurEffect::GetAlphaScalePropertyName() const
 }
 
 }
-
index 4df2ebb..48dff1d 100644 (file)
@@ -123,6 +123,7 @@ MotionStretchEffect MotionStretchEffect::New()
   // varying   vec2  vTexCoord;
   std::string vertexSource;
   vertexSource =
+    "precision mediump float;\n"
     "uniform mat4  uModelLastFrame;\n"
     "uniform float uTimeDelta;\n"
 
@@ -223,10 +224,9 @@ MotionStretchEffect MotionStretchEffect::New()
     "}";
 
   // NOTE: we must turn on alpha blending for the actor (HINT_BLENDING)
-  ShaderEffect shader = ShaderEffect::New( vertexSource,
-                                           fragmentSource,
-                                           GeometryType( GEOMETRY_TYPE_IMAGE ),
-                                           ShaderEffect::GeometryHints( ShaderEffect::HINT_BLENDING | ShaderEffect::HINT_GRID ) );
+  ShaderEffect shader = ShaderEffect::New(
+    vertexSource, fragmentSource, GeometryType( GEOMETRY_TYPE_IMAGE ),
+    ShaderEffect::GeometryHints( ShaderEffect::HINT_BLENDING | ShaderEffect::HINT_GRID ) );
 
 
 
@@ -302,4 +302,3 @@ const std::string& MotionStretchEffect::GetAlphaScalePropertyName() const
 }
 
 }
-
index ca75378..bfaba3d 100644 (file)
@@ -42,6 +42,7 @@ struct NinePatchMaskEffectSizeConstraint
 static void DoApply( ImageActor actor, const std::string& maskImage, const Vector2& maskSize, Vector4 maskBorder )
 {
   const char* ALPHA_MASK_VERTEX_SHADER_SOURCE =
+  "precision mediump float;\n"
   "uniform vec2 uImageSize;                                                       \n"
   "uniform vec2 uMaskSize;                                                        \n"
   "varying vec2 vMaskTexCoord;                                                    \n"
@@ -68,7 +69,7 @@ static void DoApply( ImageActor actor, const std::string& maskImage, const Vecto
   "}                                                                              \n";
 
   const char* ALPHA_MASK_FRAGMENT_SHADER_SOURCE =
-  "varying vec2 vMaskTexCoord;                                                    \n"
+  "varying mediump vec2 vMaskTexCoord;                                            \n"
   "                                                                               \n"
   "void main()                                                                    \n"
   "{                                                                              \n"
@@ -76,10 +77,11 @@ static void DoApply( ImageActor actor, const std::string& maskImage, const Vecto
   "  gl_FragColor = texture2D(sTexture, vTexCoord) * uColor * vec4(1,1,1,mask.a); \n"
   "}                                                                              \n";
 
-  ShaderEffect maskEffect = ShaderEffect::New( ALPHA_MASK_VERTEX_SHADER_SOURCE,
-                                               ALPHA_MASK_FRAGMENT_SHADER_SOURCE,
-                                               GeometryType( GEOMETRY_TYPE_IMAGE ),
-                                               ShaderEffect::GeometryHints( ShaderEffect::HINT_BLENDING ) );
+  ShaderEffect maskEffect = ShaderEffect::New(
+    ALPHA_MASK_VERTEX_SHADER_SOURCE,
+    ALPHA_MASK_FRAGMENT_SHADER_SOURCE,
+    GeometryType( GEOMETRY_TYPE_IMAGE ),
+    ShaderEffect::GeometryHints( ShaderEffect::HINT_BLENDING ) );
 
   maskEffect.SetEffectImage( Image::New( maskImage ) );
 
index e936106..eae9ac7 100644 (file)
@@ -60,6 +60,7 @@ PageTurnBookSpineEffect::~PageTurnBookSpineEffect()
 PageTurnBookSpineEffect PageTurnBookSpineEffect::New()
 {
   std::string vertexSource(
+  "precision mediump float;\n"
   "uniform float uShadowWidth;\n"
   "  void main()\n"
   "  {\n"
@@ -70,6 +71,7 @@ PageTurnBookSpineEffect PageTurnBookSpineEffect::New()
 
   // the simplified version of the fragment shader of page turn effect
   std::string fragmentSource(
+  "precision mediump float;\n"
   "uniform float uIsBackImageVisible;\n"
   "uniform float uPageWidth;\n"
   "uniform vec2 uSpineShadowParameter;\n"
@@ -99,7 +101,7 @@ PageTurnBookSpineEffect PageTurnBookSpineEffect::New()
   "  }" );
 
   ShaderEffect shader;
-  shader = ShaderEffect::New( vertexSource,fragmentSource );
+  shader = ShaderEffect::New( vertexSource, fragmentSource );
   PageTurnBookSpineEffect handle( shader );
   handle.SetUniform( IS_BACK_IMAGE_VISIBLE_PROPERTY_NAME, -1.f );
   handle.SetUniform( SHADOW_WIDTH_PROPERTY_NAME, DEFAULT_SHADOW_WIDTH );
index 43f2c02..cfbb685 100644 (file)
@@ -52,6 +52,7 @@ Ripple2DEffect Ripple2DEffect::New()
 {
     // append the default version
     std::string fragmentShader(
+        "precision mediump float;\n"
         "uniform float uAmplitude;\n"
         "uniform float uTime;\n"
         "void main()\n"
@@ -65,10 +66,9 @@ Ripple2DEffect Ripple2DEffect::New()
 
   // Create the implementation, temporarily owned on stack
   Dali::ShaderEffect shaderEffect =  Dali::ShaderEffect::New(
-      "",
-      fragmentShader,
-      Dali::GeometryType( GEOMETRY_TYPE_IMAGE ),
-      ShaderEffect::GeometryHints( ShaderEffect::HINT_BLENDING | ShaderEffect::HINT_GRID ));
+    "", fragmentShader,
+    Dali::GeometryType( GEOMETRY_TYPE_IMAGE ),
+    ShaderEffect::GeometryHints( ShaderEffect::HINT_BLENDING | ShaderEffect::HINT_GRID ));
 
   /* Pass ownership to Ripple2DEffect through overloaded constructor, So that it now has access to the
      Dali::ShaderEffect implementation */
index 5755dd3..2eef696 100644 (file)
@@ -56,12 +56,12 @@ SpotEffect SpotEffect::New()
       "\n"
       "void main()\n"
       "{\n"
-      "  vec4 world = vec4(aPosition, 1.0);\n"
+      "  mediump vec4 world = vec4(aPosition, 1.0);\n"
       "  \n"
-      "  vec2 d = vec2(world.xy - uCenter);\n"
-      "  float dist = length(d);\n"
+      "  mediump vec2 d = vec2(world.xy - uCenter);\n"
+      "  mediump float dist = length(d);\n"
       "  \n"
-      "  float range = (uRadius - dist) / (uRadius);\n"
+      "  mediump float range = (uRadius - dist) / (uRadius);\n"
       "  vRange = max(0.1, range);\n"
       "  \n"
       "  gl_Position = uMvpMatrix * world;\n"
index 89328fb..0d3d348 100644 (file)
@@ -51,18 +51,18 @@ SquareDissolveEffect SquareDissolveEffect::New()
 {
   // variable "uStep" range scope : [0.0, 1.0]
   std::string fragmentShader(
-      "uniform  vec2   texSize;                   \n"
-      "uniform  float  uStep;                     \n"
-      "uniform  float  uRows;                     \n"
-      "uniform  float  uColumns;                  \n"
-      "void main()                                \n"
-      "{                                          \n"
-      "  vec2 mosaicSize = vec2(1.0 / uRows, 1.0 / uColumns);                               \n"
-      "  vec2 intXY = vec2(vTexCoord.x * texSize.x, vTexCoord.y * texSize.y);               \n"
-      "  vec2 XYMosaic = vec2(floor(intXY.x / mosaicSize.x) * mosaicSize.x, floor(intXY.y / mosaicSize.y) * mosaicSize.y); \n"
-      "  vec2 UVMosaic = vec2(XYMosaic.x /texSize.x, XYMosaic.y / texSize.y);               \n"
-      "  vec4 noiseVec = texture2D(sEffect, UVMosaic);                                      \n"
-      "  float intensity = (noiseVec[0] + noiseVec[1] + noiseVec[2] + noiseVec[3]) / 4.0;   \n"
+      "uniform  mediump vec2   texSize;\n"
+      "uniform  mediump float  uStep;\n"
+      "uniform  mediump float  uRows;\n"
+      "uniform  mediump float  uColumns;\n"
+      "void main()\n"
+      "{\n"
+      "  mediump vec2 mosaicSize = vec2(1.0 / uRows, 1.0 / uColumns);                               \n"
+      "  mediump vec2 intXY = vec2(vTexCoord.x * texSize.x, vTexCoord.y * texSize.y);               \n"
+      "  mediump vec2 XYMosaic = vec2(floor(intXY.x / mosaicSize.x) * mosaicSize.x, floor(intXY.y / mosaicSize.y) * mosaicSize.y); \n"
+      "  mediump vec2 UVMosaic = vec2(XYMosaic.x /texSize.x, XYMosaic.y / texSize.y);               \n"
+      "  mediump vec4 noiseVec = texture2D(sEffect, UVMosaic);                                      \n"
+      "  mediump float intensity = (noiseVec[0] + noiseVec[1] + noiseVec[2] + noiseVec[3]) / 4.0;   \n"
       "  if(intensity < uStep)                                                              \n"
       "    gl_FragColor = vec4(0.1, 0.1, 0.1, 1.0);                                         \n"
       "  else                                                                               \n"
index a2624ba..67cf84d 100644 (file)
@@ -51,21 +51,21 @@ SwirlEffect SwirlEffect::New(bool warp)
 {
   // append the default version
   std::string fragmentShader(
-      "uniform vec2  uTextureSize;\n"
-      "uniform float uRadius;\n"
-      "uniform float uAngle;\n"
-      "uniform vec2  uCenter;\n"
+      "uniform mediump vec2  uTextureSize;\n"
+      "uniform highp float uRadius;\n"
+      "uniform highp float uAngle;\n"
+      "uniform mediump vec2  uCenter;\n"
       "void main()\n"
       "{\n"
-      "  vec2 textureCenter = (sTextureRect.xy + sTextureRect.zw) * 0.5;\n"
+      "  highp vec2 textureCenter = (sTextureRect.xy + sTextureRect.zw) * 0.5;\n"
       "  textureCenter = vTexCoord.st - textureCenter;\n"
-      "  float distance = length(textureCenter);\n"
+      "  highp float distance = length(textureCenter);\n"
       "  if (distance >= uRadius)\n"
       "     discard;\n"
-      "  float percent = (uRadius - distance) / uRadius;\n"
-      "  float theta = percent * percent * uAngle * 4.0;\n"
-      "  float sinTheta = sin(theta);\n"
-      "  float cosTheta = cos(theta);\n" );
+      "  highp float percent = (uRadius - distance) / uRadius;\n"
+      "  highp float theta = percent * percent * uAngle * 4.0;\n"
+      "  highp float sinTheta = sin(theta);\n"
+      "  highp float cosTheta = cos(theta);\n" );
       // if warp, loose the sign from sin
   if( warp )
   {
index deabf5c..00e35a7 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali-toolkit
 Summary:    The OpenGLES Canvas Core Library Toolkit
-Version:    1.0.16
+Version:    1.0.17
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0