Merge "Add Visual descriptions to generate doxygen page" into devel/master
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 17 Feb 2017 11:30:10 +0000 (03:30 -0800)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Fri, 17 Feb 2017 11:30:10 +0000 (03:30 -0800)
261 files changed:
automated-tests/resources/progress-bar-skin-indeterminate.png [new file with mode: 0644]
automated-tests/resources/progress-bar-skin-progress.png [new file with mode: 0644]
automated-tests/resources/progress-bar-skin-secondary-progress.png [new file with mode: 0644]
automated-tests/resources/progress-bar-skin-track.png [new file with mode: 0644]
automated-tests/src/dali-toolkit-internal/CMakeLists.txt [changed mode: 0644->0755]
automated-tests/src/dali-toolkit-internal/utc-Dali-ItemView-internal.cpp [new file with mode: 0755]
automated-tests/src/dali-toolkit-internal/utc-Dali-PropertyHelper.cpp [new file with mode: 0644]
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-MultiLanguage.cpp
automated-tests/src/dali-toolkit-styling/theme2.json [new file with mode: 0644]
automated-tests/src/dali-toolkit-styling/theme3.json [new file with mode: 0644]
automated-tests/src/dali-toolkit-styling/utc-Dali-StyleManager.cpp
automated-tests/src/dali-toolkit/CMakeLists.txt [changed mode: 0644->0755]
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-actor-utils.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-actor-utils.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-harness.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-native-image.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-native-image.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-platform-abstraction.cpp
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-platform-abstraction.h
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-trace-call-stack.cpp
automated-tests/src/dali-toolkit/utc-Dali-AccessibilityManager.cpp
automated-tests/src/dali-toolkit/utc-Dali-Builder.cpp
automated-tests/src/dali-toolkit/utc-Dali-Button.cpp
automated-tests/src/dali-toolkit/utc-Dali-Control.cpp
automated-tests/src/dali-toolkit/utc-Dali-ControlImpl.cpp
automated-tests/src/dali-toolkit/utc-Dali-ControlWrapper.cpp
automated-tests/src/dali-toolkit/utc-Dali-ImageView.cpp
automated-tests/src/dali-toolkit/utc-Dali-ItemLayout.cpp
automated-tests/src/dali-toolkit/utc-Dali-ItemView.cpp
automated-tests/src/dali-toolkit/utc-Dali-KeyInputFocusManager.cpp
automated-tests/src/dali-toolkit/utc-Dali-KeyboardFocusManager.cpp
automated-tests/src/dali-toolkit/utc-Dali-Popup.cpp
automated-tests/src/dali-toolkit/utc-Dali-ProgressBar.cpp
automated-tests/src/dali-toolkit/utc-Dali-ScrollBar.cpp
automated-tests/src/dali-toolkit/utc-Dali-ScrollView.cpp
automated-tests/src/dali-toolkit/utc-Dali-ScrollViewEffect.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextSelectionPopup.cpp
automated-tests/src/dali-toolkit/utc-Dali-ToggleButton.cpp [new file with mode: 0755]
automated-tests/src/dali-toolkit/utc-Dali-TransitionData.cpp
automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp
automated-tests/src/dali-toolkit/utc-Dali-VisualFactory.cpp
dali-toolkit/devel-api/builder/tree-node.cpp
dali-toolkit/devel-api/controls/buttons/toggle-button.cpp [new file with mode: 0644]
dali-toolkit/devel-api/controls/buttons/toggle-button.h [new file with mode: 0644]
dali-toolkit/devel-api/controls/control-depth-index-ranges.h
dali-toolkit/devel-api/controls/control-devel.h
dali-toolkit/devel-api/controls/control-wrapper-impl.cpp
dali-toolkit/devel-api/controls/control-wrapper-impl.h
dali-toolkit/devel-api/controls/control-wrapper.cpp
dali-toolkit/devel-api/controls/control-wrapper.h
dali-toolkit/devel-api/controls/progress-bar/progress-bar.h
dali-toolkit/devel-api/controls/text-controls/text-editor-devel.h [new file with mode: 0644]
dali-toolkit/devel-api/controls/text-controls/text-selection-toolbar.h
dali-toolkit/devel-api/file.list [changed mode: 0644->0755]
dali-toolkit/devel-api/visuals/visual-properties-devel.h
dali-toolkit/internal/builder/builder-impl.cpp
dali-toolkit/internal/builder/builder-impl.h
dali-toolkit/internal/builder/dictionary.h [new file with mode: 0644]
dali-toolkit/internal/builder/style.cpp [new file with mode: 0644]
dali-toolkit/internal/builder/style.h [new file with mode: 0644]
dali-toolkit/internal/builder/tree-node-manipulator.cpp
dali-toolkit/internal/controls/buttons/button-impl.cpp
dali-toolkit/internal/controls/buttons/button-impl.h
dali-toolkit/internal/controls/buttons/radio-button-impl.cpp
dali-toolkit/internal/controls/buttons/toggle-button-impl.cpp [new file with mode: 0755]
dali-toolkit/internal/controls/buttons/toggle-button-impl.h [new file with mode: 0644]
dali-toolkit/internal/controls/progress-bar/progress-bar-impl.cpp
dali-toolkit/internal/controls/progress-bar/progress-bar-impl.h
dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp
dali-toolkit/internal/controls/scrollable/item-view/depth-layout.cpp
dali-toolkit/internal/controls/scrollable/item-view/grid-layout.cpp
dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp
dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.h
dali-toolkit/internal/controls/scrollable/item-view/spiral-layout.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.h
dali-toolkit/internal/controls/scrollable/scrollable-impl.cpp
dali-toolkit/internal/controls/scrollable/scrollable-impl.h
dali-toolkit/internal/controls/table-view/table-view-impl.cpp
dali-toolkit/internal/controls/table-view/table-view-impl.h
dali-toolkit/internal/controls/text-controls/text-editor-impl.cpp
dali-toolkit/internal/controls/text-controls/text-editor-impl.h
dali-toolkit/internal/controls/text-controls/text-field-impl.cpp
dali-toolkit/internal/controls/text-controls/text-label-impl.cpp
dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.cpp
dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.h
dali-toolkit/internal/file.list [changed mode: 0644->0755]
dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.cpp
dali-toolkit/internal/helpers/property-helper.cpp [new file with mode: 0644]
dali-toolkit/internal/helpers/property-helper.h [new file with mode: 0644]
dali-toolkit/internal/image-loader/atlas-packer.cpp
dali-toolkit/internal/image-loader/image-atlas-impl.cpp
dali-toolkit/internal/image-loader/image-atlas-impl.h
dali-toolkit/internal/styling/style-manager-impl.cpp
dali-toolkit/internal/styling/style-manager-impl.h
dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp
dali-toolkit/internal/text/rendering/atlas/atlas-manager.h
dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp
dali-toolkit/internal/text/text-controller-impl.h
dali-toolkit/internal/text/text-controller.cpp
dali-toolkit/internal/text/text-controller.h
dali-toolkit/internal/text/text-model.cpp
dali-toolkit/internal/text/text-model.h
dali-toolkit/internal/text/text-vertical-scroller.cpp [new file with mode: 0644]
dali-toolkit/internal/text/text-vertical-scroller.h [new file with mode: 0644]
dali-toolkit/internal/visuals/animated-image/animated-image-visual.cpp
dali-toolkit/internal/visuals/animated-image/animated-image-visual.h
dali-toolkit/internal/visuals/border/border-visual.cpp
dali-toolkit/internal/visuals/border/border-visual.h
dali-toolkit/internal/visuals/color/color-visual.cpp
dali-toolkit/internal/visuals/color/color-visual.h
dali-toolkit/internal/visuals/gradient/gradient-visual.cpp
dali-toolkit/internal/visuals/image/batch-image-visual.cpp [deleted file]
dali-toolkit/internal/visuals/image/batch-image-visual.h [deleted file]
dali-toolkit/internal/visuals/image/image-visual.cpp
dali-toolkit/internal/visuals/image/image-visual.h
dali-toolkit/internal/visuals/mesh/mesh-visual.cpp
dali-toolkit/internal/visuals/mesh/mesh-visual.h
dali-toolkit/internal/visuals/npatch/npatch-visual.cpp
dali-toolkit/internal/visuals/primitive/primitive-visual.cpp
dali-toolkit/internal/visuals/primitive/primitive-visual.h
dali-toolkit/internal/visuals/svg/svg-visual.cpp
dali-toolkit/internal/visuals/text/text-visual.cpp
dali-toolkit/internal/visuals/text/text-visual.h
dali-toolkit/internal/visuals/visual-base-data-impl.cpp
dali-toolkit/internal/visuals/visual-base-data-impl.h
dali-toolkit/internal/visuals/visual-base-impl.cpp
dali-toolkit/internal/visuals/visual-base-impl.h
dali-toolkit/internal/visuals/visual-factory-cache.cpp
dali-toolkit/internal/visuals/visual-factory-cache.h
dali-toolkit/internal/visuals/visual-factory-impl.cpp
dali-toolkit/internal/visuals/visual-string-constants.cpp
dali-toolkit/internal/visuals/visual-string-constants.h
dali-toolkit/internal/visuals/wireframe/wireframe-visual.cpp
dali-toolkit/public-api/accessibility-manager/accessibility-manager.h
dali-toolkit/public-api/controls/alignment/alignment.h
dali-toolkit/public-api/controls/buttons/button.h
dali-toolkit/public-api/controls/buttons/check-box-button.h
dali-toolkit/public-api/controls/buttons/push-button.h
dali-toolkit/public-api/controls/buttons/radio-button.cpp
dali-toolkit/public-api/controls/buttons/radio-button.h
dali-toolkit/public-api/controls/control-impl.cpp
dali-toolkit/public-api/controls/control-impl.h
dali-toolkit/public-api/controls/control.h
dali-toolkit/public-api/controls/flex-container/flex-container.h
dali-toolkit/public-api/controls/image-view/image-view.h
dali-toolkit/public-api/controls/model3d-view/model3d-view.h
dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h
dali-toolkit/public-api/controls/scrollable/item-view/default-item-layout.h
dali-toolkit/public-api/controls/scrollable/item-view/item-factory.h
dali-toolkit/public-api/controls/scrollable/item-view/item-layout.cpp
dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h
dali-toolkit/public-api/controls/scrollable/item-view/item-view.h
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-constraints.h
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-page-path-effect.h
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.cpp
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h
dali-toolkit/public-api/controls/scrollable/scrollable.h
dali-toolkit/public-api/controls/slider/slider.h
dali-toolkit/public-api/controls/table-view/table-view.h
dali-toolkit/public-api/controls/text-controls/text-editor.h
dali-toolkit/public-api/controls/text-controls/text-field.h
dali-toolkit/public-api/controls/text-controls/text-label.h
dali-toolkit/public-api/controls/video-view/video-view.h
dali-toolkit/public-api/dali-toolkit-version.cpp
dali-toolkit/public-api/enums.h
dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h
dali-toolkit/public-api/image-loader/async-image-loader.h
dali-toolkit/public-api/image-loader/sync-image-loader.h
dali-toolkit/public-api/styling/style-manager.h
dali-toolkit/public-api/toolkit-property-index-ranges.h
dali-toolkit/public-api/visuals/image-visual-properties.h
dali-toolkit/public-api/visuals/visual-properties.h
dali-toolkit/styles/1920x1080/dali-toolkit-default-theme.json
dali-toolkit/styles/480x800/dali-toolkit-default-theme.json
dali-toolkit/styles/720x1280/dali-toolkit-default-theme.json
dali-toolkit/styles/images-common/progress-bar-skin-indeterminate.png [new file with mode: 0644]
dali-toolkit/styles/images-common/progress-bar-skin-progress.9.png [new file with mode: 0644]
dali-toolkit/styles/images-common/progress-bar-skin-secondary-progress.9.png [new file with mode: 0644]
dali-toolkit/styles/images-common/progress-bar-skin-track.9.png [new file with mode: 0644]
dali-toolkit/styles/images-common/progress-skin-progress.9.png [deleted file]
dali-toolkit/styles/images-common/progress-skin.9.png [deleted file]
dali-toolkit/styles/images-common/text_selection_scroll_indicator.9.png [new file with mode: 0644]
docs/content/images/visuals/HelloWorld.png [new file with mode: 0644]
docs/content/shared-javascript-and-cpp-documentation/creating-custom-controls.md
docs/content/shared-javascript-and-cpp-documentation/font-selection.md
docs/content/shared-javascript-and-cpp-documentation/visuals.md
packaging/dali-addon.spec
packaging/dali-toolkit.spec
plugins/dali-swig/.gitignore
plugins/dali-swig/Makefile.am
plugins/dali-swig/SWIG/dali-core.i
plugins/dali-swig/SWIG/dali-gc.i
plugins/dali-swig/SWIG/dali-toolkit.i
plugins/dali-swig/SWIG/dali.i
plugins/dali-swig/SWIG/devel-properties.i [new file with mode: 0755]
plugins/dali-swig/SWIG/doxygen.i [new file with mode: 0644]
plugins/dali-swig/SWIG/doxygen/scripts/Doxyfile [new file with mode: 0755]
plugins/dali-swig/SWIG/doxygen/scripts/GenerateIntermediate.sh [new file with mode: 0755]
plugins/dali-swig/SWIG/doxygen/scripts/README_C#_DOXY.txt [new file with mode: 0755]
plugins/dali-swig/SWIG/doxygen/scripts/doxy2swig_class.py [new file with mode: 0755]
plugins/dali-swig/SWIG/doxygen/scripts/doxy2swig_namespace.py_ [new file with mode: 0755]
plugins/dali-swig/SWIG/doxygen/scripts/doxy2swig_struct.py_ [new file with mode: 0755]
plugins/dali-swig/SWIG/doxygen/scripts/genDoxy.sh [new file with mode: 0755]
plugins/dali-swig/SWIG/events/accessibilitymanager-event.i
plugins/dali-swig/SWIG/events/actor-event.i
plugins/dali-swig/SWIG/events/application-event.i
plugins/dali-swig/SWIG/events/builder-event.i
plugins/dali-swig/SWIG/events/button-event.i
plugins/dali-swig/SWIG/events/control-event.i
plugins/dali-swig/SWIG/events/padding.i [new file with mode: 0644]
plugins/dali-swig/SWIG/events/rectangle.i [new file with mode: 0644]
plugins/dali-swig/SWIG/events/rectinteger.i [deleted file]
plugins/dali-swig/SWIG/events/stage-event.i
plugins/dali-swig/SWIG/gestures/gesture.i [new file with mode: 0644]
plugins/dali-swig/SWIG/gestures/hover.i [new file with mode: 0644]
plugins/dali-swig/SWIG/gestures/key.i [new file with mode: 0644]
plugins/dali-swig/SWIG/gestures/long-press-gesture.i [new file with mode: 0644]
plugins/dali-swig/SWIG/gestures/pan-gesture.i [new file with mode: 0644]
plugins/dali-swig/SWIG/gestures/pinch-gesture.i [new file with mode: 0644]
plugins/dali-swig/SWIG/gestures/tap-gesture.i [new file with mode: 0644]
plugins/dali-swig/SWIG/gestures/touch.i [new file with mode: 0644]
plugins/dali-swig/SWIG/gestures/wheel.i [new file with mode: 0644]
plugins/dali-swig/SWIG/property-value.i [new file with mode: 0644]
plugins/dali-swig/SWIG/signal-parameters.i
plugins/dali-swig/examples/control-dashboard.cs
plugins/dali-swig/examples/custom-control.cs
plugins/dali-swig/examples/dali-test.cs
plugins/dali-swig/examples/date-picker-using-json.cs [new file with mode: 0644]
plugins/dali-swig/examples/date-picker.cs [new file with mode: 0644]
plugins/dali-swig/examples/hello-world.cs
plugins/dali-swig/examples/image-view.cs
plugins/dali-swig/examples/images/star-mod.png [new file with mode: 0644]
plugins/dali-swig/examples/json-loader.cs [new file with mode: 0644]
plugins/dali-swig/examples/json/control-dashboard.json [new file with mode: 0644]
plugins/dali-swig/examples/json/date-picker-template.json [new file with mode: 0644]
plugins/dali-swig/examples/json/date-picker.json [new file with mode: 0644]
plugins/dali-swig/examples/json/spin.json [new file with mode: 0644]
plugins/dali-swig/examples/scroll-view.cs
plugins/dali-swig/examples/spin-control.cs [deleted file]
plugins/dali-swig/examples/user-alphafunction.cs
plugins/dali-swig/manual/cpp/devel-property-wrap.cpp [new file with mode: 0755]
plugins/dali-swig/manual/cpp/view-wrapper-impl-wrap.cpp
plugins/dali-swig/manual/csharp/CustomView.cs
plugins/dali-swig/manual/csharp/DaliEnumConstants.cs
plugins/dali-swig/manual/csharp/ManualPINVOKE.cs
plugins/dali-swig/manual/csharp/PropertyRangeManager.cs [new file with mode: 0644]
plugins/dali-swig/manual/csharp/ViewRegistry.cs [new file with mode: 0644]
plugins/dali-swig/manual/csharp/ViewRegistryHelper.cs [new file with mode: 0644]
plugins/dali-swig/manual/csharp/ViewWrapper.cs
plugins/dali-swig/manual/csharp/ViewWrapperImpl.cs
plugins/dali-swig/property-wrapper.rb
plugins/dali-swig/views/spin.cs [new file with mode: 0644]

diff --git a/automated-tests/resources/progress-bar-skin-indeterminate.png b/automated-tests/resources/progress-bar-skin-indeterminate.png
new file mode 100644 (file)
index 0000000..df99c15
Binary files /dev/null and b/automated-tests/resources/progress-bar-skin-indeterminate.png differ
diff --git a/automated-tests/resources/progress-bar-skin-progress.png b/automated-tests/resources/progress-bar-skin-progress.png
new file mode 100644 (file)
index 0000000..f73b14f
Binary files /dev/null and b/automated-tests/resources/progress-bar-skin-progress.png differ
diff --git a/automated-tests/resources/progress-bar-skin-secondary-progress.png b/automated-tests/resources/progress-bar-skin-secondary-progress.png
new file mode 100644 (file)
index 0000000..f0ae311
Binary files /dev/null and b/automated-tests/resources/progress-bar-skin-secondary-progress.png differ
diff --git a/automated-tests/resources/progress-bar-skin-track.png b/automated-tests/resources/progress-bar-skin-track.png
new file mode 100644 (file)
index 0000000..a22e7c2
Binary files /dev/null and b/automated-tests/resources/progress-bar-skin-track.png differ
old mode 100644 (file)
new mode 100755 (executable)
index fc24948..f07653b
@@ -22,6 +22,8 @@ SET(TC_SOURCES
  utc-Dali-Text-Typesetter.cpp
  utc-Dali-Text-ViewModel.cpp
  utc-Dali-DebugRendering.cpp
+ utc-Dali-ItemView-internal.cpp
+ utc-Dali-PropertyHelper.cpp
 )
 
 # Append list of test harness files (Won't get parsed for test cases)
diff --git a/automated-tests/src/dali-toolkit-internal/utc-Dali-ItemView-internal.cpp b/automated-tests/src/dali-toolkit-internal/utc-Dali-ItemView-internal.cpp
new file mode 100755 (executable)
index 0000000..1ee8077
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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>
+
+// Need to override adaptor classes for toolkit test harness, so include
+// test harness headers before dali headers.
+#include <dali-toolkit-test-suite-utils.h>
+
+#include <dali.h>
+#include <dali-toolkit/dali-toolkit.h>
+#include <dali-toolkit/devel-api/controls/scrollable/item-view/default-item-layout-property.h>
+
+#include <dali-toolkit/internal/controls/scrollable/item-view/grid-layout.h>
+#include <dali-toolkit/devel-api/controls/scrollable/item-view/item-view-devel.h>
+
+
+using namespace Dali;
+using namespace Toolkit;
+
+namespace
+{
+const unsigned int TOTAL_ITEM_NUMBER = 200;
+const char* TEST_IMAGE_FILE_NAME = "gallery_image_01.jpg";
+
+
+// Implementation of ItemFactory for providing actors to ItemView
+class TestItemFactory : public ItemFactory
+{
+public:
+
+  /**
+   * Constructor
+   * @param application class, stored as reference
+   */
+  TestItemFactory()
+  {
+  }
+
+  /**
+   * Virtual destructor.
+   */
+  virtual ~TestItemFactory()
+  {
+  }
+
+public: // From ItemFactory
+
+  /**
+   * Query the number of items available from the factory.
+   * The maximum available item has an ID of GetNumberOfItems() - 1.
+   */
+  virtual unsigned int GetNumberOfItems()
+  {
+    return TOTAL_ITEM_NUMBER;
+  }
+
+  /**
+   * Create an Actor to represent a visible item.
+   * @param itemId
+   * @return the created actor.
+   */
+  virtual Actor NewItem(unsigned int itemId)
+  {
+    // Create a renderable actor for this item
+    Image image = ResourceImage::New( TEST_IMAGE_FILE_NAME );
+    Actor actor = CreateRenderableActor(image);
+
+    return actor;
+  }
+};
+
+}
+
+int UtcDaliItemLayoutCheckPropertiesSetBeforeActivateLayout(void)
+{
+  ToolkitTestApplication application;
+
+  TestItemFactory factory;
+  ItemView view = ItemView::New(factory);
+
+  Property::Map gridLayoutProperty;
+  gridLayoutProperty.Insert( DefaultItemLayoutProperty::TYPE, Dali::Property::Value((int)DefaultItemLayout::GRID) );
+
+  //Set the column of grid-layout.
+  gridLayoutProperty.Insert( DefaultItemLayoutProperty::GRID_COLUMN_NUMBER, Dali::Property::Value(6) );
+
+  Property::Array layoutArray;
+
+  layoutArray.PushBack(gridLayoutProperty);
+
+  view.SetProperty( DevelItemView::Property::LAYOUT, layoutArray);
+
+  Dali::Toolkit::Internal::GridLayout* gridLayout = dynamic_cast<Dali::Toolkit::Internal::GridLayout*>(view.GetLayout(0).Get());
+
+  Dali::Stage stage = Dali::Stage::GetCurrent();
+  Vector3 stageSize(stage.GetSize());
+
+  //Check if the number of columns is equals to 6 which is set before.
+  DALI_TEST_EQUALS(gridLayout->GetNumberOfColumns(), 6, TEST_LOCATION );
+  view.ActivateLayout(0, stageSize, 0.0f);
+  END_TEST;
+
+}
diff --git a/automated-tests/src/dali-toolkit-internal/utc-Dali-PropertyHelper.cpp b/automated-tests/src/dali-toolkit-internal/utc-Dali-PropertyHelper.cpp
new file mode 100644 (file)
index 0000000..58fc510
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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-test-suite-utils.h>
+#include <dali-toolkit/internal/helpers/property-helper.h>
+
+using namespace Dali;
+using namespace Dali::Toolkit;
+
+void dali_property_helper_startup(void)
+{
+  test_return_value = TET_UNDEF;
+}
+
+void dali_property_helper_cleanup(void)
+{
+  test_return_value = TET_PASS;
+}
+
+int UtcDaliPropertyHelperGetStringFromPropertyWithString(void)
+{
+  tet_infoline( "Test to check if a simple string is parsed correctly" );
+
+  const std::string inputString = "Hello World";
+  Property::Value value( inputString );
+
+  std::string output;
+  DALI_TEST_CHECK( Toolkit::Internal::GetStringFromProperty( value, output ) );
+  DALI_TEST_EQUALS( output, inputString, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliPropertyHelperGetStringFromPropertyWithEmptyValue(void)
+{
+  tet_infoline( "Test to ensure if an empty value returns false" );
+
+  std::string output;
+  DALI_TEST_CHECK( ! Toolkit::Internal::GetStringFromProperty( Property::Value(), output ) );
+
+  END_TEST;
+}
+
+int UtcDaliPropertyHelperGetStringFromPropertyWithStringArray(void)
+{
+  tet_infoline( "Test to check if a string array is parsed correctly and adds new line characters too" );
+
+  Property::Value value( Property::Array().Add( "Hello World" )
+                                          .Add( "The Quick Brown Fox" )
+                                          .Add( "Jumps over the lazy dog" ) );
+
+  std::string output;
+  DALI_TEST_CHECK( Toolkit::Internal::GetStringFromProperty( value, output ) );
+  DALI_TEST_CHECK( output.find( "Hello World\n" ) != std::string::npos );
+  DALI_TEST_CHECK( output.find( "The Quick Brown Fox\n" ) != std::string::npos );
+  DALI_TEST_CHECK( output.find( "Jumps over the lazy dog\n" ) != std::string::npos );
+
+  END_TEST;
+}
+
+int UtcDaliPropertyHelperGetStringFromPropertyWithEmptyArray(void)
+{
+  tet_infoline( "Test to check if an empty array returns false" );
+
+  Property::Array array;
+
+  std::string output;
+  DALI_TEST_CHECK( ! Toolkit::Internal::GetStringFromProperty( Property::Value( array ), output ) );
+
+  END_TEST;
+}
+
+int UtcDaliPropertyHelperGetStringFromPropertyWithMultipleTypesInArray(void)
+{
+  tet_infoline( "Test to ensure an array with multiple types returns false" );
+
+  Property::Value value( Property::Array().Add( "Hello World" )
+                                          .Add( "The Quick Brown Fox" )
+                                          .Add( 1 )
+                                          .Add( "Jumps" )
+                                          .Add( 25 )
+                                          .Add( "Over" ) );
+
+  std::string output;
+  DALI_TEST_CHECK( ! Toolkit::Internal::GetStringFromProperty( value, output ) );
+  DALI_TEST_CHECK( output.empty() );
+
+  END_TEST;
+}
index 3be899f..eba6b05 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -106,23 +106,6 @@ struct ValidateFontsData
 };
 
 //////////////////////////////////////////////////////////
-void PrintFontDescription( FontId id )
-{
-  TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
-
-  TextAbstraction::FontDescription description;
-  fontClient.GetDescription( id, description );
-
-  const TextAbstraction::PointSize26Dot6 pointSize = fontClient.GetPointSize( id );
-
-  std::cout << std::endl << "  font description for font id : " << id << std::endl;
-  std::cout << "  font family : [" << description.family << "]" << std::endl;
-  std::cout << "   font width : [" << TextAbstraction::FontWidth::Name[description.width] << "]" << std::endl;
-  std::cout << "  font weight : [" << TextAbstraction::FontWeight::Name[description.weight] << "]" << std::endl;
-  std::cout << "   font slant : [" << TextAbstraction::FontSlant::Name[description.slant] << "]" << std::endl;
-  std::cout << "    font size : " << pointSize << std::endl;
-}
-
 bool MergeFontDescriptionsTest( const MergeFontDescriptionsData& data )
 {
   TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
diff --git a/automated-tests/src/dali-toolkit-styling/theme2.json b/automated-tests/src/dali-toolkit-styling/theme2.json
new file mode 100644 (file)
index 0000000..8ca44cd
--- /dev/null
@@ -0,0 +1,9 @@
+{
+  "styles":
+  {
+    "testbutton":
+    {
+      "backgroundColor":[1.0,1.0,0.0,1.0]
+    }
+  }
+}
diff --git a/automated-tests/src/dali-toolkit-styling/theme3.json b/automated-tests/src/dali-toolkit-styling/theme3.json
new file mode 100644 (file)
index 0000000..68a292e
--- /dev/null
@@ -0,0 +1,10 @@
+{
+  "styles":
+  {
+    "testbutton":
+    {
+      "backgroundColor":[1.0,1.0,0.0,1.0]
+// Deliberate Error: trailing comma
+    },
+  },
+}
index 8d93d9c..6fe0fde 100644 (file)
@@ -1,4 +1,4 @@
-/*
+ /*
  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -25,6 +25,9 @@
 #include <test-button.h>
 #include <test-animation-data.h>
 #include <toolkit-style-monitor.h>
+#include <dummy-control.h>
+#include <dali-toolkit/devel-api/controls/control-devel.h>
+#include <dali-toolkit/devel-api/visual-factory/visual-base.h>
 
 using namespace Dali;
 using namespace Dali::Toolkit;
@@ -33,6 +36,10 @@ namespace
 {
 const char* defaultTheme =
 "{\n"
+"  \"constants\":\n"
+"  {\n"
+"    \"CONFIG_SCRIPT_LOG_LEVEL\":\"NoLogging\"\n"
+"  },\n"
 "  \"styles\":\n"
 "  {\n"
 "    \"textlabel\":\n"
@@ -146,6 +153,223 @@ const char* defaultTheme =
 "      \"grabHandleImage\" : \"{DALI_STYLE_IMAGE_DIR}cursor_handler_drop_center.png\",\n"
 "      \"selectionHandleImageLeft\" : {\"filename\":\"{DALI_STYLE_IMAGE_DIR}selection_handle_drop_left.png\" },\n"
 "      \"selectionHandleImageRight\": {\"filename\":\"{DALI_STYLE_IMAGE_DIR}selection_handle_drop_right.png\" }\n"
+"    },\n"
+"    \"ComplexControl\":\n"
+"    {\n"
+"      \"states\":\n"
+"      {\n"
+"        \"NORMAL\":\n"
+"        {\n"
+"          \"states\":\n"
+"          {\n"
+"            \"SELECTED\":\n"
+"            {\n"
+"              \"visuals\":\n"
+"              {\n"
+"                \"foregroundVisual\":\n"
+"                {\n"
+"                  \"visualType\":\"GRADIENT\",\n"
+"                  \"startPosition\": [-1, -1],\n"
+"                  \"endPosition\": [1, 1],\n"
+"                  \"spreadMethod\": \"REPEAT\",\n"
+"                  \"stopOffset\": [0.2, 0.8],\n"
+"                  \"stopColor\": [ [ 1,0,0,1], [0,1,0,1] ]\n"
+"                }\n"
+"              }\n"
+"            },\n"
+"            \"UNSELECTED\":\n"
+"            {\n"
+"              \"visuals\":\n"
+"              {\n"
+"                \"foregroundVisual\":\n"
+"                {\n"
+"                  \"visualType\":\"COLOR\",\n"
+"                  \"mixColor\": [ 1,0,0,1]\n"
+"                }\n"
+"              }\n"
+"            }\n"
+"          },\n"
+"          \"transitions\":\n"
+"          {\n"
+"            \"visualName\":\"*\",\n"
+"            \"effect\":\"CROSSFADE\",\n"
+"            \"animator\":\n"
+"            {\n"
+"              \"alphaFunction\":\"EASE_IN_OUT\",\n"
+"              \"duration\":0.3\n"
+"            }\n"
+"          }\n"
+"        },\n"
+"        \"FOCUSED\":\n"
+"        {\n"
+"          \"visuals\":\n"
+"          {\n"
+"            \"foregroundVisual\":\n"
+"            {\n"
+"              \"visualType\":\"GRADIENT\",\n"
+"              \"startPosition\": [-1, -1],\n"
+"              \"endPosition\": [1, 1],\n"
+"              \"spreadMethod\": \"REPEAT\",\n"
+"              \"stopOffset\": [0.3, 0.9],\n"
+"              \"stopColor\": [ [ 0,0,1,1], [0,1,1,1] ]\n"
+"            },\n"
+"            \"focusVisual\":\n"
+"            {\n"
+"              \"visualType\":\"IMAGE\",\n"
+"              \"url\": \"focus.png\"\n"
+"            }\n"
+"          },\n"
+"          \"entryTransition\":\n"
+"          {\n"
+"            \"target\":\"focusVisual\",\n"
+"            \"property\":\"mixColor\",\n"
+"            \"initialValue\":[0,0,0,0],\n"
+"            \"targetValue\":[1,1,1,1],\n"
+"            \"animator\":\n"
+"            {\n"
+"              \"alphaFunction\":\"EASE_IN_OUT_SINE\",\n"
+"              \"timePeriod\": \n"
+"              {\n"
+"                \"duration\":0.5,\n"
+"                \"delay\":0\n"
+"              }\n"
+"            }\n"
+"          },\n"
+"          \"exitTransition\":\n"
+"          {\n"
+"            \"target\":\"focusVisual\",\n"
+"            \"property\":\"mixColor\",\n"
+"            \"initialValue\":[1,1,1,1],\n"
+"            \"targetValue\":[0,0,0,0],\n"
+"            \"animator\":\n"
+"            {\n"
+"              \"alphaFunction\":\"EASE_IN_OUT_SINE\",\n"
+"              \"timePeriod\": \n"
+"              {\n"
+"                \"duration\":0.5,\n"
+"                \"delay\":0\n"
+"              }\n"
+"            }\n"
+"          }\n"
+"        },\n"
+"        \"DISABLED\":\n"
+"        {\n"
+"          \"visuals\":\n"
+"          {\n"
+"            \"foregroundVisual\":\n"
+"            {\n"
+"              \"visualType\":\"COLOR\",\n"
+"              \"mixColor\": [1,0,0,1]\n"
+"            }\n"
+"          }\n"
+"        }\n"
+"      },\n"
+"      \"transitions\":\n"
+"      [\n"
+"        {\n"
+"          \"effect\":\"CROSSFADE\",\n"
+"          \"animator\":\n"
+"          {\n"
+"            \"alphaFunction\":\"EASE_IN_OUT\",\n"
+"            \"duration\":0.3\n"
+"          }\n"
+"        }\n"
+"      ]\n"
+"    },\n"
+"    \"BasicControl\":\n"
+"    {\n"
+"      \"states\":\n"
+"      {\n"
+"        \"NORMAL\":\n"
+"        {\n"
+"          \"visuals\":\n"
+"          {\n"
+"            \"foregroundVisual\":\n"
+"            {\n"
+"              \"visualType\":\"GRADIENT\",\n"
+"              \"startPosition\": [-1, -1],\n"
+"              \"endPosition\": [1, 1],\n"
+"              \"spreadMethod\": \"REPEAT\",\n"
+"              \"stopOffset\": [0.2, 0.8],\n"
+"              \"stopColor\": [ [ 1,0,0,1], [0,1,0,1] ]\n"
+"            }\n"
+"          }\n"
+"        },\n"
+"        \"FOCUSED\":\n"
+"        {\n"
+"          \"visuals\":\n"
+"          {\n"
+"            \"foregroundVisual\":\n"
+"            {\n"
+"              \"visualType\":\"GRADIENT\",\n"
+"              \"startPosition\": [-1, -1],\n"
+"              \"endPosition\": [1, 1],\n"
+"              \"spreadMethod\": \"REPEAT\",\n"
+"              \"stopOffset\": [0.3, 0.9],\n"
+"              \"stopColor\": [ [ 0,0,1,1], [0,1,1,1] ]\n"
+"            },\n"
+"            \"focusVisual\":\n"
+"            {\n"
+"              \"visualType\":\"IMAGE\",\n"
+"              \"url\": \"focus.png\"\n"
+"            }\n"
+"          },\n"
+"          \"entryTransition\":\n"
+"          {\n"
+"            \"target\":\"focusVisual\",\n"
+"            \"property\":\"mixColor\",\n"
+"            \"initialValue\":[0,0,0,0],\n"
+"            \"targetValue\":[1,1,1,1],\n"
+"            \"animator\":\n"
+"            {\n"
+"              \"alphaFunction\":\"EASE_IN_OUT_SINE\",\n"
+"              \"timePeriod\": \n"
+"              {\n"
+"                \"duration\":0.5,\n"
+"                \"delay\":0\n"
+"              }\n"
+"            }\n"
+"          },\n"
+"          \"exitTransition\":\n"
+"          {\n"
+"            \"target\":\"focusVisual\",\n"
+"            \"property\":\"mixColor\",\n"
+"            \"initialValue\":[1,1,1,1],\n"
+"            \"targetValue\":[0,0,0,0],\n"
+"            \"animator\":\n"
+"            {\n"
+"              \"alphaFunction\":\"EASE_IN_OUT_SINE\",\n"
+"              \"timePeriod\": \n"
+"              {\n"
+"                \"duration\":0.5,\n"
+"                \"delay\":0\n"
+"              }\n"
+"            }\n"
+"          }\n"
+"        },\n"
+"        \"DISABLED\":\n"
+"        {\n"
+"          \"visuals\":\n"
+"          {\n"
+"            \"foregroundVisual\":\n"
+"            {\n"
+"              \"visualType\":\"COLOR\",\n"
+"              \"mixColor\": [1,0,0,1]\n"
+"            }\n"
+"          }\n"
+"        }\n"
+"      },\n"
+"      \"transitions\":\n"
+"      [\n"
+"        {\n"
+"          \"effect\":\"CROSSFADE\",\n"
+"          \"animator\":\n"
+"          {\n"
+"            \"alphaFunction\":\"EASE_IN_OUT\",\n"
+"            \"duration\":0.3\n"
+"          }\n"
+"        }\n"
+"      ]\n"
 "    }\n"
 "  }\n"
 "}\n";
@@ -154,6 +378,7 @@ const char* defaultTheme =
 
 
 
+
 void dali_style_manager_startup(void)
 {
   test_return_value = TET_UNDEF;
@@ -258,6 +483,10 @@ int UtcDaliStyleManagerApplyTheme(void)
 
   const char* json1 =
     "{\n"
+    "  \"constants\":\n"
+    "  {\n"
+    "    \"CONFIG_SCRIPT_LOG_LEVEL\":\"Verbose\"\n"
+    "  },\n"
     "  \"styles\":\n"
     "  {\n"
     "    \"testbutton\":\n"
@@ -362,6 +591,10 @@ int UtcDaliStyleManagerApplyDefaultTheme(void)
 
   const char* defaultTheme =
     "{\n"
+    "  \"constants\":\n"
+    "  {\n"
+    "    \"CONFIG_SCRIPT_LOG_LEVEL\":\"Concise\"\n"
+    "  },\n"
     "  \"styles\":\n"
     "  {\n"
     "    \"testbutton\":\n"
@@ -505,6 +738,10 @@ int UtcDaliStyleManagerApplyStyle(void)
 
   const char* json1 =
     "{\n"
+    "  \"constants\":\n"
+    "  {\n"
+    "    \"CONFIG_SCRIPT_LOG_LEVEL\":\"General\"\n"
+    "  },\n"
     "  \"styles\":\n"
     "  {\n"
     "    \"testbutton\":\n"
@@ -574,6 +811,107 @@ int UtcDaliStyleManagerApplyStyle(void)
 }
 
 
+int UtcDaliStyleManagerIncludeStyleP(void)
+{
+  ToolkitTestApplication application;
+
+  tet_infoline( "UtcDaliStyleManagerIncludeStyle - test that style sheet inclusion works" );
+
+  const char* json1 =
+    "{\n"
+    "  \"includes\":\n"
+    "  [\n"
+    "     \"src/dali-toolkit-styling/theme2.json\"\n"
+    "  ],\n"
+    "  \"styles\":\n"
+    "  {\n"
+    "    \"testbutton\":\n"
+    "    {\n"
+    "      \"foregroundColor\":[0.0,0.0,1.0,1.0]\n"
+    "    }\n"
+    "  }\n"
+    "}\n";
+
+  // Add 2 buttons
+  Test::TestButton testButton = Test::TestButton::New();
+  Test::TestButton testButton2 = Test::TestButton::New();
+  Stage::GetCurrent().Add( testButton );
+  Stage::GetCurrent().Add( testButton2 );
+  StyleChangedSignalChecker styleChangedSignalHandler;
+  StyleManager styleManager = StyleManager::Get();
+
+  styleManager.StyleChangedSignal().Connect(&styleChangedSignalHandler, &StyleChangedSignalChecker::OnStyleChanged);
+
+  tet_infoline("Apply the style");
+
+  std::string themeFile("ThemeOne");
+  Test::StyleMonitor::SetThemeFileOutput(themeFile, json1);
+
+  styleManager.ApplyTheme(themeFile);
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  Property::Value themedBgColor( testButton.GetProperty(Test::TestButton::Property::BACKGROUND_COLOR) );
+  Property::Value themedFgColor( testButton.GetProperty(Test::TestButton::Property::FOREGROUND_COLOR) );
+
+  DALI_TEST_EQUALS( themedBgColor, Property::Value(Color::YELLOW), 0.001, TEST_LOCATION );
+  DALI_TEST_EQUALS( themedFgColor, Property::Value(Color::BLUE), 0.001, TEST_LOCATION );
+
+  END_TEST;
+}
+
+
+int UtcDaliStyleManagerIncludeStyleN(void)
+{
+  ToolkitTestApplication application;
+
+  tet_infoline( "UtcDaliStyleManagerIncludeStyle - test that style sheet inclusion works, but included stylesheet is bad json" );
+
+  const char* json1 =
+    "{\n"
+    "  \"includes\":\n"
+    "  [\n"
+    "     \"src/dali-toolkit-styling/theme3.json\"\n"
+    "  ],\n"
+    "  \"styles\":\n"
+    "  {\n"
+    "    \"testbutton\":\n"
+    "    {\n"
+    "      \"foregroundColor\":[0.0,0.0,1.0,1.0]\n"
+    "    }\n"
+    "  }\n"
+    "}\n";
+
+  // Add 2 buttons
+  Test::TestButton testButton = Test::TestButton::New();
+  Test::TestButton testButton2 = Test::TestButton::New();
+  Stage::GetCurrent().Add( testButton );
+  Stage::GetCurrent().Add( testButton2 );
+  StyleChangedSignalChecker styleChangedSignalHandler;
+  StyleManager styleManager = StyleManager::Get();
+
+  styleManager.StyleChangedSignal().Connect(&styleChangedSignalHandler, &StyleChangedSignalChecker::OnStyleChanged);
+
+  tet_infoline("Apply the style");
+
+  std::string themeFile("ThemeOne");
+  Test::StyleMonitor::SetThemeFileOutput(themeFile, json1);
+
+  try
+  {
+    styleManager.ApplyTheme(themeFile);
+  }
+  catch( Dali::DaliException& e )
+  {
+    DALI_TEST_ASSERT( e, "!\"Cannot parse JSON\"", TEST_LOCATION );
+  }
+
+  END_TEST;
+}
+
+
 int UtcDaliStyleManagerStyleChangedSignalFontFamily(void)
 {
   tet_infoline("Test that the StyleChange signal is fired when the font family is altered" );
@@ -860,3 +1198,85 @@ int UtcDaliStyleManagerStyleChangedSignalFontSizeTextEditor(void)
 
   END_TEST;
 }
+
+
+int UtcDaliStyleManagerVisualTransitionParsing(void)
+{
+  tet_infoline("Instantiate dummy control and test state/visual/transition capture" );
+  Test::StyleMonitor::SetThemeFileOutput( DALI_STYLE_DIR "dali-toolkit-default-theme.json",
+                                          defaultTheme );
+
+  ToolkitTestApplication application;
+
+  StyleChangedSignalChecker styleChangedSignalHandler;
+  Dali::StyleMonitor styleMonitor = Dali::StyleMonitor::Get();
+  StyleManager styleManager = StyleManager::Get();
+
+  DummyControl actor = DummyControl::New(true);
+  actor.SetStyleName("BasicControl");
+  Stage::GetCurrent().Add(actor);
+
+  Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
+
+  DALI_TEST_EQUALS(dummyImpl.IsVisualEnabled(DummyControl::Property::FOREGROUND_VISUAL), true, TEST_LOCATION);
+  Visual::Base visual1 = dummyImpl.GetVisual(DummyControl::Property::FOREGROUND_VISUAL);
+
+  actor.SetProperty( DevelControl::Property::STATE, DevelControl::FOCUSED );
+
+  DALI_TEST_EQUALS(dummyImpl.IsVisualEnabled(DummyControl::Property::FOREGROUND_VISUAL), true, TEST_LOCATION);
+  DALI_TEST_EQUALS(dummyImpl.IsVisualEnabled(DummyControl::Property::FOCUS_VISUAL), true, TEST_LOCATION);
+
+  Visual::Base visual2 = dummyImpl.GetVisual(DummyControl::Property::FOREGROUND_VISUAL);
+  DALI_TEST_CHECK( visual1 != visual2 );
+
+  actor.SetProperty( DevelControl::Property::STATE, DevelControl::DISABLED );
+
+  DALI_TEST_EQUALS(dummyImpl.IsVisualEnabled(DummyControl::Property::FOREGROUND_VISUAL), true, TEST_LOCATION);
+
+  Visual::Base visual3 = dummyImpl.GetVisual(DummyControl::Property::FOREGROUND_VISUAL);
+  Visual::Base focusVisual = dummyImpl.GetVisual(DummyControl::Property::FOCUS_VISUAL);
+  DALI_TEST_CHECK( !focusVisual );
+  DALI_TEST_EQUALS(dummyImpl.IsVisualEnabled(DummyControl::Property::FOCUS_VISUAL), false, TEST_LOCATION);
+
+  DALI_TEST_CHECK( visual1 != visual3 );
+  DALI_TEST_CHECK( visual2 != visual3 );
+
+  END_TEST;
+}
+
+
+int UtcDaliStyleManagerVisualTransitionParsing02(void)
+{
+  tet_infoline("Instantiate dummy control and test state/visual/transition capture" );
+  Test::StyleMonitor::SetThemeFileOutput( DALI_STYLE_DIR "dali-toolkit-default-theme.json",
+                                          defaultTheme );
+
+  ToolkitTestApplication application;
+
+  StyleChangedSignalChecker styleChangedSignalHandler;
+  Dali::StyleMonitor styleMonitor = Dali::StyleMonitor::Get();
+  StyleManager styleManager = StyleManager::Get();
+
+  DummyControl actor = DummyControl::New(true);
+  actor.SetProperty(DevelControl::Property::STATE, "FOCUSED");
+
+  actor.SetStyleName("ComplexControl");
+  Stage::GetCurrent().Add(actor);
+
+  Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
+
+  DALI_TEST_EQUALS(dummyImpl.IsVisualEnabled(DummyControl::Property::FOREGROUND_VISUAL), true, TEST_LOCATION);
+  Visual::Base visual1 = dummyImpl.GetVisual(DummyControl::Property::FOREGROUND_VISUAL);
+  DALI_TEST_CHECK( visual1 );
+  Property::Map map;
+  visual1.CreatePropertyMap( map );
+  Property::Value* value = map.Find( Visual::Property::TYPE );
+  DALI_TEST_CHECK( value );
+
+  int visualType;
+  value->Get( visualType );
+
+  DALI_TEST_EQUALS( visualType, (int)Toolkit::Visual::GRADIENT, TEST_LOCATION );
+
+  END_TEST;
+}
old mode 100644 (file)
new mode 100755 (executable)
index 1297575..97975d1
@@ -48,6 +48,7 @@ SET(TC_SOURCES
    utc-Dali-ProgressBar.cpp
    utc-Dali-PushButton.cpp
    utc-Dali-RadioButton.cpp
+   utc-Dali-ToggleButton.cpp
    utc-Dali-ScrollViewEffect.cpp
    utc-Dali-SuperBlurView.cpp
    utc-Dali-Toolkit.cpp
index b50f506..8877a50 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -338,6 +338,21 @@ BufferImage CreateBufferImage()
   return CreateBufferImage(4, 4, Color::WHITE);
 }
 
+void PrepareResourceImage( TestApplication& application, unsigned int imageWidth, unsigned int imageHeight, Pixel::Format pixelFormat )
+{
+  TestPlatformAbstraction& platform = application.GetPlatform();
+  platform.SetClosestImageSize(Vector2( imageWidth, imageHeight));
+
+  Integration::Bitmap* bitmap = Integration::Bitmap::New( Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::OWNED_RETAIN );
+  Integration::PixelBuffer* pixbuffer = bitmap->GetPackedPixelsProfile()->ReserveBuffer( pixelFormat, imageWidth, imageHeight, imageWidth, imageHeight );
+  unsigned int bytesPerPixel = GetBytesPerPixel(  pixelFormat );
+  unsigned int initialColor = 0xFF;
+  memset( pixbuffer, initialColor, imageHeight*imageWidth*bytesPerPixel);
+
+  Integration::ResourcePointer resourcePtr(bitmap);
+  platform.SetSynchronouslyLoadedResource( resourcePtr );
+}
+
 namespace Test
 {
 
index a3149f4..79d422b 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TEST_SUITE_UTILS_H__
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -162,6 +162,7 @@ inline bool CompareType<Property::Value>(Property::Value q1, Property::Value q2,
     return false;
   }
 
+  bool result = false;
   switch(type)
   {
     case Property::BOOLEAN:
@@ -169,7 +170,7 @@ inline bool CompareType<Property::Value>(Property::Value q1, Property::Value q2,
       bool a, b;
       q1.Get(a);
       q2.Get(b);
-      return a == b;
+      result =  a == b;
       break;
     }
     case Property::INTEGER:
@@ -177,7 +178,7 @@ inline bool CompareType<Property::Value>(Property::Value q1, Property::Value q2,
       int a, b;
       q1.Get(a);
       q2.Get(b);
-      return a == b;
+      result =  a == b;
       break;
     }
     case Property::FLOAT:
@@ -185,7 +186,7 @@ inline bool CompareType<Property::Value>(Property::Value q1, Property::Value q2,
       float a, b;
       q1.Get(a);
       q2.Get(b);
-      return CompareType<float>(a, b, epsilon);
+      result =  CompareType<float>(a, b, epsilon);
       break;
     }
     case Property::VECTOR2:
@@ -193,7 +194,7 @@ inline bool CompareType<Property::Value>(Property::Value q1, Property::Value q2,
       Vector2 a, b;
       q1.Get(a);
       q2.Get(b);
-      return CompareType<Vector2>(a, b, epsilon);
+      result = CompareType<Vector2>(a, b, epsilon);
       break;
     }
     case Property::VECTOR3:
@@ -201,7 +202,7 @@ inline bool CompareType<Property::Value>(Property::Value q1, Property::Value q2,
       Vector3 a, b;
       q1.Get(a);
       q2.Get(b);
-      return CompareType<Vector3>(a, b, epsilon);
+      result = CompareType<Vector3>(a, b, epsilon);
       break;
     }
     case Property::RECTANGLE:
@@ -210,7 +211,7 @@ inline bool CompareType<Property::Value>(Property::Value q1, Property::Value q2,
       Vector4 a, b;
       q1.Get(a);
       q2.Get(b);
-      return CompareType<Vector4>(a, b, epsilon);
+      result = CompareType<Vector4>(a, b, epsilon);
       break;
     }
     case Property::ROTATION:
@@ -218,14 +219,28 @@ inline bool CompareType<Property::Value>(Property::Value q1, Property::Value q2,
       Quaternion a, b;
       q1.Get(a);
       q2.Get(b);
-      return CompareType<Quaternion>(a, b, epsilon);
+      result = CompareType<Quaternion>(a, b, epsilon);
+      break;
+    }
+    case Property::MATRIX:
+    case Property::MATRIX3:
+    case Property::STRING:
+    case Property::ARRAY:
+    case Property::MAP:
+    {
+      //TODO: Implement this?
+      DALI_ASSERT_ALWAYS( 0 && "Not implemented");
+      result = false;
+      break;
+    }
+    case Property::NONE:
+    {
+      result = false;
       break;
     }
-    default:
-      return false;
   }
 
-  return false;
+  return result;
 }
 
 
@@ -499,6 +514,9 @@ struct DefaultFunctionCoverage
 BufferImage CreateBufferImage();
 BufferImage CreateBufferImage(int width, int height, const Vector4& color);
 
+// Prepare a resource image to be loaded. Should be called before creating the ResourceImage
+void PrepareResourceImage( TestApplication& application, unsigned int imageWidth, unsigned int imageHeight, Pixel::Format pixelFormat );
+
 // Test namespace to prevent pollution of Dali namespace, add Test helper functions here
 namespace Test
 {
index ed4d02c..979e56a 100644 (file)
@@ -68,9 +68,18 @@ BaseHandle Create()
 DALI_TYPE_REGISTRATION_BEGIN( Toolkit::DummyControl, Toolkit::Control, Create );
 DALI_TYPE_REGISTRATION_END()
 
-Dali::PropertyRegistration dummyControlVisualProperty(
+Dali::PropertyRegistration dummyControlVisualProperty01(
   typeRegistration, "testVisual", Dali::Toolkit::DummyControl::Property::TEST_VISUAL, Dali::Property::MAP, &Dali::Toolkit::DummyControlImpl::SetProperty, &Dali::Toolkit::DummyControlImpl::GetProperty );
 
+Dali::PropertyRegistration dummyControlVisualProperty02(
+  typeRegistration, "testVisual", Dali::Toolkit::DummyControl::Property::TEST_VISUAL2, Dali::Property::MAP, &Dali::Toolkit::DummyControlImpl::SetProperty, &Dali::Toolkit::DummyControlImpl::GetProperty );
+
+Dali::PropertyRegistration dummyControlVisualProperty03(
+  typeRegistration, "foregroundVisual", Dali::Toolkit::DummyControl::Property::FOREGROUND_VISUAL, Dali::Property::MAP, &Dali::Toolkit::DummyControlImpl::SetProperty, &Dali::Toolkit::DummyControlImpl::GetProperty );
+
+Dali::PropertyRegistration dummyControlVisualProperty04(
+  typeRegistration, "focusVisual", Dali::Toolkit::DummyControl::Property::FOCUS_VISUAL, Dali::Property::MAP, &Dali::Toolkit::DummyControlImpl::SetProperty, &Dali::Toolkit::DummyControlImpl::GetProperty );
+
 }
 
 DummyControl DummyControlImpl::New()
@@ -141,6 +150,26 @@ Animation DummyControlImpl::CreateTransition( const Toolkit::TransitionData& tra
 
 void DummyControlImpl::SetProperty( BaseObject* object, Dali::Property::Index index, const Dali::Property::Value& value )
 {
+  Toolkit::DummyControl control = Toolkit::DummyControl::DownCast( Dali::BaseHandle( object ) );
+  DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(control.GetImplementation());
+
+  switch(index)
+  {
+    case Toolkit::DummyControl::Property::TEST_VISUAL:
+    case Toolkit::DummyControl::Property::TEST_VISUAL2:
+    case Toolkit::DummyControl::Property::FOREGROUND_VISUAL:
+    case Toolkit::DummyControl::Property::FOCUS_VISUAL:
+    {
+      Property::Map* map = value.GetMap();
+      if( map != NULL )
+      {
+        VisualFactory visualFactory = VisualFactory::Get();
+        Visual::Base visual = visualFactory.CreateVisual(*map);
+        dummyImpl.RegisterVisual(index, visual);
+      }
+      break;
+    }
+  }
 }
 
 Property::Value DummyControlImpl::GetProperty( BaseObject* object, Dali::Property::Index propertyIndex )
@@ -149,18 +178,16 @@ Property::Value DummyControlImpl::GetProperty( BaseObject* object, Dali::Propert
   return value;
 }
 
-
-
-DummyControl DummyControlImplOverride::New()
+Toolkit::DummyControl Impl::DummyControl::New()
 {
-  IntrusivePtr< DummyControlImplOverride > impl = new DummyControlImplOverride;
-  DummyControl control( *impl );
+  IntrusivePtr< Toolkit::Impl::DummyControl > impl = new Toolkit::Impl::DummyControl;
+  Toolkit::DummyControl control( *impl );
   impl->Initialize();
   return control;
 }
 
 
-DummyControlImplOverride::DummyControlImplOverride()
+Impl::DummyControl::DummyControl()
 : DummyControlImpl(),
   initializeCalled(false),
   activatedCalled(false),
@@ -187,64 +214,75 @@ DummyControlImplOverride::DummyControlImplOverride()
 {
 }
 
-DummyControlImplOverride::~DummyControlImplOverride() { }
+Impl::DummyControl::~DummyControl() { }
 
 
-void DummyControlImplOverride::OnInitialize() { initializeCalled = true; }
-bool DummyControlImplOverride::OnAccessibilityActivated() { activatedCalled = true; return true; }
-bool DummyControlImplOverride::OnAccessibilityTouch(const TouchEvent& touchEvent) { onAccTouchedCalled = true; return true; }
-bool DummyControlImplOverride::OnAccessibilityValueChange( bool isIncrease )
+void Impl::DummyControl::OnInitialize() { initializeCalled = true; }
+bool Impl::DummyControl::OnAccessibilityActivated() { activatedCalled = true; return true; }
+bool Impl::DummyControl::OnAccessibilityTouch(const TouchEvent& touchEvent) { onAccTouchedCalled = true; return true; }
+bool Impl::DummyControl::OnAccessibilityValueChange( bool isIncrease )
 {
   onAccValueChangeCalled = true; return true;
 }
 
-void DummyControlImplOverride::OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change )
+void Impl::DummyControl::OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change )
 {
   themeChangeCalled = change == StyleChange::THEME_CHANGE;
   fontChangeCalled = change == StyleChange::DEFAULT_FONT_SIZE_CHANGE;
 }
-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( int depth ) { stageConnectionCalled = true; Control::OnStageConnection( depth ); }
-void DummyControlImplOverride::OnStageDisconnection() { stageDisconnectionCalled = true; Control::OnStageDisconnection(); }
-void DummyControlImplOverride::OnChildAdd(Actor& child) { childAddCalled = true; Control::OnChildAdd( child ); }
-void DummyControlImplOverride::OnChildRemove(Actor& child) { childRemoveCalled = true; Control::OnChildRemove( child ); }
-void DummyControlImplOverride::OnSizeSet(const Vector3& targetSize) { sizeSetCalled = true; Control::OnSizeSet( targetSize ); }
-void DummyControlImplOverride::OnSizeAnimation(Animation& animation, const Vector3& targetSize) { sizeAnimationCalled = true; Control::OnSizeAnimation( animation, targetSize ); }
-bool DummyControlImplOverride::OnTouchEvent(const TouchEvent& event) { touchEventCalled = true; return false; }
-bool DummyControlImplOverride::OnHoverEvent(const HoverEvent& event) { hoverEventCalled = true; return false; }
-bool DummyControlImplOverride::OnWheelEvent(const WheelEvent& event) { wheelEventCalled = true; return false; }
-bool DummyControlImplOverride::OnKeyEvent(const KeyEvent& event) { keyEventCalled = true; return false;}
-void DummyControlImplOverride::OnKeyInputFocusGained() { keyInputFocusGained = true; }
-void DummyControlImplOverride::OnKeyInputFocusLost() { keyInputFocusLost = true; }
-
-void DummyControlImplOverride::OnRelayout( const Vector2& size, RelayoutContainer& container )
+void Impl::DummyControl::OnPinch(const PinchGesture& pinch) { pinchCalled = true; }
+void Impl::DummyControl::OnPan(const PanGesture& pan) { panCalled = true; }
+void Impl::DummyControl::OnTap(const TapGesture& tap) { tapCalled = true; }
+void Impl::DummyControl::OnLongPress(const LongPressGesture& longPress) { longPressCalled = true; }
+void Impl::DummyControl::OnStageConnection( int depth ) { Control::OnStageConnection( depth ); stageConnectionCalled = true; }
+void Impl::DummyControl::OnStageDisconnection() { stageDisconnectionCalled = true; Control::OnStageDisconnection(); }
+void Impl::DummyControl::OnChildAdd(Actor& child) { childAddCalled = true; }
+void Impl::DummyControl::OnChildRemove(Actor& child) { childRemoveCalled = true; }
+void Impl::DummyControl::OnSizeSet(const Vector3& targetSize) { Control::OnSizeSet( targetSize ); sizeSetCalled = true; }
+void Impl::DummyControl::OnSizeAnimation(Animation& animation, const Vector3& targetSize) { Control::OnSizeAnimation( animation, targetSize ); sizeAnimationCalled = true; }
+bool Impl::DummyControl::OnTouchEvent(const TouchEvent& event) { touchEventCalled = true; return false; }
+bool Impl::DummyControl::OnHoverEvent(const HoverEvent& event) { hoverEventCalled = true; return false; }
+bool Impl::DummyControl::OnWheelEvent(const WheelEvent& event) { wheelEventCalled = true; return false; }
+bool Impl::DummyControl::OnKeyEvent(const KeyEvent& event) { keyEventCalled = true; return false;}
+void Impl::DummyControl::OnKeyInputFocusGained() { keyInputFocusGained = true; }
+void Impl::DummyControl::OnKeyInputFocusLost() { keyInputFocusLost = true; }
+
+void Impl::DummyControl::SetLayout( Property::Index visualIndex, Property::Map& map )
+{
+  Property::Value value( map );
+  mLayouts[visualIndex] = value;
+}
+
+void Impl::DummyControl::OnRelayout( const Vector2& size, RelayoutContainer& container )
 {
-  Property::Map transformMap;
-  transformMap
-    .Add( Toolkit::DevelVisual::Transform::Property::OFFSET, Vector2(0.0f, 0.0f) )
-    .Add( Toolkit::DevelVisual::Transform::Property::SIZE, Vector2(1.0f, 1.0f) )
-    .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::CENTER )
-    .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::CENTER )
-    .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_SIZE_MODE, Vector4::ZERO );
+  Property::Map emptyMap;
 
   for( VisualIndices::iterator iter = mRegisteredVisualIndices.begin(); iter != mRegisteredVisualIndices.end() ; ++iter )
   {
     Visual::Base visual = GetVisual(*iter);
-    visual.SetTransformAndSize( transformMap, size );
+    Property::Value value = mLayouts[*iter];
+    Property::Map* map = NULL;
+
+    if( value.GetType() != Property::NONE )
+    {
+      map = value.GetMap();
+    }
+    if( map == NULL )
+    {
+      map = &emptyMap;
+    }
+
+    visual.SetTransformAndSize( *map, size );
   }
 }
 
-
 DummyControl DummyControl::New( bool override )
 {
   DummyControl control;
 
   if (override)
   {
-    control = DummyControlImplOverride::New();
+    control = Impl::DummyControl::New();
   }
   else
   {
index a425330..75d3efe 100644 (file)
@@ -45,7 +45,10 @@ public:
   {
     enum Type
     {
-      TEST_VISUAL = PROPERTY_START_INDEX
+      TEST_VISUAL = PROPERTY_START_INDEX,
+      TEST_VISUAL2,
+      FOREGROUND_VISUAL,
+      FOCUS_VISUAL
     };
   };
 
@@ -70,7 +73,7 @@ public: // Not intended for application developers
  * Cannot create an instance of Internal::Control, so use this dummy class for the implementation.
  * This class does not override any of Internal::Control's behaviour.
  */
-class DummyControlImpl : public Internal::Control
+class DummyControlImpl : public Toolkit::Internal::Control
 {
 public:
 
@@ -88,7 +91,7 @@ public:
   void RegisterVisual( Property::Index index, Toolkit::Visual::Base visual, bool enabled );
   void UnregisterVisual( Property::Index index );
   void EnableVisual( Property::Index index, bool enabled );
-  bool IsVisualEnabled( Property::Index indepx );
+  bool IsVisualEnabled( Property::Index index );
 
   Toolkit::Visual::Base GetVisual( Property::Index index );
   Animation CreateTransition( const Toolkit::TransitionData& transition );
@@ -111,21 +114,26 @@ protected:
   virtual ~DummyControlImpl();
 };
 
+namespace Impl
+{
+
 /**
  * Cannot create an instance of Internal::Control, so use this dummy class for the implementation.
  * This class DOES override Internal::Control's behaviour.
  */
-class DummyControlImplOverride : public DummyControlImpl
+class DummyControl : public Toolkit::DummyControlImpl
 {
 public:
 
-  static DummyControl New();
+  static Toolkit::DummyControl New();
+
+  void SetLayout( Property::Index visualIndex, Property::Map& map );
 
 private:
 
-  DummyControlImplOverride();
+  DummyControl();
 
-  virtual ~DummyControlImplOverride();
+  virtual ~DummyControl();
 
 private: // From Internal::Control
 
@@ -156,6 +164,9 @@ private: // From CustomActorImpl
   virtual void OnKeyInputFocusLost();
   virtual void OnRelayout( const Vector2& size, RelayoutContainer& container );
 
+  DALI_INTERNAL DummyControl( const DummyControl& );
+  DALI_INTERNAL DummyControl& operator=( const DummyControl& );
+
 public:
 
   bool initializeCalled;
@@ -180,8 +191,12 @@ public:
   bool keyEventCalled;
   bool keyInputFocusGained;
   bool keyInputFocusLost;
+
+  Property::Map mLayouts;
 };
 
+} // namespace Impl
+
 } // namespace Toolkit
 
 } // namespace Dali
index 6e2e204..38eb0b2 100644 (file)
@@ -94,23 +94,4 @@ Actor CreateRenderableActor( Image texture, const std::string& vertexShader, con
   return actor;
 }
 
-Image GetTexture( Actor actor )
-{
-  Image image;
-  if( actor && actor.GetRendererCount() )
-  {
-    Renderer renderer = actor.GetRendererAt( 0u );
-    if( renderer )
-    {
-      TextureSet textureSet = renderer.GetTextures();
-      if( textureSet && textureSet.GetTextureCount() )
-      {
-        image = TextureGetImage( textureSet, 0u );
-      }
-    }
-  }
-
-  return image;
-}
-
 } // namespace Dali
index 28953cb..a62dcca 100644 (file)
@@ -49,13 +49,6 @@ Actor CreateRenderableActor( Image texture );
  */
 Actor CreateRenderableActor( Image texture, const std::string& vertexShader, const std::string& fragmentShader );
 
-/**
- * @brief Retrieves the texture used in a renderable actor (if available).
- * @return The texture used by the actor.
- * @note Assumes the actor only has one renderer, and that renderer only has one texture.
- */
-Image GetTexture( Actor actor );
-
 } // namespace Dali
 
 #endif // DALI_TEST_ACTOR_UTILS_H
index d89d4d2..6636676 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index c5ecc4f..5c94252 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TEST_APPLICATION_H__
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 76b391b..840ef0d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 135476e..da4e7e8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -38,4 +38,19 @@ TestNativeImage::~TestNativeImage()
 {
 }
 
+
+TestNativeImageNoExtPointer TestNativeImageNoExt::New(int width, int height)
+{
+  return new TestNativeImageNoExt(width, height);
+}
+
+TestNativeImageNoExt::TestNativeImageNoExt(int width, int height)
+: mWidth(width), mHeight(height), mExtensionCreateCalls(0), mExtensionDestroyCalls(0), mTargetTextureCalls(0),createResult(true)
+{
+}
+
+TestNativeImageNoExt::~TestNativeImageNoExt()
+{
+}
+
 } // namespace dali
index f1938c3..896ce52 100644 (file)
@@ -2,7 +2,7 @@
 #define __TEST_NATIVE_IMAGE_H__
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,8 +19,6 @@
  */
 
 // INTERNAL INCLUDES
-
-// EXTERNAL INCLUDES
 #include <dali/public-api/images/native-image-interface.h>
 #include <dali/devel-api/images/native-image-interface-extension.h>
 #include <dali/integration-api/gl-defines.h>
@@ -28,7 +26,9 @@
 namespace Dali
 {
 class TestNativeImage;
+class TestNativeImageNoExt;
 typedef IntrusivePtr<TestNativeImage> TestNativeImagePointer;
+typedef IntrusivePtr<TestNativeImageNoExt> TestNativeImageNoExtPointer;
 
 class DALI_IMPORT_API TestNativeImageExtension: public Dali::NativeImageInterface::Extension
 {
@@ -36,7 +36,7 @@ public:
   inline const char* GetCustomFragmentPreFix(){return "#extension GL_OES_EGL_image_external:require\n";}
   inline const char* GetCustomSamplerTypename(){return "samplerExternalOES";}
 
-  inline int GetEglImageTextureTarget(){return GL_TEXTURE_2D;}
+  inline int GetEglImageTextureTarget(){return GL_TEXTURE_EXTERNAL_OES;}
 
 };
 
@@ -48,7 +48,7 @@ public:
   inline void SetGlExtensionCreateResult(bool result){ createResult = result;}
   inline virtual bool GlExtensionCreate() { ++mExtensionCreateCalls; return createResult;};
   inline virtual void GlExtensionDestroy() { ++mExtensionDestroyCalls; };
-  inline virtual GLenum TargetTexture() { ++mTargetTextureCalls; return 1;};
+  inline virtual GLenum TargetTexture() { ++mTargetTextureCalls; return 0;};
   inline virtual void PrepareTexture() {};
   inline virtual unsigned int GetWidth() const {return mWidth;};
   inline virtual unsigned int GetHeight() const {return mHeight;};
@@ -70,6 +70,34 @@ public:
   TestNativeImageExtension* mExtension;
 };
 
+
+class DALI_IMPORT_API TestNativeImageNoExt : public Dali::NativeImageInterface
+{
+public:
+  static TestNativeImageNoExtPointer New(int width, int height);
+
+  inline void SetGlExtensionCreateResult(bool result){ createResult = result;}
+  inline virtual bool GlExtensionCreate() { ++mExtensionCreateCalls; return createResult;};
+  inline virtual void GlExtensionDestroy() { ++mExtensionDestroyCalls; };
+  inline virtual GLenum TargetTexture() { ++mTargetTextureCalls; return 1;};
+  inline virtual void PrepareTexture() {};
+  inline virtual unsigned int GetWidth() const {return mWidth;};
+  inline virtual unsigned int GetHeight() const {return mHeight;};
+  inline virtual bool RequiresBlending() const {return true;};
+
+private:
+  TestNativeImageNoExt(int width, int height);
+  virtual ~TestNativeImageNoExt();
+
+  int mWidth;
+  int mHeight;
+public:
+  int mExtensionCreateCalls;
+  int mExtensionDestroyCalls;
+  int mTargetTextureCalls;
+  bool createResult;
+};
+
 } // Dali
 
 #endif
index db22b86..86b5430 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -40,6 +40,7 @@ TestPlatformAbstraction::TestPlatformAbstraction()
 
 TestPlatformAbstraction::~TestPlatformAbstraction()
 {
+  DiscardRequest();
 }
 
 void TestPlatformAbstraction::Suspend()
@@ -93,7 +94,7 @@ Integration::ResourcePointer TestPlatformAbstraction::LoadResourceSynchronously(
 Integration::BitmapPtr TestPlatformAbstraction::DecodeBuffer( const Integration::ResourceType& resourceType, uint8_t * buffer, size_t size )
 {
   mTrace.PushCall("DecodeBuffer", "");
-  return Integration::BitmapPtr();
+  return mDecodedBitmap;
 }
 
 void TestPlatformAbstraction::CancelLoad(Integration::ResourceId id, Integration::ResourceTypeId typeId)
@@ -181,6 +182,7 @@ void TestPlatformAbstraction::Initialize()
   mResourceRequests.Clear();
   mIsLoadingResult=false;
   mSynchronouslyLoadedResource.Reset();
+  mDecodedBitmap.Reset();
 }
 
 bool TestPlatformAbstraction::WasCalled(TestFuncEnum func)
@@ -214,6 +216,7 @@ void TestPlatformAbstraction::ClearReadyResources()
   mLoadedResourcesQueue.clear();
   mFailedLoadQueue.clear();
   mSynchronouslyLoadedResource.Reset();
+  mDecodedBitmap.Reset();
 }
 
 void TestPlatformAbstraction::SetResourceLoaded(Integration::ResourceId  loadedId,
@@ -264,6 +267,7 @@ void TestPlatformAbstraction::SetAllResourceRequestsAsLoaded()
     Integration::ResourcePointer resource(bitmap);
     bitmap->GetPackedPixelsProfile()->ReserveBuffer(Pixel::RGBA8888, 80, 80, 80, 80);
     SetResourceLoaded( request->GetId(), request->GetType()->id, resource );
+    delete request;
   }
   mResourceRequests.Clear();
 }
@@ -273,13 +277,21 @@ void TestPlatformAbstraction::SetAllResourceRequestsAsFailed( Integration::Resou
   for( ResourceRequestContainer::Iterator iter = mResourceRequests.Begin(), endIter = mResourceRequests.End();
        iter != endIter; ++iter )
   {
+    Integration::ResourceRequest* request = *iter;
     SetResourceLoadFailed( (*iter)->GetId(), failure);
+    delete request;
   }
   mResourceRequests.Clear();
 }
 
 void TestPlatformAbstraction::DiscardRequest()
 {
+  for( ResourceRequestContainer::Iterator iter = mResourceRequests.Begin(), endIter = mResourceRequests.End();
+       iter != endIter; ++iter )
+  {
+    Integration::ResourceRequest* request = *iter;
+    delete request;
+  }
   mResourceRequests.Clear();
 }
 
@@ -307,4 +319,9 @@ void TestPlatformAbstraction::SetSynchronouslyLoadedResource( Integration::Resou
   mSynchronouslyLoadedResource = resource;
 }
 
+void TestPlatformAbstraction::SetDecodedBitmap( Integration::BitmapPtr bitmap )
+{
+  mDecodedBitmap = bitmap;
+}
+
 } // namespace Dali
index d9d3247..42e2d98 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TEST_PLATFORM_ABSTRACTION_H__
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -264,6 +264,17 @@ public: // TEST FUNCTIONS
    */
   void SetSynchronouslyLoadedResource( Integration::ResourcePointer resource );
 
+  /**
+   * @brief Sets the bitmap returned by DecodeBuffer()
+   * @param[in] bitmap The decoded bitmap
+   */
+  void SetDecodedBitmap( Integration::BitmapPtr bitmap );
+
+private:
+
+  TestPlatformAbstraction( const TestPlatformAbstraction& ); ///< Undefined
+  TestPlatformAbstraction& operator=( const TestPlatformAbstraction& ); ///< Undefined
+
 private:
 
   struct LoadedResource
@@ -307,6 +318,7 @@ private:
   bool                          mSaveFileResult;
 
   Integration::ResourcePointer  mSynchronouslyLoadedResource;
+  Integration::BitmapPtr        mDecodedBitmap;
 };
 
 } // Dali
index 76ccff7..f57dc50 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index 6301fd5..23200c0 100644 (file)
@@ -2338,7 +2338,7 @@ int UtcDaliAccessibilityManagerActionTouch(void)
   Dali::AccessibilityAdaptor accessibilityAdaptor = Dali::AccessibilityAdaptor::Get();
 
   DummyControl dummyControl = DummyControl::New(true);
-  DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummyControl.GetImplementation());
+  Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummyControl.GetImplementation());
   dummyControl.SetSize(480, 800);
   manager.SetFocusOrder( dummyControl, 1 );
   Stage::GetCurrent().Add( dummyControl );
index aa37715..60f4a1b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -75,14 +75,6 @@ Dali::PropertyRegistration propertyNone(    typeRegistration, "noneProperty",
 namespace
 {
 
-std::string ReplaceQuotes(const std::string &in_s)
-{
-  std::string s(in_s);
-  // wrong as no embedded quote but had regex link problems
-  std::replace(s.begin(), s.end(), '\'', '"');
-  return s;
-}
-
 struct BuilderFunctor
 {
   BuilderFunctor( bool& called ) : mCalled( called )
@@ -284,7 +276,7 @@ int UtcDaliBuilderAnimationP(void)
         "    \"name\": \"greeting\","
         "    \"type\": \"TextLabel\","
         "    \"text\": \"Touch me\","
-        "    \"styles\": [\"basicText\"],"
+        "    \"inherit\": [\"basicText\"],"
         "    \"position\": [0, -120, 0],"
         "    \"size\": [200, 200, 1],"
         "    \"orientation\": [0, 0, 30],"
@@ -408,7 +400,7 @@ int UtcDaliBuilderAnimationN(void)
         "    \"name\": \"greeting\","
         "    \"type\": \"TextLabel\","
         "    \"text\": \"Touch me\","
-        "    \"styles\": [\"basicText\"],"
+        "    \"inherit\": [\"basicText\"],"
         "    \"position\": [0, -120, 0],"
         "    \"size\": [200, 200, 1],"
         "    \"orientation\": [0, 0, 30],"
index a2bf49d..244f667 100644 (file)
@@ -59,6 +59,23 @@ static bool ButtonCallback( Button button )
   return false;
 }
 
+static std::string GetButtonText( Button button )
+{
+  Property::Value value = button.GetProperty( Toolkit::Button::Property::LABEL );
+
+  Property::Map *labelProperty = value.GetMap();
+
+  std::string textLabel;
+
+  if ( labelProperty )
+  {
+    Property::Value* value = labelProperty->Find( Toolkit::TextVisual::Property::TEXT );
+    value->Get( textLabel );
+  }
+
+  return textLabel;
+}
+
 struct CallbackFunctor
 {
   CallbackFunctor(bool* callbackFlag)
@@ -472,7 +489,7 @@ int UtcDaliButtonSetAnimationTimeP(void)
   END_TEST;
 }
 
-int UtcDaliButtonSetLabelStringP(void)
+int UtcDaliButtonSetLabelStringWithPropertyMapP(void)
 {
   ToolkitTestApplication application;
 
@@ -480,11 +497,69 @@ int UtcDaliButtonSetLabelStringP(void)
   button.SetProperty( Toolkit::Button::Property::LABEL,
                       Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT )
                                      .Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f )
+                                     .Add( Toolkit::TextVisual::Property::TEXT, "Button Label")
                      );
 
-  button.SetLabelText( "Button Label" );
+  DALI_TEST_EQUALS( GetButtonText( button ), "Button Label", TEST_LOCATION );
+  END_TEST;
+}
+
+int UtcDaliButtonSetLabelStringWithPropertyMapStringsP(void)
+{
+  ToolkitTestApplication application;
+
+  Button button = PushButton::New();
+
+  tet_infoline(" UtcDaliButtonSetLabelStringWithPropertyMapStringsP Setting Button text using String then replacing with Enum then string");
+
+  Property::Map textVisualMapInitial;
+  textVisualMapInitial["visualType"] = "TEXT";
+  textVisualMapInitial["pointSize"] =  15.0f;
+  textVisualMapInitial["text"] = "button label initial";
+
+  button.SetProperty( Button::Property::LABEL, textVisualMapInitial );
+
+  DALI_TEST_EQUALS( GetButtonText( button ), "button label initial", TEST_LOCATION );
+
+  tet_infoline(" UtcDaliButtonSetLabelStringWithPropertyMapStringsP Intermediate part of test");
+
+  Property::Map propertyMap;
+  propertyMap.Insert( Toolkit::Visual::Property::TYPE,  Toolkit::DevelVisual::TEXT );
+  propertyMap.Insert( Toolkit::TextVisual::Property::TEXT,  "error if this is the final text" );
+  propertyMap.Insert( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f );
+
+  button.SetProperty( Button::Property::LABEL, propertyMap );
+
+  DALI_TEST_EQUALS( GetButtonText( button ), "error if this is the final text", TEST_LOCATION );
+
+  tet_infoline(" UtcDaliButtonSetLabelStringWithPropertyMapStringsP Final part of test");
+
+  Property::Map textVisualMap;
+  textVisualMap["visualType"] = "TEXT";
+  textVisualMap["pointSize"] =  15.0f;
+  textVisualMap["text"] = "Button Label";
+
+  button.SetProperty( Toolkit::Button::Property::LABEL, textVisualMap );
+
+  DALI_TEST_EQUALS( GetButtonText( button ), "Button Label", TEST_LOCATION );
+  END_TEST;
+}
+
+int UtcDaliButtonSetLabelWithStringP(void)
+{
+  ToolkitTestApplication application;
+
+  Button button = PushButton::New();
+
+  // Set default point size for text visual as style sheet not available.
+  button.SetProperty( Toolkit::Button::Property::LABEL,
+                      Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT )
+                                     .Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f )
+                                     );
+
+  button.SetProperty( Toolkit::Button::Property::LABEL, "Button Label" );
 
-  DALI_TEST_EQUALS( button.GetLabelText(), "Button Label", TEST_LOCATION );
+  DALI_TEST_EQUALS( GetButtonText( button ), "Button Label", TEST_LOCATION );
   END_TEST;
 }
 
@@ -492,6 +567,9 @@ int UtcDaliButtonSetLabelPropertyP(void)
 {
   ToolkitTestApplication application;
 
+  tet_infoline(" UtcDaliButtonSetLabelPropertyP Set text label and then set again with new text");
+
+
   const std::string TEST_LABEL1 = "test label one";
   const std::string TEST_LABEL2 = "test label two";
 
@@ -500,13 +578,10 @@ int UtcDaliButtonSetLabelPropertyP(void)
   button.SetProperty( Toolkit::Button::Property::LABEL,
                         Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT )
                                        .Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f )
+                                       .Add( Toolkit::TextVisual::Property::TEXT, TEST_LABEL1 )
                      );
 
-  button.SetProperty( Button::Property::LABEL_TEXT, TEST_LABEL1 );
-
-  std::string labelText = button.GetProperty<std::string>( Button::Property::LABEL_TEXT );
-
-  DALI_TEST_EQUALS( labelText, TEST_LABEL1,  TEST_LOCATION );
+  DALI_TEST_EQUALS( GetButtonText( button ), TEST_LABEL1,  TEST_LOCATION );
 
   Property::Map propertyMap;
   propertyMap.Insert( Toolkit::Visual::Property::TYPE,  Toolkit::DevelVisual::TEXT );
@@ -515,9 +590,7 @@ int UtcDaliButtonSetLabelPropertyP(void)
   propertyMap.Insert( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f );
   button.SetProperty( Button::Property::LABEL, propertyMap );
 
-  labelText = button.GetProperty<std::string>( Button::Property::LABEL_TEXT );
-
-  DALI_TEST_EQUALS( labelText, TEST_LABEL2,  TEST_LOCATION );
+  DALI_TEST_EQUALS( GetButtonText( button ), TEST_LABEL2,  TEST_LOCATION );
 
   END_TEST;
 }
@@ -1238,3 +1311,38 @@ int UtcDaliButtonSetGetDepreciatedPropertiesWithURL(void)
 
 END_TEST;
 }
+
+int UtcDaliButtonSetLabelTextDeprecatedPropertyP(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliButtonSetLabelTextDeprecatedPropertyP");
+
+  const std::string TEST_LABEL1 = "test label one";
+  const std::string TEST_LABEL2 = "test label two";
+
+  Button button = PushButton::New();
+
+  button.SetProperty( Toolkit::Button::Property::LABEL,
+                        Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT )
+                                       .Add( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f )
+                     );
+
+  button.SetProperty( Button::Property::LABEL_TEXT, TEST_LABEL1 );
+
+  std::string labelText = button.GetProperty<std::string>( Button::Property::LABEL_TEXT );
+
+  DALI_TEST_EQUALS( labelText, TEST_LABEL1,  TEST_LOCATION );
+
+  Property::Map propertyMap;
+  propertyMap.Insert( Toolkit::Visual::Property::TYPE,  Toolkit::DevelVisual::TEXT );
+  propertyMap.Insert( Toolkit::TextVisual::Property::TEXT,  TEST_LABEL2 );
+  propertyMap.Insert( Toolkit::TextVisual::Property::TEXT_COLOR, Color::BLUE );
+  propertyMap.Insert( Toolkit::TextVisual::Property::POINT_SIZE, 15.0f );
+  button.SetProperty( Button::Property::LABEL, propertyMap );
+
+  labelText = button.GetProperty<std::string>( Button::Property::LABEL_TEXT );
+
+  DALI_TEST_EQUALS( labelText, TEST_LABEL2,  TEST_LOCATION );
+
+  END_TEST;
+}
index 93ee34e..376ad0d 100644 (file)
@@ -24,6 +24,9 @@
 
 #include <dali.h>
 #include <dali-toolkit/dali-toolkit.h>
+#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/devel-api/align-enums.h>
+
 #include "dummy-control.h"
 
 using namespace Dali;
@@ -721,3 +724,41 @@ int UtcDaliControlAutoClippingWhenAlreadyOnStageN(void)
 
   END_TEST;
 }
+
+int UtcDaliControlSetTransformSize(void)
+{
+  ToolkitTestApplication application;
+  Control control = Control::New();
+
+  Property::Map transformMap;
+  transformMap.Add( DevelVisual::Transform::Property::OFFSET, Vector2( 10, 10 ) )
+              .Add( DevelVisual::Transform::Property::ANCHOR_POINT, Align::BOTTOM_END )
+              .Add( DevelVisual::Transform::Property::ORIGIN, Align::BOTTOM_END )
+              .Add( DevelVisual::Transform::Property::SIZE, Vector2( 10, 20 ) );
+
+  control.SetProperty( Control::Property::BACKGROUND, Property::Map().Add( Visual::Property::TYPE, Visual::COLOR )
+                                                                     .Add( DevelVisual::Property::TRANSFORM, transformMap ) );
+
+  tet_infoline( "Test to ensure that the control background transform does not get overwritten when adding to the stage" );
+
+  Stage::GetCurrent().Add( control );
+
+  application.SendNotification();
+  application.Render();
+
+  // Ensure the transform property still matches what we set
+  Property::Value value = control.GetProperty( Control::Property::BACKGROUND );
+  Property::Map* map = value.GetMap();
+  DALI_TEST_CHECK( map );
+  Property::Value* transformValue = map->Find( DevelVisual::Property::TRANSFORM );
+  DALI_TEST_CHECK( transformValue );
+
+  Property::Map* retMap = transformValue->GetMap();
+  DALI_TEST_CHECK( retMap );
+  DALI_TEST_EQUALS( retMap->Find( DevelVisual::Transform::Property::OFFSET )->Get< Vector2 >(), Vector2( 10, 10 ), TEST_LOCATION );
+  DALI_TEST_EQUALS( retMap->Find( DevelVisual::Transform::Property::ANCHOR_POINT )->Get< int >(), (int)Align::BOTTOM_END, TEST_LOCATION );
+  DALI_TEST_EQUALS( retMap->Find( DevelVisual::Transform::Property::ORIGIN )->Get< int >(), (int)Align::BOTTOM_END, TEST_LOCATION );
+  DALI_TEST_EQUALS( retMap->Find( DevelVisual::Transform::Property::SIZE )->Get< Vector2 >(), Vector2( 10, 20 ), TEST_LOCATION );
+
+  END_TEST;
+}
index 77c2436..6150385 100644 (file)
@@ -232,7 +232,7 @@ int UtcDaliControlImplOnGestureMethods(void)
     application.SendNotification();
     application.Render();
 
-    DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
+    Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
     dummyImpl.EnableGestureDetection( Gesture::Type(Gesture::Pinch | Gesture::Pan | Gesture::Tap | Gesture::LongPress) );
 
     DALI_TEST_CHECK( dummyImpl.pinchCalled == false );
@@ -347,7 +347,7 @@ int UtcDaliControlImplChildAddAndRemove(void)
   {
     DummyControl dummy = DummyControl::New( true );
     Stage::GetCurrent().Add(dummy);
-    DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
+    Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
 
     application.Render();
     application.SendNotification();
@@ -406,7 +406,7 @@ int UtcDaliControlImplStageConnection(void)
 
   {
     DummyControl dummy = DummyControl::New( true );
-    DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
+    Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
 
     DALI_TEST_EQUALS( dummyImpl.stageConnectionCalled, false, TEST_LOCATION );
     Stage::GetCurrent().Add(dummy);
@@ -446,7 +446,7 @@ int UtcDaliControlImplSizeSetP(void)
 
   {
     DummyControl dummy = DummyControl::New( true );
-    DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
+    Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
 
     Stage::GetCurrent().Add(dummy);
     application.Render();
@@ -503,7 +503,7 @@ int UtcDaliControlImplSizeAnimation(void)
 
   {
     DummyControl dummy = DummyControl::New( true );
-    DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
+    Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
 
     Stage::GetCurrent().Add(dummy);
 
@@ -550,7 +550,7 @@ int UtcDaliControlImplTouchEvent(void)
 
   {
     DummyControl dummy = DummyControl::New( true );
-    DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
+    Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
 
     dummy.SetSize( Vector2( 100.0f, 100.0f ) );
     dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
@@ -606,7 +606,7 @@ int UtcDaliControlImplHoverEvent(void)
 
   {
     DummyControl dummy = DummyControl::New( true );
-    DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
+    Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
 
     dummy.SetSize( Vector2( 100.0f, 100.0f ) );
     dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
@@ -665,7 +665,7 @@ int UtcDaliControlImplKeyEvent(void)
 
   {
     DummyControl dummy = DummyControl::New( true );
-    DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
+    Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
 
     Stage::GetCurrent().Add(dummy);
     dummy.SetKeyInputFocus();
@@ -709,7 +709,7 @@ int UtcDaliControlImplKeyInputFocusGained(void)
 
   {
     DummyControl dummy = DummyControl::New( true );
-    DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
+    Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
 
     Stage::GetCurrent().Add(dummy);
 
@@ -739,7 +739,7 @@ int UtcDaliControlImplKeyInputFocusLost(void)
 
   {
     DummyControl dummy = DummyControl::New( true );
-    DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
+    Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
 
     Stage::GetCurrent().Add(dummy);
 
@@ -761,7 +761,7 @@ int UtcDaliControlImplKeyInputFocusLost(void)
     dummy.SetKeyInputFocus();
     dummy.ClearKeyInputFocus();
 
-    DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
+    Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
 
     dummyImpl.IsKeyboardNavigationSupported();
     dummyImpl.IsKeyboardFocusGroup();
@@ -803,7 +803,7 @@ int UtcDaliControlImplWheelEvent(void)
 
   {
     DummyControl dummy = DummyControl::New( true );
-    DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
+    Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
 
     dummy.SetSize( Vector2( 100.0f, 100.0f ) );
     dummy.SetAnchorPoint(AnchorPoint::TOP_LEFT);
@@ -1350,7 +1350,6 @@ int UtcDaliControlImplRegisterTwoVisualsAndEnableOnlyOne(void)
 
   END_TEST;
 }
-
 int UtcDaliControlImplAutoClippingWithVisuals(void)
 {
   ToolkitTestApplication application;
index 32076f1..8caf518 100644 (file)
@@ -23,6 +23,7 @@
 #include <dali-toolkit-test-suite-utils.h>
 
 #include <dali.h>
+#include <dali/public-api/dali-core.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/devel-api/controls/control-wrapper.h>
 #include <dali-toolkit/devel-api/controls/control-wrapper-impl.h>
@@ -216,8 +217,12 @@ struct TestCustomControl : public Toolkit::Internal::ControlWrapper
   bool mNego;
   unsigned int mDepth;
 };
+
 }
 
+static std::string customControlTypeName = "TestCustomControl";
+static TypeRegistration customControl( customControlTypeName, typeid(Dali::Toolkit::Control), NULL );
+
 int UtcDaliControlWrapperConstructor(void)
 {
   ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
@@ -227,9 +232,10 @@ int UtcDaliControlWrapperConstructor(void)
 
   DALI_TEST_CHECK( !ControlWrapper::DownCast( controlWrapper ) );
 
-  controlWrapper = ControlWrapper::New( *controlWrapperImpl );
+  controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
 
   DALI_TEST_CHECK( ControlWrapper::DownCast( controlWrapper ) );
+
   END_TEST;
 }
 
@@ -237,7 +243,7 @@ int UtcDaliControlWrapperDestructor(void)
 {
   TestApplication application;
 
-  ControlWrapper control = ControlWrapper::New( *( new Toolkit::Internal::ControlWrapper( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT ) ) );
+  ControlWrapper control = ControlWrapper::New( customControlTypeName, *( new Toolkit::Internal::ControlWrapper( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT ) ) );
 
   ControlWrapper control2( control );
 
@@ -259,7 +265,7 @@ int UtcDaliControlWrapperRelayoutRequest(void)
   DALI_TEST_EQUALS( gOnRelayout, false, TEST_LOCATION );
 
   Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
-  ControlWrapper controlWrapper = ControlWrapper::New( *controlWrapperImpl );
+  ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
 
   Stage::GetCurrent().Add( controlWrapper );
 
@@ -283,7 +289,7 @@ int UtcDaliControlWrapperImplGetHeightForWidthBase(void)
   TestApplication application;
 
   Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
-  ControlWrapper controlWrapper = ControlWrapper::New( *controlWrapperImpl );
+  ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
 
   float width = 300.0f;
   float v = 0.0f;
@@ -303,7 +309,7 @@ int UtcDaliControlWrapperGetWidthForHeightBase(void)
   TestApplication application;
 
   Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
-  ControlWrapper controlWrapper = ControlWrapper::New( *controlWrapperImpl );
+  ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
 
   float height = 300.0f;
   float v = 0.0f;
@@ -323,7 +329,7 @@ int UtcDaliControlWrapperCalculateChildSizeBase(void)
   TestApplication application;
 
   Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
-  ControlWrapper controlWrapper = ControlWrapper::New( *controlWrapperImpl );
+  ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
 
   Actor child = Actor::New();
   child.SetResizePolicy( Dali::ResizePolicy::FIXED, Dali::Dimension::ALL_DIMENSIONS );
@@ -344,7 +350,7 @@ int UtcDaliControlWrapperRelayoutDependentOnChildrenBase(void)
   TestApplication application;
 
   Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
-  ControlWrapper controlWrapper = ControlWrapper::New( *controlWrapperImpl );
+  ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
 
   bool v = false;
 
@@ -371,7 +377,7 @@ int UtcDaliControlWrapperRegisterVisualToSelf(void)
 
   {
     Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
-    ControlWrapper controlWrapper = ControlWrapper::New( *controlWrapperImpl );
+    ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
 
     objectDestructionTracker.Start( controlWrapper );
 
@@ -404,7 +410,7 @@ int UtcDaliControlWrapperRegisterDisabledVisual(void)
   ToolkitTestApplication application;
 
   Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
-  ControlWrapper controlWrapper = ControlWrapper::New( *controlWrapperImpl );
+  ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
 
   Property::Index TEST_PROPERTY = 1;
 
@@ -446,7 +452,7 @@ int UtcDaliControlWrapperRegisterUnregisterVisual(void)
   ToolkitTestApplication application;
 
   Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
-  ControlWrapper controlWrapper = ControlWrapper::New( *controlWrapperImpl );
+  ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
 
   Property::Index index = 1;
 
@@ -491,7 +497,7 @@ int UtcDaliControlWrapperTransitionDataMap1N(void)
   Dali::Toolkit::TransitionData transition = TransitionData::New( map );
 
   Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
-  ControlWrapper controlWrapper = ControlWrapper::New( *controlWrapperImpl );
+  ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
 
   //DummyControl actor = DummyControl::New();
   controlWrapper.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
@@ -544,10 +550,56 @@ int UtcDaliControlWrapperApplyThemeStyle(void)
   ToolkitTestApplication application;
 
   Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
-  ControlWrapper controlWrapper = ControlWrapper::New( *controlWrapperImpl );
+  ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
 
   controlWrapperImpl->ApplyThemeStyle();
 
   DALI_TEST_CHECK( true );
   END_TEST;
 }
+
+int UtcDaliControlWrapperTestControlProperties(void)
+{
+  ToolkitTestApplication application;
+
+  Impl::TestCustomControl* controlWrapperImpl = new ::Impl::TestCustomControl( Toolkit::Internal::ControlWrapper::CONTROL_BEHAVIOUR_DEFAULT );
+  ControlWrapper controlWrapper = ControlWrapper::New( customControlTypeName, *controlWrapperImpl );
+
+  Stage::GetCurrent().Add( controlWrapper );
+
+  // "background" property
+  Property::Map rendererMap;
+  rendererMap[Visual::Property::TYPE] = Visual::COLOR;
+  rendererMap[ColorVisual::Property::MIX_COLOR] = Color::RED;
+  controlWrapper.SetProperty( Control::Property::BACKGROUND, rendererMap );
+  Property::Value propertyValue = controlWrapper.GetProperty( Control::Property::BACKGROUND );
+  Property::Map* resultMap = propertyValue.GetMap();
+  DALI_TEST_CHECK( resultMap->Find( Visual::Property::TYPE ) );
+  DALI_TEST_EQUALS( resultMap->Find( Visual::Property::TYPE )->Get<int>(), (int)Visual::COLOR, TEST_LOCATION );
+  DALI_TEST_CHECK( resultMap->Find( ColorVisual::Property::MIX_COLOR ) );
+  DALI_TEST_EQUALS( resultMap->Find( ColorVisual::Property::MIX_COLOR )->Get<Vector4>(), Color::RED, TEST_LOCATION );
+
+  // "keyInputFocus" property
+  controlWrapper.SetProperty( Control::Property::KEY_INPUT_FOCUS, true );
+  DALI_TEST_EQUALS( true, controlWrapper.GetProperty( Control::Property::KEY_INPUT_FOCUS ).Get< bool >(), TEST_LOCATION );
+
+  // "styleName" property
+  controlWrapper.SetProperty( Control::Property::STYLE_NAME, "MyCustomStyle" );
+  DALI_TEST_EQUALS( "MyCustomStyle", controlWrapper.GetProperty( Control::Property::STYLE_NAME ).Get< std::string >(), TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliControlWrapperTypeRegistryCreation(void)
+{
+  ToolkitTestApplication application;
+
+  TypeInfo typeInfo = TypeRegistry::Get().GetTypeInfo( "ControlWrapper" );
+  DALI_TEST_CHECK( typeInfo )
+
+  // Check that we can't create a ControlWrapper instance
+  BaseHandle baseHandle = typeInfo.CreateInstance();
+  DALI_TEST_CHECK( !baseHandle )
+
+  END_TEST;
+}
index 2ff700b..721bfec 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -80,6 +80,9 @@ static const char* gImage_34_RGBA = TEST_RESOURCE_DIR "/icon-edit.png";
 // resolution: 600*600, pixel format: RGB888
 static const char* gImage_600_RGB = TEST_RESOURCE_DIR "/test-image-600.jpg";
 
+// resolution: 50*50, frame count: 4, frame delay: 0.2 second for each frame
+const char* TEST_GIF_FILE_NAME = TEST_RESOURCE_DIR "/anim.gif";
+
 void TestImage( ImageView imageView, BufferImage image )
 {
   Property::Value value = imageView.GetProperty( imageView.GetPropertyIndex( "image" ) );
@@ -363,6 +366,62 @@ int UtcDaliImageViewSetGetProperty03(void)
   END_TEST;
 }
 
+int UtcDaliImageViewPixelArea(void)
+{
+  // Test pixel area property
+  ToolkitTestApplication application;
+
+  // Gif image, use AnimatedImageVisual internally
+  // Atlasing is applied to pack multiple frames, use custom wrap mode
+  ImageView gifView = ImageView::New();
+  const Vector4 pixelAreaVisual( 0.f, 0.f, 2.f, 2.f );
+  gifView.SetProperty( ImageView::Property::IMAGE,
+                       Property::Map().Add( ImageVisual::Property::URL, TEST_GIF_FILE_NAME )
+                                      .Add( ImageVisual::Property::PIXEL_AREA, pixelAreaVisual ) );
+
+  // Add to stage
+  Stage stage = Stage::GetCurrent();
+  stage.Add( gifView );
+
+  // loading started
+  application.SendNotification();
+  application.Render(16);
+  DALI_TEST_CHECK( gifView.GetRendererCount() == 1u );
+
+  const Vector4 fullTextureRect( 0.f, 0.f, 1.f, 1.f );
+  // test that the pixel area value defined in the visual property map is registered on renderer
+  Renderer renderer = gifView.GetRendererAt(0);
+  Property::Value pixelAreaValue = renderer.GetProperty( renderer.GetPropertyIndex( "pixelArea" ) );
+  DALI_TEST_EQUALS( pixelAreaValue.Get<Vector4>(), pixelAreaVisual, TEST_LOCATION );
+
+  // test that the shader has the default pixel area value registered.
+  Shader shader = renderer.GetShader();
+  pixelAreaValue = shader.GetProperty( shader.GetPropertyIndex( "pixelArea" ) );
+  DALI_TEST_EQUALS( pixelAreaValue.Get<Vector4>(), fullTextureRect, TEST_LOCATION );
+
+  // test that the uniform uses the pixelArea property on the renderer.
+  TestGlAbstraction& gl = application.GetGlAbstraction();
+  Vector4 pixelAreaUniform;
+  DALI_TEST_CHECK( gl.GetUniformValue<Vector4>( "pixelArea", pixelAreaUniform ) );
+  DALI_TEST_EQUALS( pixelAreaVisual, pixelAreaUniform, Math::MACHINE_EPSILON_100, TEST_LOCATION );
+
+  // set the pixelArea property on the control
+  const Vector4 pixelAreaControl( -1.f, -1.f, 3.f, 3.f );
+  gifView.SetProperty( ImageView::Property::PIXEL_AREA, pixelAreaControl );
+  application.SendNotification();
+  application.Render(16);
+
+  // check the pixelArea property on the control
+  pixelAreaValue = gifView.GetProperty( gifView.GetPropertyIndex( "pixelArea" ) );
+  DALI_TEST_EQUALS( pixelAreaValue.Get<Vector4>(), pixelAreaControl, TEST_LOCATION );
+  // test that the uniform uses the pixelArea property on the control.
+  DALI_TEST_CHECK( gl.GetUniformValue<Vector4>( "pixelArea", pixelAreaUniform ) );
+  DALI_TEST_EQUALS( pixelAreaControl, pixelAreaUniform, Math::MACHINE_EPSILON_100, TEST_LOCATION );
+
+
+  END_TEST;
+}
+
 int UtcDaliImageViewAsyncLoadingWithoutAltasing(void)
 {
   ToolkitTestApplication application;
@@ -420,12 +479,54 @@ int UtcDaliImageViewAsyncLoadingWithAtlasing(void)
   END_TEST;
 }
 
+int UtcDaliImageViewAsyncLoadingWithAtlasing02(void)
+{
+  ToolkitTestApplication application;
+
+  //Async loading, automatic atlasing for small size image
+  TraceCallStack& callStack = application.GetGlAbstraction().GetTextureTrace();
+  callStack.Reset();
+  callStack.Enable(true);
+
+  Property::Map asyncLoadingMap;
+  asyncLoadingMap[ "url" ] = gImage_34_RGBA;
+  asyncLoadingMap[ "desiredHeight" ] = 34;
+  asyncLoadingMap[ "desiredWidth" ] = 34;
+  asyncLoadingMap[ "synchronousLoading" ] = false;
+
+  ImageView imageView = ImageView::New();
+  imageView.SetProperty( ImageView::Property::IMAGE, asyncLoadingMap );
+
+  Stage::GetCurrent().Add( imageView );
+  application.SendNotification();
+  application.Render(16);
+  application.Render(16);
+  application.SendNotification();
+
+  // loading started, this waits for the loader thread for max 30 seconds
+  DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
+
+  application.SendNotification();
+  application.Render(16);
+
+  callStack.Enable(false);
+
+  TraceCallStack::NamedParams params;
+  params["width"] = ToString(34);
+  params["height"] = ToString(34);
+  DALI_TEST_EQUALS( callStack.FindMethodAndParams( "TexSubImage2D", params ), true, TEST_LOCATION );
+
+  END_TEST;
+}
+
 int UtcDaliImageViewSyncLoading(void)
 {
   ToolkitTestApplication application;
 
+  tet_infoline("ImageView Testing sync loading and size using index key property map");
+
   Property::Map syncLoadingMap;
-  syncLoadingMap[ "synchronousLoading" ] = true;
+  syncLoadingMap[ ImageVisual::Property::SYNCHRONOUS_LOADING ] = true;
 
   // Sync loading, no atlasing for big size image
   {
@@ -475,6 +576,51 @@ int UtcDaliImageViewSyncLoading(void)
   END_TEST;
 }
 
+
+int UtcDaliImageViewSyncLoading02(void)
+{
+  ToolkitTestApplication application;
+
+  tet_infoline("ImageView Testing sync loading and size using string key property map");
+
+  // Sync loading, automatic atlasing for small size image
+  {
+    BitmapLoader::ResetLatestCreated();
+    TraceCallStack& callStack = application.GetGlAbstraction().GetTextureTrace();
+    callStack.Reset();
+    callStack.Enable(true);
+
+    ImageView imageView = ImageView::New( );
+
+    // Sync loading is used
+    Property::Map syncLoadingMap;
+    syncLoadingMap[ "url" ] = gImage_34_RGBA;
+    syncLoadingMap[ "desiredHeight" ] = 34;
+    syncLoadingMap[ "desiredWidth" ] = 34;
+    syncLoadingMap[ "synchronousLoading" ] = true;
+    imageView.SetProperty( ImageView::Property::IMAGE, syncLoadingMap );
+
+    // loading is started even if the actor is offStage
+    BitmapLoader loader = BitmapLoader::GetLatestCreated();
+    DALI_TEST_CHECK( loader );
+
+    loader.WaitForLoading();
+
+    DALI_TEST_CHECK( loader.IsLoaded() );
+
+    Stage::GetCurrent().Add( imageView );
+    application.SendNotification();
+    application.Render(16);
+
+    TraceCallStack::NamedParams params;
+    params["width"] = ToString(34);
+    params["height"] = ToString(34);
+    DALI_TEST_EQUALS( callStack.FindMethodAndParams( "TexSubImage2D", params ),
+                      true, TEST_LOCATION );
+  }
+  END_TEST;
+}
+
 int UtcDaliImageViewSizeWithBackground(void)
 {
   ToolkitTestApplication application;
@@ -854,7 +1000,7 @@ int UtcDaliImageViewSetImageNativeImage(void)
   DALI_TEST_CHECK( gl.GetTextureTrace().FindMethod("BindTexture") );
 
   std::stringstream params;
-  params << GL_TEXTURE_2D << ", " << 23;
+  params << GL_TEXTURE_EXTERNAL_OES << ", " << 23;
   DALI_TEST_CHECK( gl.GetTextureTrace().FindMethodAndParams("BindTexture", params.str()) );
 
   END_TEST;
@@ -904,7 +1050,7 @@ int UtcDaliImageViewSetImageBufferImageToNativeImage(void)
   DALI_TEST_CHECK( gl.GetTextureTrace().FindMethod("BindTexture") );
 
   std::stringstream nextTextureParams;
-  nextTextureParams << GL_TEXTURE_2D << ", " << 24;
+  nextTextureParams << GL_TEXTURE_EXTERNAL_OES << ", " << 24;
   DALI_TEST_CHECK( gl.GetTextureTrace().FindMethodAndParams("BindTexture", nextTextureParams.str()) );
 
   END_TEST;
@@ -936,7 +1082,7 @@ int UtcDaliImageViewSetImageNativeImageToBufferImage(void)
   DALI_TEST_CHECK( gl.GetTextureTrace().FindMethod("BindTexture") );
 
   std::stringstream params;
-  params << GL_TEXTURE_2D << ", " << 23;
+  params << GL_TEXTURE_EXTERNAL_OES << ", " << 23;
   DALI_TEST_CHECK( gl.GetTextureTrace().FindMethodAndParams("BindTexture", params.str()) );
 
   width = 200;
@@ -1003,7 +1149,7 @@ int UtcDaliImageViewSetImageNativeImageWithCustomShader(void)
   DALI_TEST_CHECK( gl.GetTextureTrace().FindMethod("BindTexture") );
 
   std::stringstream params;
-  params << GL_TEXTURE_2D << ", " << 23;
+  params << GL_TEXTURE_EXTERNAL_OES << ", " << 23;
   DALI_TEST_CHECK( gl.GetTextureTrace().FindMethodAndParams("BindTexture", params.str()) );
 
   END_TEST;
@@ -1068,7 +1214,7 @@ int UtcDaliImageViewSetImageBufferImageWithCustomShaderToNativeImage(void)
   DALI_TEST_CHECK( gl.GetTextureTrace().FindMethod("BindTexture") );
 
   std::stringstream nativeImageParams;
-  nativeImageParams << GL_TEXTURE_2D << ", " << 24;
+  nativeImageParams << GL_TEXTURE_EXTERNAL_OES << ", " << 24;
   DALI_TEST_CHECK( gl.GetTextureTrace().FindMethodAndParams("BindTexture", nativeImageParams.str()) );
 
 
index da05a53..77321db 100755 (executable)
@@ -601,18 +601,6 @@ int UtcDaliItemLayoutSetAndGetLayoutProperties(void)
 
 }
 
-int UtcDaliItemLayoutSetandGetLayoutChangedFlag(void)
-{
-  ToolkitTestApplication application;
-
-  TestItemLayoutPtr layout = TestItemLayout::New();
-  DALI_TEST_CHECK( layout );
-  layout->ResetLayoutChangedFlag();
-  DALI_TEST_CHECK(layout->HasLayoutChanged() == false);
-
-  END_TEST;
-}
-
 int UtcDaliItemRangeIntersection(void)
 {
   ToolkitTestApplication application;
index 3e3e303..040fb1c 100755 (executable)
@@ -1011,6 +1011,12 @@ int UtcDaliItemViewSetGetProperty(void)
   view.SetProperty( Scrollable::Property::OVERSHOOT_ENABLED, false );
   DALI_TEST_EQUALS( view.GetProperty(Scrollable::Property::OVERSHOOT_ENABLED).Get<bool>(), false, TEST_LOCATION );
 
+  // Test "overshootSize" property
+  DALI_TEST_CHECK( view.GetPropertyIndex("overshootSize") == Scrollable::Property::OVERSHOOT_SIZE  );
+  Vector2 overshootSize = Vector2(100.0f,100.0f);
+  view.SetProperty( Scrollable::Property::OVERSHOOT_SIZE, overshootSize );
+  DALI_TEST_EQUALS( view.GetProperty(Scrollable::Property::OVERSHOOT_SIZE).Get<Vector2>(), overshootSize, TEST_LOCATION );
+
   // Animatable properties
 
   // Test "layoutPosition" property
index 395b409..8231d2e 100644 (file)
@@ -141,7 +141,7 @@ int UtcDaliKeyInputFocusManagerSetFocus01(void)
   DALI_TEST_CHECK( ! focusedControl );
 
   DummyControl dummy = DummyControl::New(true);
-  DummyControlImplOverride& dummyImpl = static_cast<DummyControlImplOverride&>(dummy.GetImplementation());
+  Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
   dummy.SetSize(100.0f, 100.0f);
   stage.Add( dummy );
   DALI_TEST_CHECK( ! dummyImpl.keyInputFocusGained );
@@ -168,7 +168,7 @@ int UtcDaliKeyInputFocusManagerSetFocus02(void)
   DALI_TEST_CHECK(manager);
 
   DummyControl dummy1 = DummyControl::New(true);
-  DummyControlImplOverride& dummy1Impl = static_cast<DummyControlImplOverride&>(dummy1.GetImplementation());
+  Impl::DummyControl& dummy1Impl = static_cast<Impl::DummyControl&>(dummy1.GetImplementation());
   dummy1.SetSize(100.0f, 100.0f);
   stage.Add( dummy1 );
   DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusGained );
@@ -182,7 +182,7 @@ int UtcDaliKeyInputFocusManagerSetFocus02(void)
   dummy1Impl.keyInputFocusGained = false;
 
   DummyControl dummy2 = DummyControl::New(true);
-  DummyControlImplOverride& dummy2Impl = static_cast<DummyControlImplOverride&>(dummy2.GetImplementation());
+  Impl::DummyControl& dummy2Impl = static_cast<Impl::DummyControl&>(dummy2.GetImplementation());
   dummy2.SetSize(100.0f, 100.0f);
   stage.Add( dummy2 );
   DALI_TEST_CHECK( ! dummy2Impl.keyInputFocusGained );
@@ -213,14 +213,14 @@ int UtcDaliKeyInputFocusManagerGetCurrentFocusControl(void)
   DALI_TEST_CHECK(manager);
 
   DummyControl dummy1 = DummyControl::New(true);
-  DummyControlImplOverride& dummy1Impl = static_cast<DummyControlImplOverride&>(dummy1.GetImplementation());
+  Impl::DummyControl& dummy1Impl = static_cast<Impl::DummyControl&>(dummy1.GetImplementation());
   dummy1.SetSize(100.0f, 100.0f);
   stage.Add( dummy1 );
   DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusGained );
   DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusLost );
 
   DummyControl dummy2 = DummyControl::New(true);
-  DummyControlImplOverride& dummy2Impl = static_cast<DummyControlImplOverride&>(dummy2.GetImplementation());
+  Impl::DummyControl& dummy2Impl = static_cast<Impl::DummyControl&>(dummy2.GetImplementation());
   dummy2.SetSize(100.0f, 100.0f);
   stage.Add( dummy2 );
   DALI_TEST_CHECK( ! dummy2Impl.keyInputFocusGained );
@@ -265,14 +265,14 @@ int UtcDaliKeyInputFocusManagerRemoveFocus01(void)
   DALI_TEST_CHECK(manager);
 
   DummyControl dummy1 = DummyControl::New(true);
-  DummyControlImplOverride& dummy1Impl = static_cast<DummyControlImplOverride&>(dummy1.GetImplementation());
+  Impl::DummyControl& dummy1Impl = static_cast<Impl::DummyControl&>(dummy1.GetImplementation());
   dummy1.SetSize(100.0f, 100.0f);
   stage.Add( dummy1 );
   DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusGained );
   DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusLost );
 
   DummyControl dummy2 = DummyControl::New(true);
-  DummyControlImplOverride& dummy2Impl = static_cast<DummyControlImplOverride&>(dummy2.GetImplementation());
+  Impl::DummyControl& dummy2Impl = static_cast<Impl::DummyControl&>(dummy2.GetImplementation());
   dummy2.SetSize(100.0f, 100.0f);
   stage.Add( dummy2 );
   DALI_TEST_CHECK( ! dummy2Impl.keyInputFocusGained );
@@ -320,21 +320,21 @@ int UtcDaliKeyInputFocusManagerRemoveFocus02(void)
   DALI_TEST_CHECK(manager);
 
   DummyControl dummy1 = DummyControl::New(true);
-  DummyControlImplOverride& dummy1Impl = static_cast<DummyControlImplOverride&>(dummy1.GetImplementation());
+  Impl::DummyControl& dummy1Impl = static_cast<Impl::DummyControl&>(dummy1.GetImplementation());
   dummy1.SetSize(100.0f, 100.0f);
   stage.Add( dummy1 );
   DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusGained );
   DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusLost );
 
   DummyControl dummy2 = DummyControl::New(true);
-  DummyControlImplOverride& dummy2Impl = static_cast<DummyControlImplOverride&>(dummy2.GetImplementation());
+  Impl::DummyControl& dummy2Impl = static_cast<Impl::DummyControl&>(dummy2.GetImplementation());
   dummy2.SetSize(100.0f, 100.0f);
   stage.Add( dummy2 );
   DALI_TEST_CHECK( ! dummy2Impl.keyInputFocusGained );
   DALI_TEST_CHECK( ! dummy2Impl.keyInputFocusLost );
 
   DummyControl dummy3 = DummyControl::New(true);
-  DummyControlImplOverride& dummy3Impl = static_cast<DummyControlImplOverride&>(dummy3.GetImplementation());
+  Impl::DummyControl& dummy3Impl = static_cast<Impl::DummyControl&>(dummy3.GetImplementation());
   dummy3.SetSize(100.0f, 100.0f);
   stage.Add( dummy3 );
   DALI_TEST_CHECK( ! dummy3Impl.keyInputFocusGained );
@@ -384,14 +384,14 @@ int UtcDaliKeyInputFocusManagerRemoveFocus03(void)
   DALI_TEST_CHECK(manager);
 
   DummyControl dummy1 = DummyControl::New(true);
-  DummyControlImplOverride& dummy1Impl = static_cast<DummyControlImplOverride&>(dummy1.GetImplementation());
+  Impl::DummyControl& dummy1Impl = static_cast<Impl::DummyControl&>(dummy1.GetImplementation());
   dummy1.SetSize(100.0f, 100.0f);
   stage.Add( dummy1 );
   DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusGained );
   DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusLost );
 
   DummyControl dummy2 = DummyControl::New(true);
-  DummyControlImplOverride& dummy2Impl = static_cast<DummyControlImplOverride&>(dummy2.GetImplementation());
+  Impl::DummyControl& dummy2Impl = static_cast<Impl::DummyControl&>(dummy2.GetImplementation());
   dummy2.SetSize(100.0f, 100.0f);
   stage.Add( dummy2 );
   DALI_TEST_CHECK( ! dummy2Impl.keyInputFocusGained );
@@ -473,7 +473,7 @@ int UtcDaliKeyInputFocusManagerDestroyObject01(void)
   DALI_TEST_CHECK(manager);
 
   DummyControl dummy1 = DummyControl::New(true);
-  DummyControlImplOverride& dummy1Impl = static_cast<DummyControlImplOverride&>(dummy1.GetImplementation());
+  Impl::DummyControl& dummy1Impl = static_cast<Impl::DummyControl&>(dummy1.GetImplementation());
   dummy1.SetSize(100.0f, 100.0f);
   stage.Add( dummy1 );
   DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusGained );
@@ -481,7 +481,7 @@ int UtcDaliKeyInputFocusManagerDestroyObject01(void)
 
   {
     DummyControl dummy2 = DummyControl::New(true);
-    DummyControlImplOverride& dummy2Impl = static_cast<DummyControlImplOverride&>(dummy2.GetImplementation());
+    Impl::DummyControl& dummy2Impl = static_cast<Impl::DummyControl&>(dummy2.GetImplementation());
     dummy2.SetSize(100.0f, 100.0f);
     stage.Add( dummy2 );
     DALI_TEST_CHECK( ! dummy2Impl.keyInputFocusGained );
@@ -518,7 +518,7 @@ int UtcDaliKeyInputFocusManagerDestroyObject02(void)
   DALI_TEST_CHECK(manager);
 
   DummyControl dummy1 = DummyControl::New(true);
-  DummyControlImplOverride& dummy1Impl = static_cast<DummyControlImplOverride&>(dummy1.GetImplementation());
+  Impl::DummyControl& dummy1Impl = static_cast<Impl::DummyControl&>(dummy1.GetImplementation());
   dummy1.SetSize(100.0f, 100.0f);
   stage.Add( dummy1 );
   DALI_TEST_CHECK( ! dummy1Impl.keyInputFocusGained );
@@ -526,7 +526,7 @@ int UtcDaliKeyInputFocusManagerDestroyObject02(void)
 
 
   DummyControl dummy2 = DummyControl::New(true);
-  DummyControlImplOverride& dummy2Impl = static_cast<DummyControlImplOverride&>(dummy2.GetImplementation());
+  Impl::DummyControl& dummy2Impl = static_cast<Impl::DummyControl&>(dummy2.GetImplementation());
   dummy2.SetSize(100.0f, 100.0f);
   stage.Add( dummy2 );
   DALI_TEST_CHECK( ! dummy2Impl.keyInputFocusGained );
index c7a2a12..a480204 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali/integration-api/events/key-event-integ.h>
-
+#include <dali-toolkit/devel-api/controls/control-devel.h>
 
 using namespace Dali;
 using namespace Dali::Toolkit;
@@ -762,3 +762,351 @@ int UtcDaliKeyboardFocusManagerMoveFocusBackward(void)
 
   END_TEST;
 }
+
+int UtcDaliKeyboardFocusManagerChangeFocusDirectionByKeyEvents(void)
+{
+  ToolkitTestApplication application;
+
+  tet_infoline(" UtcDaliKeyboardFocusManagerChangeFocusDirectionByKeyEvents");
+
+  KeyboardFocusManager manager = KeyboardFocusManager::Get();
+  DALI_TEST_CHECK(manager);
+
+  bool preFocusChangeSignalVerified = false;
+  PreFocusChangeCallback preFocusChangeCallback(preFocusChangeSignalVerified);
+  manager.PreFocusChangeSignal().Connect( &preFocusChangeCallback, &PreFocusChangeCallback::Callback );
+
+  bool focusChangedSignalVerified = false;
+  FocusChangedCallback focusChangedCallback(focusChangedSignalVerified);
+  manager.FocusChangedSignal().Connect( &focusChangedCallback, &FocusChangedCallback::Callback );
+
+  Integration::KeyEvent leftEvent("Left", "", 0, 0, 0, Integration::KeyEvent::Down);
+  Integration::KeyEvent rightEvent("Right", "", 0, 0, 0, Integration::KeyEvent::Down);
+  Integration::KeyEvent upEvent("Up", "", 0, 0, 0, Integration::KeyEvent::Down);
+  Integration::KeyEvent downEvent("Down", "", 0, 0, 0, Integration::KeyEvent::Down);
+  Integration::KeyEvent pageUpEvent("Prior", "", 0, 0, 0, Integration::KeyEvent::Down);
+  Integration::KeyEvent pageDownEvent("Next", "", 0, 0, 0, Integration::KeyEvent::Down);
+
+  // Create a 2x2 table view and try to move focus inside it
+  TableView tableView = TableView::New( 2, 2 );
+  Stage::GetCurrent().Add(tableView);
+
+  // Create the first actor
+  Actor first = Actor::New();
+  first.SetKeyboardFocusable(true);
+
+  // Create the second actor
+  Actor second = Actor::New();
+  second.SetKeyboardFocusable(true);
+
+  // Create the third actor
+  Actor third = Actor::New();
+  third.SetKeyboardFocusable(true);
+
+  // Create the fourth actor
+  Actor fourth = Actor::New();
+  fourth.SetKeyboardFocusable(true);
+
+  // Add the four children to table view
+  tableView.AddChild(first, TableView::CellPosition(0, 0));
+  tableView.AddChild(second, TableView::CellPosition(0, 1));
+  tableView.AddChild(third, TableView::CellPosition(1, 0));
+  tableView.AddChild(fourth, TableView::CellPosition(1, 1));
+
+  // Set the focus to the first actor
+  DALI_TEST_CHECK(manager.SetCurrentFocusActor(first) == true);
+  DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
+  DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
+  DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == Actor());
+  DALI_TEST_CHECK(focusChangedCallback.mCurrentFocusedActor == first);
+  focusChangedCallback.Reset();
+
+  // Send the right key event to move the focus towards right
+  application.ProcessEvent(rightEvent);
+  DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second);
+  DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
+  DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == first);
+  DALI_TEST_CHECK(focusChangedCallback.mCurrentFocusedActor == second);
+  focusChangedCallback.Reset();
+
+  // Send the down key event to move the focus towards down
+  application.ProcessEvent(downEvent);
+  DALI_TEST_CHECK(manager.GetCurrentFocusActor() == fourth);
+  DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
+  DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == second);
+  DALI_TEST_CHECK(focusChangedCallback.mCurrentFocusedActor == fourth);
+  focusChangedCallback.Reset();
+
+  // Send the down event to move the focus towards left
+  application.ProcessEvent(leftEvent);
+  DALI_TEST_CHECK(manager.GetCurrentFocusActor() == third);
+  DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
+  DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == fourth);
+  DALI_TEST_CHECK(focusChangedCallback.mCurrentFocusedActor == third);
+  focusChangedCallback.Reset();
+
+  // Send the up event to move the focus towards up
+  application.ProcessEvent(upEvent);
+  DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
+  DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
+  DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == third);
+  DALI_TEST_CHECK(focusChangedCallback.mCurrentFocusedActor == first);
+  focusChangedCallback.Reset();
+
+  // Send the pape up event, but focus should not be moved because page up is not supported by table view
+  application.ProcessEvent(pageUpEvent);
+  DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
+  DALI_TEST_CHECK(preFocusChangeCallback.mSignalVerified);
+  DALI_TEST_CHECK(preFocusChangeCallback.mCurrentFocusedActor == first);
+  DALI_TEST_CHECK(preFocusChangeCallback.mProposedActorToFocus == first);
+  DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::KeyboardFocus::PAGE_UP);
+  preFocusChangeCallback.Reset();
+
+  // Send the pape down event, but focus should not be moved because page down is not supported by table view
+  application.ProcessEvent(pageDownEvent);
+  DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
+  DALI_TEST_CHECK(preFocusChangeCallback.mSignalVerified);
+  DALI_TEST_CHECK(preFocusChangeCallback.mCurrentFocusedActor == first);
+  DALI_TEST_CHECK(preFocusChangeCallback.mProposedActorToFocus == first);
+  DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::KeyboardFocus::PAGE_DOWN);
+  preFocusChangeCallback.Reset();
+
+  // Clear the focus
+  manager.ClearFocus();
+
+  // Send the pape up event, but nothing was focued so focus manager will try the initial focus
+  preFocusChangeCallback.Reset();
+  application.ProcessEvent(pageUpEvent);
+  DALI_TEST_CHECK(manager.GetCurrentFocusActor() == Actor());
+  DALI_TEST_CHECK(preFocusChangeCallback.mSignalVerified);
+  DALI_TEST_CHECK(preFocusChangeCallback.mCurrentFocusedActor == Actor());
+  DALI_TEST_CHECK(preFocusChangeCallback.mProposedActorToFocus == Actor());
+  DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::KeyboardFocus::RIGHT);
+
+  // Clear the focus again
+  manager.ClearFocus();
+
+  // Send the pape down event, but nothing was focued so focus manager will try the initial focus
+  preFocusChangeCallback.Reset();
+  application.ProcessEvent(pageDownEvent);
+  DALI_TEST_CHECK(manager.GetCurrentFocusActor() == Actor());
+  DALI_TEST_CHECK(preFocusChangeCallback.mSignalVerified);
+  DALI_TEST_CHECK(preFocusChangeCallback.mCurrentFocusedActor == Actor());
+  DALI_TEST_CHECK(preFocusChangeCallback.mProposedActorToFocus == Actor());
+  DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::KeyboardFocus::RIGHT);
+
+  END_TEST;
+}
+
+
+
+
+
+int UtcDaliKeyboardFocusManagerMoveFocusTestStateChange(void)
+{
+  ToolkitTestApplication application;
+
+  tet_infoline(" UtcDaliKeyboardFocusManagerMoveFocusTestStateChange");
+
+  // Register Type
+  TypeInfo type;
+  type = TypeRegistry::Get().GetTypeInfo( "KeyboardFocusManager" );
+  DALI_TEST_CHECK( type );
+  BaseHandle handle = type.CreateInstance();
+  DALI_TEST_CHECK( handle );
+
+  KeyboardFocusManager manager = KeyboardFocusManager::Get();
+  DALI_TEST_CHECK(manager);
+
+  bool preFocusChangeSignalVerified = false;
+  PreFocusChangeCallback preFocusChangeCallback(preFocusChangeSignalVerified);
+  manager.PreFocusChangeSignal().Connect( &preFocusChangeCallback, &PreFocusChangeCallback::Callback );
+
+  bool focusChangedSignalVerified = false;
+  FocusChangedCallback focusChangedCallback(focusChangedSignalVerified);
+  manager.FocusChangedSignal().Connect( &focusChangedCallback, &FocusChangedCallback::Callback );
+
+  // Create the first actor and add it to the stage
+  Control first = Control::New();
+  first.SetKeyboardFocusable(true);
+  Stage::GetCurrent().Add(first);
+
+  // Create the second actor and add it to the stage
+  Control second = Control::New();
+  second.SetKeyboardFocusable(true);
+  Stage::GetCurrent().Add(second);
+
+  // Move the focus to the right
+  DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::RIGHT) == false);
+
+  // Because no layout control in the stage and no actor is focused, it should emit the PreFocusChange signal
+  DALI_TEST_CHECK(preFocusChangeCallback.mSignalVerified);
+  DALI_TEST_CHECK(preFocusChangeCallback.mCurrentFocusedActor == Actor());
+  DALI_TEST_CHECK(preFocusChangeCallback.mProposedActorToFocus == Actor());
+  DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::KeyboardFocus::RIGHT);
+  preFocusChangeCallback.Reset();
+
+  // Check that the focus is set on the first actor
+  DALI_TEST_CHECK(manager.SetCurrentFocusActor(first) == true);
+  DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
+  DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
+  DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == Actor());
+  DALI_TEST_CHECK(focusChangedCallback.mCurrentFocusedActor == first);
+  DALI_TEST_EQUALS(first.GetProperty<std::string>(DevelControl::Property::STATE), "FOCUSED", TEST_LOCATION );
+  focusChangedCallback.Reset();
+
+  // Move the focus towards right
+  DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::RIGHT) == false);
+
+  // Because no layout control in the stage and the first actor is focused, it should emit the PreFocusChange signal
+  DALI_TEST_CHECK(preFocusChangeCallback.mSignalVerified);
+  DALI_TEST_CHECK(preFocusChangeCallback.mCurrentFocusedActor == first);
+  DALI_TEST_CHECK(preFocusChangeCallback.mProposedActorToFocus == Actor());
+  DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::KeyboardFocus::RIGHT);
+  preFocusChangeCallback.Reset();
+
+  // Check that the focus is set on the second actor
+  DALI_TEST_CHECK(manager.SetCurrentFocusActor(second) == true);
+  DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second);
+  DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
+  DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == first);
+  DALI_TEST_CHECK(focusChangedCallback.mCurrentFocusedActor == second);
+  DALI_TEST_EQUALS(first.GetProperty<std::string>(DevelControl::Property::STATE), "NORMAL", TEST_LOCATION );
+  DALI_TEST_EQUALS(second.GetProperty<std::string>(DevelControl::Property::STATE), "FOCUSED", TEST_LOCATION );
+  focusChangedCallback.Reset();
+
+  // Move the focus towards up
+  DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::UP) == false);
+
+  // Because no layout control in the stage and no actor is focused, it should emit the PreFocusChange signal
+  DALI_TEST_CHECK(preFocusChangeCallback.mSignalVerified);
+  DALI_TEST_CHECK(preFocusChangeCallback.mCurrentFocusedActor == second);
+  DALI_TEST_CHECK(preFocusChangeCallback.mProposedActorToFocus == Actor());
+  DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::KeyboardFocus::UP);
+  preFocusChangeCallback.Reset();
+  DALI_TEST_CHECK(!focusChangedCallback.mSignalVerified);
+
+  // Create a 2x2 table view and try to move focus inside it
+  TableView tableView = TableView::New( 2, 2 );
+  Stage::GetCurrent().Add(tableView);
+
+  // Create the third actor
+  Control third = Control::New();
+  third.SetKeyboardFocusable(true);
+
+  // Create the fourth actor
+  Control fourth = Control::New();
+  fourth.SetKeyboardFocusable(true);
+
+  // Add the four children to table view
+  tableView.AddChild(first, TableView::CellPosition(0, 0));
+  tableView.AddChild(second, TableView::CellPosition(0, 1));
+  tableView.AddChild(third, TableView::CellPosition(1, 0));
+  tableView.AddChild(fourth, TableView::CellPosition(1, 1));
+
+  // Set the focus to the first actor
+  DALI_TEST_CHECK(manager.SetCurrentFocusActor(first) == true);
+  DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
+  DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
+  DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == second);
+  DALI_TEST_CHECK(focusChangedCallback.mCurrentFocusedActor == first);
+
+  DALI_TEST_EQUALS(first.GetProperty<std::string>(DevelControl::Property::STATE), "FOCUSED", TEST_LOCATION );
+  DALI_TEST_EQUALS(second.GetProperty<std::string>(DevelControl::Property::STATE), "NORMAL", TEST_LOCATION );
+
+  focusChangedCallback.Reset();
+
+  // Move the focus towards right
+  DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::RIGHT) == true);
+  DALI_TEST_CHECK(manager.GetCurrentFocusActor() == second);
+  DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
+  DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == first);
+  DALI_TEST_CHECK(focusChangedCallback.mCurrentFocusedActor == second);
+  DALI_TEST_EQUALS(first.GetProperty<std::string>(DevelControl::Property::STATE), "NORMAL", TEST_LOCATION );
+  DALI_TEST_EQUALS(second.GetProperty<std::string>(DevelControl::Property::STATE), "FOCUSED", TEST_LOCATION );
+
+  focusChangedCallback.Reset();
+
+  // Move the focus towards down
+  DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::DOWN) == true);
+  DALI_TEST_CHECK(manager.GetCurrentFocusActor() == fourth);
+  DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
+  DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == second);
+  DALI_TEST_CHECK(focusChangedCallback.mCurrentFocusedActor == fourth);
+
+  DALI_TEST_EQUALS(first.GetProperty<std::string>(DevelControl::Property::STATE), "NORMAL", TEST_LOCATION );
+  DALI_TEST_EQUALS(second.GetProperty<std::string>(DevelControl::Property::STATE), "NORMAL", TEST_LOCATION );
+  DALI_TEST_EQUALS(third.GetProperty<std::string>(DevelControl::Property::STATE), "NORMAL", TEST_LOCATION );
+  DALI_TEST_EQUALS(fourth.GetProperty<std::string>(DevelControl::Property::STATE), "FOCUSED", TEST_LOCATION );
+
+  focusChangedCallback.Reset();
+
+  // Move the focus towards left
+  DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::LEFT) == true);
+  DALI_TEST_CHECK(manager.GetCurrentFocusActor() == third);
+  DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
+  DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == fourth);
+  DALI_TEST_CHECK(focusChangedCallback.mCurrentFocusedActor == third);
+
+  DALI_TEST_EQUALS(first.GetProperty<std::string>(DevelControl::Property::STATE), "NORMAL", TEST_LOCATION );
+  DALI_TEST_EQUALS(second.GetProperty<std::string>(DevelControl::Property::STATE), "NORMAL", TEST_LOCATION );
+  DALI_TEST_EQUALS(third.GetProperty<std::string>(DevelControl::Property::STATE), "FOCUSED", TEST_LOCATION );
+  DALI_TEST_EQUALS(fourth.GetProperty<std::string>(DevelControl::Property::STATE), "NORMAL", TEST_LOCATION );
+
+  focusChangedCallback.Reset();
+
+  // Move the focus towards up
+  DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::UP) == true);
+  DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
+  DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
+  DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == third);
+  DALI_TEST_CHECK(focusChangedCallback.mCurrentFocusedActor == first);
+  DALI_TEST_EQUALS(first.GetProperty<std::string>(DevelControl::Property::STATE), "FOCUSED", TEST_LOCATION );
+  DALI_TEST_EQUALS(second.GetProperty<std::string>(DevelControl::Property::STATE), "NORMAL", TEST_LOCATION );
+  DALI_TEST_EQUALS(third.GetProperty<std::string>(DevelControl::Property::STATE), "NORMAL", TEST_LOCATION );
+  DALI_TEST_EQUALS(fourth.GetProperty<std::string>(DevelControl::Property::STATE), "NORMAL", TEST_LOCATION );
+  focusChangedCallback.Reset();
+
+  // Move the focus towards left. The focus move will fail as no way to move it upwards
+  DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::LEFT) == false);
+  DALI_TEST_CHECK(manager.GetCurrentFocusActor() == first);
+  DALI_TEST_CHECK(preFocusChangeCallback.mSignalVerified);
+  DALI_TEST_CHECK(preFocusChangeCallback.mCurrentFocusedActor == first);
+  DALI_TEST_CHECK(preFocusChangeCallback.mProposedActorToFocus == Actor());
+  DALI_TEST_CHECK(preFocusChangeCallback.mDirection == Control::KeyboardFocus::LEFT);
+  DALI_TEST_EQUALS(first.GetProperty<std::string>(DevelControl::Property::STATE), "FOCUSED", TEST_LOCATION );
+  DALI_TEST_EQUALS(second.GetProperty<std::string>(DevelControl::Property::STATE), "NORMAL", TEST_LOCATION );
+  DALI_TEST_EQUALS(third.GetProperty<std::string>(DevelControl::Property::STATE), "NORMAL", TEST_LOCATION );
+  DALI_TEST_EQUALS(fourth.GetProperty<std::string>(DevelControl::Property::STATE), "NORMAL", TEST_LOCATION );
+
+  preFocusChangeCallback.Reset();
+  DALI_TEST_CHECK(!focusChangedCallback.mSignalVerified);
+
+  // Enable the loop
+  manager.SetFocusGroupLoop(true);
+  DALI_TEST_CHECK(manager.GetFocusGroupLoop() == true);
+
+  // Move the focus towards left again. The focus should move to the fourth actor.
+  DALI_TEST_CHECK(manager.MoveFocus(Control::KeyboardFocus::LEFT) == true);
+  DALI_TEST_CHECK(manager.GetCurrentFocusActor() == fourth);
+  DALI_TEST_CHECK(focusChangedCallback.mSignalVerified);
+  DALI_TEST_CHECK(focusChangedCallback.mOriginalFocusedActor == first);
+  DALI_TEST_CHECK(focusChangedCallback.mCurrentFocusedActor == fourth);
+
+  DALI_TEST_EQUALS(first.GetProperty<std::string>(DevelControl::Property::STATE), "NORMAL", TEST_LOCATION );
+  DALI_TEST_EQUALS(second.GetProperty<std::string>(DevelControl::Property::STATE), "NORMAL", TEST_LOCATION );
+  DALI_TEST_EQUALS(third.GetProperty<std::string>(DevelControl::Property::STATE), "NORMAL", TEST_LOCATION );
+  DALI_TEST_EQUALS(fourth.GetProperty<std::string>(DevelControl::Property::STATE), "FOCUSED", TEST_LOCATION );
+
+  focusChangedCallback.Reset();
+
+  // Clear the focus
+  manager.ClearFocus();
+  DALI_TEST_EQUALS(first.GetProperty<std::string>(DevelControl::Property::STATE), "NORMAL", TEST_LOCATION );
+  DALI_TEST_EQUALS(second.GetProperty<std::string>(DevelControl::Property::STATE), "NORMAL", TEST_LOCATION );
+  DALI_TEST_EQUALS(third.GetProperty<std::string>(DevelControl::Property::STATE), "NORMAL", TEST_LOCATION );
+  DALI_TEST_EQUALS(fourth.GetProperty<std::string>(DevelControl::Property::STATE), "NORMAL", TEST_LOCATION );
+
+
+  END_TEST;
+}
index 6bd2c05..cd38bc3 100644 (file)
@@ -916,11 +916,11 @@ int UtcDaliPopupPropertyContextualMode(void)
   // Test all contextual modes.
   const char* mode[5] = { "NON_CONTEXTUAL", "ABOVE", "RIGHT", "BELOW", "LEFT" };
   Vector2 offsetValues[5];
-  offsetValues[0] = Vector2( 0.0f, 0.0f );
-  offsetValues[1] = Vector2( 0.0f, -10.0f );
-  offsetValues[2] = Vector2( 10.0f, 0.0f );
-  offsetValues[3] = Vector2( 0.0f, 10.0f );
-  offsetValues[4] = Vector2( -10.0f, 0.0f );
+  offsetValues[0] = Vector2( 0.375f, 0.0f );
+  offsetValues[1] = Vector2( -0.125f, -10.5f );
+  offsetValues[2] = Vector2( 10.875f, -0.5f );
+  offsetValues[3] = Vector2( -0.125f, 10.5f );
+  offsetValues[4] = Vector2( -10.875f, -0.5f );
 
   for( int i = 0; i < 5; ++i )
   {
index 2a2ae20..4b965c8 100644 (file)
@@ -18,6 +18,9 @@
 #include <dali-toolkit-test-suite-utils.h>
 #include <dali-toolkit/dali-toolkit.h>
 #include <dali-toolkit/devel-api/controls/progress-bar/progress-bar.h>
+#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
+#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/public-api/visuals/image-visual-properties.h>
 
 using namespace Dali;
 using namespace Dali::Toolkit;
@@ -36,7 +39,10 @@ void utc_dali_toolkit_progressbar_cleanup(void)
 
 namespace
 {
-
+static const char* trackImage = TEST_RESOURCE_DIR "/progress-bar-skin-track-progress.png";
+static const char* progressImage = TEST_RESOURCE_DIR "/progress-bar-skin-progress-progress.png";
+static const char* secondaryProgressImage = TEST_RESOURCE_DIR "/progress-bar-skin-secondary-progress.png";
+static const char* indeterminateImage = TEST_RESOURCE_DIR "/progress-bar-skin-indeterminate.png";
 static bool gObjectCreatedCallBackCalled;
 
 static void TestCallback(BaseHandle handle)
@@ -107,7 +113,7 @@ int UtcDaliProgressBarDownCast(void)
 
 static bool gProgressBarValueChangedCallBackCalled = false;
 
-static void OnProgressBarValueChanged( ProgressBar progressBar, float value )
+static void OnProgressBarValueChanged( ProgressBar progressBar, float value, float secondaryValue )
 {
   gProgressBarValueChangedCallBackCalled = true;
 }
@@ -124,14 +130,21 @@ int UtcDaliProgressBarSignals(void)
   progressBar.SetAnchorPoint(ParentOrigin::TOP_LEFT);
   progressBar.SetSize( Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
   progressBar.SetPosition( 0.0f, 0.0f );
-
   progressBar.ValueChangedSignal().Connect( &OnProgressBarValueChanged );
+
   progressBar.SetProperty(ProgressBar::Property::PROGRESS_VALUE, 0.2f);
 
   application.SendNotification();
   application.Render();
 
-  //gProgressBarValueChangedCallBackCalled = false;
+  DALI_TEST_CHECK(gProgressBarValueChangedCallBackCalled);
+
+  //Check Secondary progress value can make signal
+  gProgressBarValueChangedCallBackCalled = false;
+  progressBar.SetProperty(ProgressBar::Property::SECONDARY_PROGRESS_VALUE, 0.2f);
+
+  application.SendNotification();
+  application.Render();
 
   DALI_TEST_CHECK(gProgressBarValueChangedCallBackCalled);
   END_TEST;
@@ -147,91 +160,140 @@ int UtcDaliProgressBarSetPropertyP(void)
   progressBar.SetAnchorPoint(ParentOrigin::TOP_LEFT);
   progressBar.SetSize( Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
   progressBar.SetPosition( 0.0f, 0.0f );
-
+  progressBar.ValueChangedSignal().Connect( &OnProgressBarValueChanged );
   Stage::GetCurrent().Add(progressBar);
   application.SendNotification();
   application.Render();
 
-  float val = progressBar.GetProperty<float>(ProgressBar::Property::PROGRESS_VALUE);
-  DALI_TEST_EQUALS(val, 0.0f, TEST_LOCATION);
-
-  progressBar.SetProperty(ProgressBar::Property::PROGRESS_VALUE, 0.2f);
-  val = progressBar.GetProperty<float>(ProgressBar::Property::PROGRESS_VALUE);
-  DALI_TEST_EQUALS(val, 0.2f, TEST_LOCATION);
-
-  progressBar.SetProperty(ProgressBar::Property::PROGRESS_VALUE, 0.8f);
-  val = progressBar.GetProperty<float>(ProgressBar::Property::PROGRESS_VALUE);
-  DALI_TEST_EQUALS(val, 0.8f, TEST_LOCATION);
-
-  progressBar.SetProperty(ProgressBar::Property::PROGRESS_VALUE, 0.4f);
-  val = progressBar.GetProperty<float>(ProgressBar::Property::PROGRESS_VALUE);
-  DALI_TEST_EQUALS(val, 0.4f, TEST_LOCATION);
-
-  progressBar.SetProperty(ProgressBar::Property::PROGRESS_VALUE, 0.0f);
-  val = progressBar.GetProperty<float>(ProgressBar::Property::PROGRESS_VALUE);
-  DALI_TEST_EQUALS(val, 0.0f, TEST_LOCATION);
-
-  progressBar.SetProperty(ProgressBar::Property::PROGRESS_VALUE, 1.0f);
-  val = progressBar.GetProperty<float>(ProgressBar::Property::PROGRESS_VALUE);
-  DALI_TEST_EQUALS(val, 1.0f, TEST_LOCATION);
-
-  progressBar.SetProperty(ProgressBar::Property::PROGRESS_VALUE, -1.0f);
-  val = progressBar.GetProperty<float>(ProgressBar::Property::PROGRESS_VALUE);
-  DALI_TEST_EQUALS(val, 1.0f, TEST_LOCATION);
-
-  progressBar.SetProperty(ProgressBar::Property::PROGRESS_VALUE, 0.9f);
-  val = progressBar.GetProperty<float>(ProgressBar::Property::PROGRESS_VALUE);
-  DALI_TEST_EQUALS(val, 0.9f, TEST_LOCATION);
-
-  progressBar.SetProperty(ProgressBar::Property::PROGRESS_VALUE, 1.1f);
-  val = progressBar.GetProperty<float>(ProgressBar::Property::PROGRESS_VALUE);
-  DALI_TEST_EQUALS(val, 0.9f, TEST_LOCATION);
-
-  progressBar.SetProperty(ProgressBar::Property::PROGRESS_VALUE, 2.0f);
-  val = progressBar.GetProperty<float>(ProgressBar::Property::PROGRESS_VALUE);
-  DALI_TEST_EQUALS(val, 0.9f, TEST_LOCATION);
-
-  progressBar.SetProperty(ProgressBar::Property::PROGRESS_VALUE, 0.0f);
-  val = progressBar.GetProperty<float>(ProgressBar::Property::PROGRESS_VALUE);
-  DALI_TEST_EQUALS(val, 0.0f, TEST_LOCATION);
-
-  progressBar.SetProperty(ProgressBar::Property::PROGRESS_VALUE, 0.9f);
-  val = progressBar.GetProperty<float>(ProgressBar::Property::PROGRESS_VALUE);
-  DALI_TEST_EQUALS(val, 0.9f, TEST_LOCATION);
-
-  progressBar.SetProperty(ProgressBar::Property::PROGRESS_VALUE, 0.09f);
-  val = progressBar.GetProperty<float>(ProgressBar::Property::PROGRESS_VALUE);
-  DALI_TEST_EQUALS(val, 0.09f, TEST_LOCATION);
-
-  progressBar.SetProperty(ProgressBar::Property::PROGRESS_VALUE, 0.1f);
-  val = progressBar.GetProperty<float>(ProgressBar::Property::PROGRESS_VALUE);
-  DALI_TEST_EQUALS(val, 0.1f, TEST_LOCATION);
-
-  {
-    Property::Map map;
-    map["rendererType"] = "image";
-    map["size"] = Vector2(200, 200);
-    map["url"] = "track2.png";
-    progressBar.SetProperty(ProgressBar::Property::TRACK_VISUAL, map);
-    map["url"] = "progress2.png";
-    progressBar.SetProperty(ProgressBar::Property::PROGRESS_VISUAL, map);
-
-    Property::Value value = progressBar.GetProperty(ProgressBar::Property::TRACK_VISUAL);
-    Property::Map* resultMap = value.GetMap();
-    DALI_TEST_CHECK( resultMap );
-    Property::Value* url = resultMap->Find("url");
-    DALI_TEST_CHECK( url ) ;
-    DALI_TEST_EQUALS( *url, "track2.png", TEST_LOCATION );
-
-    value = progressBar.GetProperty(ProgressBar::Property::PROGRESS_VISUAL);
-    resultMap = value.GetMap();
-    DALI_TEST_CHECK( resultMap );
-    url = resultMap->Find("url");
-    DALI_TEST_CHECK( url ) ;
-    DALI_TEST_EQUALS( *url, "progress2.png", TEST_LOCATION );
-
-   }
-
+  Property::Map map;
+  map["visualType"] = "IMAGE";
+  map[Toolkit::ImageVisual::Property::URL] = trackImage;
+  progressBar.SetProperty(ProgressBar::Property::TRACK_VISUAL, map);
+
+  Property::Value value = progressBar.GetProperty(ProgressBar::Property::TRACK_VISUAL);
+  Property::Map* resultMap = value.GetMap();
+  DALI_TEST_CHECK( resultMap );
+  Property::Value* urlValue = resultMap->Find( Toolkit::ImageVisual::Property::URL );
+  std::string urlString;
+  urlValue->Get( urlString );
+  DALI_TEST_CHECK( !urlString.empty() ) ;
+  DALI_TEST_EQUALS( urlString, trackImage, TEST_LOCATION );
+
+  Property::Map colorMap;
+  colorMap["visualType"] = "COLOR";
+  colorMap[Toolkit::ColorVisual::Property::MIX_COLOR] = Color::RED;
+  progressBar.SetProperty(ProgressBar::Property::TRACK_VISUAL, colorMap);
+
+  value = progressBar.GetProperty(ProgressBar::Property::TRACK_VISUAL);
+  resultMap = value.GetMap();
+  DALI_TEST_CHECK( resultMap );
+  Property::Value* colorValue = resultMap->Find( Toolkit::ColorVisual::Property::MIX_COLOR );
+  Vector4 color = Color::TRANSPARENT;
+  colorValue->Get( color );
+  DALI_TEST_CHECK( color != Color::TRANSPARENT );
+  DALI_TEST_EQUALS( color, Color::RED, TEST_LOCATION );
+
+  map[Toolkit::ImageVisual::Property::URL] = progressImage;
+  progressBar.SetProperty(ProgressBar::Property::PROGRESS_VISUAL, map);
+
+  value = progressBar.GetProperty(ProgressBar::Property::PROGRESS_VISUAL);
+  resultMap = value.GetMap();
+  DALI_TEST_CHECK( resultMap );
+  urlValue = resultMap->Find( Toolkit::ImageVisual::Property::URL );
+  urlValue->Get( urlString );
+  DALI_TEST_CHECK( !urlString.empty() ) ;
+  DALI_TEST_EQUALS( urlString, progressImage, TEST_LOCATION );
+
+  progressBar.SetProperty(ProgressBar::Property::SECONDARY_PROGRESS_VISUAL, secondaryProgressImage);
+
+  value = progressBar.GetProperty(ProgressBar::Property::SECONDARY_PROGRESS_VISUAL);
+  resultMap = value.GetMap();
+  DALI_TEST_CHECK( resultMap );
+  urlValue = resultMap->Find( Toolkit::ImageVisual::Property::URL );
+  urlValue->Get( urlString );
+  DALI_TEST_CHECK( !urlString.empty() ) ;
+  DALI_TEST_EQUALS( urlString, secondaryProgressImage, TEST_LOCATION );
+
+  map[Toolkit::ImageVisual::Property::URL] = secondaryProgressImage;
+  progressBar.SetProperty(ProgressBar::Property::SECONDARY_PROGRESS_VISUAL, map);
+
+  value = progressBar.GetProperty(ProgressBar::Property::SECONDARY_PROGRESS_VISUAL);
+  resultMap = value.GetMap();
+  DALI_TEST_CHECK( resultMap );
+  urlValue = resultMap->Find( Toolkit::ImageVisual::Property::URL );
+  urlValue->Get( urlString );
+  DALI_TEST_CHECK( !urlString.empty() ) ;
+  DALI_TEST_EQUALS( urlString, secondaryProgressImage, TEST_LOCATION );
+
+  map[Toolkit::ImageVisual::Property::URL] = indeterminateImage;
+  progressBar.SetProperty(ProgressBar::Property::INDETERMINATE_VISUAL, map);
+
+  value = progressBar.GetProperty(ProgressBar::Property::INDETERMINATE_VISUAL);
+  resultMap = value.GetMap();
+  DALI_TEST_CHECK( resultMap );
+  urlValue = resultMap->Find( Toolkit::ImageVisual::Property::URL );
+  urlValue->Get( urlString );
+  DALI_TEST_CHECK( !urlString.empty() ) ;
+  DALI_TEST_EQUALS( urlString, indeterminateImage, TEST_LOCATION );
+
+  progressBar.SetProperty(ProgressBar::Property::LABEL_VISUAL, "test1");
+
+  value = progressBar.GetProperty(ProgressBar::Property::LABEL_VISUAL);
+  resultMap = value.GetMap();
+  DALI_TEST_CHECK( resultMap );
+  Property::Value* textValue = resultMap->Find(Toolkit::TextVisual::Property::TEXT);
+
+  std::string textString;
+  textValue->Get( textString );
+  DALI_TEST_CHECK( !textString.empty() );
+  DALI_TEST_EQUALS( textString, std::string( "test1" ), TEST_LOCATION );
+
+  Property::Map textVisualMap2;
+  textVisualMap2.Insert( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT );
+  textVisualMap2.Insert( Toolkit::TextVisual::Property::TEXT, "test2" );
+  textVisualMap2.Insert( Toolkit::TextVisual::Property::POINT_SIZE, 12.0f );
+  progressBar.SetProperty(ProgressBar::Property::LABEL_VISUAL, textVisualMap2);
+
+  value = progressBar.GetProperty(ProgressBar::Property::LABEL_VISUAL);
+  resultMap = value.GetMap();
+  DALI_TEST_CHECK( resultMap );
+  textValue = resultMap->Find(Toolkit::TextVisual::Property::TEXT);
+
+  textValue->Get( textString );
+  DALI_TEST_CHECK( !textString.empty() );
+  DALI_TEST_EQUALS( textString, std::string( "test2" ), TEST_LOCATION );
+
+  progressBar.SetProperty(ProgressBar::Property::LABEL_VISUAL, "test3");
+
+  value = progressBar.GetProperty(ProgressBar::Property::LABEL_VISUAL);
+  resultMap = value.GetMap();
+  DALI_TEST_CHECK( resultMap );
+  textValue = resultMap->Find(Toolkit::TextVisual::Property::TEXT);
+
+  std::string textString2;
+  textValue->Get( textString2 );
+  DALI_TEST_CHECK( !textString2.empty() );
+  DALI_TEST_EQUALS( textString2, std::string( "test3" ), TEST_LOCATION );
+
+  Property::Map transitionMap;
+  transitionMap["target"] = "indeterminateVisual";
+  transitionMap["property"] = "offset";
+  transitionMap["initialValue"] = Vector2( 0.0f, 0.0f );
+  transitionMap["targetValue"] = Vector2( 10.0f, 0.0f );
+  transitionMap["animator"] = Property::Map().Add("alphaFunction", "EASE_IN_OUT_BACK")
+                                             .Add("timePeriod", Property::Map().Add("delay", 0.5f).Add("duration", 1.0f));
+  Property::Array array;
+  array.PushBack( transitionMap );
+  progressBar.SetProperty(ProgressBar::Property::INDETERMINATE_VISUAL_ANIMATION, array);
+
+  Property::Map transitionMap2;
+  transitionMap2["target"] = "indeterminateVisual";
+  transitionMap2["property"] = "offset";
+  transitionMap2["initialValue"] = Vector2( 0.0f, 0.0f );
+  transitionMap2["targetValue"] = Vector2( 15.0f, 0.0f );
+  transitionMap2["animator"] = Property::Map().Add("alphaFunction", "EASE_IN_OUT_BACK")
+                                             .Add("timePeriod", Property::Map().Add("delay", 0.5f).Add("duration", 1.0f));
+  progressBar.SetProperty(ProgressBar::Property::INDETERMINATE_VISUAL_ANIMATION, transitionMap2);
   END_TEST;
 }
 
@@ -245,6 +307,7 @@ int UtcDaliProgressBarSetPropertyP1(void)
   progressBar.SetAnchorPoint(ParentOrigin::TOP_LEFT);
   progressBar.SetSize( Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
   progressBar.SetPosition( 0.0f, 0.0f );
+  progressBar.ValueChangedSignal().Connect( &OnProgressBarValueChanged );
 
   Stage::GetCurrent().Add(progressBar);
   application.SendNotification();
@@ -254,7 +317,7 @@ int UtcDaliProgressBarSetPropertyP1(void)
   DALI_TEST_EQUALS(val, 0.0f, TEST_LOCATION);
 
   // test to download a file of 100k in chunks
-  float lowerBound = 0, upperBound = 100, progressValue = 0, chunkValue = 0;
+  float lowerBound = 0, upperBound = 100, progressValue = 0, secondaryProgressValue = 0, chunkValue = 0;
 
   while( chunkValue <= upperBound )
   {
@@ -277,6 +340,76 @@ int UtcDaliProgressBarSetPropertyP1(void)
     chunkValue = chunkValue + 100;
   }
 
+  val = progressBar.GetProperty<float>(ProgressBar::Property::SECONDARY_PROGRESS_VALUE);
+  DALI_TEST_EQUALS(val, 0.0f, TEST_LOCATION);
+
+  // test to download a file of 100k in chunks
+  lowerBound = 0, upperBound = 100, secondaryProgressValue = 0, chunkValue = 0;
+
+  while( chunkValue <= upperBound )
+  {
+    secondaryProgressValue = (chunkValue - lowerBound ) / ( upperBound - lowerBound );
+    progressBar.SetProperty(ProgressBar::Property::SECONDARY_PROGRESS_VALUE, secondaryProgressValue);
+    val = progressBar.GetProperty<float>(ProgressBar::Property::SECONDARY_PROGRESS_VALUE);
+    DALI_TEST_EQUALS(val, secondaryProgressValue, TEST_LOCATION);
+    chunkValue = chunkValue + 10;
+  }
+
+  // test to download a file of 1000k in chunks
+  lowerBound = 0, upperBound = 1000, secondaryProgressValue = 0, chunkValue = 0;
+
+  while( chunkValue <= upperBound )
+  {
+    secondaryProgressValue = (chunkValue - lowerBound ) / ( upperBound - lowerBound );
+    progressBar.SetProperty(ProgressBar::Property::SECONDARY_PROGRESS_VALUE, secondaryProgressValue);
+    val = progressBar.GetProperty<float>(ProgressBar::Property::SECONDARY_PROGRESS_VALUE);
+    DALI_TEST_EQUALS(val, secondaryProgressValue, TEST_LOCATION);
+    chunkValue = chunkValue + 100;
+  }
+
   END_TEST;
 }
 
+int UtcDaliProgressBarSetPropertyP2(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliProgressBarSetPropertyP2" );
+
+  ProgressBar progressBar = ProgressBar::New();
+  progressBar.SetParentOrigin(ParentOrigin::TOP_LEFT);
+  progressBar.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+  progressBar.SetPosition( 0.0f, 0.0f );
+  progressBar.SetProperty(ProgressBar::Property::LABEL_VISUAL, "test");
+  progressBar.SetProperty(ProgressBar::Property::INDETERMINATE, true);
+  progressBar.SetProperty(ProgressBar::Property::TRACK_VISUAL, trackImage);
+  progressBar.SetProperty(ProgressBar::Property::PROGRESS_VISUAL, progressImage);
+  progressBar.SetProperty(ProgressBar::Property::SECONDARY_PROGRESS_VISUAL, secondaryProgressImage);
+  progressBar.SetProperty(ProgressBar::Property::INDETERMINATE_VISUAL, indeterminateImage);
+
+  Property::Map transitionMap;
+  transitionMap["target"] = "indeterminateVisual";
+  transitionMap["property"] = "offset";
+  transitionMap["initialValue"] = Vector2( 0.0f, 0.0f );
+  transitionMap["targetValue"] = Vector2( 10.0f, 0.0f );
+  transitionMap["animator"] = Property::Map().Add("alphaFunction", "EASE_IN_OUT_BACK")
+                                             .Add("timePeriod", Property::Map().Add("delay", 0.5f).Add("duration", 1.0f));
+  progressBar.SetProperty(ProgressBar::Property::INDETERMINATE_VISUAL_ANIMATION, transitionMap);
+  progressBar.SetProperty(ProgressBar::Property::PROGRESS_VALUE, 0.2f);
+  progressBar.SetProperty(ProgressBar::Property::SECONDARY_PROGRESS_VALUE, 0.3f);
+
+  progressBar.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
+  progressBar.SetSize( Vector2( Stage::GetCurrent().GetSize().x, 20.0f ) );
+  Stage::GetCurrent().Add(progressBar);
+  application.SendNotification();
+  application.Render();
+
+  // Test get/set INDETERMINATE
+  bool val = progressBar.GetProperty<bool>(ProgressBar::Property::INDETERMINATE);
+  DALI_TEST_EQUALS(val, true, TEST_LOCATION);
+
+  progressBar.SetProperty(ProgressBar::Property::INDETERMINATE, false);
+  val = progressBar.GetProperty<bool>(ProgressBar::Property::INDETERMINATE);
+  DALI_TEST_EQUALS(val, false, TEST_LOCATION);
+
+  END_TEST;
+}
index ea50a30..ded233f 100644 (file)
@@ -470,6 +470,11 @@ int UtcDaliToolkitScrollBarSetScrollIndicatorP(void)
   DALI_TEST_CHECK( indicator != scrollBar.GetScrollIndicator() );
   DALI_TEST_CHECK( newIndicator == scrollBar.GetScrollIndicator() );
 
+  // Check that the new control indicator is successfully set
+  Control controlIndicator = Control::New();
+  scrollBar.SetScrollIndicator(controlIndicator);
+
+  DALI_TEST_CHECK( controlIndicator == Control::DownCast( scrollBar.GetScrollIndicator() ) );
   END_TEST;
 }
 
index 883aacc..fdd32b5 100644 (file)
@@ -1198,6 +1198,11 @@ int UtcDaliToolkitScrollViewOvershoot(void)
   // Set up a scrollView...
   ScrollView scrollView = ScrollView::New();
   scrollView.SetOvershootEnabled(true);
+
+  Vector2 overshootSize = Vector2(100.0f,100.0f);
+  scrollView.SetProperty( Scrollable::Property::OVERSHOOT_SIZE, overshootSize );
+  DALI_TEST_EQUALS( scrollView.GetProperty(Scrollable::Property::OVERSHOOT_SIZE).Get<Vector2>(), overshootSize, TEST_LOCATION );
+
   Stage::GetCurrent().Add( scrollView );
   Vector2 stageSize = Stage::GetCurrent().GetSize();
   scrollView.SetSize(stageSize);
index 717b5cf..a527eac 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -213,31 +213,6 @@ void CleanupTest()
   ResetScrollCallbackResults();
 }
 
-Actor AddActorToPage(Actor page, float x, float y, float cols, float rows)
-{
-  Stage stage = Stage::GetCurrent();
-  Vector2 stageSize = stage.GetSize();
-
-  const float margin = 10.0f;
-  const Vector2 actorSize((stageSize.x / cols) - margin, (stageSize.y / rows) - margin);
-
-  Actor actor = Actor::New();
-  actor.SetParentOrigin( ParentOrigin::CENTER );
-  actor.SetAnchorPoint( AnchorPoint::CENTER );
-
-  Vector3 position( margin * 0.5f + (actorSize.x + margin) * x - stageSize.width * 0.5f,
-                    margin * 0.5f + (actorSize.y + margin) * y - stageSize.height * 0.5f,
-                    0.0f);
-  Vector3 positionEnd( margin * 0.5f + (actorSize.x + margin) * (x + cols) - stageSize.width * 0.5f - margin,
-                       margin * 0.5f + (actorSize.y + margin) * (y + rows) - stageSize.height * 0.5f - margin,
-                       0.0f);
-  Vector3 size(positionEnd - position);
-  actor.SetPosition( position + size * 0.5f);
-  actor.SetSize( positionEnd - position );
-  page.Add(actor);
-  return actor;
-}
-
 } // unnamed namespace
 
 int UtcDaliScrollViewPagePathEffectSetup(void)
index 2dae967..cd9d6bf 100644 (file)
@@ -25,6 +25,7 @@
 #include <dali/integration-api/events/tap-gesture-event.h>
 #include <dali-toolkit-test-suite-utils.h>
 #include <dali-toolkit/dali-toolkit.h>
+#include <dali-toolkit/devel-api/controls/text-controls/text-editor-devel.h>
 
 using namespace Dali;
 using namespace Toolkit;
@@ -84,6 +85,9 @@ const char* const PROPERTY_NAME_INPUT_EMBOSS                         = "inputEmb
 const char* const PROPERTY_NAME_OUTLINE                              = "outline";
 const char* const PROPERTY_NAME_INPUT_OUTLINE                        = "inputOutline";
 
+const char* const PROPERTY_NAME_SMOOTH_SCROLL                        = "smoothScroll";
+const char* const PROPERTY_NAME_SMOOTH_SCROLL_DURATION               = "smoothScrollDuration";
+
 const int DEFAULT_RENDERING_BACKEND = Dali::Toolkit::Text::DEFAULT_RENDERING_BACKEND;
 
 const Dali::Vector4 LIGHT_BLUE( 0.75f, 0.96f, 1.f, 1.f ); // The text highlight color.
@@ -324,6 +328,8 @@ int UtcDaliTextEditorGetPropertyP(void)
   DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_INPUT_EMBOSS ) == TextEditor::Property::INPUT_EMBOSS );
   DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_OUTLINE ) == TextEditor::Property::OUTLINE );
   DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_INPUT_OUTLINE ) == TextEditor::Property::INPUT_OUTLINE );
+  DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_SMOOTH_SCROLL ) == DevelTextEditor::Property::SMOOTH_SCROLL );
+  DALI_TEST_CHECK( editor.GetPropertyIndex( PROPERTY_NAME_SMOOTH_SCROLL_DURATION ) == DevelTextEditor::Property::SMOOTH_SCROLL_DURATION );
 
   END_TEST;
 }
@@ -593,6 +599,15 @@ int UtcDaliTextEditorSetPropertyP(void)
   editor.SetProperty( TextEditor::Property::INPUT_OUTLINE, "Outline input properties" );
   DALI_TEST_EQUALS( editor.GetProperty<std::string>( TextEditor::Property::INPUT_OUTLINE ), std::string("Outline input properties"), TEST_LOCATION );
 
+  // Check the smooth scroll property
+  DALI_TEST_EQUALS( editor.GetProperty<bool>( DevelTextEditor::Property::SMOOTH_SCROLL ), false, TEST_LOCATION );
+  editor.SetProperty( DevelTextEditor::Property::SMOOTH_SCROLL, true );
+  DALI_TEST_EQUALS( editor.GetProperty<bool>( DevelTextEditor::Property::SMOOTH_SCROLL ), true, TEST_LOCATION );
+
+  // Check the smooth scroll duration property
+  editor.SetProperty( DevelTextEditor::Property::SMOOTH_SCROLL_DURATION, 0.2f );
+  DALI_TEST_EQUALS( editor.GetProperty<float>( DevelTextEditor::Property::SMOOTH_SCROLL_DURATION ), 0.2f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+
   END_TEST;
 }
 
@@ -1520,3 +1535,73 @@ int utcDaliTextEditorEvent04(void)
 
   END_TEST;
 }
+
+int utcDaliTextEditorEvent05(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" utcDaliTextEditorEvent05");
+
+  // Checks if the highlight actor is created.
+
+  TextEditor editor = TextEditor::New();
+  DALI_TEST_CHECK( editor );
+
+  Stage::GetCurrent().Add( editor );
+
+  editor.SetProperty( TextEditor::Property::TEXT, "Hello\nworl" );
+  editor.SetProperty( TextEditor::Property::POINT_SIZE, 10.f );
+  editor.SetSize( 50.f, 50.f );
+  editor.SetParentOrigin( ParentOrigin::TOP_LEFT );
+  editor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+  editor.SetProperty( DevelTextEditor::Property::SMOOTH_SCROLL, true );
+  editor.SetProperty( DevelTextEditor::Property::SMOOTH_SCROLL_DURATION, 0.2f );
+
+  // Avoid a crash when core load gl resources.
+  application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Tap on the text editor
+  application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, Vector2( 3.f, 25.0f ) ) );
+  application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, Vector2( 3.f, 25.0f ) ) );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  // Move at the end of the text.
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down ) );
+  application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_DOWN, 0, 0, Integration::KeyEvent::Down ) );
+
+  // Render and notify
+  application.SendNotification();
+  application.Render();
+
+  for( unsigned int index = 0u; index < 10u; ++index )
+  {
+    // Add a character
+    application.ProcessEvent( GenerateKey( "d", "d", 0, 0, 0, Integration::KeyEvent::Down ) );
+
+    // Render and notify
+    application.SendNotification();
+    application.Render();
+  }
+  // Modify duration after scroll is enabled
+  editor.SetProperty( DevelTextEditor::Property::SMOOTH_SCROLL_DURATION, 0.1f );
+
+  // Continuous scroll left to increase coverage
+  for( unsigned int index = 0u; index < 10u; ++index )
+  {
+    application.ProcessEvent( GenerateKey( "", "", DALI_KEY_CURSOR_LEFT, 0, 0, Integration::KeyEvent::Down ) );
+
+    // Render and notify
+    application.SendNotification();
+    application.Render();
+  }
+  DALI_TEST_EQUALS( editor.GetProperty<float>( DevelTextEditor::Property::SMOOTH_SCROLL_DURATION ), 0.1f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+  DALI_TEST_EQUALS( editor.GetProperty<bool>( DevelTextEditor::Property::SMOOTH_SCROLL ), true, TEST_LOCATION );
+
+  END_TEST;
+}
index 2cee1b5..b1d76da 100644 (file)
@@ -111,7 +111,6 @@ int UtcDaliToolkitTextSelectionPopupDownCastP(void)
 
 int UtcDaliToolkitTextSelectionToolBarP(void)
 {
-
   // Creates Toolbar, adds 2 options and a divider then resizes divider
   ToolkitTestApplication application;
 
@@ -140,3 +139,27 @@ int UtcDaliToolkitTextSelectionToolBarP(void)
   DALI_TEST_CHECK( toolbar );
   END_TEST;
 }
+
+int UtcDaliToolkitTextSelectionToolBarScrollBarP(void)
+{
+  // Creates Toolbar, adds 2 options and a divider then resizes divider
+  ToolkitTestApplication application;
+
+  TextSelectionToolbar toolbar = TextSelectionToolbar::New();
+
+  toolbar.SetProperty( Toolkit::TextSelectionToolbar::Property::MAX_SIZE, Size( 100.0f, 60.0f) );
+
+  Toolkit::PushButton option = Toolkit::PushButton::New();
+  option.SetName( "test-option" );
+  option.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
+  toolbar.AddOption( option );
+
+  // Add a scroll-bar
+  toolbar.SetProperty( Toolkit::TextSelectionToolbar::Property::ENABLE_SCROLL_BAR, true );
+
+  bool enabled = toolbar.GetProperty<bool>( Toolkit::TextSelectionToolbar::Property::ENABLE_SCROLL_BAR );
+  DALI_TEST_CHECK( enabled );
+
+  DALI_TEST_CHECK( toolbar );
+  END_TEST;
+}
diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ToggleButton.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ToggleButton.cpp
new file mode 100755 (executable)
index 0000000..2f75b37
--- /dev/null
@@ -0,0 +1,384 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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>
+#include <dali/integration-api/events/touch-event-integ.h>
+#include <dali-toolkit/devel-api/controls/buttons/toggle-button.h>
+
+
+using namespace Dali;
+using namespace Dali::Toolkit;
+
+void dali_toggle_button_startup(void)
+{
+  test_return_value = TET_UNDEF;
+}
+
+void dali_toggle_button_cleanup(void)
+{
+  test_return_value = TET_PASS;
+}
+
+namespace
+{
+static const char* TEST_IMAGE_ONE   = TEST_RESOURCE_DIR "/icon-delete.png";
+static const char* TEST_IMAGE_TWO   = TEST_RESOURCE_DIR "/icon-edit.png";
+static const char* TEST_IMAGE_THREE = TEST_RESOURCE_DIR "/popup_tail_down.png";
+static const char* TEST_IMAGE_FOUR  = TEST_RESOURCE_DIR "/popup_tail_up.png";
+
+static const Vector2 INSIDE_TOUCH_POINT_POSITON  = Vector2( 240, 400 );
+static const Vector3 BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS  = Vector3( 200, 360, 0 );
+static const Size BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS  = Size( 100, 100 );
+
+static bool gObjectCreatedCallBackCalled;
+
+static void TestCallback(BaseHandle handle)
+{
+  gObjectCreatedCallBackCalled = true;
+}
+
+Dali::Integration::Point GetPointDownInside()
+{
+  Dali::Integration::Point point;
+  point.SetState( PointState::DOWN );
+  point.SetScreenPosition( INSIDE_TOUCH_POINT_POSITON );
+  return point;
+}
+
+Dali::Integration::Point GetPointUpInside()
+{
+  Dali::Integration::Point point;
+  point.SetState( PointState::UP );
+  point.SetScreenPosition( INSIDE_TOUCH_POINT_POSITON );
+  return point;
+}
+
+}
+
+int UtcDaliToggleButtonConstructorP(void)
+{
+  TestApplication application;
+  tet_infoline(" UtcDaliToggleButtonConstructorP");
+
+  ToggleButton button;
+  DALI_TEST_CHECK( !button );
+  END_TEST;
+}
+
+int UtcDaliToggleButtonCopyConstructorP(void)
+{
+  TestApplication application;
+  tet_infoline(" UtcDaliToggleButtonCopyConstructorP");
+
+  // Initialize an object, ref count == 1
+  ToggleButton button = ToggleButton::New();
+
+  ToggleButton copy( button );
+  DALI_TEST_CHECK( copy );
+  END_TEST;
+}
+
+int UtcDaliToggleButtonAssignmentOperatorP(void)
+{
+  TestApplication application;
+  tet_infoline(" UtcDaliToggleButtonAssignmentOperatorP");
+
+  ToggleButton button = ToggleButton::New();
+
+  ToggleButton copy( button );
+  DALI_TEST_CHECK( copy );
+
+  DALI_TEST_CHECK( button == copy );
+  END_TEST;
+}
+
+int UtcDaliToggleButtonNewP(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline(" UtcDaliToggleButtonNewP");
+
+  // Create the Slider actor
+  ToggleButton toggleButton;
+
+  DALI_TEST_CHECK( !toggleButton );
+
+  toggleButton = ToggleButton::New();
+
+  DALI_TEST_CHECK( toggleButton );
+
+  ToggleButton toggleButton2(toggleButton);
+
+  DALI_TEST_CHECK( toggleButton2 == toggleButton );
+
+  //Additional check to ensure object is created by checking if it's registered
+  ObjectRegistry registry = Stage::GetCurrent().GetObjectRegistry();
+  DALI_TEST_CHECK( registry );
+
+  gObjectCreatedCallBackCalled = false;
+  registry.ObjectCreatedSignal().Connect( &TestCallback );
+  {
+    ToggleButton toggleButton = ToggleButton::New();
+  }
+  DALI_TEST_CHECK( gObjectCreatedCallBackCalled );
+  END_TEST;
+}
+
+int UtcDaliToggleButtonDestructorP(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline("UtcDaliToggleButtonDestructorP");
+
+  ToggleButton* toggleButton = new ToggleButton();
+  delete toggleButton;
+
+  DALI_TEST_CHECK( true );
+  END_TEST;
+}
+
+int UtcDaliToggleButtonDownCast(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline("UtcDaliToggleButtonDownCast");
+
+  Handle handle = ToggleButton::New();
+  ToggleButton toggleButton = ToggleButton::DownCast( handle );
+
+  DALI_TEST_CHECK( toggleButton == handle );
+  END_TEST;
+}
+
+int UtcDaliToggleButtonToggleStatesProperty(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+  tet_infoline(" UtcDaliToggleButtonToggleStatesProperty");
+
+  // Create the ToggleButton actor
+  ToggleButton toggleButton = ToggleButton::New();
+  Stage::GetCurrent().Add( toggleButton );
+  toggleButton.SetParentOrigin(ParentOrigin::TOP_LEFT);
+  toggleButton.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+  toggleButton.SetPosition( 0.0f, 0.0f );
+
+  {// Check empty array
+    Property::Array toggleIcons;
+    toggleButton.SetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS, toggleIcons );
+
+    application.SendNotification();
+    application.Render();
+
+    Property::Array resultIcons;
+    resultIcons = toggleButton.GetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS ).Get<Property::Array>();
+    DALI_TEST_CHECK( resultIcons.Count() == 0 );
+  }
+
+  {// Check non-empty Array
+    Property::Array toggleIcons;
+    toggleIcons.PushBack( TEST_IMAGE_ONE ); //Icons path
+    toggleIcons.PushBack( TEST_IMAGE_TWO );
+    toggleIcons.PushBack( TEST_IMAGE_THREE );
+    toggleIcons.PushBack( TEST_IMAGE_FOUR );
+    toggleButton.SetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS, toggleIcons );
+
+    application.SendNotification();
+    application.Render();
+
+    Property::Array resultIcons;
+    resultIcons = toggleButton.GetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS ).Get<Property::Array>();
+
+    // Check that the result is the same as
+    DALI_TEST_EQUALS( toggleIcons.Count(), resultIcons.Count(), TEST_LOCATION );
+    DALI_TEST_CHECK( toggleIcons[0].Get<std::string>() == resultIcons[0].Get<std::string>() );
+    DALI_TEST_CHECK( toggleIcons[1].Get<std::string>() == resultIcons[1].Get<std::string>() );
+    DALI_TEST_CHECK( toggleIcons[2].Get<std::string>() == resultIcons[2].Get<std::string>() );
+    DALI_TEST_CHECK( toggleIcons[3].Get<std::string>() == resultIcons[3].Get<std::string>() );
+  }
+
+  {// Check property::map
+    Property::Map propertyMap1;
+    Vector4 testColor1( 1.f, 0.5f, 0.3f, 0.2f );
+    propertyMap1.Insert( Toolkit::Visual::Property::TYPE,  Toolkit::Visual::COLOR);
+    propertyMap1.Insert(Toolkit::ColorVisual::Property::MIX_COLOR,  testColor1);
+
+    Property::Map propertyMap2;
+    Vector4 testColor2( 0.5f, 1.f, 0.3f, 0.2f );
+    propertyMap2.Insert(Toolkit::Visual::Property::TYPE,  Toolkit::Visual::COLOR);
+    propertyMap2.Insert(Toolkit::ColorVisual::Property::MIX_COLOR,  testColor2);
+
+    Property::Map propertyMap3;
+    Vector4 testColor3( 1.f, 0.5f, 1.f, 0.2f );
+    propertyMap3.Insert(Toolkit::Visual::Property::TYPE,  Toolkit::Visual::COLOR);
+    propertyMap3.Insert(Toolkit::ColorVisual::Property::MIX_COLOR,  testColor3);
+
+    Property::Array toggleMaps;
+    toggleMaps.Add( propertyMap1 );
+    toggleMaps.Add( propertyMap2 );
+    toggleMaps.Add( propertyMap3 );
+    toggleButton.SetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS, toggleMaps );
+
+    application.SendNotification();
+    application.Render();
+
+    Property::Array resultMaps;
+    resultMaps = toggleButton.GetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS ).Get<Property::Array>();
+
+    // Check that the result
+    DALI_TEST_EQUALS( toggleMaps.Count(), resultMaps.Count(), TEST_LOCATION );
+  }
+
+  END_TEST;
+}
+
+int UtcDaliToggleButtonToggleTipsProperty( void )
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+  tet_infoline(" UtcDaliToggleButtonToggleTipsProperty");
+
+  // Create the ToggleButton actor
+  ToggleButton toggleButton = ToggleButton::New();
+  Stage::GetCurrent().Add( toggleButton );
+  toggleButton.SetParentOrigin(ParentOrigin::TOP_LEFT);
+  toggleButton.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+  toggleButton.SetPosition( 0.0f, 0.0f );
+
+  { // Check empty tip array
+    Property::Array toggleIcons;
+    toggleIcons.PushBack( TEST_IMAGE_ONE ); //Icons path
+    toggleIcons.PushBack( TEST_IMAGE_TWO );
+    toggleIcons.PushBack( TEST_IMAGE_THREE );
+    toggleButton.SetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS, toggleIcons );
+
+    Property::Array toggleTips;
+    toggleButton.SetProperty( Toolkit::ToggleButton::Property::TOOLTIPS, toggleTips );
+
+    application.SendNotification();
+    application.Render();
+
+    Property::Array resultTips;
+    resultTips = toggleButton.GetProperty( Toolkit::ToggleButton::Property::TOOLTIPS ).Get<Property::Array>();
+    DALI_TEST_CHECK( resultTips.Count() == 0 );
+  }
+
+  { // Check non-empty tip array
+    Property::Array toggleIcons;
+    toggleIcons.PushBack( TEST_IMAGE_ONE ); //Icons path
+    toggleIcons.PushBack( TEST_IMAGE_TWO );
+    toggleIcons.PushBack( TEST_IMAGE_THREE );
+    toggleButton.SetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS, toggleIcons );
+
+    Property::Array toggleTips;
+    toggleTips.PushBack( "Button State A" ); //Tooltip string
+    toggleTips.PushBack( "Button State B" );
+    toggleTips.PushBack( "Button State C" );
+    toggleButton.SetProperty( Toolkit::ToggleButton::Property::TOOLTIPS, toggleTips );
+
+    application.SendNotification();
+    application.Render();
+
+    Property::Array resultTips;
+    resultTips = toggleButton.GetProperty( Toolkit::ToggleButton::Property::TOOLTIPS ).Get<Property::Array>();
+
+    //Check that the result is the same as
+    DALI_TEST_EQUALS( toggleTips.Count(), resultTips.Count(), TEST_LOCATION );
+    DALI_TEST_CHECK( toggleTips[0].Get<std::string>() == resultTips[0].Get<std::string>() );
+    DALI_TEST_CHECK( toggleTips[1].Get<std::string>() == resultTips[1].Get<std::string>() );
+    DALI_TEST_CHECK( toggleTips[2].Get<std::string>() == resultTips[2].Get<std::string>() );
+    DALI_TEST_CHECK( toggleTips[3].Get<std::string>() == resultTips[3].Get<std::string>() );
+  }
+  END_TEST;
+}
+
+int UtcDaliToggleButtonStateChange(void)
+{
+  ToolkitTestApplication application;  // Exceptions require ToolkitTestApplication
+  tet_infoline(" UtcDaliToggleButtonStateChange");
+
+  // Create the ToggleButton actor
+  ToggleButton toggleButton = ToggleButton::New();
+  Stage::GetCurrent().Add( toggleButton );
+  toggleButton.SetParentOrigin(ParentOrigin::TOP_LEFT);
+  toggleButton.SetAnchorPoint(ParentOrigin::TOP_LEFT);
+  toggleButton.SetPosition( BUTTON_POSITON_TO_GET_INSIDE_TOUCH_EVENTS );
+  toggleButton.SetSize( BUTTON_SIZE_TO_GET_INSIDE_TOUCH_EVENTS );
+
+  Property::Array toggleIcons;
+  toggleIcons.PushBack( TEST_IMAGE_ONE ); //Icons path
+  toggleIcons.PushBack( TEST_IMAGE_TWO );
+  toggleIcons.PushBack( TEST_IMAGE_THREE );
+  toggleButton.SetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS, toggleIcons );
+
+  Property::Array toggleTips;
+  toggleTips.PushBack( "Button State A" ); //Tooltip string
+  toggleTips.PushBack( "Button State B" );
+  toggleTips.PushBack( "Button State C" );
+  toggleButton.SetProperty( Toolkit::ToggleButton::Property::TOOLTIPS, toggleTips );
+
+  application.SendNotification();
+  application.Render();
+
+  Property::Array resultIcons;
+  resultIcons = toggleButton.GetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS ).Get<Property::Array>();
+  DALI_TEST_EQUALS( toggleIcons.Count(), resultIcons.Count(), TEST_LOCATION );
+
+  Property::Array resultTips;
+  resultTips = toggleButton.GetProperty( Toolkit::ToggleButton::Property::TOOLTIPS ).Get<Property::Array>();
+  DALI_TEST_EQUALS( toggleTips.Count(), resultTips.Count(), TEST_LOCATION );
+
+  int index;
+  DALI_TEST_CHECK( toggleButton.GetProperty( Toolkit::ToggleButton::Property::CURRENT_STATE_INDEX ).Get( index ) );
+  DALI_TEST_EQUALS( index, 0, TEST_LOCATION );
+
+  Dali::Integration::TouchEvent event;
+
+  // Touch point down and up inside the button 3 times.
+  event = Dali::Integration::TouchEvent();
+  event.AddPoint( GetPointDownInside() );
+  application.ProcessEvent( event );
+
+  event = Dali::Integration::TouchEvent();
+  event.AddPoint( GetPointUpInside() );
+  application.ProcessEvent( event );
+
+  DALI_TEST_CHECK( toggleButton.GetProperty( Toolkit::ToggleButton::Property::CURRENT_STATE_INDEX ).Get( index ) );
+  DALI_TEST_EQUALS( index, 1, TEST_LOCATION );
+
+  event = Dali::Integration::TouchEvent();
+  event.AddPoint( GetPointDownInside() );
+  application.ProcessEvent( event );
+
+  event = Dali::Integration::TouchEvent();
+  event.AddPoint( GetPointUpInside() );
+  application.ProcessEvent( event );
+
+  DALI_TEST_CHECK( toggleButton.GetProperty( Toolkit::ToggleButton::Property::CURRENT_STATE_INDEX ).Get( index ) );
+  DALI_TEST_EQUALS( index, 2, TEST_LOCATION );
+
+  event = Dali::Integration::TouchEvent();
+  event.AddPoint( GetPointDownInside() );
+  application.ProcessEvent( event );
+
+  event = Dali::Integration::TouchEvent();
+  event.AddPoint( GetPointUpInside() );
+  application.ProcessEvent( event );
+
+  DALI_TEST_CHECK( toggleButton.GetProperty( Toolkit::ToggleButton::Property::CURRENT_STATE_INDEX ).Get( index ) );
+  DALI_TEST_EQUALS( index, 0, TEST_LOCATION );
+
+  END_TEST;
+}
\ No newline at end of file
index 58559d5..5ca2b17 100644 (file)
@@ -262,7 +262,6 @@ int UtcDaliTransitionDataMap1P(void)
   anim.Play();
 
   application.SendNotification();
-  application.Render(0);
   application.Render(500); // Start animation
   application.Render(500); // Halfway thru anim
   application.SendNotification();
index 4885bc2..f399d4d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@
 #include <dali/public-api/rendering/shader.h>
 #include <dali/devel-api/object/handle-devel.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
+#include <dali-toolkit/devel-api/visual-factory/transition-data.h>
 #include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
 #include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 #include <dali-toolkit/devel-api/align-enums.h>
@@ -85,6 +86,20 @@ bool DaliTestCheckMaps( const Property::Map& fontStyleMapGet, const Property::Ma
   return true;
 }
 
+void PrepareResourceImage( ToolkitTestApplication& application, unsigned int imageWidth, unsigned int imageHeight, Pixel::Format pixelFormat )
+{
+  TestPlatformAbstraction& platform = application.GetPlatform();
+  platform.SetClosestImageSize(Vector2( imageWidth, imageHeight));
+
+  Integration::Bitmap* bitmap = Integration::Bitmap::New( Integration::Bitmap::BITMAP_2D_PACKED_PIXELS, ResourcePolicy::OWNED_RETAIN );
+  Integration::PixelBuffer* pixbuffer = bitmap->GetPackedPixelsProfile()->ReserveBuffer( pixelFormat, imageWidth, imageHeight, imageWidth, imageHeight );
+  unsigned int bytesPerPixel = GetBytesPerPixel(  pixelFormat );
+  unsigned int initialColor = 0xFF;
+  memset( pixbuffer, initialColor, imageHeight*imageWidth*bytesPerPixel);
+
+  Integration::ResourcePointer resourcePtr(bitmap);
+  platform.SetSynchronouslyLoadedResource( resourcePtr );
+}
 } //namespace
 
 void dali_visual_startup(void)
@@ -97,6 +112,19 @@ void dali_visual_cleanup(void)
   test_return_value = TET_PASS;
 }
 
+
+static void TestMixColor( Visual::Base visual, Property::Index mixColorIndex, const Vector4& testColor )
+{
+  Property::Map map;
+  visual.CreatePropertyMap(map);
+  Property::Value* value = map.Find( mixColorIndex );
+  DALI_TEST_CHECK( value );
+  Vector4 mixColor;
+  DALI_TEST_CHECK( value->Get( mixColor ) );
+  DALI_TEST_EQUALS( mixColor, testColor, 0.001, TEST_LOCATION );
+}
+
+
 int UtcDaliVisualCopyAndAssignment(void)
 {
   ToolkitTestApplication application;
@@ -162,9 +190,9 @@ int UtcDaliVisualSetGetDepthIndex(void)
 
   visual.SetDepthIndex( 1.f );
 
-  DummyControl dummyControl = DummyControl::New();
-  DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(dummyControl.GetImplementation());
-  dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
+  DummyControl dummyControl = DummyControl::New(true);
+  Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummyControl.GetImplementation());
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
 
   dummyControl.SetSize(200.f, 200.f);
   Stage::GetCurrent().Add( dummyControl );
@@ -203,6 +231,7 @@ int UtcDaliVisualSize(void)
   DALI_TEST_EQUALS( naturalSize, Vector2::ZERO, TEST_LOCATION );
 
   // image visual
+  PrepareResourceImage( application, 100u, 200u, Pixel::RGBA8888 );
   Image image = ResourceImage::New(TEST_IMAGE_FILE_NAME, ImageDimensions(100, 200));
   Visual::Base imageVisual = factory.CreateVisual( image );
   imageVisual.SetTransformAndSize(DefaultTransform(), controlSize );
@@ -228,9 +257,11 @@ int UtcDaliVisualSize(void)
   propertyMap.Insert(Visual::Property::TYPE,  Visual::GRADIENT);
   Vector2 start(-1.f, -1.f);
   Vector2 end(1.f, 1.f);
-  propertyMap.Insert(GradientVisual::Property::START_POSITION,   start);
-  propertyMap.Insert(GradientVisual::Property::END_POSITION,   end);
-  propertyMap.Insert(GradientVisual::Property::STOP_OFFSET,   Vector2(0.f, 1.f));
+  propertyMap.Insert( "mixColor", Color::MAGENTA );
+  propertyMap.Insert( GradientVisual::Property::START_POSITION,   start) ;
+  propertyMap.Insert( GradientVisual::Property::END_POSITION,   end );
+  propertyMap.Insert( GradientVisual::Property::STOP_OFFSET,   Vector2(0.f, 1.f) );
+  propertyMap.Insert( GradientVisual::Property::SPREAD_METHOD, GradientVisual::SpreadMethod::REPEAT) ;
   Property::Array stopColors;
   stopColors.PushBack( Color::RED );
   stopColors.PushBack( Color::GREEN );
@@ -255,19 +286,6 @@ int UtcDaliVisualSize(void)
   svgVisual2.GetNaturalSize(naturalSize);
   DALI_TEST_EQUALS( naturalSize, Vector2(100.f, 100.f), TEST_LOCATION ); // Natural size should still be 100, 100
 
-  // Batch Image visual
-  TestPlatformAbstraction& platform = application.GetPlatform();
-  Vector2 testSize(80.f, 160.f);
-  platform.SetClosestImageSize(testSize);
-  propertyMap.Clear();
-  propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE );
-  propertyMap.Insert( ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME );
-  propertyMap.Insert( ImageVisual::Property::BATCHING_ENABLED, true );
-  Visual::Base batchImageVisual = factory.CreateVisual( propertyMap );
-  batchImageVisual.SetTransformAndSize(DefaultTransform(), controlSize );
-  batchImageVisual.GetNaturalSize( naturalSize );
-  DALI_TEST_EQUALS( naturalSize, Vector2( 80.0f, 160.0f ), TEST_LOCATION );
-
   // Text visual.
 
   // Load some fonts to get the same metrics on different platforms.
@@ -315,9 +333,9 @@ int UtcDaliVisualSetOnOffStage(void)
   propertyMap.Insert(ColorVisual::Property::MIX_COLOR,  Color::BLUE);
   Visual::Base visual = factory.CreateVisual( propertyMap );
 
-  DummyControl actor = DummyControl::New();
-  DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
-  dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
+  DummyControl actor = DummyControl::New(true);
+  Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
 
   actor.SetSize(200.f, 200.f);
 
@@ -340,16 +358,15 @@ int UtcDaliVisualSetOnOffStage(void)
   END_TEST;
 }
 
-
 int UtcDaliVisualGetPropertyMap1(void)
 {
   ToolkitTestApplication application;
-  tet_infoline( "UtcDaliVisualGetPropertyMap1: ColorVisual" );
+  tet_infoline( "UtcDaliVisualGetPropertyMap1: ColorVisual (With base MixColor" );
 
   VisualFactory factory = VisualFactory::Get();
   Property::Map propertyMap;
   propertyMap.Insert(Visual::Property::TYPE,  Visual::COLOR);
-  propertyMap.Insert(ColorVisual::Property::MIX_COLOR,  Color::BLUE);
+  propertyMap.Insert(DevelVisual::Property::MIX_COLOR,  Color::BLUE);
   Visual::Base colorVisual = factory.CreateVisual( propertyMap );
 
   Property::Map resultMap;
@@ -383,8 +400,10 @@ int UtcDaliVisualGetPropertyMap2(void)
   VisualFactory factory = VisualFactory::Get();
   Property::Map propertyMap;
   propertyMap.Insert(Visual::Property::TYPE,  Visual::BORDER);
-  propertyMap.Insert(BorderVisual::Property::COLOR,  Color::BLUE);
-  propertyMap.Insert(BorderVisual::Property::SIZE,  5.f);
+  propertyMap.Insert("mixColor", Vector4(1.0f, 0.0f, 1.0f, 0.5f) );
+  propertyMap.Insert("borderColor",  Color::BLUE);
+  propertyMap.Insert("borderSize",  5.f);
+  propertyMap.Insert("antiAliasing",  true);
   Visual::Base borderVisual = factory.CreateVisual( propertyMap );
 
   Property::Map resultMap;
@@ -403,6 +422,10 @@ int UtcDaliVisualGetPropertyMap2(void)
   DALI_TEST_CHECK( sizeValue );
   DALI_TEST_CHECK( sizeValue->Get<float>() == 5.f );
 
+  Property::Value* AAValue = resultMap.Find( BorderVisual::Property::ANTI_ALIASING, Property::BOOLEAN );
+  DALI_TEST_CHECK( AAValue );
+  DALI_TEST_CHECK( AAValue->Get<bool>() == true );
+
   Property::Map propertyMap1;
   propertyMap1[ Visual::Property::TYPE ] = Visual::BORDER;
   propertyMap1[ BorderVisual::Property::COLOR  ] = Color::CYAN;
@@ -426,6 +449,30 @@ int UtcDaliVisualGetPropertyMap2(void)
   END_TEST;
 }
 
+int UtcDaliVisualGetPropertyMap2N(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliVisualGetPropertyMap2N: BorderVisual with no setup properties" );
+
+  VisualFactory factory = VisualFactory::Get();
+  Property::Map propertyMap;
+  propertyMap.Insert(Visual::Property::TYPE,  Visual::BORDER);
+  Visual::Base borderVisual = factory.CreateVisual( propertyMap );
+
+  tet_infoline( "Test that the visual is created, with a default renderer" );
+  DALI_TEST_CHECK( borderVisual );
+
+  DummyControl dummyControl = DummyControl::New(true);
+  Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummyControl.GetImplementation());
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, borderVisual );
+  Stage::GetCurrent().Add( dummyControl );
+
+  DALI_TEST_EQUALS( dummyControl.GetRendererCount(), 1, TEST_LOCATION );
+
+  END_TEST;
+}
+
+
 int UtcDaliVisualGetPropertyMap3(void)
 {
   ToolkitTestApplication application;
@@ -439,9 +486,9 @@ int UtcDaliVisualGetPropertyMap3(void)
 
   Vector2 start(-1.f, -1.f);
   Vector2 end(1.f, 1.f);
-  propertyMap.Insert(GradientVisual::Property::START_POSITION, start);
-  propertyMap.Insert(GradientVisual::Property::END_POSITION, end);
-  propertyMap.Insert(GradientVisual::Property::SPREAD_METHOD, GradientVisual::SpreadMethod::REPEAT);
+  propertyMap.Insert( "startPosition", start);
+  propertyMap.Insert( "endPosition", end);
+  propertyMap.Insert( "spreadMethod", GradientVisual::SpreadMethod::REPEAT);
 
   propertyMap.Insert(GradientVisual::Property::STOP_OFFSET,   Vector2(0.2f, 0.8f));
 
@@ -572,14 +619,15 @@ int UtcDaliVisualGetPropertyMap5(void)
   VisualFactory factory = VisualFactory::Get();
   Property::Map propertyMap;
   propertyMap.Insert( Visual::Property::TYPE,  Visual::IMAGE );
+  propertyMap.Insert( DevelVisual::Property::MIX_COLOR, Color::MAGENTA );
   propertyMap.Insert( ImageVisual::Property::URL,  TEST_IMAGE_FILE_NAME );
   propertyMap.Insert( ImageVisual::Property::DESIRED_WIDTH,   20 );
   propertyMap.Insert( ImageVisual::Property::DESIRED_HEIGHT,   30 );
-  propertyMap.Insert( ImageVisual::Property::FITTING_MODE,   FittingMode::FIT_HEIGHT );
-  propertyMap.Insert( ImageVisual::Property::SAMPLING_MODE,   SamplingMode::BOX_THEN_NEAREST );
-  propertyMap.Insert( ImageVisual::Property::PIXEL_AREA, Vector4( 0.25f, 0.25f, 0.5f, 0.5f ) );
-  propertyMap.Insert( ImageVisual::Property::WRAP_MODE_U, WrapMode::REPEAT );
-  propertyMap.Insert( ImageVisual::Property::WRAP_MODE_V, WrapMode::MIRRORED_REPEAT );
+  propertyMap.Insert( "fittingMode",   FittingMode::FIT_HEIGHT );
+  propertyMap.Insert( "samplingMode",   SamplingMode::BOX_THEN_NEAREST );
+  propertyMap.Insert( "pixelArea", Vector4( 0.25f, 0.25f, 0.5f, 0.5f ) );
+  propertyMap.Insert( "wrapModeU", WrapMode::REPEAT );
+  propertyMap.Insert( "wrapModeV", WrapMode::MIRRORED_REPEAT );
   propertyMap.Insert( "synchronousLoading",   true );
 
   Visual::Base imageVisual = factory.CreateVisual(propertyMap);
@@ -597,6 +645,10 @@ int UtcDaliVisualGetPropertyMap5(void)
   DALI_TEST_CHECK( value );
   DALI_TEST_CHECK( value->Get<std::string>() == TEST_IMAGE_FILE_NAME );
 
+  value = resultMap.Find( DevelVisual::Property::MIX_COLOR,  Property::VECTOR4 );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_CHECK( value->Get<Vector4>() == Color::MAGENTA );
+
   value = resultMap.Find( ImageVisual::Property::FITTING_MODE,   Property::INTEGER );
   DALI_TEST_CHECK( value );
   DALI_TEST_CHECK( value->Get<int>() == FittingMode::FIT_HEIGHT );
@@ -630,6 +682,7 @@ int UtcDaliVisualGetPropertyMap5(void)
   DALI_TEST_CHECK( value->Get<bool>() == true );
 
   // Get an image visual with an image handle, and test the default property values
+  PrepareResourceImage( application, 100u, 200u, Pixel::RGBA8888 );
   Image image = ResourceImage::New(TEST_IMAGE_FILE_NAME, ImageDimensions(100, 200));
   imageVisual = factory.CreateVisual(image);
   imageVisual.CreatePropertyMap( resultMap );
@@ -685,6 +738,7 @@ int UtcDaliVisualGetPropertyMap6(void)
   VisualFactory factory = VisualFactory::Get();
   Property::Map propertyMap;
   propertyMap.Insert( Visual::Property::TYPE,  Visual::IMAGE );
+  propertyMap.Insert( "mixColor",  Color::MAGENTA );
   propertyMap.Insert( ImageVisual::Property::URL,  TEST_NPATCH_FILE_NAME );
   propertyMap.Insert( ImageVisual::Property::BORDER_ONLY,  true );
   Visual::Base nPatchVisual = factory.CreateVisual( propertyMap );
@@ -697,6 +751,10 @@ int UtcDaliVisualGetPropertyMap6(void)
   DALI_TEST_CHECK( value );
   DALI_TEST_CHECK( value->Get<int>() == Visual::IMAGE );
 
+  value = resultMap.Find( DevelVisual::Property::MIX_COLOR,  Property::VECTOR4 );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_CHECK( value->Get<Vector4>() == Color::MAGENTA );
+
   value = resultMap.Find( ImageVisual::Property::URL,  Property::STRING );
   DALI_TEST_CHECK( value );
   DALI_TEST_CHECK( value->Get<std::string>() == TEST_NPATCH_FILE_NAME );
@@ -718,6 +776,7 @@ int UtcDaliVisualGetPropertyMap7(void)
   VisualFactory factory = VisualFactory::Get();
   Property::Map propertyMap;
   propertyMap.Insert( Visual::Property::TYPE,  Visual::IMAGE );
+  propertyMap.Insert( DevelVisual::Property::MIX_COLOR, Color::WHITE );
   propertyMap.Insert( ImageVisual::Property::URL, TEST_SVG_FILE_NAME );
   Visual::Base svgVisual = factory.CreateVisual( propertyMap );
 
@@ -758,6 +817,7 @@ int UtcDaliVisualGetPropertyMap8(void)
   VisualFactory factory = VisualFactory::Get();
   Property::Map propertyMap;
   propertyMap.Insert( Visual::Property::TYPE, Visual::MESH );
+  propertyMap.Insert( DevelVisual::Property::MIX_COLOR, Color::BLUE );
   propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME );
   propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_MTL_FILE_NAME );
   propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, TEST_RESOURCE_LOCATION );
@@ -767,6 +827,7 @@ int UtcDaliVisualGetPropertyMap8(void)
 
   Property::Map resultMap;
   meshVisual.CreatePropertyMap( resultMap );
+  TestMixColor( meshVisual, DevelVisual::Property::MIX_COLOR, Color::BLUE );
 
   //Check values in the result map are identical to the initial map's values.
   Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER );
@@ -883,45 +944,6 @@ int UtcDaliVisualGetPropertyMap9(void)
   END_TEST;
 }
 
-int UtcDaliVisualGetPropertyMapBatchImageVisual(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline( "UtcDaliVisualGetPropertyMapBatchImageVisual:" );
-
-  VisualFactory factory = VisualFactory::Get();
-  Property::Map propertyMap;
-  propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE );
-  propertyMap.Insert( ImageVisual::Property::BATCHING_ENABLED, true );
-  propertyMap.Insert( ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME );
-  propertyMap.Insert( ImageVisual::Property::DESIRED_WIDTH, 20 );
-  propertyMap.Insert( ImageVisual::Property::DESIRED_HEIGHT, 30 );
-
-  Visual::Base batchImageVisual = factory.CreateVisual( propertyMap );
-  DALI_TEST_CHECK( batchImageVisual );
-
-  Property::Map resultMap;
-  batchImageVisual.CreatePropertyMap( resultMap );
-
-  // Check the property values from the returned map from visual
-  Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER );
-  DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<int>() == Visual::IMAGE );
-
-  value = resultMap.Find( ImageVisual::Property::URL, Property::STRING );
-  DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == TEST_IMAGE_FILE_NAME );
-
-  value = resultMap.Find( ImageVisual::Property::DESIRED_WIDTH, Property::INTEGER );
-  DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<int>() == 20 );
-
-  value = resultMap.Find( ImageVisual::Property::DESIRED_HEIGHT, Property::INTEGER );
-  DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<int>() == 30 );
-
-  END_TEST;
-}
-
 //Text shape visual
 int UtcDaliVisualGetPropertyMap10(void)
 {
@@ -933,6 +955,7 @@ int UtcDaliVisualGetPropertyMap10(void)
 
   Property::Map propertyMap;
   propertyMap.Insert( Visual::Property::TYPE, DevelVisual::TEXT );
+  propertyMap.Insert( DevelVisual::Property::MIX_COLOR, Color::BLACK );
   propertyMap.Insert( "renderingBackend", static_cast<int>( Toolkit::Text::DEFAULT_RENDERING_BACKEND ) );
   propertyMap.Insert( "enableMarkup", false );
   propertyMap.Insert( "text", "Hello world" );
@@ -957,6 +980,10 @@ int UtcDaliVisualGetPropertyMap10(void)
   DALI_TEST_CHECK( value );
   DALI_TEST_EQUALS( value->Get<int>(), (int)DevelVisual::TEXT, TEST_LOCATION );
 
+  value = resultMap.Find( DevelVisual::Property::MIX_COLOR, Property::VECTOR4 );
+  DALI_TEST_CHECK( value );
+  DALI_TEST_EQUALS( value->Get<Vector4>(), Color::BLACK, 0.001f, TEST_LOCATION );
+
   value = resultMap.Find( TextVisual::Property::TEXT, Property::STRING );
   DALI_TEST_CHECK( value );
   DALI_TEST_EQUALS( value->Get<std::string>(), "Hello world", TEST_LOCATION );
@@ -1038,36 +1065,6 @@ int UtcDaliVisualGetPropertyMap11(void)
   END_TEST;
 }
 
-int UtcDaliVisualGetPropertyMapBatchImageVisualNoAtlas(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline( "UtcDaliVisualGetPropertyMapBatchImageVisualNoAtlas:" );
-
-  VisualFactory factory = VisualFactory::Get();
-  Property::Map propertyMap;
-  propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE );
-  propertyMap.Insert( ImageVisual::Property::BATCHING_ENABLED, true );
-  propertyMap.Insert( ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME );
-
-  // Set the desired size to be larger than the atlas limit of 1024x1024.
-  propertyMap.Insert( ImageVisual::Property::DESIRED_WIDTH, 2048 );
-  propertyMap.Insert( ImageVisual::Property::DESIRED_HEIGHT, 2048 );
-
-  // Create the visual.
-  Visual::Base batchImageVisual = factory.CreateVisual( propertyMap );
-
-  DALI_TEST_CHECK( batchImageVisual );
-
-  DummyControl dummyControl = DummyControl::New();
-  DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(dummyControl.GetImplementation());
-  dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, batchImageVisual );
-  Stage::GetCurrent().Add( dummyControl );
-
-  DALI_TEST_CHECK( dummyControl.GetRendererCount() == 1u );
-
-  END_TEST;
-}
-
 int UtcDaliVisualAnimateBorderVisual01(void)
 {
   ToolkitTestApplication application;
@@ -1076,13 +1073,26 @@ int UtcDaliVisualAnimateBorderVisual01(void)
   VisualFactory factory = VisualFactory::Get();
   Property::Map propertyMap;
   propertyMap.Insert(Visual::Property::TYPE,  Visual::BORDER);
+  propertyMap.Insert(DevelVisual::Property::MIX_COLOR, Vector4(1, 1, 1, 0.8f));
   propertyMap.Insert(BorderVisual::Property::COLOR,  Color::BLUE);
   propertyMap.Insert(BorderVisual::Property::SIZE,  5.f);
   Visual::Base borderVisual = factory.CreateVisual( propertyMap );
 
-  DummyControl actor = DummyControl::New();
-  DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
-  dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, borderVisual );
+  Property::Map map;
+  map["target"] = "testVisual";
+  map["property"] = "mixColor";
+  map["targetValue"] = Vector4(1,1,1,0);
+  map["animator"] = Property::Map()
+    .Add("alphaFunction", "LINEAR")
+    .Add("timePeriod", Property::Map()
+         .Add("delay", 0.0f)
+         .Add("duration", 4.0f));
+
+  Dali::Toolkit::TransitionData transition = TransitionData::New( map );
+
+  DummyControl actor = DummyControl::New(true);
+  Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, borderVisual );
   actor.SetSize(2000, 2000);
   actor.SetParentOrigin(ParentOrigin::CENTER);
   Stage::GetCurrent().Add(actor);
@@ -1090,27 +1100,41 @@ int UtcDaliVisualAnimateBorderVisual01(void)
   DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
 
   Renderer renderer = actor.GetRendererAt(0);
-  Property::Index index = DevelHandle::GetPropertyIndex( renderer, BorderVisual::Property::COLOR );
+  Property::Index borderColorIndex = DevelHandle::GetPropertyIndex( renderer, BorderVisual::Property::COLOR );
+  Property::Index mixColorIndex = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::MIX_COLOR );
 
-  Animation animation = Animation::New(4.0f);
-  animation.AnimateTo( Property(renderer, index), Color::WHITE );
+  Animation animation = dummyImpl.CreateTransition( transition );
+
+  // Animate the mix color through the transition, and the border color through
+  // programmatic method.
+  animation.AnimateTo( Property(renderer, borderColorIndex), Color::WHITE );
   animation.Play();
 
   application.SendNotification();
   application.Render(0);
   application.Render(2000u); // halfway point between blue and white
 
-  Vector4 color = renderer.GetProperty<Vector4>( index );
+  Vector4 color = renderer.GetProperty<Vector4>( borderColorIndex );
   Vector4 testColor = (Color::BLUE + Color::WHITE)*0.5f;
   DALI_TEST_EQUALS( color, testColor, TEST_LOCATION );
   DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("borderColor", testColor ), true, TEST_LOCATION );
 
+  color = renderer.GetProperty<Vector4>( mixColorIndex );
+  testColor = Vector4( 1,1,1,0.4f );
+  DALI_TEST_EQUALS( color, testColor, 0.0001f, TEST_LOCATION );
+  DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("mixColor", testColor ), true, TEST_LOCATION );
+
   application.Render(2000u); // halfway point between blue and white
 
-  color = renderer.GetProperty<Vector4>( index );
+  color = renderer.GetProperty<Vector4>( borderColorIndex );
   DALI_TEST_EQUALS( color, Color::WHITE, TEST_LOCATION );
   DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("borderColor", Color::WHITE ), true, TEST_LOCATION );
 
+  color = renderer.GetProperty<Vector4>( mixColorIndex );
+  testColor = Vector4(1,1,1,0);
+  DALI_TEST_EQUALS( color, testColor, TEST_LOCATION );
+  DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("mixColor", testColor ), true, TEST_LOCATION );
+
   END_TEST;
 }
 
@@ -1127,9 +1151,9 @@ int UtcDaliVisualAnimateBorderVisual02(void)
   propertyMap.Insert(BorderVisual::Property::SIZE,  5.f);
   Visual::Base borderVisual = factory.CreateVisual( propertyMap );
 
-  DummyControl actor = DummyControl::New();
-  DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
-  dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, borderVisual );
+  DummyControl actor = DummyControl::New(true);
+  Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, borderVisual );
   actor.SetSize(2000, 2000);
   actor.SetParentOrigin(ParentOrigin::CENTER);
   Stage::GetCurrent().Add(actor);
@@ -1171,9 +1195,9 @@ int UtcDaliVisualAnimateColorVisual(void)
   propertyMap.Insert(ColorVisual::Property::MIX_COLOR, Color::BLUE);
   Visual::Base borderVisual = factory.CreateVisual( propertyMap );
 
-  DummyControl actor = DummyControl::New();
-  DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
-  dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, borderVisual );
+  DummyControl actor = DummyControl::New(true);
+  Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, borderVisual );
   actor.SetSize(2000, 2000);
   actor.SetParentOrigin(ParentOrigin::CENTER);
   Stage::GetCurrent().Add(actor);
@@ -1183,6 +1207,9 @@ int UtcDaliVisualAnimateColorVisual(void)
   Renderer renderer = actor.GetRendererAt(0);
   Property::Index index = DevelHandle::GetPropertyIndex( renderer, ColorVisual::Property::MIX_COLOR );
 
+  Property::Value blendModeValue = renderer.GetProperty( Renderer::Property::BLEND_MODE );
+  DALI_TEST_EQUALS( blendModeValue.Get<int>(), (int)BlendMode::AUTO, TEST_LOCATION );
+
   Animation animation = Animation::New(4.0f);
   animation.AnimateTo( Property(renderer, index), Color::WHITE );
   animation.Play();
@@ -1204,25 +1231,109 @@ int UtcDaliVisualAnimateColorVisual(void)
 
   DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("mixColor", Color::WHITE ), true, TEST_LOCATION );
 
+  blendModeValue = renderer.GetProperty( Renderer::Property::BLEND_MODE );
+  DALI_TEST_EQUALS( blendModeValue.Get<int>(), (int)BlendMode::AUTO, TEST_LOCATION );
 
   END_TEST;
 }
 
-
 int UtcDaliVisualAnimatePrimitiveVisual(void)
 {
   ToolkitTestApplication application;
   tet_infoline( "UtcDaliAnimatePrimitiveVisual color" );
 
+  {
+    VisualFactory factory = VisualFactory::Get();
+    Property::Map propertyMap;
+    propertyMap.Insert(Visual::Property::TYPE,  Visual::PRIMITIVE);
+    propertyMap.Insert(PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::CUBE);
+    propertyMap.Insert(PrimitiveVisual::Property::MIX_COLOR, Color::BLUE);
+    Visual::Base visual = factory.CreateVisual( propertyMap );
+
+    DummyControl actor = DummyControl::New(true);
+    Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
+    dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
+    actor.SetSize(2000, 2000);
+    actor.SetParentOrigin(ParentOrigin::CENTER);
+    actor.SetColor(Color::BLACK);
+    Stage::GetCurrent().Add(actor);
+
+    DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
+
+    Renderer renderer = actor.GetRendererAt(0);
+    Property::Index index = DevelHandle::GetPropertyIndex( renderer, PrimitiveVisual::Property::MIX_COLOR );
+
+    tet_infoline("Test that the renderer has the Primitive mix color");
+    DALI_TEST_CHECK( index != Property::INVALID_INDEX );
+
+    const Vector4 INITIAL_MIX_COLOR( 1.0f,0.0f,1.0f,0.5f ); // Magenta with half alpha
+    const Vector4 TARGET_MIX_COLOR( Color::RED );
+
+    Property::Map map;
+    map["target"] = "testVisual";
+    map["property"] = "mixColor";
+    map["initialValue"] = INITIAL_MIX_COLOR;
+    map["targetValue"] = TARGET_MIX_COLOR;
+    map["animator"] = Property::Map()
+      .Add("alphaFunction", "LINEAR")
+      .Add("timePeriod", Property::Map()
+           .Add("delay", 0.0f)
+           .Add("duration", 4.0f));
+
+    Dali::Toolkit::TransitionData transition = TransitionData::New( map );
+
+    Animation animation = dummyImpl.CreateTransition( transition );
+    Property::Value blendModeValue = renderer.GetProperty( Renderer::Property::BLEND_MODE );
+    DALI_TEST_EQUALS( blendModeValue.Get<int>(), (int)BlendMode::ON, TEST_LOCATION );
+
+    animation.AnimateTo( Property(actor, Actor::Property::COLOR), Color::WHITE );
+    animation.Play();
+
+    application.SendNotification();
+    application.Render(0);
+    application.Render(2000u); // halfway point
+    application.SendNotification();
+
+    DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("uColor", Vector4(0.5f, 0.5f, 0.5f, 1.0f )), true, TEST_LOCATION );
+
+    Vector4 halfwayColor = (INITIAL_MIX_COLOR + TARGET_MIX_COLOR)*0.5;
+    DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("mixColor", halfwayColor ), true, TEST_LOCATION );
+
+    application.Render(2001u); // go past end
+    application.SendNotification(); // Trigger signals
+
+    DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION );
+    DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("uColor", Color::WHITE ), true, TEST_LOCATION );
+    DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("mixColor", TARGET_MIX_COLOR ), true, TEST_LOCATION );
+
+    blendModeValue = renderer.GetProperty( Renderer::Property::BLEND_MODE );
+    DALI_TEST_EQUALS( blendModeValue.Get<int>(), (int)BlendMode::AUTO, TEST_LOCATION );
+
+    actor.Unparent();
+  }
+
+  END_TEST;
+}
+
+int UtcDaliVisualAnimateImageVisualMixColor(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliAnimateImageVisual mix color" );
+
+  application.GetPlatform().SetClosestImageSize( Vector2(100, 100) );
+
   VisualFactory factory = VisualFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert(Visual::Property::TYPE,  Visual::COLOR);
-  propertyMap.Insert(ColorVisual::Property::MIX_COLOR, Color::BLUE);
-  Visual::Base borderVisual = factory.CreateVisual( propertyMap );
+  propertyMap.Insert(Visual::Property::TYPE,  Visual::IMAGE);
+  propertyMap.Insert(ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME );
+  propertyMap.Insert("mixColor", Color::BLUE);
+  propertyMap.Insert(ImageVisual::Property::SYNCHRONOUS_LOADING, true);
+  Visual::Base visual = factory.CreateVisual( propertyMap );
+
+  DummyControl actor = DummyControl::New(true);
+  Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
 
-  DummyControl actor = DummyControl::New();
-  DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
-  dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, borderVisual );
   actor.SetSize(2000, 2000);
   actor.SetParentOrigin(ParentOrigin::CENTER);
   actor.SetColor(Color::BLACK);
@@ -1231,12 +1342,33 @@ int UtcDaliVisualAnimatePrimitiveVisual(void)
   DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
 
   Renderer renderer = actor.GetRendererAt(0);
-  Property::Index index = DevelHandle::GetPropertyIndex( renderer, PrimitiveVisual::Property::MIX_COLOR );
+  Property::Index index = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::MIX_COLOR );
+  Property::Value blendModeValue = renderer.GetProperty( Renderer::Property::BLEND_MODE );
+  DALI_TEST_EQUALS( blendModeValue.Get<int>(), (int)BlendMode::AUTO, TEST_LOCATION );
 
-  // The property isn't registered on the renderer, it's instead registered on the shader.
-  DALI_TEST_EQUALS( index, Property::INVALID_INDEX, TEST_LOCATION );
+  tet_infoline("Test that the renderer has the mixColor property");
+  DALI_TEST_CHECK( index != Property::INVALID_INDEX );
+
+  const Vector4 TARGET_MIX_COLOR( 1.0f, 0.0f, 0.0f, 0.5f );
+
+  Property::Map map;
+  map["target"] = "testVisual";
+  map["property"] = "mixColor";
+  map["initialValue"] = Color::MAGENTA;
+  map["targetValue"] = TARGET_MIX_COLOR;
+  map["animator"] = Property::Map()
+    .Add("alphaFunction", "LINEAR")
+    .Add("timePeriod", Property::Map()
+         .Add("delay", 0.0f)
+         .Add("duration", 4.0f));
+
+  Dali::Toolkit::TransitionData transition = TransitionData::New( map );
+
+  Animation animation = dummyImpl.CreateTransition( transition );
+
+  blendModeValue = renderer.GetProperty( Renderer::Property::BLEND_MODE );
+  DALI_TEST_EQUALS( blendModeValue.Get<int>(), (int)BlendMode::ON, TEST_LOCATION );
 
-  Animation animation = Animation::New(4.0f);
   animation.AnimateTo( Property(actor, Actor::Property::COLOR), Color::WHITE );
   animation.Play();
 
@@ -1244,18 +1376,87 @@ int UtcDaliVisualAnimatePrimitiveVisual(void)
   application.Render(0);
   application.Render(2000u); // halfway point
 
-  // Actor color overrides renderer color.
   DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("uColor", Vector4(0.5f, 0.5f, 0.5f, 1.0f )), true, TEST_LOCATION );
+  DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("mixColor", Vector4(1.0f, 0.0f, 0.5f, 0.75f )), true, TEST_LOCATION );
 
   application.Render(2000u); // halfway point between blue and white
 
   DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION );
   DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("uColor", Color::WHITE ), true, TEST_LOCATION );
+  DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("mixColor", TARGET_MIX_COLOR), true, TEST_LOCATION );
+
+  TestMixColor( visual, DevelVisual::Property::MIX_COLOR, TARGET_MIX_COLOR );
+
+  blendModeValue = renderer.GetProperty( Renderer::Property::BLEND_MODE );
+  DALI_TEST_EQUALS( blendModeValue.Get<int>(), (int)BlendMode::ON, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliVisualAnimateImageVisualPixelArea(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliAnimateImageVisual pixel area" );
+
+  application.GetPlatform().SetClosestImageSize( Vector2(100, 100) );
+
+  VisualFactory factory = VisualFactory::Get();
+  Property::Map propertyMap;
+  propertyMap.Insert(Visual::Property::TYPE,  Visual::IMAGE);
+  propertyMap.Insert(ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME );
+  propertyMap.Insert("mixColor", Color::BLUE);
+  propertyMap.Insert(ImageVisual::Property::SYNCHRONOUS_LOADING, true);
+  Visual::Base visual = factory.CreateVisual( propertyMap );
+
+  DummyControl actor = DummyControl::New(true);
+  Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
+
+  actor.SetSize(2000, 2000);
+  actor.SetParentOrigin(ParentOrigin::CENTER);
+  actor.SetColor(Color::BLACK);
+  Stage::GetCurrent().Add(actor);
+
+  DALI_TEST_EQUALS( actor.GetRendererCount(), 1u, TEST_LOCATION);
+
+  Renderer renderer = actor.GetRendererAt(0);
+  Property::Index index = DevelHandle::GetPropertyIndex( renderer, DevelVisual::Property::MIX_COLOR );
+
+  tet_infoline("Test that the renderer has the mixColor property");
+  DALI_TEST_CHECK( index != Property::INVALID_INDEX );
+
+  // TransitionData only takes string keys
+  Property::Map map;
+  map["target"] = "testVisual";
+  map["property"] = "pixelArea";
+  map["initialValue"] = Vector4( 0,0,0,1 );
+  map["targetValue"] = Vector4( 0,0,1,1 ); // Animate width from zero to full
+  map["animator"] = Property::Map()
+    .Add("alphaFunction", "LINEAR")
+    .Add("timePeriod", Property::Map()
+         .Add("delay", 0.0f)
+         .Add("duration", 4.0f));
+
+  Dali::Toolkit::TransitionData transition = TransitionData::New( map );
+
+  Animation animation = dummyImpl.CreateTransition( transition );
+  animation.AnimateTo( Property(actor, Actor::Property::COLOR), Color::WHITE );
+  animation.Play();
+
+  application.SendNotification();
+  application.Render(0);
+  application.Render(2000u); // halfway point
+
+  DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("pixelArea", Vector4(0.0f, 0.0f, 0.5f, 1.0f )), true, TEST_LOCATION );
+
+  application.Render(2000u);
 
+  DALI_TEST_EQUALS( application.GetGlAbstraction().CheckUniformValue<Vector4>("pixelArea", Vector4( 0.0f, 0.0f, 1.0f, 1.0f )), true, TEST_LOCATION );
 
   END_TEST;
 }
 
+
 int UtcDaliVisualWireframeVisual(void)
 {
   ToolkitTestApplication application;
@@ -1371,35 +1572,48 @@ static void TestTransform( ToolkitTestApplication& application, Visual::Base vis
   }
 
   //Put the visual on the stage
-  DummyControl actor = DummyControl::New();
-  DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
-  dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
+  DummyControl actor = DummyControl::New(true);
+  Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
   actor.SetSize(2000, 2000);
   actor.SetParentOrigin(ParentOrigin::CENTER);
   Stage::GetCurrent().Add(actor);
 
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
+  dummyImpl.SetLayout( DummyControl::Property::TEST_VISUAL, transform );
+
   application.SendNotification();
   application.Render(0);
   Renderer renderer( actor.GetRendererAt(0) );
 
   //Check that the properties have been registered on the Renderer
-  Vector2 offset = renderer.GetProperty<Vector2>( renderer.GetPropertyIndex( "offset" ) );
+  Property::Index index = renderer.GetPropertyIndex( "offset" );
+  DALI_TEST_CHECK( index != Property::INVALID_INDEX );
+  Vector2 offset = renderer.GetProperty<Vector2>( index );
   DALI_TEST_EQUALS( offset, Vector2(10.0f,10.0f), TEST_LOCATION );
 
-  Vector2 size = renderer.GetProperty<Vector2>( renderer.GetPropertyIndex( "size" ) );
+  index = renderer.GetPropertyIndex( "size" );
+  DALI_TEST_CHECK( index != Property::INVALID_INDEX );
+  Vector2 size = renderer.GetProperty<Vector2>( index );
   DALI_TEST_EQUALS( size, Vector2(0.2f,0.2f), TEST_LOCATION );
 
-  Vector4 offsetSizeMode = renderer.GetProperty<Vector4>( renderer.GetPropertyIndex( "offsetSizeMode" ) );
+  index = renderer.GetPropertyIndex( "offsetSizeMode" );
+  DALI_TEST_CHECK( index != Property::INVALID_INDEX );
+  Vector4 offsetSizeMode = renderer.GetProperty<Vector4>( index );
   DALI_TEST_EQUALS( offsetSizeMode, Vector4(1.0f,1.0f,0.0f,0.0f), TEST_LOCATION );
 
-  Vector2 parentOrigin = renderer.GetProperty<Vector2>( renderer.GetPropertyIndex( "origin" ) );
+  index = renderer.GetPropertyIndex( "origin" );
+  DALI_TEST_CHECK( index != Property::INVALID_INDEX );
+  Vector2 parentOrigin = renderer.GetProperty<Vector2>( index );
   DALI_TEST_EQUALS( parentOrigin, Vector2(-0.5f,-0.5f), TEST_LOCATION );
 
-  Vector2 anchorPoint = renderer.GetProperty<Vector2>( renderer.GetPropertyIndex( "anchorPoint" ) );
+  index = renderer.GetPropertyIndex( "anchorPoint" );
+  DALI_TEST_CHECK( index != Property::INVALID_INDEX );
+  Vector2 anchorPoint = renderer.GetProperty<Vector2>( index );
   DALI_TEST_EQUALS( anchorPoint, Vector2(-0.5f,-0.5f), TEST_LOCATION );
 
   //Set a new transform
   transform.Clear();
+  transform = DefaultTransform();
   transform.Insert( DevelVisual::Transform::Property::OFFSET, Vector2(20.0f, 20.0f) );
   transform.Insert( DevelVisual::Transform::Property::SIZE, Vector2(100.0f, 100.0f) );
   transform.Insert( DevelVisual::Transform::Property::OFFSET_SIZE_MODE, Vector4(0.0f, 0.0f, 1.0f,1.0f) );
@@ -1436,6 +1650,7 @@ int UtcDaliVisualSetTransform0(void)
   propertyMap.Insert(ColorVisual::Property::MIX_COLOR,  Color::BLUE);
   Visual::Base visual = factory.CreateVisual( propertyMap );
   TestTransform( application, visual );
+  TestMixColor( visual, ColorVisual::Property::MIX_COLOR, Color::BLUE );
 
   END_TEST;
 }
@@ -1448,12 +1663,13 @@ int UtcDaliVisualSetTransform1(void)
   VisualFactory factory = VisualFactory::Get();
   Property::Map propertyMap;
   propertyMap[ Visual::Property::TYPE           ] = Visual::PRIMITIVE;
-  propertyMap[ PrimitiveVisual::Property::MIX_COLOR ] = Vector4(1.0f,1.0f,1.0f,1.0f);
+  propertyMap[ PrimitiveVisual::Property::MIX_COLOR ] = Color::WHITE;
   propertyMap[ PrimitiveVisual::Property::SHAPE  ] = PrimitiveVisual::Shape::SPHERE;
   propertyMap[ PrimitiveVisual::Property::SLICES ] = 10;
   propertyMap[ PrimitiveVisual::Property::STACKS ] = 10;
   Visual::Base visual = factory.CreateVisual( propertyMap );
   TestTransform( application, visual );
+  TestMixColor( visual, PrimitiveVisual::Property::MIX_COLOR, Color::WHITE );
 
   END_TEST;
 }
@@ -1466,6 +1682,8 @@ int UtcDaliVisualSetTransform2(void)
   VisualFactory factory = VisualFactory::Get();
   Property::Map propertyMap;
   propertyMap.Insert( Visual::Property::TYPE,  Visual::GRADIENT );
+  propertyMap.Insert( DevelVisual::Property::MIX_COLOR,  Color::GREEN );
+
   Property::Array stopOffsets;
   stopOffsets.PushBack( 0.0f );
   stopOffsets.PushBack( 0.3f );
@@ -1485,6 +1703,7 @@ int UtcDaliVisualSetTransform2(void)
   propertyMap.Insert( GradientVisual::Property::RADIUS, 1.414f );
   Visual::Base visual = factory.CreateVisual( propertyMap );
   TestTransform( application, visual );
+  TestMixColor( visual, DevelVisual::Property::MIX_COLOR, Color::GREEN );
 
   END_TEST;
 }
@@ -1497,10 +1716,12 @@ int UtcDaliVisualSetTransform3(void)
   VisualFactory factory = VisualFactory::Get();
   Property::Map propertyMap;
   propertyMap.Insert( Visual::Property::TYPE, Visual::BORDER );
+  propertyMap.Insert( DevelVisual::Property::MIX_COLOR, Color::MAGENTA );
   propertyMap.Insert( BorderVisual::Property::COLOR, Vector4(0.f, 1.f, 0.f, 0.6f) );
   propertyMap.Insert( BorderVisual::Property::SIZE, 3.0f );
   Visual::Base visual = factory.CreateVisual( propertyMap );
   TestTransform( application, visual );
+  TestMixColor( visual, DevelVisual::Property::MIX_COLOR, Color::MAGENTA );
 
   END_TEST;
 }
@@ -1513,13 +1734,16 @@ int UtcDaliVisualSetTransform4(void)
   VisualFactory factory = VisualFactory::Get();
   Property::Map propertyMap;
   propertyMap.Insert( Visual::Property::TYPE, Visual::MESH );
-  propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME );
-  propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_MTL_FILE_NAME );
-  propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, TEST_RESOURCE_LOCATION );
-  propertyMap.Insert( MeshVisual::Property::SHADING_MODE, MeshVisual::ShadingMode::TEXTURELESS_WITH_DIFFUSE_LIGHTING );
-  propertyMap.Insert( MeshVisual::Property::LIGHT_POSITION, Vector3( 5.0f, 10.0f, 15.0f) );
+  propertyMap.Insert( DevelVisual::Property::MIX_COLOR, Color::CYAN );
+
+  propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
+  propertyMap.Insert( "materialUrl", TEST_MTL_FILE_NAME );
+  propertyMap.Insert( "texturesPath", TEST_RESOURCE_LOCATION );
+  propertyMap.Insert( "shadingMode", MeshVisual::ShadingMode::TEXTURELESS_WITH_DIFFUSE_LIGHTING );
+  propertyMap.Insert( "lightPosition", Vector3( 5.0f, 10.0f, 15.0f) );
   Visual::Base visual = factory.CreateVisual( propertyMap );
   TestTransform( application, visual );
+  TestMixColor( visual, DevelVisual::Property::MIX_COLOR, Color::CYAN );
 
   END_TEST;
 }
@@ -1533,6 +1757,7 @@ int UtcDaliVisualSetTransform5(void)
   Image image = ResourceImage::New(TEST_IMAGE_FILE_NAME, ImageDimensions(100, 200));
   Visual::Base visual = factory.CreateVisual(image);
   TestTransform( application, visual );
+  TestMixColor( visual, DevelVisual::Property::MIX_COLOR, Color::WHITE );
 
   END_TEST;
 }
@@ -1545,6 +1770,7 @@ int UtcDaliVisualSetTransform6(void)
   VisualFactory factory = VisualFactory::Get();
   Property::Map propertyMap;
   propertyMap[Toolkit::Visual::Property::TYPE] = Toolkit::Visual::IMAGE;
+  propertyMap[DevelVisual::Property::MIX_COLOR] = Color::YELLOW;
   propertyMap[Toolkit::ImageVisual::Property::URL] = TEST_IMAGE_FILE_NAME;
   propertyMap[Toolkit::ImageVisual::Property::DESIRED_WIDTH] = 100.0f;
   propertyMap[Toolkit::ImageVisual::Property::DESIRED_HEIGHT] = 100.0f;
@@ -1553,6 +1779,7 @@ int UtcDaliVisualSetTransform6(void)
   propertyMap[Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING] = true;
   Visual::Base visual = factory.CreateVisual(propertyMap);
   TestTransform( application, visual );
+  TestMixColor( visual, DevelVisual::Property::MIX_COLOR, Color::YELLOW );
 
   END_TEST;
 }
@@ -1566,6 +1793,7 @@ int UtcDaliVisualSetTransform7(void)
   Image image = ResourceImage::New(TEST_NPATCH_FILE_NAME, ImageDimensions(100, 200));
   Visual::Base visual = factory.CreateVisual(image);
   TestTransform( application, visual );
+  TestMixColor( visual, DevelVisual::Property::MIX_COLOR, Color::WHITE );
 
   END_TEST;
 }
@@ -1589,16 +1817,19 @@ int UtcDaliNPatchVisualCustomShader(void)
   transformMap["origin"] = Align::CENTER;
   properties[DevelVisual::Property::TRANSFORM] = transformMap;
 
-  properties[Dali::Toolkit::Visual::Property::TYPE] = Dali::Toolkit::Visual::IMAGE;
-  properties[Dali::Toolkit::Visual::Property::SHADER]=shader;
-  properties[Dali::Toolkit::ImageVisual::Property::URL] = TEST_NPATCH_FILE_NAME;
+  properties[Visual::Property::TYPE] = Visual::IMAGE;
+  properties[DevelVisual::Property::MIX_COLOR] = Color::BLUE;
+  properties[Visual::Property::SHADER]=shader;
+  properties[ImageVisual::Property::URL] = TEST_NPATCH_FILE_NAME;
 
   Visual::Base visual = factory.CreateVisual( properties );
+  TestMixColor( visual, DevelVisual::Property::MIX_COLOR, Color::BLUE );
 
   // trigger creation through setting on stage
-  DummyControl dummy = DummyControl::New();
-  DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(dummy.GetImplementation());
-  dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
+  DummyControl dummy = DummyControl::New(true);
+  Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummy.GetImplementation());
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
+  dummyImpl.SetLayout( DummyControl::Property::TEST_VISUAL, transformMap );
   dummy.SetSize(2000, 2000);
   dummy.SetParentOrigin(ParentOrigin::CENTER);
   Stage::GetCurrent().Add(dummy);
@@ -1620,6 +1851,7 @@ int UtcDaliNPatchVisualCustomShader(void)
 
   END_TEST;
 }
+
 int UtcDaliGradientVisualBlendMode(void)
 {
   ToolkitTestApplication application;
@@ -1639,13 +1871,13 @@ int UtcDaliGradientVisualBlendMode(void)
                      .Add( GradientVisual::Property::STOP_COLOR, Property::Array().Add( Color::RED )
                                                                                   .Add( Vector4( 1.0f, 1.0f, 1.0f, 0.5f ) ) ) );
 
-  DummyControl control = DummyControl::New();
+  DummyControl control = DummyControl::New(true);
   control.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS);
   Stage::GetCurrent().Add( control );
 
-  DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>( control.GetImplementation() );
-  dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, opaqueGradientVisual );
-  dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 2, alphaGradientVisual );
+  Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>( control.GetImplementation() );
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL,  opaqueGradientVisual );
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL2, alphaGradientVisual );
 
   application.SendNotification();
   application.Render();
@@ -1671,9 +1903,9 @@ int UtcDaliVisualRendererRemovalAndReAddition(void)
 
   visual.SetDepthIndex( 1.f );
 
-  DummyControl dummyControl = DummyControl::New();
-  DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(dummyControl.GetImplementation());
-  dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
+  DummyControl dummyControl = DummyControl::New(true);
+  Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummyControl.GetImplementation());
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
   DALI_TEST_EQUALS( dummyControl.GetRendererCount(), 0, TEST_LOCATION );
 
   dummyControl.SetSize(200.f, 200.f);
@@ -1715,6 +1947,7 @@ int UtcDaliVisualTextVisualRender(void)
   VisualFactory factory = VisualFactory::Get();
   Property::Map propertyMap;
   propertyMap.Insert( Visual::Property::TYPE, DevelVisual::TEXT );
+  propertyMap.Insert( "mixColor", Color::WHITE );
   propertyMap.Insert( "renderingBackend", static_cast<int>( Toolkit::Text::DEFAULT_RENDERING_BACKEND ) );
   propertyMap.Insert( "enableMarkup", false );
   propertyMap.Insert( "text", "Hello world" );
@@ -1733,8 +1966,8 @@ int UtcDaliVisualTextVisualRender(void)
   textVisual.SetDepthIndex( 1.f );
 
   DummyControl dummyControl = DummyControl::New(true);
-  DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(dummyControl.GetImplementation());
-  dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, textVisual );
+  Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummyControl.GetImplementation());
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, textVisual );
   DALI_TEST_EQUALS( dummyControl.GetRendererCount(), 0, TEST_LOCATION );
 
   dummyControl.SetSize(200.f, 200.f);
@@ -1759,7 +1992,7 @@ int UtcDaliVisualTextVisualRender(void)
   textVisual = factory.CreateVisual( propertyMap );
   textVisual.SetDepthIndex( 1.f );
 
-  dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, textVisual );
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, textVisual );
   dummyControl.SetSize( 720.f, 640.f );
 
   application.SendNotification(); // force process events to ensure text visual
@@ -1769,8 +2002,59 @@ int UtcDaliVisualTextVisualRender(void)
   Renderer renderer = dummyControl.GetRendererAt(0u);
   Property::Index index = renderer.GetPropertyIndex("size");
 
-  tet_infoline( "Test that the TextVisual overrides anything set by developer" );
-  DALI_TEST_EQUALS( renderer.GetProperty<Vector2>(index), Vector2( 1.0, 1.0 ), 0.001f, TEST_LOCATION );
+  tet_infoline( "Test that the TextVisual has NOT overridden what was set by developer" );
+  DALI_TEST_EQUALS( renderer.GetProperty<Vector2>(index), Vector2( 0.5f, 0.5f ), 0.001f, TEST_LOCATION );
+
+  END_TEST;
+}
+
+int UtcDaliVisualTextVisualDisableEnable(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliVisualTextVisualDisableEnable Ensure Text visible can be re-enabled" );
+
+  VisualFactory factory = VisualFactory::Get();
+  Property::Map propertyMap;
+  propertyMap.Insert( Visual::Property::TYPE, DevelVisual::TEXT );
+  propertyMap.Insert( "mixColor", Color::WHITE );
+  propertyMap.Insert( "renderingBackend", static_cast<int>( Toolkit::Text::DEFAULT_RENDERING_BACKEND ) );
+  propertyMap.Insert( "enableMarkup", false );
+  propertyMap.Insert( "text", "Hello world" );
+  propertyMap.Insert( "fontFamily", "TizenSans" );
+
+  Property::Map fontStyleMapSet;
+  fontStyleMapSet.Insert( "weight", "bold" );
+  propertyMap.Insert( "fontStyle", fontStyleMapSet );
+
+  propertyMap.Insert( "pointSize", 12.f );
+  propertyMap.Insert( "multiLine", true );
+  propertyMap.Insert( "horizontalAlignment", "CENTER" );
+  propertyMap.Insert( "verticalAlignment", "CENTER" );
+  propertyMap.Insert( "textColor", Color::RED );
+  Visual::Base textVisual = factory.CreateVisual( propertyMap );
+  textVisual.SetDepthIndex( 1.f );
+
+  DummyControl dummyControl = DummyControl::New(true);
+  Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(dummyControl.GetImplementation());
+  dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, textVisual );
+  DALI_TEST_EQUALS( dummyControl.GetRendererCount(), 0, TEST_LOCATION );
+
+  dummyControl.SetSize(200.f, 200.f);
+  dummyControl.SetParentOrigin( ParentOrigin::CENTER );
+
+  Stage::GetCurrent().Add( dummyControl );
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_EQUALS( dummyControl.GetRendererCount(), 1, TEST_LOCATION );
+
+  dummyImpl.EnableVisual( DummyControl::Property::TEST_VISUAL, false );
+
+  DALI_TEST_EQUALS( dummyControl.GetRendererCount(), 0, TEST_LOCATION );
+
+  dummyImpl.EnableVisual( DummyControl::Property::TEST_VISUAL, true );
+
+  DALI_TEST_EQUALS( dummyControl.GetRendererCount(), 1, TEST_LOCATION );
 
   END_TEST;
 }
index 0e9c014..2eb6262 100644 (file)
@@ -1334,6 +1334,30 @@ int UtcDaliVisualFactoryGetMeshVisual2(void)
   END_TEST;
 }
 
+//Test if mesh loads correctly when supplied with all main parameters, an object file, a material file and a directory location, but duff optional parameters
+int UtcDaliVisualFactoryGetMeshVisual3b(void)
+{
+  //Set up test application first, so everything else can be handled.
+  ToolkitTestApplication application;
+
+  tet_infoline( "UtcDaliVisualFactoryGetMeshVisual3:  Request mesh visual with all parameters correct" );
+
+  //Set up visual properties.
+  Property::Map propertyMap;
+  propertyMap.Insert( Visual::Property::TYPE, Visual::MESH );
+  propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME );
+  propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_MTL_FILE_NAME );
+  propertyMap.Insert( MeshVisual::Property::USE_MIPMAPPING, Color::GREEN ); // Test that wrong property types don't prevent the object load
+  propertyMap.Insert( MeshVisual::Property::USE_SOFT_NORMALS, 1.0f );
+  propertyMap.Insert( MeshVisual::Property::LIGHT_POSITION, 1.0f );
+  propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, TEST_RESOURCE_DIR "/" );
+
+  //Test to see if mesh loads correctly.
+  MeshVisualLoadsCorrectlyTest( propertyMap, application );
+
+  END_TEST;
+}
+
 //Test if mesh loads correctly when supplied with all main parameters, an object file, a material file and a directory location.
 int UtcDaliVisualFactoryGetMeshVisual3(void)
 {
@@ -1347,6 +1371,9 @@ int UtcDaliVisualFactoryGetMeshVisual3(void)
   propertyMap.Insert( Visual::Property::TYPE, Visual::MESH );
   propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME );
   propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_MTL_FILE_NAME );
+  propertyMap.Insert( MeshVisual::Property::USE_MIPMAPPING, false );
+  propertyMap.Insert( MeshVisual::Property::USE_SOFT_NORMALS, false );
+  propertyMap.Insert( MeshVisual::Property::LIGHT_POSITION, Vector3::XAXIS );
   propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, TEST_RESOURCE_DIR "/" );
 
   //Test to see if mesh loads correctly.
@@ -1374,7 +1401,6 @@ int UtcDaliVisualFactoryGetMeshVisual4(void)
   //Test to see if mesh loads correctly.
   MeshVisualLoadsCorrectlyTest( propertyMap, application );
 
-
   END_TEST;
 }
 
@@ -1389,10 +1415,13 @@ int UtcDaliVisualFactoryGetMeshVisual5(void)
   //Set up visual properties.
   Property::Map propertyMap;
   propertyMap.Insert( Visual::Property::TYPE, Visual::MESH );
-  propertyMap.Insert( MeshVisual::Property::OBJECT_URL, TEST_OBJ_FILE_NAME );
-  propertyMap.Insert( MeshVisual::Property::MATERIAL_URL, TEST_MTL_FILE_NAME );
-  propertyMap.Insert( MeshVisual::Property::TEXTURES_PATH, TEST_RESOURCE_DIR "/" );
-  propertyMap.Insert( MeshVisual::Property::SHADING_MODE, MeshVisual::ShadingMode::TEXTURED_WITH_SPECULAR_LIGHTING );
+  propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
+  propertyMap.Insert( "materialUrl", TEST_MTL_FILE_NAME );
+  propertyMap.Insert( "texturesPath", TEST_RESOURCE_DIR "/" );
+  propertyMap.Insert( "useMipmapping", false );
+  propertyMap.Insert( "useSoftNormals", false );
+  propertyMap.Insert( "lightPosition", Vector3::ZAXIS );
+  propertyMap.Insert( "shadingMode", MeshVisual::ShadingMode::TEXTURED_WITH_SPECULAR_LIGHTING );
 
   //Test to see if mesh loads correctly.
   MeshVisualLoadsCorrectlyTest( propertyMap, application );
@@ -1947,119 +1976,10 @@ int UtcDaliVisualFactoryGetPrimitiveVisualN1(void)
   END_TEST;
 }
 
-int UtcDaliVisualFactoryGetBatchImageVisual1(void)
+int UtcDaliVisualFactoryGetAnimatedImageVisual1(void)
 {
   ToolkitTestApplication application;
-  tet_infoline( "UtcDaliVisualFactoryGetBatchImageVisual1: Request a Batch Image visual with a Property::Map" );
-
-  VisualFactory factory = VisualFactory::Get();
-  DALI_TEST_CHECK( factory );
-
-  Property::Map propertyMap;
-  propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE );
-  propertyMap.Insert( ImageVisual::Property::BATCHING_ENABLED, true );
-  propertyMap.Insert( ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME );
-
-  Visual::Base visual = factory.CreateVisual( propertyMap );
-  DALI_TEST_CHECK( visual );
-
-  DummyControl actor = DummyControl::New();
-  DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
-  dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
-
-  actor.SetSize( 200.0f, 200.0f );
-  Stage::GetCurrent().Add( actor );
-  visual.SetTransformAndSize(DefaultTransform(),  Vector2( 200.0f, 200.0f ) );
-
-  // Test SetOnStage().
-  DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
-
-  application.SendNotification();
-  application.Render();
-
-  // Test SetOffStage().
-  actor.Unparent();
-  DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
-
-  END_TEST;
-}
-
-int UtcDaliVisualFactoryGetBatchImageVisual2(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline( "UtcDaliVisualFactoryGetBatchImageVisual2: Request Batch Image visual from an Image Visual with batchingEnabled set" );
-
-  VisualFactory factory = VisualFactory::Get();
-  DALI_TEST_CHECK( factory );
-
-  Property::Map propertyMap;
-  // Create a normal Image Visual.
-  propertyMap.Insert( Visual::Property::TYPE, Visual::IMAGE );
-  // Instruct the factory to change Image Visuals to Batch-Image Visuals.
-  propertyMap.Insert( ImageVisual::Property::BATCHING_ENABLED, true );
-
-  // Properties for the Batch-Image Visual.
-  propertyMap.Insert( ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME );
-
-  Visual::Base visual = factory.CreateVisual( propertyMap );
-  DALI_TEST_CHECK( visual );
-
-  // Check that a Batch-Image visual was created instead of an Image visual.
-  Property::Map resultMap;
-  visual.CreatePropertyMap( resultMap );
-
-  Property::Value* value = resultMap.Find( Visual::Property::TYPE, Property::INTEGER );
-  DALI_TEST_CHECK( value );
-  DALI_TEST_EQUALS( value->Get<int>(), (int)Visual::IMAGE, TEST_LOCATION );
-
-  DummyControl actor = DummyControl::New();
-  DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
-  dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
-
-  actor.SetSize( 200.0f, 200.0f );
-  Stage::GetCurrent().Add( actor );
-  visual.SetTransformAndSize(DefaultTransform(),  Vector2( 200.0f, 200.0f ) );
-
-  // Test SetOnStage().
-  DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
-
-  application.SendNotification();
-  application.Render();
-
-  // Test SetOffStage().
-  actor.Unparent();
-  DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
-
-  END_TEST;
-}
-
-int UtcDaliVisualFactoryGetBatchImageVisual3(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline( "UtcDaliVisualFactoryGetBatchImageVisual3: Create an ImageView that uses a batched visual internally" );
-
-  VisualFactory factory = VisualFactory::Get();
-  DALI_TEST_CHECK( factory );
-
-  // Create a property-map that enables batching.
-  Property::Map propertyMap;
-  propertyMap.Insert( Dali::Toolkit::ImageVisual::Property::URL, TEST_IMAGE_FILE_NAME );
-  propertyMap.Insert( ImageVisual::Property::BATCHING_ENABLED, true );
-
-  // Create an ImageView, passing the property-map in to instruct it to use batching.
-  Toolkit::ImageView imageView = Toolkit::ImageView::New();
-  imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, propertyMap );
-
-  imageView.SetSize( 200.0f, 200.0f );
-  Stage::GetCurrent().Add( imageView );
-
-  END_TEST;
-}
-
-int UtcDaliVisualFactoryGetAnimatedImageVisual(void)
-{
-  ToolkitTestApplication application;
-  tet_infoline( "UtcDaliVisualFactoryGetAnimatedImageVisual: Request animated image visual with a gif url" );
+  tet_infoline( "UtcDaliVisualFactoryGetAnimatedImageVisual1: Request animated image visual with a gif url" );
 
   VisualFactory factory = VisualFactory::Get();
   Visual::Base visual = factory.CreateVisual( TEST_GIF_FILE_NAME, ImageDimensions() );
@@ -2072,6 +1992,7 @@ int UtcDaliVisualFactoryGetAnimatedImageVisual(void)
   DummyControl actor = DummyControl::New();
   DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
   dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
+  actor.SetSize( 200.0f, 200.0f );
   Stage::GetCurrent().Add( actor );
 
   application.SendNotification();
@@ -2134,3 +2055,69 @@ int UtcDaliVisualFactoryGetAnimatedImageVisual(void)
 
   END_TEST;
 }
+
+int UtcDaliVisualFactoryGetAnimatedImageVisual2(void)
+{
+  ToolkitTestApplication application;
+  tet_infoline( "UtcDaliVisualFactoryGetAnimatedImageVisual2: Request animated image visual with a Property::Map, test custom wrap mode and pixel area" );
+
+  const Vector4 pixelArea(-0.5f, -0.5f, 2.f, 2.f);
+  Property::Map propertyMap;
+  propertyMap.Add( Visual::Property::TYPE,  Visual::IMAGE  )
+             .Add( ImageVisual::Property::URL, TEST_GIF_FILE_NAME  )
+             .Add( ImageVisual::Property::PIXEL_AREA, pixelArea )
+             .Add( ImageVisual::Property::WRAP_MODE_U, WrapMode::MIRRORED_REPEAT )
+             .Add( ImageVisual::Property::WRAP_MODE_V, WrapMode::REPEAT );
+
+  Visual::Base visual = VisualFactory::Get().CreateVisual( propertyMap );
+  DALI_TEST_CHECK( visual );
+
+  TestGlAbstraction& gl = application.GetGlAbstraction();
+  TraceCallStack& textureTrace = gl.GetTextureTrace();
+  textureTrace.Enable(true);
+  TraceCallStack& texParameterTrace = gl.GetTexParameterTrace();
+  texParameterTrace.Enable( true );
+
+  DummyControl actor = DummyControl::New();
+  DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
+  dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
+  actor.SetSize( 200.0f, 200.0f );
+  Stage::GetCurrent().Add( actor );
+
+  application.SendNotification();
+  application.Render();
+
+  DALI_TEST_CHECK( actor.GetRendererCount() == 1u );
+
+  DALI_TEST_EQUALS( textureTrace.FindMethod("BindTexture"), true, TEST_LOCATION );
+
+  // For animated image visual, the wrapping is handled manually in shader, so the following gl function should not be called
+  std::stringstream out;
+  out << GL_TEXTURE_2D << ", " << GL_TEXTURE_WRAP_S << ", " << GL_MIRRORED_REPEAT;
+  DALI_TEST_CHECK( !texParameterTrace.FindMethodAndParams("TexParameteri", out.str()) );
+  out.str("");
+  out << GL_TEXTURE_2D << ", " << GL_TEXTURE_WRAP_T << ", " << GL_REPEAT;
+  DALI_TEST_CHECK( !texParameterTrace.FindMethodAndParams("TexParameteri", out.str()) );
+
+  // test the uniforms which used to handle the wrap mode
+  Renderer renderer = actor.GetRendererAt( 0u );
+  DALI_TEST_CHECK( renderer );
+
+  Property::Value pixelAreaValue = renderer.GetProperty( renderer.GetPropertyIndex( "pixelArea" ) );
+  DALI_TEST_EQUALS( pixelAreaValue.Get<Vector4>(), pixelArea, TEST_LOCATION );
+  Vector4 pixelAreaUniform;
+  DALI_TEST_CHECK( gl.GetUniformValue<Vector4>( "pixelArea", pixelAreaUniform ) );
+  DALI_TEST_EQUALS( pixelArea, pixelAreaUniform, Math::MACHINE_EPSILON_100, TEST_LOCATION );
+
+  Property::Value wrapModeValue = renderer.GetProperty( renderer.GetPropertyIndex( "wrapMode" ) );
+  Vector2 wrapMode( WrapMode::MIRRORED_REPEAT-1, WrapMode::REPEAT-1 );
+  DALI_TEST_EQUALS( wrapModeValue.Get<Vector2>(), wrapMode, TEST_LOCATION );
+  Vector2 wrapModeUniform;
+  DALI_TEST_CHECK( gl.GetUniformValue<Vector2>( "wrapMode", wrapModeUniform ) );
+  DALI_TEST_EQUALS( wrapMode, wrapModeUniform, Math::MACHINE_EPSILON_100, TEST_LOCATION );
+
+  actor.Unparent( );
+  DALI_TEST_CHECK( actor.GetRendererCount() == 0u );
+
+  END_TEST;
+}
index 6b0f6b3..3d9eed7 100644 (file)
@@ -23,7 +23,8 @@
 #include "dali-toolkit/devel-api/builder/tree-node.h"
 #include "dali-toolkit/internal/builder/tree-node-manipulator.h"
 
-namespace
+
+namespace Dali
 {
 
 bool CaseInsensitiveCharacterCompare( unsigned char a, unsigned char b )
@@ -45,12 +46,6 @@ bool CaseInsensitiveStringCompare( const std::string& a, const std::string& b )
   return result;
 }
 
-} // anonymous namespace
-
-
-namespace Dali
-{
-
 namespace Toolkit
 {
 
diff --git a/dali-toolkit/devel-api/controls/buttons/toggle-button.cpp b/dali-toolkit/devel-api/controls/buttons/toggle-button.cpp
new file mode 100644 (file)
index 0000000..39f1845
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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/devel-api/controls/buttons/toggle-button.h>
+
+// INTERNAL INCLUDES
+
+#include <dali-toolkit/internal/controls/buttons/toggle-button-impl.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+ToggleButton::ToggleButton()
+: Button()
+{
+}
+
+ToggleButton::ToggleButton( Internal::ToggleButton& implementation )
+: Button( implementation )
+{
+}
+
+ToggleButton::ToggleButton( const ToggleButton& toggleButton )
+: Button( toggleButton )
+{
+}
+
+ToggleButton& ToggleButton::operator=( const ToggleButton& toggleButton )
+{
+  if( &toggleButton != this )
+  {
+    Button::operator=( toggleButton );
+  }
+  return *this;
+}
+
+ToggleButton::ToggleButton( Dali::Internal::CustomActor* internal )
+: Button( internal )
+{
+  VerifyCustomActorPointer<Internal::ToggleButton>(internal);
+}
+
+ToggleButton::~ToggleButton()
+{
+}
+
+ToggleButton ToggleButton::New()
+{
+  return Internal::ToggleButton::New();
+}
+
+ToggleButton ToggleButton::DownCast( BaseHandle handle )
+{
+  return Control::DownCast<ToggleButton, Internal::ToggleButton>(handle);
+}
+
+} // namespace Toolkit
+
+} // namespace Dali
diff --git a/dali-toolkit/devel-api/controls/buttons/toggle-button.h b/dali-toolkit/devel-api/controls/buttons/toggle-button.h
new file mode 100644 (file)
index 0000000..2e61901
--- /dev/null
@@ -0,0 +1,223 @@
+#ifndef __DALI_TOOLKIT_TOGGLE_BUTTON_H__
+#define __DALI_TOOLKIT_TOGGLE_BUTTON_H__
+
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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-toolkit/public-api/controls/buttons/button.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+// Forward declarations
+
+namespace Internal DALI_INTERNAL
+{
+// Forward declarations
+
+class ToggleButton;
+}
+/**
+ * @addtogroup dali_toolkit_controls_buttons
+ * @{
+ */
+
+/**
+ * @brief A ToggleButton allows the user to change a setting between two or more states.
+ *
+ * By default a ToggleButton emits a Button::StateChangedSignal() signal when it's clicked.
+ *
+ * Usage example: -
+ *
+ * @code
+ *
+ * void ToggleButtonExample::Create( Application& application )
+ * {
+ *   ToggleButton button = ToggleButton::New();
+ *   button.SetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS, Property::Array()
+ *                       .Add( "A.png" )
+ *                       .Add( "B.png" )
+ *                       .Add( "C.png" ));
+ *  or
+ *
+ *  Property::Map propertyMap1;
+ *  Vector4 testColor1( 1.f, 0.5f, 0.3f, 0.2f );
+ *  propertyMap1.Insert(Visual::Property::TYPE,  Visual::COLOR);
+ *  propertyMap1.Insert(ColorVisual::Property::MIX_COLOR,  testColor1);
+ *
+ *  Property::Map propertyMap2;
+ *  Vector4 testColor2( 0.5f, 1.f, 0.3f, 0.2f );
+ *  propertyMap2.Insert(Visual::Property::TYPE,  Visual::COLOR);
+ *  propertyMap2.Insert(ColorVisual::Property::MIX_COLOR,  testColor2);
+ *
+ *  Property::Map propertyMap3;
+ *  Vector4 testColor3( 1.f, 0.5f, 1.f, 0.2f );
+ *  propertyMap3.Insert(Visual::Property::TYPE,  Visual::COLOR);
+ *  propertyMap3.Insert(ColorVisual::Property::MIX_COLOR,  testColor3);
+ *
+ *  button.SetProperty( Toolkit::ToggleButton::Property::STATE_VISUALS, Property::Array()
+ *                       .Add( propertyMap1 )
+ *                       .Add( propertyMap2 )
+ *                       .Add( propertyMap3 ));
+ *
+ * button.SetProperty( Toolkit::ToggleButton::Property::TOOLTIPS, Property::Array()
+ *                       .Add( "STATE A" )
+ *                       .Add( "STATE B" )
+ *                       .Add( "STATE C" ));
+ *
+ *   Stage::GetCurrent().Add( button );
+ *
+ *   // Connect to button signals emitted by the button
+ *   button.ClickedSignal().Connect( this, &ToggleButtonExample::OnButtonClicked );
+ * }
+ *
+ * bool ToggleButtonExample::OnButtonClicked( Button button )
+ * {
+ *   // Do something when the button is clicked
+ *   return true;
+ * }
+ * @endcode
+ *
+ * See Button for more detail on signals and modifying states via properties.
+ */
+class DALI_IMPORT_API ToggleButton : public Button
+{
+public:
+  /**
+   * @brief The start and end property ranges for this control.
+   */
+  enum PropertyRange
+  {
+    PROPERTY_START_INDEX = Button::PROPERTY_END_INDEX + 1,    ///< Toggle button start index
+    PROPERTY_END_INDEX =   PROPERTY_START_INDEX + 1000        ///< Reserving 1000 property indices
+  };
+
+  /**
+   * @brief An enumeration of properties belonging to the ToggleButton class.
+   */
+  struct Property
+  {
+    enum
+    {
+      /**
+       * @brief The state visual array of toggle button.
+       * @details Name "stateVisuals",  type Property::Array.
+       * It's a property array of property-maps or a property array of strings,
+       * property map expects a description of visual and
+       * string represents an image url.
+       * @note Mandatory
+       */
+      STATE_VISUALS = PROPERTY_START_INDEX,
+
+      /**
+       * @brief The tooltips of toggle button.
+       * @details Name "tooltips",  type Property::Array.
+       * It's an array of toggle state tooltip strings.
+       * Each tooltip string should match a toggle state strictly.
+       * @note Mandatory
+       */
+      TOOLTIPS,
+
+      /**
+       * @brief The current state index of toggle button.
+       * @details Name "currentStateIndex",  type integer.
+       * It just provides a property to get current state index.
+       * @note Optional
+       * @note The index is automatically changed when toggle button is clicked.
+       */
+      CURRENT_STATE_INDEX
+    };
+  };
+
+public:
+
+  /**
+   * @brief Create an uninitialized ToggleButton; this can be initialized with ToggleButton::New().
+   *
+   * Calling member functions with an uninitialized Dali::Object is not allowed.
+   */
+  ToggleButton();
+
+  /**
+   * @brief Copy constructor.
+   * @param[in] toggleButton Handle to an object
+   */
+  ToggleButton( const ToggleButton& toggleButton );
+
+  /**
+   * @brief Assignment operator.
+   * @param[in] toggleButton Handle to an object
+   * @return A reference to this
+   */
+  ToggleButton& operator=( const ToggleButton& toggleButton );
+
+  /**
+   * @brief Destructor
+   *
+   * This is non-virtual since derived Handle types must not contain data or virtual methods.
+   */
+  ~ToggleButton();
+
+  /**
+   * @brief Create an initialized ToggleButton.
+   *
+   * @return A handle to a newly allocated Dali resource.
+   */
+  static ToggleButton New();
+
+  /**
+   * @brief Downcast a handle to ToggleButton handle.
+   *
+   * If handle points to a ToggleButton the downcast produces valid
+   * handle. If not the returned handle is left uninitialized.
+   *
+   * @param[in] handle Handle to an object
+   * @return handle to a ToggleButton or an uninitialized handle
+   */
+  static ToggleButton DownCast( BaseHandle handle );
+
+public: // Not intended for application developers
+
+  /// @cond internal
+  /**
+   * @brief Creates a handle using the Toolkit::Internal implementation.
+   *
+   * @param[in]  implementation  The Control implementation.
+   */
+  DALI_INTERNAL ToggleButton( Internal::ToggleButton& implementation );
+
+  /**
+   * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
+   *
+   * @param[in]  internal  A pointer to the internal CustomActor.
+   */
+  DALI_INTERNAL ToggleButton( Dali::Internal::CustomActor* internal );
+  /// @endcond
+};
+
+/**
+ * @}
+ */
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // __DALI_TOOLKIT_TOGGLE_BUTTON_H__
index d010c11..088fb7a 100644 (file)
@@ -19,7 +19,8 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/actors/layer.h>
+#include <dali/public-api/common/compile-time-assert.h>
+#include <dali/devel-api/actors/layer-devel.h>
 
 namespace Dali
 {
@@ -30,14 +31,29 @@ namespace Toolkit
 namespace DepthIndex
 {
 
+// The negative value for background effect and background has been
+// chosen so that newer controls can have content without setting
+// depth index, and go in front of native controls with a background.
+// This backround negative value means that the highest possible value
+// is SIBLING_ORDER_MULTIPLIER-BACKGROUND_EFFECT-1.  The divisor of
+// 100 ensures the range fits within the sibling order range, and has
+// enough gaps to allow Control Authors to use other intermediate depths.
+
 enum Ranges
 {
-    BACKGROUND    = -Dali::Layer::TREE_DEPTH_MULTIPLIER / 10,
-    CONTENT       = 0,
-    TEXT          = Dali::Layer::TREE_DEPTH_MULTIPLIER / 100,
-    DECORATION    = Dali::Layer::TREE_DEPTH_MULTIPLIER / 10
+  BACKGROUND_EFFECT = -2 * DevelLayer::SIBLING_ORDER_MULTIPLIER/100,
+  BACKGROUND    =     -1 * DevelLayer::SIBLING_ORDER_MULTIPLIER/100,
+  CONTENT       =      0,
+  DECORATION    =      1 * DevelLayer::SIBLING_ORDER_MULTIPLIER/100,
+  FOREGROUND_EFFECT =  2 * DevelLayer::SIBLING_ORDER_MULTIPLIER/100
 };
 
+DALI_COMPILE_TIME_ASSERT( (unsigned int)DevelLayer::ACTOR_DEPTH_MULTIPLIER > (unsigned int)DevelLayer::SIBLING_ORDER_MULTIPLIER );
+DALI_COMPILE_TIME_ASSERT( BACKGROUND_EFFECT < BACKGROUND );
+DALI_COMPILE_TIME_ASSERT( BACKGROUND < CONTENT );
+DALI_COMPILE_TIME_ASSERT( CONTENT < DECORATION );
+DALI_COMPILE_TIME_ASSERT( DECORATION < FOREGROUND_EFFECT );
+
 } // namespace DepthIndex
 
 } // namespace Toolkit
index 71071db..306ce2d 100644 (file)
@@ -30,6 +30,13 @@ namespace Toolkit
 namespace DevelControl
 {
 
+enum State
+{
+  NORMAL,
+  FOCUSED,
+  DISABLED
+};
+
 namespace Property
 {
 
@@ -53,6 +60,22 @@ enum
    * @see Toolkit::Tooltip
    */
   TOOLTIP = BACKGROUND + 1,
+
+  /**
+   * @brief The current state of the control.
+   * @details Name "state", type DevelControl::State ( Property::INTEGER ) or Property::STRING
+   *
+   * @see DevelControl::State
+   */
+  STATE = BACKGROUND + 2,
+
+  /**
+   * @brief The current sub state of the control.
+   * @details Name "subState", type Property::INTEGER or Property::STRING. The enumeration used is dependent on the derived control.
+   *
+   * @see DevelControl::State
+   */
+  SUB_STATE = BACKGROUND + 3
 };
 
 } // namespace Property
index 48019fe..d3fcc56 100755 (executable)
 // CLASS HEADER
 #include <dali-toolkit/devel-api/controls/control-wrapper-impl.h>
 
-// INTERNAL INCLUDES
+// EXTERNAL INCLUDES
 #include <dali/public-api/animation/animation.h>
+#include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
+#include <dali/devel-api/object/handle-devel.h>
+
+// INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-base.h>
 #include <dali-toolkit/public-api/styling/style-manager.h>
@@ -34,11 +39,26 @@ namespace Toolkit
 namespace Internal
 {
 
+namespace
+{
+
+BaseHandle Create()
+{
+  // empty handle as we cannot create control wrapper
+  return BaseHandle();
+}
+
+// Setup type-registry.
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::ControlWrapper, Toolkit::Control, Create )
+DALI_TYPE_REGISTRATION_END()
+
+}
+
 /*
  * Implementation.
  */
 
-Dali::Toolkit::ControlWrapper ControlWrapper::New( ControlWrapper* controlWrapper )
+Dali::Toolkit::ControlWrapper ControlWrapper::New( const std::string& typeName, ControlWrapper* controlWrapper )
 {
   ControlWrapperPtr wrapper( controlWrapper );
 
@@ -49,6 +69,19 @@ Dali::Toolkit::ControlWrapper ControlWrapper::New( ControlWrapper* controlWrappe
   // This can only be done after the CustomActor connection has been made.
   wrapper->Initialize();
 
+  // Different types of C# custom view registered themselves using type registry,
+  // but their type names are registered per type not per instance, so they still
+  // have the same wrong type name in native side when type registry queries the
+  // unique type name of each instance using typeid() because of the binding.
+  // Therefore, we have to link each instance with its correct type info if already
+  // pre-registered.
+
+  TypeInfo typeInfo = TypeRegistry::Get().GetTypeInfo( typeName );
+  if(typeInfo)
+  {
+    Dali::DevelHandle::SetTypeInfo( handle, typeInfo );
+  }
+
   return handle;
 }
 
index fa9173f..33905a5 100755 (executable)
@@ -64,9 +64,13 @@ public:
 
   /**
    * Create a new ControlWrapper.
+   *
+   * @param[in] typeName The name of the type that is registered with this control
+   * @param[in] controlWrapper The implementation of this control
+   *
    * @return A public handle to the newly allocated ControlWrapper.
    */
-  static Dali::Toolkit::ControlWrapper New( ControlWrapper* controlWrapper );
+  static Dali::Toolkit::ControlWrapper New( const std::string& typeName, ControlWrapper* controlWrapper );
 
 public: // From CustomActorImpl
 
index 7f8db27..0c6be01 100644 (file)
@@ -31,9 +31,9 @@ namespace Toolkit
 // ControlWrapper
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-ControlWrapper ControlWrapper::New( Internal::ControlWrapper& implementation )
+ControlWrapper ControlWrapper::New( const std::string& typeName, Internal::ControlWrapper& implementation )
 {
-  return Internal::ControlWrapper::New( &implementation );
+  return Internal::ControlWrapper::New( typeName, &implementation );
 }
 
 ControlWrapper::ControlWrapper()
index a45c4b5..b50852b 100644 (file)
@@ -45,9 +45,12 @@ public:
   /**
    * @brief Create a new instance of a ControlWrapper.
    *
+   * @param[in] typeName The name of the type that is registered with this control
+   * @param[in] implementation The implementation of this control
+   *
    * @return A handle to a new ControlWrapper.
    */
-  static ControlWrapper New( Internal::ControlWrapper& implementation );
+  static ControlWrapper New( const std::string& typeName, Internal::ControlWrapper& implementation );
 
   /**
    * @brief Creates an empty ControlWrapper handle.
index b487029..4c39a87 100644 (file)
@@ -34,6 +34,25 @@ class ProgressBar;
 
 /**
  * @brief ProgressBar is a control to give the user an indication of the progress of an operation.
+ * *
+ *     Determinate Progress State
+ *
+ *      #  : Progress visual
+ *      *  : Secondary Progress visual
+ *      =  : Track visual
+ *     40% : Label visual
+ *
+ *     =============================================
+ *     = ###############**** 40%                   =
+ *     =============================================
+ *
+ *     Indeterminate Progress State
+ *
+ *      /  : Indeterminate visual
+ *
+ *     =============================================
+ *     = ///////////////////////////////////////// =
+ *     =============================================
  *
  * Also progress value percentage is shown as text inside the progress bar.
  *
@@ -42,6 +61,7 @@ class ProgressBar;
  * |-------------------|-------------------------------|
  * | valueChanged      | @ref ValueChangedSignal()     |
  */
+
 class DALI_IMPORT_API ProgressBar : public Control
 {
 public:
@@ -77,6 +97,23 @@ public:
       PROGRESS_VALUE = PROPERTY_START_INDEX,
 
       /**
+       * @brief The secondary progress value of progress bar, secondary progress runs form 0 to 1.
+       * @details Name "secondaryProgressValue", type Property::FLOAT.
+       * @note Optional. If not supplied, the default is 0.
+       * @note Value should be between 0 to 1.
+       * @note If Value is set to 0, progress bar will be set secondary progress to beginning.
+       * @note If Value is set to 1, progress bar will be set secondary progress to end.
+       * @note Any Value outside of the range is ignored.
+       */
+      SECONDARY_PROGRESS_VALUE,
+
+      /**
+       * @brief Sets the progress-bar as \e indeterminate state.
+       * @details name "indeterminate", type bool
+       */
+      INDETERMINATE,
+
+      /**
        * @brief The track Visual value of progress bar, it's a full progress area and it's shown behind PROGRESS_VISUAL.
        * @details Name "trackVisual", type Property::STRING if it is a url, map otherwise.
        * @note Optional. If not supplied, the default track visual will be shown.
@@ -89,6 +126,33 @@ public:
        * @note Optional. If not supplied, the default progress visual will be shown.
        */
       PROGRESS_VISUAL,
+
+      /**
+       * @brief The secondary progress visual of progress bar, size of the secondary progress visual is changed based on SECONDARY_PROGRESS_VALUE.
+       * @details Name "secondaryProgressVisual", type Property::STRING if it is a url, map otherwise.
+       * @note Optional. If not supplied, the secondary progress visual will not be shown.
+       */
+      SECONDARY_PROGRESS_VISUAL,
+
+      /**
+       * @brief The indeterminate visual of progress bar.
+       * @details Name "inditerminateVisual", type Property::STRING if it is a url, map otherwise.
+       * @note Optional. If not supplied, the default inditerminate visual will be shown.
+       */
+      INDETERMINATE_VISUAL,
+
+      /**
+       * @brief The transition data for indeterminate visual animation.
+       * @details Name "indeterminateVisualAnimation", type Property::STRING.
+       * @note Optional. If not supplied, default animation will be played.
+       */
+      INDETERMINATE_VISUAL_ANIMATION,
+
+      /**
+       * @brief The Label visual of progress bar.
+       * @details Name "labelVisual", type Property::MAP.
+       */
+      LABEL_VISUAL,
     };
   };
 
@@ -141,19 +205,20 @@ public:  // Signals
   /**
    * @brief Value changed signal type.
    */
-  typedef Signal< void ( ProgressBar, float ) > ValueChangedSignalType;
+  typedef Signal< void ( ProgressBar, float, float ) > ValueChangedSignalType;
 
   /**
    * @brief Signal emitted when the ProgressBar value changes.
    *
    * A callback of the following type may be connected:
    * @code
-   *   void YourCallbackName( ProgressBar progressBar, float value );
+   *   void YourCallbackName( ProgressBar progressBar, float progressValue, float secondaryProgressValue );
    * @endcode
    * @return The signal to connect to
    */
   ValueChangedSignalType& ValueChangedSignal();
 
+
 public: // Not intended for application developers
 
   /// @cond internal
diff --git a/dali-toolkit/devel-api/controls/text-controls/text-editor-devel.h b/dali-toolkit/devel-api/controls/text-controls/text-editor-devel.h
new file mode 100644 (file)
index 0000000..d842559
--- /dev/null
@@ -0,0 +1,98 @@
+#ifndef DALI_TOOLKIT_TEXT_EDITOR_DEVEL_H
+#define DALI_TOOLKIT_TEXT_EDITOR_DEVEL_H
+
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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-toolkit/public-api/controls/text-controls/text-editor.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace DevelTextEditor
+{
+
+namespace Property
+{
+  enum Type
+  {
+      RENDERING_BACKEND = Dali::Toolkit::TextEditor::Property::RENDERING_BACKEND,
+      TEXT = Dali::Toolkit::TextEditor::Property::TEXT,
+      TEXT_COLOR = Dali::Toolkit::TextEditor::Property::TEXT_COLOR,
+      FONT_FAMILY = Dali::Toolkit::TextEditor::Property::FONT_FAMILY,
+      FONT_STYLE = Dali::Toolkit::TextEditor::Property::FONT_STYLE,
+      POINT_SIZE = Dali::Toolkit::TextEditor::Property::POINT_SIZE,
+      HORIZONTAL_ALIGNMENT = Dali::Toolkit::TextEditor::Property::HORIZONTAL_ALIGNMENT,
+      SCROLL_THRESHOLD = Dali::Toolkit::TextEditor::Property::SCROLL_THRESHOLD,
+      SCROLL_SPEED = Dali::Toolkit::TextEditor::Property::SCROLL_SPEED,
+      PRIMARY_CURSOR_COLOR = Dali::Toolkit::TextEditor::Property::PRIMARY_CURSOR_COLOR,
+      SECONDARY_CURSOR_COLOR = Dali::Toolkit::TextEditor::Property::SECONDARY_CURSOR_COLOR,
+      ENABLE_CURSOR_BLINK = Dali::Toolkit::TextEditor::Property::ENABLE_CURSOR_BLINK,
+      CURSOR_BLINK_INTERVAL = Dali::Toolkit::TextEditor::Property::CURSOR_BLINK_INTERVAL,
+      CURSOR_BLINK_DURATION = Dali::Toolkit::TextEditor::Property::CURSOR_BLINK_DURATION,
+      CURSOR_WIDTH = Dali::Toolkit::TextEditor::Property::CURSOR_WIDTH,
+      GRAB_HANDLE_IMAGE = Dali::Toolkit::TextEditor::Property::GRAB_HANDLE_IMAGE,
+      GRAB_HANDLE_PRESSED_IMAGE = Dali::Toolkit::TextEditor::Property::GRAB_HANDLE_PRESSED_IMAGE,
+      SELECTION_HANDLE_IMAGE_LEFT = Dali::Toolkit::TextEditor::Property::SELECTION_HANDLE_IMAGE_LEFT,
+      SELECTION_HANDLE_IMAGE_RIGHT = Dali::Toolkit::TextEditor::Property::SELECTION_HANDLE_IMAGE_RIGHT,
+      SELECTION_HANDLE_PRESSED_IMAGE_LEFT = Dali::Toolkit::TextEditor::Property::SELECTION_HANDLE_PRESSED_IMAGE_LEFT,
+      SELECTION_HANDLE_PRESSED_IMAGE_RIGHT = Dali::Toolkit::TextEditor::Property::SELECTION_HANDLE_PRESSED_IMAGE_RIGHT,
+      SELECTION_HANDLE_MARKER_IMAGE_LEFT = Dali::Toolkit::TextEditor::Property::SELECTION_HANDLE_MARKER_IMAGE_LEFT,
+      SELECTION_HANDLE_MARKER_IMAGE_RIGHT = Dali::Toolkit::TextEditor::Property::SELECTION_HANDLE_MARKER_IMAGE_RIGHT,
+      SELECTION_HIGHLIGHT_COLOR = Dali::Toolkit::TextEditor::Property::SELECTION_HIGHLIGHT_COLOR,
+      DECORATION_BOUNDING_BOX = Dali::Toolkit::TextEditor::Property::DECORATION_BOUNDING_BOX,
+      ENABLE_MARKUP = Dali::Toolkit::TextEditor::Property::ENABLE_MARKUP,
+      INPUT_COLOR = Dali::Toolkit::TextEditor::Property::INPUT_COLOR,
+      INPUT_FONT_FAMILY = Dali::Toolkit::TextEditor::Property::INPUT_FONT_FAMILY,
+      INPUT_FONT_STYLE = Dali::Toolkit::TextEditor::Property::INPUT_FONT_STYLE,
+      INPUT_POINT_SIZE = Dali::Toolkit::TextEditor::Property::INPUT_POINT_SIZE,
+      LINE_SPACING = Dali::Toolkit::TextEditor::Property::LINE_SPACING,
+      INPUT_LINE_SPACING = Dali::Toolkit::TextEditor::Property::INPUT_LINE_SPACING,
+      UNDERLINE = Dali::Toolkit::TextEditor::Property::UNDERLINE,
+      INPUT_UNDERLINE = Dali::Toolkit::TextEditor::Property::INPUT_UNDERLINE,
+      SHADOW = Dali::Toolkit::TextEditor::Property::SHADOW,
+      INPUT_SHADOW = Dali::Toolkit::TextEditor::Property::INPUT_SHADOW,
+      EMBOSS = Dali::Toolkit::TextEditor::Property::EMBOSS,
+      INPUT_EMBOSS = Dali::Toolkit::TextEditor::Property::INPUT_EMBOSS,
+      OUTLINE = Dali::Toolkit::TextEditor::Property::OUTLINE,
+      INPUT_OUTLINE = Dali::Toolkit::TextEditor::Property::INPUT_OUTLINE,
+
+      /**
+       * @brief name "smoothScroll", type bool
+       * @details Enable or disable the smooth scroll animation
+       */
+      SMOOTH_SCROLL = INPUT_OUTLINE + 1,
+
+      /**
+       * @brief name "smoothScrollDuration", type float
+       * @details Sets the duration of smooth scroll animation
+       */
+      SMOOTH_SCROLL_DURATION
+  };
+} // namespace Property
+
+} // namespace DevelText
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // DALI_TOOLKIT_TEXT_EDITOR_DEVEL_H
\ No newline at end of file
index 0a3b941..26d81a4 100644 (file)
@@ -64,6 +64,8 @@ public:
     {
       MAX_SIZE =  PROPERTY_START_INDEX, ///< name "maxSize",                 The maximum size the Popup can be,              type VECTOR2
       ENABLE_OVERSHOOT,                 ///< name "enableOvershoot",         Whether the overshoot image is enabled,         type BOOLEAN
+      ENABLE_SCROLL_BAR,                ///< name "enableScrollBar",         Whether the scroll-bar is enabled,              type BOOLEAN
+      SCROLL_BAR_PADDING,               ///< name "scrollBarPadding",        The padding used to position the scroll bar,    type VECTOR2
       SCROLL_VIEW,                      ///< name "scrollView",              Properties to set on scroll view                type Property::Map
     };
   };
old mode 100644 (file)
new mode 100755 (executable)
index a67e25b..3108cc3
@@ -8,6 +8,7 @@ devel_api_src_files = \
   $(devel_api_src_dir)/controls/control-wrapper-impl.cpp \
   $(devel_api_src_dir)/controls/bloom-view/bloom-view.cpp \
   $(devel_api_src_dir)/controls/bubble-effect/bubble-emitter.cpp \
+  $(devel_api_src_dir)/controls/buttons/toggle-button.cpp \
   $(devel_api_src_dir)/controls/effects-view/effects-view.cpp \
   $(devel_api_src_dir)/controls/magnifier/magnifier.cpp \
   $(devel_api_src_dir)/controls/navigation-view/navigation-view.cpp \
@@ -53,7 +54,8 @@ devel_api_bubble_emitter_header_files = \
   $(devel_api_src_dir)/controls/bubble-effect/bubble-emitter.h
 
 devel_api_buttons_header_files = \
-  $(devel_api_src_dir)/controls/buttons/button-devel.h
+  $(devel_api_src_dir)/controls/buttons/button-devel.h \
+  $(devel_api_src_dir)/controls/buttons/toggle-button.h
 
 devel_api_builder_header_files = \
   $(devel_api_src_dir)/builder/builder.h \
@@ -121,6 +123,7 @@ devel_api_super_blur_view_header_files = \
   $(devel_api_src_dir)/controls/super-blur-view/super-blur-view.h
 
 devel_api_text_controls_header_files = \
+  $(devel_api_src_dir)/controls/text-controls/text-editor-devel.h \
   $(devel_api_src_dir)/controls/text-controls/text-selection-popup.h \
   $(devel_api_src_dir)/controls/text-controls/text-selection-toolbar.h
 
index 8f7248f..9c9a628 100644 (file)
@@ -57,22 +57,30 @@ enum Type
   /**
    * @brief The transform used by the visual.
    * @details Name "transform", type Property::Map.
-
+   *
    * @note Optional.
    * @see DevelVisual::Transform::Property
    */
-  TRANSFORM = SHADER + 1, // Dali::Toolkit::Visual::Property::SHADER + 1
+  TRANSFORM = SHADER + 1,
 
   /**
    * @brief Enables/disables premultiplied alpha.
    * The premultiplied alpha is false by default unless this behaviour is modified
    * by the derived Visual type.
-
+   *
    * @details Name "premultipliedAlpha", type Property::Boolean.
-
+   *
    * @note Optional.
    */
-  PREMULTIPLIED_ALPHA = SHADER + 2, // Dali::Toolkit::Visual::Property::SHADER + 2
+  PREMULTIPLIED_ALPHA = SHADER + 2,
+
+  /**
+   * @brief Mix color is a blend color for any visual.
+   * @details Name "mixColor", type Property::VECTOR4
+   *
+   * @note Optional
+   */
+  MIX_COLOR = SHADER + 3,
 };
 
 } //namespace Property
index a7fabdf..ac5ea3e 100644 (file)
 #include <sys/stat.h>
 #include <sstream>
 
-#include <dali/public-api/render-tasks/render-task-list.h>
+#include <dali/public-api/actors/camera-actor.h>
+#include <dali/public-api/actors/layer.h>
+#include <dali/public-api/object/property-array.h>
 #include <dali/public-api/object/type-info.h>
 #include <dali/public-api/object/type-registry.h>
-#include <dali/public-api/object/property-array.h>
-#include <dali/public-api/actors/layer.h>
-#include <dali/public-api/actors/camera-actor.h>
-#include <dali/devel-api/scripting/scripting.h>
+#include <dali/public-api/render-tasks/render-task-list.h>
 #include <dali/public-api/signals/functor-delegate.h>
+#include <dali/devel-api/scripting/scripting.h>
 #include <dali/integration-api/debug.h>
+#include <dali-toolkit/devel-api/controls/control-devel.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control.h>
 #include <dali-toolkit/devel-api/builder/json-parser.h>
 
-#include <dali-toolkit/internal/builder/builder-get-is.inl.h>
-#include <dali-toolkit/internal/builder/builder-filesystem.h>
 #include <dali-toolkit/internal/builder/builder-declarations.h>
+#include <dali-toolkit/internal/builder/builder-filesystem.h>
+#include <dali-toolkit/internal/builder/builder-get-is.inl.h>
+#include <dali-toolkit/internal/builder/builder-impl-debug.h>
 #include <dali-toolkit/internal/builder/builder-set-property.h>
 #include <dali-toolkit/internal/builder/replacement.h>
 #include <dali-toolkit/internal/builder/tree-node-manipulator.h>
 
-#include <dali-toolkit/internal/builder/builder-impl-debug.h>
-
 namespace Dali
 {
 
@@ -56,9 +56,12 @@ namespace Internal
 class Replacement;
 
 extern Animation CreateAnimation(const TreeNode& child, const Replacement& replacements, const Dali::Actor searchRoot, Builder* const builder );
+
 extern Actor SetupSignalAction(ConnectionTracker* tracker, const TreeNode &root, const TreeNode &child, Actor actor, Dali::Toolkit::Internal::Builder* const builder);
+
 extern Actor SetupPropertyNotification(ConnectionTracker* tracker, const TreeNode &root, const TreeNode &child, Actor actor, Dali::Toolkit::Internal::Builder* const builder);
 
+
 #if defined(DEBUG_ENABLED)
 Integration::Log::Filter* gFilterScript  = Integration::Log::Filter::New(Debug::NoLogging, false, "LOG_SCRIPT");
 #endif
@@ -68,14 +71,20 @@ namespace
 
 #define TOKEN_STRING(x) #x
 
-const std::string KEYNAME_STYLES    = "styles";
-const std::string KEYNAME_TYPE      = "type";
-const std::string KEYNAME_ACTORS    = "actors";
-const std::string KEYNAME_SIGNALS   = "signals";
-const std::string KEYNAME_NAME      = "name";
-const std::string KEYNAME_TEMPLATES = "templates";
-const std::string KEYNAME_INCLUDES  = "includes";
-const std::string KEYNAME_MAPPINGS  = "mappings";
+const std::string KEYNAME_ACTORS           = "actors";
+const std::string KEYNAME_ENTRY_TRANSITION = "entryTransition";
+const std::string KEYNAME_EXIT_TRANSITION  = "exitTransition";
+const std::string KEYNAME_INCLUDES         = "includes";
+const std::string KEYNAME_INHERIT          = "inherit";
+const std::string KEYNAME_MAPPINGS         = "mappings";
+const std::string KEYNAME_NAME             = "name";
+const std::string KEYNAME_SIGNALS          = "signals";
+const std::string KEYNAME_STATES           = "states";
+const std::string KEYNAME_STYLES           = "styles";
+const std::string KEYNAME_TEMPLATES        = "templates";
+const std::string KEYNAME_TRANSITIONS      = "transitions";
+const std::string KEYNAME_TYPE             = "type";
+const std::string KEYNAME_VISUALS          = "visuals";
 
 const std::string PROPERTIES = "properties";
 const std::string ANIMATABLE_PROPERTIES = "animatableProperties";
@@ -121,7 +130,12 @@ void CollectAllStyles( const TreeNode& stylesCollection, const TreeNode& style,
         {
           styleList.push_back( &(*node) );
 
-          if( OptionalChild subStyle = IsChild( *node, KEYNAME_STYLES ) )
+          OptionalChild subStyle = IsChild( *node, KEYNAME_INHERIT );
+          if( ! subStyle )
+          {
+            subStyle = IsChild( *node, KEYNAME_STYLES );
+          }
+          if( subStyle )
           {
             CollectAllStyles( stylesCollection, *subStyle, styleList );
           }
@@ -134,379 +148,256 @@ void CollectAllStyles( const TreeNode& stylesCollection, const TreeNode& style,
 
 } // namespace anon
 
-/*
- * Sets the handle properties found in the tree node
- */
-void Builder::SetProperties( const TreeNode& node, Handle& handle, const Replacement& constant )
+
+Builder::Builder()
+: mSlotDelegate( this )
 {
-  if( handle )
-  {
+  mParser = Dali::Toolkit::JsonParser::New();
 
-    for( TreeNode::ConstIterator iter = node.CBegin(); iter != node.CEnd(); ++iter )
-    {
-      const TreeNode::KeyNodePair& keyChild = *iter;
+  Property::Map defaultDirs;
+  defaultDirs[ TOKEN_STRING(DALI_IMAGE_DIR) ]       = DALI_IMAGE_DIR;
+  defaultDirs[ TOKEN_STRING(DALI_SOUND_DIR) ]       = DALI_SOUND_DIR;
+  defaultDirs[ TOKEN_STRING(DALI_STYLE_DIR) ]       = DALI_STYLE_DIR;
+  defaultDirs[ TOKEN_STRING(DALI_STYLE_IMAGE_DIR) ] = DALI_STYLE_IMAGE_DIR;
 
-      std::string key( keyChild.first );
+  AddConstants( defaultDirs );
+}
 
-      // ignore special fields; type,actors,signals,styles
-      if(key == KEYNAME_TYPE || key == KEYNAME_ACTORS || key == KEYNAME_SIGNALS || key == KEYNAME_STYLES || key == KEYNAME_MAPPINGS )
-      {
-        continue;
-      }
+void Builder::LoadFromString( std::string const& data, Dali::Toolkit::Builder::UIFormat format )
+{
+  // parser to get constants and includes only
+  Dali::Toolkit::JsonParser parser = Dali::Toolkit::JsonParser::New();
+
+  if( !parser.Parse( data ) )
+  {
+    DALI_LOG_WARNING( "JSON Parse Error:%d:%d:'%s'\n",
+                      parser.GetErrorLineNumber(),
+                      parser.GetErrorColumn(),
+                      parser.GetErrorDescription().c_str() );
 
-      Handle propertyObject( handle );
+    DALI_ASSERT_ALWAYS(!"Cannot parse JSON");
+  }
+  else
+  {
+    // load constant map (allows the user to override the constants in the json after loading)
+    LoadConstants( *parser.GetRoot(), mReplacementMap );
 
-      Dali::Property::Index index = propertyObject.GetPropertyIndex( key );
+    // merge includes
+    if( OptionalChild includes = IsChild(*parser.GetRoot(), KEYNAME_INCLUDES) )
+    {
+      Replacement replacer( mReplacementMap );
 
-      if( Property::INVALID_INDEX != index )
+      for(TreeNode::ConstIterator iter = (*includes).CBegin(); iter != (*includes).CEnd(); ++iter)
       {
-        Property::Type type = propertyObject.GetPropertyType(index);
-        Property::Value value;
-        bool mapped = false;
+        OptionalString filename = replacer.IsString( (*iter).second );
 
-        // if node.value is a mapping, get the property value from the "mappings" table
-        if( keyChild.second.GetType() == TreeNode::STRING )
-        {
-          std::string mappingKey;
-          if( GetMappingKey(keyChild.second.GetString(), mappingKey) )
-          {
-            OptionalChild mappingRoot = IsChild( mParser.GetRoot(), KEYNAME_MAPPINGS );
-            mapped = GetPropertyMap( *mappingRoot, mappingKey.c_str(), type, value );
-          }
-        }
-        if( ! mapped )
-        {
-          mapped = DeterminePropertyFromNode( keyChild.second, type, value, constant );
-          if( ! mapped )
-          {
-            // Just determine the property from the node and if it's valid, let the property object handle it
-            DeterminePropertyFromNode( keyChild.second, value, constant );
-            mapped = ( value.GetType() != Property::NONE );
-          }
-        }
-        if( mapped )
+        if( filename )
         {
-          DALI_SCRIPT_VERBOSE("SetProperty '%s' Index=:%d Value Type=%d Value '%s'\n", key.c_str(), index, value.GetType(), PropertyValueToString(value).c_str() );
-
-          propertyObject.SetProperty( index, value );
+#if defined(DEBUG_ENABLED)
+          DALI_SCRIPT_VERBOSE("Loading Include '%s'\n", (*filename).c_str());
+#endif
+          LoadFromString( GetFileContents(*filename) );
         }
       }
-      else
-      {
-        DALI_LOG_ERROR("Key '%s' not found.\n", key.c_str());
-      }
+    }
 
-      // Add custom properties
-      SetCustomProperties(node, handle, constant, PROPERTIES, Property::READ_WRITE);
-      SetCustomProperties(node, handle, constant, ANIMATABLE_PROPERTIES, Property::ANIMATABLE);
+    if( !mParser.Parse( data ) )
+    {
+      DALI_LOG_WARNING( "JSON Parse Error:%d:%d:'%s'\n",
+                        mParser.GetErrorLineNumber(),
+                        mParser.GetErrorColumn(),
+                        mParser.GetErrorDescription().c_str() );
 
-    } // for property nodes
-  }
-  else
-  {
-    DALI_SCRIPT_WARNING("Style applied to empty handle\n");
+      DALI_ASSERT_ALWAYS(!"Cannot parse JSON");
+    }
   }
+
+  DUMP_PARSE_TREE(parser); // This macro only writes out if DEBUG is enabled and the "DUMP_TREE" constant is defined in the stylesheet.
+  DUMP_TEST_MAPPINGS(parser);
+
+  DALI_ASSERT_ALWAYS(mParser.GetRoot() && "Cannot parse JSON");
 }
 
-void Builder::SetCustomProperties( const TreeNode& node, Handle& handle, const Replacement& constant,
-                          const std::string& childName, Property::AccessMode accessMode )
+void Builder::AddConstants( const Property::Map& map )
 {
-  // Add custom properties
-  if( OptionalChild customPropertiesChild = IsChild(node, childName) )
-  {
-    const TreeNode& customPropertiesNode = *customPropertiesChild;
-    const TreeConstIter endIter = customPropertiesNode.CEnd();
-    for( TreeConstIter iter = customPropertiesNode.CBegin(); endIter != iter; ++iter )
-    {
-      const TreeNode::KeyNodePair& keyChild = *iter;
-      std::string key( keyChild.first );
+  mReplacementMap.Merge( map );
+}
 
-      Property::Value value;
-      DeterminePropertyFromNode( keyChild.second, value, constant );
-      // Register/Set property.
-      handle.RegisterProperty( key, value, accessMode );
-    }
-  }
+void Builder::AddConstant( const std::string& key, const Property::Value& value )
+{
+  mReplacementMap[key] = value;
 }
 
-// Set properties from node on handle.
-void Builder::ApplyProperties( const TreeNode& root, const TreeNode& node,
-                               Dali::Handle& handle, const Replacement& constant )
+const Property::Map& Builder::GetConstants() const
 {
-  if( Actor actor = Actor::DownCast(handle) )
-  {
-    SetProperties( node, actor, constant );
+  return mReplacementMap;
+}
 
-    if( actor )
-    {
-      // add signals
-      SetupSignalAction( mSlotDelegate.GetConnectionTracker(), root, node, actor, this );
-      SetupPropertyNotification( mSlotDelegate.GetConnectionTracker(), root, node, actor, this );
-   }
+const Property::Value& Builder::GetConstant( const std::string& key ) const
+{
+  Property::Value* match = mReplacementMap.Find( key );
+  if( match )
+  {
+    return (*match);
   }
   else
   {
-    SetProperties( node, handle, constant );
+    static Property::Value invalid;
+    return invalid;
   }
 }
 
-// Appling by style helper
-// use FindChildByName() to apply properties referenced in KEYNAME_ACTORS in the node
-void Builder::ApplyStylesByActor(  const TreeNode& root, const TreeNode& node,
-                                   Dali::Handle& handle, const Replacement& constant )
+Animation Builder::CreateAnimation( const std::string& animationName, const Property::Map& map, Dali::Actor sourceActor )
 {
-  if( Dali::Actor actor = Dali::Actor::DownCast( handle ) )
-  {
-    if( const TreeNode* actors = node.GetChild( KEYNAME_ACTORS ) )
-    {
-      // in a style the actor subtree properties referenced by actor name
-      for( TreeConstIter iter = actors->CBegin(); iter != actors->CEnd(); ++iter )
-      {
-        Dali::Actor foundActor;
-
-        if( (*iter).first )
-        {
-          foundActor = actor.FindChildByName( (*iter).first );
-        }
-
-        if( !foundActor )
-        {
-          // debug log cannot find searched for actor
-#if defined(DEBUG_ENABLED)
-          DALI_SCRIPT_VERBOSE("Cannot find actor in style application '%s'\n", (*iter).first);
-#endif
-        }
-        else
-        {
-#if defined(DEBUG_ENABLED)
-          DALI_SCRIPT_VERBOSE("Styles applied to actor '%s'\n", (*iter).first);
-#endif
-          ApplyProperties( root, (*iter).second, foundActor, constant );
-        }
-      }
-    }
-  }
+  Replacement replacement(map, mReplacementMap);
+  return CreateAnimation( animationName, replacement, sourceActor);
 }
 
+Animation Builder::CreateAnimation( const std::string& animationName, const Property::Map& map )
+{
+  Replacement replacement(map, mReplacementMap);
+  return CreateAnimation( animationName, replacement, Stage::GetCurrent().GetRootLayer() );
+}
 
-void Builder::ApplyAllStyleProperties( const TreeNode& root, const TreeNode& node,
-                                       Dali::Handle& handle, const Replacement& constant )
+Animation Builder::CreateAnimation( const std::string& animationName, Dali::Actor sourceActor )
 {
-  OptionalChild styles = IsChild(root, KEYNAME_STYLES);
-  OptionalChild style  = IsChild(node, KEYNAME_STYLES);
+  Replacement replacement( mReplacementMap );
 
-  if( styles && style )
-  {
-    TreeNodeList additionalStyles;
+  return CreateAnimation( animationName, replacement, sourceActor );
+}
 
-    CollectAllStyles( *styles, *style, additionalStyles );
+Animation Builder::CreateAnimation( const std::string& animationName )
+{
+  Replacement replacement( mReplacementMap );
 
-#if defined(DEBUG_ENABLED)
-    for(TreeNode::ConstIterator iter = (*style).CBegin(); iter != (*style).CEnd(); ++iter)
-    {
-      if( OptionalString styleName = IsString( (*iter).second ) )
-      {
-        DALI_SCRIPT_VERBOSE("Style Applied '%s'\n", (*styleName).c_str());
-      }
-    }
-#endif
+  return CreateAnimation( animationName, replacement, Dali::Stage::GetCurrent().GetRootLayer() );
+}
 
-    // a style may have other styles, which has other styles etc so we apply in reverse by convention.
-    for(TreeNodeList::reverse_iterator iter = additionalStyles.rbegin(); iter != additionalStyles.rend(); ++iter)
-    {
-      ApplyProperties( root, *(*iter), handle, constant );
+BaseHandle Builder::Create( const std::string& templateName )
+{
+  Replacement replacement( mReplacementMap );
+  return Create( templateName, replacement );
+}
 
-      ApplyStylesByActor( root, *(*iter), handle, constant );
-    }
-  }
+BaseHandle Builder::Create( const std::string& templateName, const Property::Map& map )
+{
+  Replacement replacement( map, mReplacementMap );
+  return Create( templateName, replacement );
+}
+
+BaseHandle Builder::CreateFromJson( const std::string& json )
+{
+  BaseHandle ret;
 
-  // applying given node last
-  ApplyProperties( root, node, handle, constant );
+  // merge in new template, hoping no one else has one named '@temp@'
+  std::string newTemplate =
+    std::string("{\"templates\":{\"@temp@\":") +                      \
+    json +                                                            \
+    std::string("}}");
 
-  ApplyStylesByActor( root, node, handle, constant );
+  if( mParser.Parse(newTemplate) )
+  {
+    Replacement replacement( mReplacementMap );
+    ret = Create( "@temp@", replacement );
+  }
 
+  return ret;
 }
 
-
-/*
- * Create a dali type from a node.
- * If parent given and an actor type was created then add it to the parent and
- * recursively add nodes children.
- */
-BaseHandle Builder::DoCreate( const TreeNode& root, const TreeNode& node,
-                              Actor parent, const Replacement& replacements )
+bool Builder::ApplyFromJson(  Handle& handle, const std::string& json )
 {
-  BaseHandle baseHandle;
-  TypeInfo typeInfo;
-  const TreeNode* templateNode = NULL;
-
-  if( OptionalString typeName = IsString(node, KEYNAME_TYPE) )
-  {
-    typeInfo = TypeRegistry::Get().GetTypeInfo( *typeName );
+  bool ret = false;
 
-    if( !typeInfo )
-    {
-      // a template name is also allowed inplace of the type name
-      OptionalChild templates = IsChild( root, KEYNAME_TEMPLATES);
-
-      if( templates )
-      {
-        if( OptionalChild isTemplate = IsChild( *templates, *typeName ) )
-        {
-          templateNode = &(*isTemplate);
-
-          if( OptionalString templateTypeName = IsString(*templateNode, KEYNAME_TYPE) )
-          {
-            typeInfo = TypeRegistry::Get().GetTypeInfo( *templateTypeName );
-          }
-        }
-      }
-    }
-  }
+  // merge new style, hoping no one else has one named '@temp@'
+  std::string newStyle =
+    std::string("{\"styles\":{\"@temp@\":") +                           \
+    json +                                                              \
+    std::string("}}");
 
-  if(!typeInfo)
+  if( mParser.Parse(newStyle) )
   {
-    DALI_SCRIPT_WARNING("Cannot create Dali type from node '%s'\n", node.GetName());
+    Replacement replacement( mReplacementMap );
+    ret = ApplyStyle( "@temp@", handle, replacement );
   }
-  else
-  {
-    baseHandle       = typeInfo.CreateInstance();
-    Handle handle    = Handle::DownCast(baseHandle);
-    Actor actor      = Actor::DownCast(handle);
-
-    if(handle)
-    {
-
-      DALI_SCRIPT_VERBOSE("Create:%s\n", typeInfo.GetName().c_str());
-
-#if defined(DEBUG_ENABLED)
-      if(handle)
-      {
-        DALI_SCRIPT_VERBOSE("  Is Handle Object=%d\n", (long*)handle.GetObjectPtr());
-        DALI_SCRIPT_VERBOSE("  Is Handle Property Count=%d\n", handle.GetPropertyCount());
-      }
-
-      if(actor)
-      {
-        DALI_SCRIPT_VERBOSE("  Is Actor id=%d\n", actor.GetId());
-      }
-
-      Toolkit::Control control  = Toolkit::Control::DownCast(handle);
-      if(control)
-      {
-        DALI_SCRIPT_VERBOSE("  Is Control id=%d\n", actor.GetId());
-      }
-#endif // DEBUG_ENABLED
 
-      if( templateNode )
-      {
-        ApplyProperties( root, *templateNode, handle, replacements );
+  return ret;
+}
 
-        if( OptionalChild actors = IsChild( *templateNode, KEYNAME_ACTORS ) )
-        {
-          for( TreeConstIter iter = (*actors).CBegin(); iter != (*actors).CEnd(); ++iter )
-          {
-            DoCreate( root, (*iter).second, actor, replacements );
-          }
-        }
-      }
+bool Builder::ApplyStyle( const std::string& styleName, Handle& handle )
+{
+  Replacement replacer( mReplacementMap );
+  return ApplyStyle( styleName, handle, replacer );
+}
 
-      if( actor )
-      {
-        // add children of all the styles
-        if( OptionalChild actors = IsChild( node, KEYNAME_ACTORS ) )
-        {
-          for( TreeConstIter iter = (*actors).CBegin(); iter != (*actors).CEnd(); ++iter )
-          {
-            DoCreate( root, (*iter).second, actor, replacements );
-          }
-        }
+bool Builder::LookupStyleName( const std::string& styleName )
+{
+  DALI_ASSERT_ALWAYS(mParser.GetRoot() && "Builder script not loaded");
 
-        // apply style on top as they need the children to exist
-        ApplyAllStyleProperties( root, node, actor, replacements );
+  OptionalChild styles = IsChild( *mParser.GetRoot(), KEYNAME_STYLES );
+  OptionalChild style  = IsChildIgnoreCase( *styles, styleName );
 
-        // then add to parent
-        if( parent )
-        {
-          parent.Add( actor );
-        }
-      }
-      else
-      {
-        ApplyProperties( root, node, handle, replacements );
-      }
-    }
-    else
-    {
-      DALI_SCRIPT_WARNING("Cannot create handle from type '%s'\n", typeInfo.GetName().c_str());
-    }
+  if( styles && style )
+  {
+    return true;
   }
-
-  return baseHandle;
+  return false;
 }
 
-void Builder::SetupTask( RenderTask& task, const TreeNode& node, const Replacement& constant )
+const StylePtr Builder::GetStyle( const std::string& styleName )
 {
-  const Stage& stage = Stage::GetCurrent();
-  Layer root  = stage.GetRootLayer();
+  const StylePtr* style = mStyles.FindCaseInsensitiveC( styleName );
 
-  if( OptionalString s = constant.IsString( IsChild(node, "sourceActor") ) )
+  if( style==NULL )
   {
-    Actor actor = root.FindChildByName(*s);
-    if(actor)
-    {
-      task.SetSourceActor( actor );
-    }
-    else
-    {
-      DALI_SCRIPT_WARNING("Cannot find source actor on stage for render task called '%s'\n", (*s).c_str() );
-    }
+    return StylePtr(NULL);
   }
-
-  if( OptionalString s = constant.IsString( IsChild(node, "cameraActor") ) )
+  else
   {
-    CameraActor actor = CameraActor::DownCast( root.FindChildByName(*s) );
-    if(actor)
-    {
-      task.SetCameraActor( actor );
-    }
-    else
-    {
-      DALI_SCRIPT_WARNING("Cannot find camera actor on stage for render task called '%s'\n", (*s).c_str() );
-    }
+    return *style;
   }
+}
 
-  if( OptionalString s = constant.IsString( IsChild(node, "targetFrameBuffer") ) )
-  {
-    FrameBufferImage fb = GetFrameBufferImage( *s, constant );
-    if(fb)
-    {
-      task.SetTargetFrameBuffer( fb );
-    }
-    else
-    {
-      DALI_SCRIPT_WARNING("Cannot find target frame buffer '%s'\n", (*s).c_str() );
-    }
-  }
+void Builder::AddActors( Actor toActor )
+{
+  // 'stage' is the default/by convention section to add from
+  AddActors( "stage", toActor );
+}
 
-  if( OptionalString s = constant.IsString( IsChild(node, "screenToFrameBufferFunction") ) )
+void Builder::AddActors( const std::string &sectionName, Actor toActor )
+{
+  DALI_ASSERT_ALWAYS(mParser.GetRoot() && "Builder script not loaded");
+
+  Property::Map overrideMap;
+  Replacement replacements(overrideMap, mReplacementMap);
+
+  OptionalChild add = IsChild(*mParser.GetRoot(), sectionName);
+
+  if( add )
   {
-    if("DEFAULT_SCREEN_TO_FRAMEBUFFER_FUNCTION" == *s)
-    {
-      task.SetScreenToFrameBufferFunction( RenderTask::DEFAULT_SCREEN_TO_FRAMEBUFFER_FUNCTION );
-    }
-    else if("FULLSCREEN_FRAMEBUFFER_FUNCTION" == *s)
+    for( TreeNode::ConstIterator iter = (*add).CBegin(); iter != (*add).CEnd(); ++iter )
     {
-      task.SetScreenToFrameBufferFunction( RenderTask::FULLSCREEN_FRAMEBUFFER_FUNCTION );
+      // empty actor adds directly to the stage
+      BaseHandle baseHandle = DoCreate( *mParser.GetRoot(), (*iter).second, Actor(), replacements );
+      Actor actor = Actor::DownCast(baseHandle);
+      if(actor)
+      {
+        toActor.Add( actor );
+      }
     }
-    else
+
+    // if were adding the 'stage' section then also check for a render task called stage
+    // to add automatically
+    if( "stage" == sectionName )
     {
-      DALI_SCRIPT_WARNING("todo");
+      if( OptionalChild renderTasks = IsChild(*mParser.GetRoot(), "renderTasks") )
+      {
+        if( OptionalChild tasks = IsChild(*renderTasks, "stage") )
+        {
+          CreateRenderTask( "stage" );
+        }
+      }
     }
   }
-
-  // other setup is via the property system
-  SetProperties( node, task, constant );
 }
 
 void Builder::CreateRenderTask( const std::string &name )
@@ -741,6 +632,7 @@ PathConstrainer Builder::GetPathConstrainer( const std::string& name )
   return ret;
 }
 
+
 bool Builder::IsPathConstrainer( const std::string& name )
 {
   size_t count( mPathConstrainerLut.size() );
@@ -877,60 +769,67 @@ void Builder::EmitQuitSignal()
   mQuitSignal.Emit();
 }
 
-void Builder::AddActors( Actor toActor )
+Builder::~Builder()
 {
-  // 'stage' is the default/by convention section to add from
-  AddActors( "stage", toActor );
 }
 
-void Builder::AddActors( const std::string &sectionName, Actor toActor )
+void Builder::LoadConstants( const TreeNode& root, Property::Map& intoMap )
 {
-  DALI_ASSERT_ALWAYS(mParser.GetRoot() && "Builder script not loaded");
-
-  Property::Map overrideMap;
-  Replacement replacements(overrideMap, mReplacementMap);
-
-  OptionalChild add = IsChild(*mParser.GetRoot(), sectionName);
+  Replacement replacer(intoMap);
 
-  if( add )
+  if( OptionalChild constants = IsChild(root, "constants") )
   {
-    for( TreeNode::ConstIterator iter = (*add).CBegin(); iter != (*add).CEnd(); ++iter )
-    {
-      // empty actor adds directly to the stage
-      BaseHandle baseHandle = DoCreate( *mParser.GetRoot(), (*iter).second, Actor(), replacements );
-      Actor actor = Actor::DownCast(baseHandle);
-      if(actor)
-      {
-        toActor.Add( actor );
-      }
-    }
-
-    // if were adding the 'stage' section then also check for a render task called stage
-    // to add automatically
-    if( "stage" == sectionName )
+    for(TreeNode::ConstIterator iter = (*constants).CBegin();
+        iter != (*constants).CEnd(); ++iter)
     {
-      if( OptionalChild renderTasks = IsChild(*mParser.GetRoot(), "renderTasks") )
+      Dali::Property::Value property;
+      if( (*iter).second.GetName() )
       {
-        if( OptionalChild tasks = IsChild(*renderTasks, "stage") )
-        {
-          CreateRenderTask( "stage" );
-        }
+#if defined(DEBUG_ENABLED)
+        DALI_SCRIPT_VERBOSE("Constant set from json '%s'\n", (*iter).second.GetName());
+#endif
+        DeterminePropertyFromNode( (*iter).second, property, replacer );
+        intoMap[ (*iter).second.GetName() ] = property;
       }
     }
   }
-}
-
-Animation Builder::CreateAnimation( const std::string& animationName, const Replacement& replacement, Dali::Actor sourceActor )
-{
-  DALI_ASSERT_ALWAYS(mParser.GetRoot() && "Builder script not loaded");
-
-  Animation anim;
 
-  if( OptionalChild animations = IsChild(*mParser.GetRoot(), "animations") )
+#if defined(DEBUG_ENABLED)
+  Property::Value* iter = intoMap.Find( "CONFIG_SCRIPT_LOG_LEVEL" );
+  if( iter && iter->GetType() == Property::STRING )
   {
-    if( OptionalChild animation = IsChild(*animations, animationName) )
+    std::string logLevel( iter->Get< std::string >() );
+    if( logLevel == "NoLogging" )
     {
-      anim = Dali::Toolkit::Internal::CreateAnimation( *animation, replacement, sourceActor, this );
+      gFilterScript->SetLogLevel( Integration::Log::NoLogging );
+    }
+    else if( logLevel == "Concise" )
+    {
+      gFilterScript->SetLogLevel( Integration::Log::Concise );
+    }
+    else if( logLevel == "General" )
+    {
+      gFilterScript->SetLogLevel( Integration::Log::General );
+    }
+    else if( logLevel == "Verbose" )
+    {
+      gFilterScript->SetLogLevel( Integration::Log::Verbose );
+    }
+  }
+#endif
+}
+
+Animation Builder::CreateAnimation( const std::string& animationName, const Replacement& replacement, Dali::Actor sourceActor )
+{
+  DALI_ASSERT_ALWAYS(mParser.GetRoot() && "Builder script not loaded");
+
+  Animation anim;
+
+  if( OptionalChild animations = IsChild(*mParser.GetRoot(), "animations") )
+  {
+    if( OptionalChild animation = IsChild(*animations, animationName) )
+    {
+      anim = Dali::Toolkit::Internal::CreateAnimation( *animation, replacement, sourceActor, this );
     }
     else
     {
@@ -945,412 +844,737 @@ Animation Builder::CreateAnimation( const std::string& animationName, const Repl
   return anim;
 }
 
-Animation Builder::CreateAnimation( const std::string& animationName, const Property::Map& map, Dali::Actor sourceActor )
+BaseHandle Builder::Create( const std::string& templateName, const Replacement& constant )
 {
-  Replacement replacement(map, mReplacementMap);
-  return CreateAnimation( animationName, replacement, sourceActor);
-}
+  DALI_ASSERT_ALWAYS(mParser.GetRoot() && "Builder script not loaded");
 
-Animation Builder::CreateAnimation( const std::string& animationName, const Property::Map& map )
-{
-  Replacement replacement(map, mReplacementMap);
-  return CreateAnimation( animationName, replacement, Stage::GetCurrent().GetRootLayer() );
-}
+  BaseHandle baseHandle;
 
-Animation Builder::CreateAnimation( const std::string& animationName, Dali::Actor sourceActor )
-{
-  Replacement replacement( mReplacementMap );
+  OptionalChild templates = IsChild(*mParser.GetRoot(), KEYNAME_TEMPLATES);
 
-  return CreateAnimation( animationName, replacement, sourceActor );
-}
+  if( !templates )
+  {
+    DALI_SCRIPT_WARNING("No template section found to CreateFromTemplate\n");
+  }
+  else
+  {
+    OptionalChild childTemplate = IsChild(*templates, templateName);
+    if(!childTemplate)
+    {
+      DALI_SCRIPT_WARNING("Template '%s' does not exist in template section\n", templateName.c_str());
+    }
+    else
+    {
+      OptionalString type = constant.IsString( IsChild(*childTemplate, KEYNAME_TYPE) );
 
-Animation Builder::CreateAnimation( const std::string& animationName )
-{
-  Replacement replacement( mReplacementMap );
+      if(!type)
+      {
+        DALI_SCRIPT_WARNING("Cannot create template '%s' as template section is missing 'type'\n", templateName.c_str());
+      }
+      else
+      {
+        baseHandle = DoCreate( *mParser.GetRoot(), *childTemplate, Actor(), constant );
+      }
+    }
+  }
 
-  return CreateAnimation( animationName, replacement, Dali::Stage::GetCurrent().GetRootLayer() );
+  return baseHandle;
 }
 
-bool Builder::ConvertChildValue( const TreeNode& mappingRoot, KeyStack& keyStack, Property::Value& child )
+/*
+ * Create a dali type from a node.
+ * If parent given and an actor type was created then add it to the parent and
+ * recursively add nodes children.
+ */
+BaseHandle Builder::DoCreate( const TreeNode& root, const TreeNode& node,
+                              Actor parent, const Replacement& replacements )
 {
-  bool result = false;
+  BaseHandle baseHandle;
+  TypeInfo typeInfo;
+  const TreeNode* templateNode = NULL;
 
-  switch( child.GetType() )
+  if( OptionalString typeName = IsString(node, KEYNAME_TYPE) )
   {
-    case Property::STRING:
+    typeInfo = TypeRegistry::Get().GetTypeInfo( *typeName );
+
+    if( !typeInfo )
     {
-      std::string value;
-      if( child.Get( value ) )
+      // a template name is also allowed inplace of the type name
+      OptionalChild templates = IsChild( root, KEYNAME_TEMPLATES);
+
+      if( templates )
       {
-        std::string key;
-        if( GetMappingKey( value, key ) )
+        if( OptionalChild isTemplate = IsChild( *templates, *typeName ) )
         {
-          // Check key for cycles:
-          result=true;
-          for( KeyStack::iterator iter = keyStack.begin() ; iter != keyStack.end(); ++iter )
-          {
-            if( key.compare(*iter) == 0 )
-            {
-              // key is already in stack; stop.
-              DALI_LOG_WARNING("Detected cycle in stylesheet mapping table:%s\n", key.c_str());
-              child = Property::Value("");
-              result=false;
-              break;
-            }
-          }
+          templateNode = &(*isTemplate);
 
-          if( result )
+          if( OptionalString templateTypeName = IsString(*templateNode, KEYNAME_TYPE) )
           {
-            // The following call will overwrite the child with the value
-            // from the mapping.
-            RecursePropertyMap( mappingRoot, keyStack, key.c_str(), Property::NONE, child );
-            result = true;
+            typeInfo = TypeRegistry::Get().GetTypeInfo( *templateTypeName );
           }
         }
       }
-      break;
     }
+  }
 
-    case Property::MAP:
+  if(!typeInfo)
+  {
+    DALI_SCRIPT_WARNING("Cannot create Dali type from node '%s'\n", node.GetName());
+  }
+  else
+  {
+    baseHandle       = typeInfo.CreateInstance();
+    Handle handle    = Handle::DownCast(baseHandle);
+    Actor actor      = Actor::DownCast(handle);
+
+    if(handle)
     {
-      Property::Map* map = child.GetMap();
-      if( map )
+
+      DALI_SCRIPT_VERBOSE("Create:%s\n", typeInfo.GetName().c_str());
+
+#if defined(DEBUG_ENABLED)
+      if(handle)
       {
-        for( Property::Map::SizeType i=0; i < map->Count(); ++i )
-        {
-          Property::Value& child = map->GetValue(i);
-          ConvertChildValue(mappingRoot, keyStack, child);
-        }
+        DALI_SCRIPT_VERBOSE("  Is Handle Object=%d\n", (long*)handle.GetObjectPtr());
+        DALI_SCRIPT_VERBOSE("  Is Handle Property Count=%d\n", handle.GetPropertyCount());
       }
-      break;
-    }
 
-    case Property::ARRAY:
-    {
-      Property::Array* array = child.GetArray();
-      if( array )
+      if(actor)
       {
-        for( Property::Array::SizeType i=0; i < array->Count(); ++i )
-        {
-          Property::Value& child = array->GetElementAt(i);
-          ConvertChildValue(mappingRoot, keyStack, child);
-        }
+        DALI_SCRIPT_VERBOSE("  Is Actor id=%d\n", actor.GetId());
       }
-      break;
-    }
-
-    default:
-      // Ignore other types.
-      break;
-  }
 
-  return result;
-}
+      Toolkit::Control control  = Toolkit::Control::DownCast(handle);
+      if(control)
+      {
+        DALI_SCRIPT_VERBOSE("  Is Control id=%d\n", actor.GetId());
+      }
+#endif // DEBUG_ENABLED
 
-bool Builder::RecursePropertyMap( const TreeNode& mappingRoot, KeyStack& keyStack, const char* theKey, Property::Type propertyType, Property::Value& value )
-{
-  Replacement replacer( mReplacementMap );
-  bool result = false;
+      if( templateNode )
+      {
+        ApplyProperties( root, *templateNode, handle, replacements );
 
-  keyStack.push_back( theKey );
+        if( OptionalChild actors = IsChild( *templateNode, KEYNAME_ACTORS ) )
+        {
+          for( TreeConstIter iter = (*actors).CBegin(); iter != (*actors).CEnd(); ++iter )
+          {
+            DoCreate( root, (*iter).second, actor, replacements );
+          }
+        }
+      }
 
-  for( TreeNode::ConstIterator iter = mappingRoot.CBegin(); iter != mappingRoot.CEnd(); ++iter )
-  {
-    std::string aKey( (*iter).first );
-    if( aKey.compare( theKey ) == 0 )
-    {
-      if( propertyType == Property::NONE )
+      if( actor )
       {
-        DeterminePropertyFromNode( (*iter).second, value, replacer );
-        result = true;
+        // add children of all the styles
+        if( OptionalChild actors = IsChild( node, KEYNAME_ACTORS ) )
+        {
+          for( TreeConstIter iter = (*actors).CBegin(); iter != (*actors).CEnd(); ++iter )
+          {
+            DoCreate( root, (*iter).second, actor, replacements );
+          }
+        }
+
+        // apply style on top as they need the children to exist
+        ApplyAllStyleProperties( root, node, actor, replacements );
+
+        // then add to parent
+        if( parent )
+        {
+          parent.Add( actor );
+        }
       }
       else
       {
-        result = DeterminePropertyFromNode( (*iter).second, propertyType, value, replacer );
-      }
-
-      if( result )
-      {
-        ConvertChildValue(mappingRoot, keyStack, value);
+        ApplyProperties( root, node, handle, replacements );
       }
-      break;
+    }
+    else
+    {
+      DALI_SCRIPT_WARNING("Cannot create handle from type '%s'\n", typeInfo.GetName().c_str());
     }
   }
-  keyStack.pop_back();
-
-  return result;
-}
-
 
-bool Builder::GetPropertyMap( const TreeNode& mappingRoot, const char* theKey, Property::Type propertyType, Property::Value& value )
-{
-  KeyStack keyStack;
-  return RecursePropertyMap( mappingRoot, keyStack, theKey, propertyType, value );
+  return baseHandle;
 }
 
-
-void Builder::LoadFromString( std::string const& data, Dali::Toolkit::Builder::UIFormat format )
+void Builder::SetupTask( RenderTask& task, const TreeNode& node, const Replacement& constant )
 {
-  // parser to get constants and includes only
-  Dali::Toolkit::JsonParser parser = Dali::Toolkit::JsonParser::New();
+  const Stage& stage = Stage::GetCurrent();
+  Layer root  = stage.GetRootLayer();
 
-  if( !parser.Parse( data ) )
+  if( OptionalString s = constant.IsString( IsChild(node, "sourceActor") ) )
   {
-    DALI_LOG_WARNING( "JSON Parse Error:%d:%d:'%s'\n",
-                      parser.GetErrorLineNumber(),
-                      parser.GetErrorColumn(),
-                      parser.GetErrorDescription().c_str() );
-
-    DALI_ASSERT_ALWAYS(!"Cannot parse JSON");
+    Actor actor = root.FindChildByName(*s);
+    if(actor)
+    {
+      task.SetSourceActor( actor );
+    }
+    else
+    {
+      DALI_SCRIPT_WARNING("Cannot find source actor on stage for render task called '%s'\n", (*s).c_str() );
+    }
   }
-  else
-  {
-    // load constant map (allows the user to override the constants in the json after loading)
-    LoadConstants( *parser.GetRoot(), mReplacementMap );
 
-    // merge includes
-    if( OptionalChild includes = IsChild(*parser.GetRoot(), KEYNAME_INCLUDES) )
+  if( OptionalString s = constant.IsString( IsChild(node, "cameraActor") ) )
+  {
+    CameraActor actor = CameraActor::DownCast( root.FindChildByName(*s) );
+    if(actor)
     {
-      Replacement replacer( mReplacementMap );
-
-      for(TreeNode::ConstIterator iter = (*includes).CBegin(); iter != (*includes).CEnd(); ++iter)
-      {
-        OptionalString filename = replacer.IsString( (*iter).second );
-
-        if( filename )
-        {
-#if defined(DEBUG_ENABLED)
-          DALI_SCRIPT_VERBOSE("Loading Include '%s'\n", (*filename).c_str());
-#endif
-          LoadFromString( GetFileContents(*filename) );
-        }
-      }
+      task.SetCameraActor( actor );
     }
-
-    if( !mParser.Parse( data ) )
+    else
     {
-      DALI_LOG_WARNING( "JSON Parse Error:%d:%d:'%s'\n",
-                        mParser.GetErrorLineNumber(),
-                        mParser.GetErrorColumn(),
-                        mParser.GetErrorDescription().c_str() );
+      DALI_SCRIPT_WARNING("Cannot find camera actor on stage for render task called '%s'\n", (*s).c_str() );
+    }
+  }
 
-      DALI_ASSERT_ALWAYS(!"Cannot parse JSON");
+  if( OptionalString s = constant.IsString( IsChild(node, "targetFrameBuffer") ) )
+  {
+    FrameBufferImage fb = GetFrameBufferImage( *s, constant );
+    if(fb)
+    {
+      task.SetTargetFrameBuffer( fb );
+    }
+    else
+    {
+      DALI_SCRIPT_WARNING("Cannot find target frame buffer '%s'\n", (*s).c_str() );
     }
   }
 
-  DUMP_PARSE_TREE(parser); // This macro only writes out if DEBUG is enabled and the "DUMP_TREE" constant is defined in the stylesheet.
-  DUMP_TEST_MAPPINGS(parser);
+  if( OptionalString s = constant.IsString( IsChild(node, "screenToFrameBufferFunction") ) )
+  {
+    if("DEFAULT_SCREEN_TO_FRAMEBUFFER_FUNCTION" == *s)
+    {
+      task.SetScreenToFrameBufferFunction( RenderTask::DEFAULT_SCREEN_TO_FRAMEBUFFER_FUNCTION );
+    }
+    else if("FULLSCREEN_FRAMEBUFFER_FUNCTION" == *s)
+    {
+      task.SetScreenToFrameBufferFunction( RenderTask::FULLSCREEN_FRAMEBUFFER_FUNCTION );
+    }
+    else
+    {
+      DALI_SCRIPT_WARNING("todo");
+    }
+  }
 
-  DALI_ASSERT_ALWAYS(mParser.GetRoot() && "Cannot parse JSON");
+  // other setup is via the property system
+  SetProperties( node, task, constant );
 }
 
-void Builder::AddConstants( const Property::Map& map )
+bool Builder::ApplyStyle( const std::string& styleName, Handle& handle, const Replacement& replacement )
 {
-  mReplacementMap.Merge( map );
-}
+  DALI_ASSERT_ALWAYS(mParser.GetRoot() && "Builder script not loaded");
 
-void Builder::AddConstant( const std::string& key, const Property::Value& value )
-{
-  mReplacementMap[key] = value;
-}
+  OptionalChild styles = IsChild( *mParser.GetRoot(), KEYNAME_STYLES );
 
-const Property::Map& Builder::GetConstants() const
-{
-  return mReplacementMap;
-}
+  std::string styleNameLower(styleName);
+  OptionalChild style  = IsChildIgnoreCase( *styles, styleNameLower );
 
-const Property::Value& Builder::GetConstant( const std::string& key ) const
-{
-  Property::Value* match = mReplacementMap.Find( key );
-  if( match )
+  if( styles && style )
   {
-    return (*match);
+    ApplyAllStyleProperties( *mParser.GetRoot(), *style, handle, replacement );
+    return true;
   }
   else
   {
-    static Property::Value invalid;
-    return invalid;
+    return false;
   }
 }
 
-void Builder::LoadConstants( const TreeNode& root, Property::Map& intoMap )
+void Builder::ApplyAllStyleProperties( const TreeNode& root, const TreeNode& node,
+                                       Dali::Handle& handle, const Replacement& constant )
 {
-  Replacement replacer(intoMap);
+  const char* styleName = node.GetName();
 
-  if( OptionalChild constants = IsChild(root, "constants") )
+  StylePtr style = Style::New();
+
+  StylePtr* matchedStyle = NULL;
+  if( styleName )
   {
-    for(TreeNode::ConstIterator iter = (*constants).CBegin();
-        iter != (*constants).CEnd(); ++iter)
+    matchedStyle = mStyles.FindCaseInsensitive( styleName );
+    if( ! matchedStyle )
     {
-      Dali::Property::Value property;
-      if( (*iter).second.GetName() )
+      OptionalChild styleNodes = IsChild(root, KEYNAME_STYLES);
+      OptionalChild inheritFromNode = IsChild(node, KEYNAME_INHERIT);
+      if( !inheritFromNode )
+      {
+        inheritFromNode = IsChild( node, KEYNAME_STYLES );
+      }
+
+      if( styleNodes )
       {
+        if( inheritFromNode )
+        {
+          TreeNodeList additionalStyleNodes;
+
+          CollectAllStyles( *styleNodes, *inheritFromNode, additionalStyleNodes );
+
 #if defined(DEBUG_ENABLED)
-        DALI_SCRIPT_VERBOSE("Constant set from json '%s'\n", (*iter).second.GetName());
+          for(TreeNode::ConstIterator iter = (*inheritFromNode).CBegin(); iter != (*inheritFromNode).CEnd(); ++iter)
+          {
+            if( OptionalString styleName = IsString( (*iter).second ) )
+            {
+              DALI_SCRIPT_VERBOSE("Style Applied '%s'\n", (*styleName).c_str());
+            }
+          }
 #endif
-        DeterminePropertyFromNode( (*iter).second, property, replacer );
-        intoMap[ (*iter).second.GetName() ] = property;
+
+          // a style may have other styles, which has other styles etc so we apply in reverse by convention.
+          for(TreeNodeList::reverse_iterator iter = additionalStyleNodes.rbegin(); iter != additionalStyleNodes.rend(); ++iter)
+          {
+            RecordStyle( style, *(*iter), handle, constant );
+            ApplySignals( root, *(*iter), handle );
+            ApplyStylesByActor( root, *(*iter), handle, constant );
+          }
+        }
+
+        RecordStyle( style, node, handle, constant );
+        mStyles.Add( styleName, style ); // shallow copy
+        matchedStyle = &style;
       }
     }
   }
 
-#if defined(DEBUG_ENABLED)
-  Property::Value* iter = intoMap.Find( "CONFIG_SCRIPT_LOG_LEVEL" );
-  if( iter && iter->GetType() == Property::STRING )
+  if( matchedStyle )
   {
-    std::string logLevel( iter->Get< std::string >() );
-    if( logLevel == "NoLogging" )
+    StylePtr style( *matchedStyle );
+    style->ApplyVisualsAndPropertiesRecursively( handle ); // (recurses through states)
+  }
+  else // If there were no styles, instead set properties
+  {
+    SetProperties( node, handle, constant );
+  }
+  ApplySignals( root, node, handle );
+  ApplyStylesByActor( root, node, handle, constant );
+}
+
+void Builder::RecordStyle( StylePtr           style,
+                           const TreeNode&    node,
+                           Dali::Handle&      handle,
+                           const Replacement& replacements )
+{
+  // With repeated calls, accumulate inherited states, visuals and properties
+  // but override any with same name
+
+  for( TreeNode::ConstIterator iter = node.CBegin(); iter != node.CEnd(); ++iter )
+  {
+    const TreeNode::KeyNodePair& keyValue = *iter;
+    std::string key( keyValue.first );
+    if( key == KEYNAME_STATES )
     {
-      gFilterScript->SetLogLevel( Integration::Log::NoLogging );
+      const TreeNode& states = keyValue.second;
+      if( states.GetType() != TreeNode::OBJECT )
+      {
+        DALI_LOG_WARNING( "RecordStyle() Node \"%s\" is not a JSON object\n", key.c_str() );
+        continue;
+      }
+
+      for( TreeNode::ConstIterator iter = states.CBegin(); iter != states.CEnd(); ++iter )
+      {
+        const TreeNode& stateNode = (*iter).second;
+        const char* stateName = stateNode.GetName();
+        if( stateNode.GetType() != TreeNode::OBJECT )
+        {
+          DALI_LOG_WARNING( "RecordStyle() Node \"%s\" is not a JSON object\n", stateName );
+          continue;
+        }
+
+        StylePtr* stylePtr = style->subStates.FindCaseInsensitive( stateName );
+        if( stylePtr )
+        {
+          StylePtr style(*stylePtr);
+          RecordStyle( style, stateNode, handle, replacements );
+        }
+        else
+        {
+          StylePtr subState = Style::New();
+          RecordStyle( subState, stateNode, handle, replacements );
+          style->subStates.Add( stateName, subState );
+        }
+      }
     }
-    else if( logLevel == "Concise" )
+    else if( key == KEYNAME_VISUALS )
     {
-      gFilterScript->SetLogLevel( Integration::Log::Concise );
+      for( TreeNode::ConstIterator iter = keyValue.second.CBegin(); iter != keyValue.second.CEnd(); ++iter )
+      {
+        // Each key in this table should be a property name matching a visual.
+        const TreeNode::KeyNodePair& visual = *iter;
+        Dali::Property::Value property(Property::MAP);
+        if( DeterminePropertyFromNode( visual.second, Property::MAP, property, replacements ) )
+        {
+          Property::Map* mapPtr = style->visuals.FindCaseInsensitive( visual.first );
+          if( mapPtr )
+          {
+            // Override existing visuals
+            mapPtr->Clear();
+            mapPtr->Merge(*property.GetMap());
+          }
+          else
+          {
+            style->visuals.Add(visual.first, *property.GetMap());
+          }
+        }
+      }
     }
-    else if( logLevel == "General" )
+    else if( key == KEYNAME_ENTRY_TRANSITION )
     {
-      gFilterScript->SetLogLevel( Integration::Log::General );
+      Dali::Property::Value property(Property::MAP);
+      if( DeterminePropertyFromNode( keyValue.second, Property::MAP, property, replacements ) )
+      {
+        style->entryTransition = Toolkit::TransitionData::New( *property.GetMap() );
+      }
     }
-    else if( logLevel == "Verbose" )
+    else if( key == KEYNAME_EXIT_TRANSITION )
     {
-      gFilterScript->SetLogLevel( Integration::Log::Verbose );
+      Dali::Property::Value property(Property::MAP);
+      if( DeterminePropertyFromNode( keyValue.second, Property::MAP, property, replacements ) )
+      {
+        style->exitTransition = Toolkit::TransitionData::New( *property.GetMap() );
+      }
+    }
+    else if( key == KEYNAME_TRANSITIONS )
+    {
+      //@todo add new transitions to style.transitions
+      //      override existing transitions. A transition matches on target & property name
+      const TreeNode& node = keyValue.second;
+      if( node.GetType() == TreeNode::ARRAY )
+      {
+        Dali::Property::Value property(Property::ARRAY);
+        if( DeterminePropertyFromNode( node, Property::ARRAY, property, replacements ) )
+        {
+          style->transitions = *property.GetArray();
+        }
+      }
+      else if( node.GetType() == TreeNode::OBJECT )
+      {
+        Dali::Property::Value property(Property::MAP);
+        if( DeterminePropertyFromNode( node, Property::MAP, property, replacements ) )
+        {
+          Property::Array propertyArray;
+          propertyArray.Add( property );
+          style->transitions = propertyArray;
+        }
+      }
+      else
+      {
+        DALI_LOG_WARNING( "RecordStyle() Node \"%s\" is not a JSON array or object\n", key.c_str() );
+      }
+    }
+    else if( key == KEYNAME_TYPE ||
+             key == KEYNAME_ACTORS ||
+             key == KEYNAME_SIGNALS ||
+             key == KEYNAME_STYLES ||
+             key == KEYNAME_MAPPINGS ||
+             key == KEYNAME_INHERIT )
+    {
+      continue;
+    }
+    else // It's a property
+    {
+      Property::Index index;
+      Property::Value value;
+      if( MapToTargetProperty( handle, key, keyValue.second, replacements, index, value ) )
+      {
+        Property::Value* existingValuePtr = style->properties.Find( index );
+        if( existingValuePtr != NULL )
+        {
+          *existingValuePtr = value; // Overwrite existing property.
+        }
+        else
+        {
+          style->properties.Add( index, value );
+        }
+      }
     }
   }
-#endif
+}
 
+// Set properties from node on handle.
+void Builder::ApplyProperties( const TreeNode& root, const TreeNode& node,
+                               Dali::Handle& handle, const Replacement& constant )
+{
+  SetProperties( node, handle, constant );
+  ApplySignals( root, node, handle );
 }
 
-bool Builder::ApplyStyle( const std::string& styleName, Handle& handle )
+void Builder::ApplySignals(const TreeNode& root, const TreeNode& node, Dali::Handle& handle )
 {
-  Replacement replacer( mReplacementMap );
-  return ApplyStyle( styleName, handle, replacer );
+  Actor actor = Actor::DownCast(handle);
+  if( actor )
+  {
+    // add signals
+    SetupSignalAction( mSlotDelegate.GetConnectionTracker(), root, node, actor, this );
+    SetupPropertyNotification( mSlotDelegate.GetConnectionTracker(), root, node, actor, this );
+  }
 }
 
-bool Builder::ApplyStyle( const std::string& styleName, Handle& handle, const Replacement& replacement )
+
+// Appling by style helper
+// use FindChildByName() to apply properties referenced in KEYNAME_ACTORS in the node
+void Builder::ApplyStylesByActor(  const TreeNode& root, const TreeNode& node,
+                                   Dali::Handle& handle, const Replacement& constant )
 {
-  DALI_ASSERT_ALWAYS(mParser.GetRoot() && "Builder script not loaded");
+  if( Dali::Actor actor = Dali::Actor::DownCast( handle ) )
+  {
+    if( const TreeNode* actors = node.GetChild( KEYNAME_ACTORS ) )
+    {
+      // in a style the actor subtree properties referenced by actor name
+      for( TreeConstIter iter = actors->CBegin(); iter != actors->CEnd(); ++iter )
+      {
+        Dali::Actor foundActor;
 
-  OptionalChild styles = IsChild( *mParser.GetRoot(), KEYNAME_STYLES );
+        if( (*iter).first )
+        {
+          foundActor = actor.FindChildByName( (*iter).first );
+        }
 
-  std::string styleNameLower(styleName);
-  OptionalChild style  = IsChildIgnoreCase( *styles, styleNameLower );
+        if( !foundActor )
+        {
+          DALI_SCRIPT_VERBOSE("Cannot find actor in style application '%s'\n", (*iter).first);
+        }
+        else
+        {
+          DALI_SCRIPT_VERBOSE("Styles applied to actor '%s'\n", (*iter).first);
+          ApplyProperties( root, (*iter).second, foundActor, constant );
+        }
+      }
+    }
+  }
+}
 
-  if( styles && style )
+/*
+ * Sets the handle properties found in the tree node
+ */
+void Builder::SetProperties( const TreeNode& node, Handle& handle, const Replacement& constant )
+{
+  if( handle )
   {
-    ApplyAllStyleProperties( *mParser.GetRoot(), *style, handle, replacement );
-    return true;
+    for( TreeNode::ConstIterator iter = node.CBegin(); iter != node.CEnd(); ++iter )
+    {
+      const TreeNode::KeyNodePair& keyChild = *iter;
+
+      std::string key( keyChild.first );
+
+      // ignore special fields;
+      if( key == KEYNAME_TYPE ||
+          key == KEYNAME_ACTORS ||
+          key == KEYNAME_SIGNALS ||
+          key == KEYNAME_STYLES ||
+          key == KEYNAME_MAPPINGS ||
+          key == KEYNAME_INHERIT ||
+          key == KEYNAME_STATES ||
+          key == KEYNAME_VISUALS ||
+          key == KEYNAME_ENTRY_TRANSITION ||
+          key == KEYNAME_EXIT_TRANSITION ||
+          key == KEYNAME_TRANSITIONS )
+      {
+        continue;
+      }
+
+      Property::Index index;
+      Property::Value value;
+
+      bool mapped = MapToTargetProperty( handle, key, keyChild.second, constant, index, value );
+      if( mapped )
+      {
+        DALI_SCRIPT_VERBOSE("SetProperty '%s' Index=:%d Value Type=%d Value '%s'\n", key.c_str(), index, value.GetType(), PropertyValueToString(value).c_str() );
+
+        handle.SetProperty( index, value );
+      }
+
+      // Add custom properties
+      SetCustomProperties(node, handle, constant, PROPERTIES, Property::READ_WRITE);
+      SetCustomProperties(node, handle, constant, ANIMATABLE_PROPERTIES, Property::ANIMATABLE);
+
+    } // for property nodes
   }
   else
   {
-    return false;
+    DALI_SCRIPT_WARNING("Style applied to empty handle\n");
   }
 }
 
-BaseHandle Builder::Create( const std::string& templateName, const Property::Map& map )
+bool Builder::MapToTargetProperty(
+  Handle&            propertyObject,
+  const std::string& key,
+  const TreeNode&    node,
+  const Replacement& constant,
+  Property::Index&   index,
+  Property::Value&   value )
 {
-  Replacement replacement( map, mReplacementMap );
-  return Create( templateName, replacement );
+  bool mapped = false;
+
+  index = propertyObject.GetPropertyIndex( key );
+  if( Property::INVALID_INDEX != index )
+  {
+    Property::Type type = propertyObject.GetPropertyType(index);
+
+    // if node.value is a mapping, get the property value from the "mappings" table
+    if( node.GetType() == TreeNode::STRING )
+    {
+      std::string mappingKey;
+      if( GetMappingKey( node.GetString(), mappingKey) )
+      {
+        OptionalChild mappingRoot = IsChild( mParser.GetRoot(), KEYNAME_MAPPINGS );
+        mapped = GetPropertyMap( *mappingRoot, mappingKey.c_str(), type, value );
+      }
+    }
+    if( ! mapped )
+    {
+      mapped = DeterminePropertyFromNode( node, type, value, constant );
+      if( ! mapped )
+      {
+        // Just determine the property from the node and if it's valid, let the property object handle it
+        DeterminePropertyFromNode( node, value, constant );
+        mapped = ( value.GetType() != Property::NONE );
+      }
+    }
+  }
+  else
+  {
+    DALI_LOG_ERROR("Key '%s' not found.\n", key.c_str());
+  }
+  return mapped;
 }
 
-BaseHandle Builder::Create( const std::string& templateName, const Replacement& constant )
+bool Builder::GetPropertyMap( const TreeNode& mappingRoot, const char* theKey, Property::Type propertyType, Property::Value& value )
 {
-  DALI_ASSERT_ALWAYS(mParser.GetRoot() && "Builder script not loaded");
+  KeyStack keyStack;
+  return RecursePropertyMap( mappingRoot, keyStack, theKey, propertyType, value );
+}
 
-  BaseHandle baseHandle;
+bool Builder::RecursePropertyMap( const TreeNode& mappingRoot, KeyStack& keyStack, const char* theKey, Property::Type propertyType, Property::Value& value )
+{
+  Replacement replacer( mReplacementMap );
+  bool result = false;
 
-  OptionalChild templates = IsChild(*mParser.GetRoot(), KEYNAME_TEMPLATES);
+  keyStack.push_back( theKey );
 
-  if( !templates )
-  {
-    DALI_SCRIPT_WARNING("No template section found to CreateFromTemplate\n");
-  }
-  else
+  for( TreeNode::ConstIterator iter = mappingRoot.CBegin(); iter != mappingRoot.CEnd(); ++iter )
   {
-    OptionalChild childTemplate = IsChild(*templates, templateName);
-    if(!childTemplate)
-    {
-      DALI_SCRIPT_WARNING("Template '%s' does not exist in template section\n", templateName.c_str());
-    }
-    else
+    std::string aKey( (*iter).first );
+    if( aKey.compare( theKey ) == 0 )
     {
-      OptionalString type = constant.IsString( IsChild(*childTemplate, KEYNAME_TYPE) );
-
-      if(!type)
+      if( propertyType == Property::NONE )
       {
-        DALI_SCRIPT_WARNING("Cannot create template '%s' as template section is missing 'type'\n", templateName.c_str());
+        DeterminePropertyFromNode( (*iter).second, value, replacer );
+        result = true;
       }
       else
       {
-        baseHandle = DoCreate( *mParser.GetRoot(), *childTemplate, Actor(), constant );
+        result = DeterminePropertyFromNode( (*iter).second, propertyType, value, replacer );
+      }
+
+      if( result )
+      {
+        ConvertChildValue(mappingRoot, keyStack, value);
       }
+      break;
     }
   }
+  keyStack.pop_back();
 
-  return baseHandle;
+  return result;
 }
 
-BaseHandle Builder::CreateFromJson( const std::string& json )
+bool Builder::ConvertChildValue( const TreeNode& mappingRoot, KeyStack& keyStack, Property::Value& child )
 {
-  BaseHandle ret;
-
-  // merge in new template, hoping no one else has one named '@temp@'
-  std::string newTemplate =
-    std::string("{\"templates\":{\"@temp@\":") +                      \
-    json +                                                            \
-    std::string("}}");
+  bool result = false;
 
-  if( mParser.Parse(newTemplate) )
+  switch( child.GetType() )
   {
-    Replacement replacement( mReplacementMap );
-    ret = Create( "@temp@", replacement );
-  }
+    case Property::STRING:
+    {
+      std::string value;
+      if( child.Get( value ) )
+      {
+        std::string key;
+        if( GetMappingKey( value, key ) )
+        {
+          // Check key for cycles:
+          result=true;
+          for( KeyStack::iterator iter = keyStack.begin() ; iter != keyStack.end(); ++iter )
+          {
+            if( key.compare(*iter) == 0 )
+            {
+              // key is already in stack; stop.
+              DALI_LOG_WARNING("Detected cycle in stylesheet mapping table:%s\n", key.c_str());
+              child = Property::Value("");
+              result=false;
+              break;
+            }
+          }
 
-  return ret;
-}
+          if( result )
+          {
+            // The following call will overwrite the child with the value
+            // from the mapping.
+            RecursePropertyMap( mappingRoot, keyStack, key.c_str(), Property::NONE, child );
+            result = true;
+          }
+        }
+      }
+      break;
+    }
 
-bool Builder::ApplyFromJson(  Handle& handle, const std::string& json )
-{
-  bool ret = false;
+    case Property::MAP:
+    {
+      Property::Map* map = child.GetMap();
+      if( map )
+      {
+        for( Property::Map::SizeType i=0; i < map->Count(); ++i )
+        {
+          Property::Value& child = map->GetValue(i);
+          ConvertChildValue(mappingRoot, keyStack, child);
+        }
+      }
+      break;
+    }
 
-  // merge new style, hoping no one else has one named '@temp@'
-  std::string newStyle =
-    std::string("{\"styles\":{\"@temp@\":") +                           \
-    json +                                                              \
-    std::string("}}");
+    case Property::ARRAY:
+    {
+      Property::Array* array = child.GetArray();
+      if( array )
+      {
+        for( Property::Array::SizeType i=0; i < array->Count(); ++i )
+        {
+          Property::Value& child = array->GetElementAt(i);
+          ConvertChildValue(mappingRoot, keyStack, child);
+        }
+      }
+      break;
+    }
 
-  if( mParser.Parse(newStyle) )
-  {
-    Replacement replacement( mReplacementMap );
-    ret = ApplyStyle( "@temp@", handle, replacement );
+    default:
+      // Ignore other types.
+      break;
   }
 
-  return ret;
-}
-
-
-BaseHandle Builder::Create( const std::string& templateName )
-{
-  Replacement replacement( mReplacementMap );
-  return Create( templateName, replacement );
+  return result;
 }
 
-Builder::Builder()
-: mSlotDelegate( this )
+void Builder::SetCustomProperties( const TreeNode& node, Handle& handle, const Replacement& constant,
+                          const std::string& childName, Property::AccessMode accessMode )
 {
-  mParser = Dali::Toolkit::JsonParser::New();
-
-  Property::Map defaultDirs;
-  defaultDirs[ TOKEN_STRING(DALI_IMAGE_DIR) ]       = DALI_IMAGE_DIR;
-  defaultDirs[ TOKEN_STRING(DALI_SOUND_DIR) ]       = DALI_SOUND_DIR;
-  defaultDirs[ TOKEN_STRING(DALI_STYLE_DIR) ]       = DALI_STYLE_DIR;
-  defaultDirs[ TOKEN_STRING(DALI_STYLE_IMAGE_DIR) ] = DALI_STYLE_IMAGE_DIR;
+  // Add custom properties
+  if( OptionalChild customPropertiesChild = IsChild(node, childName) )
+  {
+    const TreeNode& customPropertiesNode = *customPropertiesChild;
+    const TreeConstIter endIter = customPropertiesNode.CEnd();
+    for( TreeConstIter iter = customPropertiesNode.CBegin(); endIter != iter; ++iter )
+    {
+      const TreeNode::KeyNodePair& keyChild = *iter;
+      std::string key( keyChild.first );
+      Property::Value value;
+      DeterminePropertyFromNode( keyChild.second, value, constant );
 
-  AddConstants( defaultDirs );
+      // Register/Set property.
+      handle.RegisterProperty( key, value, accessMode );
+    }
+  }
 }
 
-Builder::~Builder()
-{
-}
 
 } // namespace Internal
 
index 4c018aa..b6db52d 100644 (file)
@@ -34,6 +34,7 @@
 #include <dali-toolkit/devel-api/builder/json-parser.h>
 #include <dali-toolkit/devel-api/builder/builder.h>
 #include <dali-toolkit/internal/builder/builder-declarations.h>
+#include <dali-toolkit/internal/builder/style.h>
 
 // Warning messages usually displayed
 #define DALI_SCRIPT_WARNING(format, args...) \
@@ -149,6 +150,24 @@ public:
   bool ApplyStyle( const std::string& styleName, Handle& handle );
 
   /**
+   * Lookup the stylename in builder. If it's found in the parse tree,
+   * then return true.
+   * @param[in] styleName The style name to search for
+   * @return true if the stylename exists
+   */
+  bool LookupStyleName( const std::string& styleName );
+
+  /**
+   * Lookup the stylename in the recorded Styles - if it exists,
+   * performs a shallow copy to the passed in style and returns true.
+   * Otherwise it returns false.
+
+   * @param[in] styleName The stylename to search for
+   * @return A const pointer to the style object
+   */
+  const StylePtr GetStyle( const std::string& styleName );
+
+  /**
    * @copydoc Toolkit::Builder::AddActors
    */
   void AddActors( Actor toActor );
@@ -214,99 +233,151 @@ public:
    */
   void EmitQuitSignal();
 
+
 protected:
 
   virtual ~Builder();
 
 private:
-  // Undefined
-  Builder(const Builder&);
-  Builder& operator=(const Builder& rhs);
-
-  void SetupTask( RenderTask& task, const Toolkit::TreeNode& node, const Replacement& replacement );
-
-  void SetCustomProperties( const TreeNode& node, Handle& handle, const Replacement& constant, const std::string& childName, Property::AccessMode accessMode );
-
-private:
-  Toolkit::JsonParser mParser;
-
-  typedef std::map<const std::string, FrameBufferImage> ImageLut;
-  ImageLut mFrameBufferImageLut;
-
-  typedef std::map<const std::string, Path> PathLut;
-  PathLut mPathLut;
-
-  typedef struct{ std::string name; Dali::PathConstrainer pathConstrainer; } PathConstrainerEntry;
-  typedef std::vector<PathConstrainerEntry> PathConstrainerLut;
-  PathConstrainerLut mPathConstrainerLut;
-
+  typedef std::vector<const char*> KeyStack;
+  typedef std::vector< TreeNode::KeyNodePair > MappingsLut;
   typedef struct{ std::string name; Dali::LinearConstrainer linearConstrainer; } LinearConstrainerEntry;
   typedef std::vector<LinearConstrainerEntry> LinearConstrainerLut;
-  LinearConstrainerLut mLinearConstrainerLut;
-
-  SlotDelegate<Builder> mSlotDelegate;
-
-  Property::Map mReplacementMap;
-
-  typedef std::vector< TreeNode::KeyNodePair > MappingsLut;
-  MappingsLut mCompleteMappings;
+  typedef struct{ std::string name; Dali::PathConstrainer pathConstrainer; } PathConstrainerEntry;
+  typedef std::vector<PathConstrainerEntry> PathConstrainerLut;
+  typedef std::map<const std::string, Path> PathLut;
+  typedef std::map<const std::string, FrameBufferImage> ImageLut;
 
-  BaseHandle Create( const std::string& templateName, const Replacement& constant );
+private:
+  // Undefined
+  Builder(const Builder&);
 
-  BaseHandle DoCreate( const TreeNode& root, const TreeNode& node, Actor parent, const Replacement& replacements );
+  // Undefined
+  Builder& operator=(const Builder& rhs);
 
   void LoadConstants( const TreeNode& root, Property::Map& intoMap );
 
-  void LoadIncludes( const std::string& data );
-
-  bool ApplyStyle( const std::string& styleName, Handle& handle, const Replacement& replacement);
-
-  Animation CreateAnimation( const std::string& animationName, const Replacement& replacement, Dali::Actor sourceActor );
-
-  typedef std::vector<const char*> KeyStack;
+  Animation CreateAnimation( const std::string& animationName,
+                             const Replacement& replacement,
+                             Dali::Actor        sourceActor );
+
+  BaseHandle Create( const std::string& templateName,
+                     const Replacement& constant );
+
+  BaseHandle DoCreate( const TreeNode&    root,
+                       const TreeNode&    node,
+                       Actor              parent,
+                       const Replacement& replacements );
+
+  void SetupTask( RenderTask&              task,
+                  const Toolkit::TreeNode& node,
+                  const Replacement&       replacement );
+
+  bool ApplyStyle( const std::string& styleName,
+                   Handle&            handle,
+                   const Replacement& replacement);
+
+  void ApplyAllStyleProperties( const TreeNode&    root,
+                                const TreeNode&    node,
+                                Dali::Handle&      handle,
+                                const Replacement& constant );
+
+  void RecordStyles( const char*        styleName,
+                     const TreeNode&    node,
+                     Dali::Handle&      handle,
+                     const Replacement& replacements );
+
+  void RecordStyle( StylePtr           style,
+                    const TreeNode&    node,
+                    Dali::Handle&      handle,
+                    const Replacement& replacements );
+
+  void ApplyProperties( const TreeNode&    root,
+                        const TreeNode&    node,
+                        Dali::Handle&      handle,
+                        const Replacement& constant );
+
+  void ApplySignals( const TreeNode& root,
+                     const TreeNode& node,
+                     Dali::Handle& handle );
+
+  void ApplyStylesByActor( const TreeNode&    root,
+                           const TreeNode&    node,
+                           Dali::Handle&      handle,
+                           const Replacement& constant );
+
+  void SetProperties( const TreeNode&    node,
+                      Handle&            handle,
+                      const Replacement& constant );
+
+  bool MapToTargetProperty( Handle&            propertyObject,
+                            const std::string& key,
+                            const TreeNode&    node,
+                            const Replacement& constant,
+                            Property::Index&   index,
+                            Property::Value&   value );
 
   /**
-   * Tests if the value is a string delimited by <>. If it is, then it attempts to
-   * change the value to the mapping from a matching key in the mappings table.
+   * Find the key in the mapping table, if it's present, then generate
+   * a property value for it (of the given type if available),
+   * recursing as necessary, and stopping if any cycles are detected.
+   *
    * @param[in] mappingRoot The JSON node containing the mappings
-   * @param[in,out] keyStack the stack of visited keys
+   * @param[in] theKey The key to search for
+   * @param[in] propertyType The property type if known, or NONE
    * @param[in,out] value The string value to test and write back to.
-   * @return true if the value was converted, false otherwise.
    */
-  bool ConvertChildValue( const TreeNode& mappingRoot, KeyStack& keyStack, Property::Value& value );
+  bool GetPropertyMap( const TreeNode&  mappingRoot,
+                       const char*      theKey,
+                       Property::Type   propertyType,
+                       Property::Value& value );
+
+  void SetCustomProperties( const TreeNode&      node,
+                            Handle&              handle,
+                            const Replacement&   constant,
+                            const std::string&   childName,
+                            Property::AccessMode accessMode );
 
   /**
-   * Find the key in the mapping table, if it's present, then generate a property value for it (of the given type if available), recursing as necessary, and stopping if any cycles
-   * are detected.
+   * Find the key in the mapping table, if it's present, then generate
+   * a property value for it (of the given type if available),
+   * recursing as necessary, and stopping if any cycles are detected.
+   *
    * @param[in] mappingRoot The JSON node containing the mappings
    * @param[in] theKey The key to search for
    * @param[in,out] keyStack the stack of visited keys
    * @param[in] propertyType The property type if known, or NONE
    * @param[in,out] value The string value to test and write back to.
    */
-  bool RecursePropertyMap( const TreeNode& mappingRoot, KeyStack& keyStack, const char* theKey, Property::Type propertyType, Property::Value& value );
+  bool RecursePropertyMap( const TreeNode&  mappingRoot,
+                           KeyStack&        keyStack,
+                           const char*      theKey,
+                           Property::Type   propertyType,
+                           Property::Value& value );
+
 
   /**
-   * Find the key in the mapping table, if it's present, then generate a property value for it (of the given type if available), recursing as necessary, and stopping if any cycles
-   * are detected.
+   * Tests if the value is a string delimited by <>. If it is, then it attempts to
+   * change the value to the mapping from a matching key in the mappings table.
    * @param[in] mappingRoot The JSON node containing the mappings
-   * @param[in] theKey The key to search for
-   * @param[in] propertyType The property type if known, or NONE
+   * @param[in,out] keyStack the stack of visited keys
    * @param[in,out] value The string value to test and write back to.
+   * @return true if the value was converted, false otherwise.
    */
-  bool GetPropertyMap( const TreeNode& mappingRoot, const char* theKey, Property::Type propertyType, Property::Value& value );
-
-  void ApplyProperties( const TreeNode& root, const TreeNode& node,
-                        Dali::Handle& handle, const Replacement& constant );
-
-  void ApplyStylesByActor( const TreeNode& root, const TreeNode& node,
-                           Dali::Handle& handle, const Replacement& constant );
-
-  void ApplyAllStyleProperties( const TreeNode& root, const TreeNode& node,
-                                Dali::Handle& handle, const Replacement& constant );
-
-  void SetProperties( const TreeNode& node, Handle& handle, const Replacement& constant );
+  bool ConvertChildValue( const TreeNode& mappingRoot,
+                          KeyStack& keyStack,
+                          Property::Value& value );
 
+private:
+  Toolkit::JsonParser                 mParser;
+  ImageLut                            mFrameBufferImageLut;
+  PathLut                             mPathLut;
+  PathConstrainerLut                  mPathConstrainerLut;
+  LinearConstrainerLut                mLinearConstrainerLut;
+  SlotDelegate<Builder>               mSlotDelegate;
+  Property::Map                       mReplacementMap;
+  MappingsLut                         mCompleteMappings;
+  Dictionary<StylePtr>                mStyles; // State based styles
   Toolkit::Builder::BuilderSignalType mQuitSignal;
 };
 
diff --git a/dali-toolkit/internal/builder/dictionary.h b/dali-toolkit/internal/builder/dictionary.h
new file mode 100644 (file)
index 0000000..22d2afe
--- /dev/null
@@ -0,0 +1,235 @@
+#ifndef DALI_TOOLKIT_INTERNAL_BUILDER_DICTIONARY_H
+#define DALI_TOOLKIT_INTERNAL_BUILDER_DICTIONARY_H
+
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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/public-api/common/vector-wrapper.h>
+#include <algorithm>
+
+namespace Dali
+{
+extern bool CaseInsensitiveStringCompare( const std::string& a, const std::string& b );
+
+namespace Toolkit
+{
+namespace Internal
+{
+
+/**
+ * The Dictionary template class enables a means of storing key-value
+ * pairs where the keys are strings and the value can be a complex
+ * type.
+ *
+ * It enables lookup of keys via case-insensitive match.
+ */
+template<typename EntryType>
+class Dictionary
+{
+private:
+  /**
+   * Element is a key-value pair
+   */
+  struct Element
+  {
+    std::string key;
+    EntryType entry;
+    Element( const std::string&name, EntryType entry )
+    : key( name ),
+      entry( entry )
+    {
+    }
+  };
+  typedef std::vector<Element> Elements;
+  Elements container;
+
+public:
+  /**
+   * Only allow const iteration over the dictionary
+   */
+  typedef typename Elements::const_iterator iterator;
+
+
+  /**
+   * Constructor
+   */
+  Dictionary<EntryType>()
+  {
+  }
+
+  /**
+   * Add a key value pair to the dictionary.
+   * If the entry does not already exist, add it to the dictionary
+   * using a shallow copy
+   */
+  bool Add( const std::string& name, const EntryType& entry )
+  {
+    for( typename Elements::iterator iter = container.begin(); iter != container.end(); ++iter )
+    {
+      if( iter->key == name )
+      {
+        return false;
+      }
+    }
+    container.push_back( Element(name, entry) );
+    return true;
+  }
+
+  /**
+   * Add a key-value pair to the dictionary
+   * If the entry does not already exist, add it to the dictionary
+   * (shallow copy)
+   */
+  bool Add( const char* name, const EntryType& entry )
+  {
+    bool result=false;
+    if( name != NULL )
+    {
+      std::string theName(name);
+      result=Add(theName, entry);
+    }
+    return result;
+  }
+
+  /**
+   * Find the element in the dictionary pointed at by key, and
+   * return a pointer to it, or NULL.
+   */
+  EntryType* Find( const std::string& key ) const
+  {
+    EntryType* result=NULL;
+
+    if( ! key.empty() )
+    {
+      for( typename Elements::iterator iter = container.begin(); iter != container.end(); ++iter )
+      {
+        if( iter->key == key )
+        {
+          result = &(iter->entry);
+          break;
+        }
+      }
+    }
+    return result;
+  }
+
+  /**
+   * Find the element in the dictionary pointed at by key, and
+   * return a pointer to it, or NULL
+   */
+  EntryType* Find( const char* key ) const
+  {
+    if( key != NULL )
+    {
+      std::string theKey(key);
+      return Find(theKey);
+    }
+    return NULL;
+  }
+
+  /**
+   * Find the element in the dictionary pointed at by key using a case
+   * insensitive search, and return a const pointer to it, or NULL
+   */
+  const EntryType* FindCaseInsensitiveC( const std::string& key ) const
+  {
+    if( ! key.empty() )
+    {
+      for( typename Elements::const_iterator iter = container.begin(); iter != container.end(); ++iter )
+      {
+        if( Dali::CaseInsensitiveStringCompare(iter->key, key ))
+        {
+          const EntryType* result = &(iter->entry);
+          return result;
+        }
+      }
+    }
+    return NULL;
+  }
+
+  /**
+   * Find the element in the dictionary pointed at by key using a case
+   * insensitive search, and return a non-const pointer to it, or NULL
+   */
+  EntryType* FindCaseInsensitive( const std::string& key ) const
+  {
+    EntryType* result = NULL;
+    if( ! key.empty() )
+    {
+      for( typename Elements::const_iterator iter = container.begin(); iter != container.end(); ++iter )
+      {
+        if( Dali::CaseInsensitiveStringCompare(iter->key, key ))
+        {
+          // Const cast because of const_iterator. const_iterator because, STL.
+          result = const_cast<EntryType*>(&(iter->entry));
+        }
+      }
+    }
+    return result;
+  }
+
+  /**
+   * Find the element in the dictionary pointed at by key using a case
+   * insensitive search, and return a const pointer to it, or NULL
+   */
+  const EntryType* FindCaseInsensitiveC( const char* key ) const
+  {
+    if( key != NULL )
+    {
+      std::string theKey(key);
+      return FindCaseInsensitiveC( theKey );
+    }
+    return NULL;
+  }
+
+  /**
+   * Find the element in the dictionary pointed at by key using a case
+   * insensitive search, and return a non-const pointer to it, or NULL
+   */
+  EntryType* FindCaseInsensitive( const char* key ) const
+  {
+    if( key != NULL )
+    {
+      std::string theKey(key);
+      return FindCaseInsensitive( theKey );
+    }
+    return NULL;
+  }
+
+  /**
+   * Return an iterator pointing at the first entry in the dictionary
+   */
+  typename Elements::const_iterator Begin() const
+  {
+    return container.begin();
+  }
+
+  /**
+   * Return an iterator pointing past the last entry in the dictionary
+   */
+  typename Elements::const_iterator End() const
+  {
+    return container.end();
+  }
+};
+
+
+
+}//Internal
+}//Toolkit
+}//Dali
+
+#endif // DALI_TOOLKIT_INTERNAL_BUILDER_DICTIONARY_H
diff --git a/dali-toolkit/internal/builder/style.cpp b/dali-toolkit/internal/builder/style.cpp
new file mode 100644 (file)
index 0000000..eaf59dc
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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/public-api/object/handle.h>
+#include <dali-toolkit/public-api/controls/control.h>
+#include <dali-toolkit/devel-api/controls/control-devel.h>
+#include <dali-toolkit/internal/builder/style.h>
+
+namespace Dali
+{
+namespace Toolkit
+{
+namespace Internal
+{
+
+StylePtr Style::New()
+{
+  StylePtr stylePtr( new Style() );
+  return stylePtr;
+}
+
+void Style::ApplyVisualsAndPropertiesRecursively( Handle handle ) const
+{
+  ApplyVisuals( handle );
+  ApplyProperties( handle );
+
+  Toolkit::Control control = Toolkit::Control::DownCast(handle);
+  if( control )
+  {
+    Property::Value value = control.GetProperty(DevelControl::Property::STATE);
+    std::string stateName;
+    if( value.Get( stateName ) )
+    {
+      // Look up state in states table:
+      const StylePtr* stylePtr = subStates.FindCaseInsensitiveC( stateName );
+      if( stylePtr )
+      {
+        const StylePtr statePtr(*stylePtr);
+
+        // We have a state match.
+        statePtr->ApplyVisuals( handle );
+        statePtr->ApplyProperties( handle );
+
+        // Apply substate visuals
+        Property::Value value = control.GetProperty(DevelControl::Property::SUB_STATE);
+        std::string subStateName;
+        if( value.Get( subStateName ) && ! subStateName.empty() )
+        {
+          const StylePtr* stylePtr = statePtr->subStates.FindCaseInsensitiveC( subStateName );
+          if( stylePtr )
+          {
+            const StylePtr subStatePtr(*stylePtr);
+            // We have a sub-state match.
+            subStatePtr->ApplyVisuals( handle );
+            subStatePtr->ApplyProperties( handle );
+          }
+        }
+      }
+    }
+  }
+}
+
+void Style::ApplyVisuals( Handle handle ) const
+{
+  for( Dictionary<Property::Map>::iterator iter = visuals.Begin(); iter != visuals.End() ; ++iter )
+  {
+    const std::string& visualName = (*iter).key;
+    const Property::Map& map = (*iter).entry;
+    Dali::Property::Index index = handle.GetPropertyIndex( visualName );
+    if( index != Property::INVALID_INDEX )
+    {
+      const Property::Value value(const_cast<Property::Map&>(map));
+      handle.SetProperty( index, value );
+    }
+  }
+}
+
+void Style::ApplyProperties( Handle handle ) const
+{
+  for( Property::Map::SizeType i=0; i<properties.Count(); ++i )
+  {
+    KeyValuePair keyValue = properties.GetKeyValue( i );
+    if( keyValue.first.type == Property::Key::INDEX )
+    {
+      handle.SetProperty( keyValue.first.indexKey, keyValue.second );
+    }
+  }
+}
+
+Style::Style()
+{
+}
+
+Style::~Style()
+{
+}
+
+
+} // Internal
+} // Toolkit
+} // Dali
diff --git a/dali-toolkit/internal/builder/style.h b/dali-toolkit/internal/builder/style.h
new file mode 100644 (file)
index 0000000..2fb4e83
--- /dev/null
@@ -0,0 +1,112 @@
+#ifndef DALI_TOOLKIT_INTERNAL_BUILDER_STYLE_H
+#define DALI_TOOLKIT_INTERNAL_BUILDER_STYLE_H
+
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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/public-api/object/ref-object.h>
+#include <dali-toolkit/devel-api/visual-factory/transition-data.h>
+#include <dali-toolkit/internal/builder/dictionary.h>
+
+namespace Dali
+{
+namespace Toolkit
+{
+namespace Internal
+{
+
+class Style;
+typedef IntrusivePtr<Style> StylePtr;
+
+/**
+ * This class encapsulates the style information for a given styled
+ * control.  It is generated only when a control instance looks up
+ * it's style information for the first time, and then stored by
+ * Builder.
+ *
+ * It contains the visual, property and transition definitions for the
+ * main control and for each state and sub-state within the control.
+ *
+ * It has methods to enable the base control to apply visuals and
+ * properties per state.
+ */
+class Style : public RefObject
+{
+public:
+  static StylePtr New();
+
+public:
+  /**
+   * Apply the visuals and properties for the current state/substate
+   * of the handle to the control pointed at by handle. Recurses
+   * through sub-states.
+   *
+   * @param[in] handle The handle to apply the visuals to
+   */
+  void ApplyVisualsAndPropertiesRecursively( Handle handle ) const;
+
+
+private:
+  /**
+   * Apply the visuals of the style to the control pointed at by
+   * handle.
+   *
+   * @param[in] handle The handle to apply the visuals to
+   */
+  void ApplyVisuals( Handle handle ) const;
+
+  /**
+   * Apply the properties of the style to the control pointed at by
+   * handle.
+   *
+   * @param[in] handle The handle to apply the properties to
+   */
+  void ApplyProperties( Handle handle ) const;
+
+protected:
+  /**
+   * @brief Default constructor.
+   */
+  Style();
+
+  /**
+   * @brief virtual destructor.
+   */
+  virtual ~Style();
+
+private:
+  // Not implemented
+  DALI_INTERNAL Style( const Style& rhs );
+
+  // Not implemented
+  DALI_INTERNAL Style& operator=(const Style& rhs);
+
+public:
+  // Everything must be shallow-copiable.
+  Dictionary<StylePtr> subStates; // Each named style maps to a state.
+  Dictionary<Property::Map> visuals;
+  Property::Map properties;
+  Property::Array transitions;
+  Toolkit::TransitionData entryTransition;
+  Toolkit::TransitionData exitTransition;
+};
+
+} // Internal
+} // Toolkit
+} // Dali
+
+
+#endif //DALI_TOOLKIT_INTERNAL_BUILDER_STYLE_H
index 4357cb8..9567306 100644 (file)
@@ -398,7 +398,7 @@ void TreeNodeManipulator::DoWrite(const TreeNode *value, std::ostream& output, i
     {
       bool groupMyChildren = false;
 
-      if( TreeNode::ARRAY == value->GetType() &&
+      if( TreeNode::ARRAY == value->GetType() && value->mFirstChild &&
           ( TreeNode::INTEGER == value->mFirstChild->GetType() ||
             TreeNode::FLOAT   == value->mFirstChild->GetType() ) )
       {
index 0c7005b..a8ab543 100644 (file)
@@ -39,6 +39,7 @@
 #include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
 #include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
+#include <dali-toolkit/internal/visuals/text/text-visual.h>
 #include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
 #include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 
@@ -348,11 +349,7 @@ bool Button::IsSelected() const
 
 void Button::SetLabelText( const std::string& label )
 {
-  Property::Map labelProperty;
-  labelProperty.Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT)
-               .Add( Toolkit::TextVisual::Property::TEXT, label );
-
-  Self().SetProperty( Toolkit::Button::Property::LABEL, labelProperty );
+  Self().SetProperty( Toolkit::Button::Property::LABEL, label );
 }
 
 std::string Button::GetLabelText() const
@@ -372,7 +369,7 @@ std::string Button::GetLabelText() const
   return textLabel;
 }
 
-void Button::MergeLabelProperties( const Property::Map& inMap, Property::Map& outMap )
+void Button::MergeWithExistingLabelProperties( const Property::Map& inMap, Property::Map& outMap )
 {
   DALI_LOG_INFO( gLogButtonFilter, Debug::Verbose, "MergeLabelProperties with %d properties\n", inMap.Count() );
 
@@ -1224,13 +1221,33 @@ void Button::SetProperty( BaseObject* object, Property::Index index, const Prope
 
       case Toolkit::Button::Property::LABEL:
       {
-        // Get a Property::Map from the property if possible.
-        Property::Map* setPropertyMap = value.GetMap();
-        if( setPropertyMap )
+        Property::Map outTextVisualProperties;
+        std::string textString;
+
+        if ( value.Get( textString ) )
+        {
+          DALI_LOG_INFO( gLogButtonFilter, Debug::Verbose, "Button::SetProperty Setting TextVisual with string[%s]\n", textString.c_str() );
+
+          Property::Map setPropertyMap;
+          setPropertyMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT )
+                        .Add( Toolkit::TextVisual::Property::TEXT, textString );
+
+          GetImplementation( button ).MergeWithExistingLabelProperties( setPropertyMap, outTextVisualProperties );
+        }
+        else
+        {
+          // Get a Property::Map from the property if possible.
+          Property::Map* setPropertyMap = value.GetMap();
+          if( setPropertyMap )
+          {
+            TextVisual::ConvertStringKeysToIndexKeys( *setPropertyMap );
+            GetImplementation( button ).MergeWithExistingLabelProperties( *setPropertyMap, outTextVisualProperties );
+          }
+        }
+
+        if( !outTextVisualProperties.Empty() )
         {
-          Property::Map textVisualProperties;
-          GetImplementation( button ).MergeLabelProperties( *setPropertyMap, textVisualProperties );
-          GetImplementation( button ).CreateVisualsForComponent( index, textVisualProperties, DepthIndex::CONTENT );
+          GetImplementation( button ).CreateVisualsForComponent( index, outTextVisualProperties, DepthIndex::CONTENT );
           GetImplementation( button ).RelayoutRequest();
         }
         break;
index a079cd5..e0b7d50 100644 (file)
@@ -149,13 +149,13 @@ public:
   std::string GetLabelText() const;
 
   /**
-   * @brief Produces a Property::Map of Text properties to create a Text Visual
+   * @brief Produces a Property::Map of Text properties to create a Text Visual, merging existing properties with supplied map
    * If the label does not exist yet, it is created.
    * The derived buttons are notified if any properties are changed.
    * @param[in] properties A Property::Map of key-value pairs of properties to set.
-   * @param[out] properties A Property::Map of text visual  properties to set.
+   * @param[out] properties A Property::Map of text visual properties to set after merging inMap with existing maps
    */
-  void MergeLabelProperties( const Property::Map& inMap, Property::Map& outMap );
+  void MergeWithExistingLabelProperties( const Property::Map& inMap, Property::Map& outMap );
 
   /**
    * Performs actions as requested using the action name.
index 79ff320..e54ad82 100644 (file)
@@ -105,7 +105,7 @@ void RadioButton::OnStateChange( State newState )
         Dali::Toolkit::RadioButton radioButtonChild = Dali::Toolkit::RadioButton::DownCast( parent.GetChildAt( i ) );
         if( radioButtonChild && radioButtonChild != Self() )
         {
-          radioButtonChild.SetSelected( false );
+          radioButtonChild.SetProperty( Toolkit::Button::Property::SELECTED, false );
         }
       }
     }
diff --git a/dali-toolkit/internal/controls/buttons/toggle-button-impl.cpp b/dali-toolkit/internal/controls/buttons/toggle-button-impl.cpp
new file mode 100755 (executable)
index 0000000..555cb7b
--- /dev/null
@@ -0,0 +1,370 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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 "toggle-button-impl.h"
+
+// EXTERNAL INCLUDES
+#include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/object/type-registry-helper.h>
+#include <dali/public-api/images/resource-image.h>
+#include <dali/devel-api/scripting/scripting.h>
+#include <dali/public-api/object/property-array.h>
+#include <dali/integration-api/debug.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/controls/image-view/image-view.h>
+#include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
+#include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
+#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
+#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/devel-api/align-enums.h>
+#include <dali-toolkit/devel-api/controls/tooltip/tooltip-properties.h>
+#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
+#include <dali-toolkit/devel-api/controls/control-devel.h>
+
+#if defined(DEBUG_ENABLED)
+  extern Debug::Filter* gLogButtonFilter;
+#endif
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Internal
+{
+
+namespace
+{
+
+BaseHandle Create()
+{
+  return Toolkit::ToggleButton::New();
+}
+
+// Properties
+DALI_TYPE_REGISTRATION_BEGIN( Toolkit::ToggleButton, Toolkit::Button, Create )
+
+DALI_PROPERTY_REGISTRATION( Toolkit, ToggleButton, "stateVisuals",       ARRAY,     STATE_VISUALS        )
+DALI_PROPERTY_REGISTRATION( Toolkit, ToggleButton, "tooltips",           ARRAY,     TOOLTIPS             )
+DALI_PROPERTY_REGISTRATION( Toolkit, ToggleButton, "currentStateIndex",  INTEGER,   CURRENT_STATE_INDEX  )
+
+DALI_TYPE_REGISTRATION_END()
+
+} // unnamed namespace
+
+Dali::Toolkit::ToggleButton ToggleButton::New()
+{
+  DALI_LOG_INFO( gLogButtonFilter, Debug::General, "ToggleButton::New\n" );
+  // Create the implementation, temporarily owned on stack
+  IntrusivePtr< ToggleButton > internalToggleButton = new ToggleButton();
+
+  // Pass ownership to CustomActor
+  Dali::Toolkit::ToggleButton toggleButton( *internalToggleButton );
+
+  // Second-phase init of the implementation
+  // This can only be done after the CustomActor connection has been made...
+  internalToggleButton->Initialize();
+
+  return toggleButton;
+}
+
+ToggleButton::ToggleButton()
+: Button(),
+  mToggleStates(),
+  mToggleVisuals(),
+  mToggleSelectedVisuals(),
+  mToggleDisabledVisuals(),
+  mToggleDisabledSelectedVisuals(),
+  mToggleTooltips(),
+  mCurrentToggleIndex(0)
+{
+  DALI_LOG_INFO( gLogButtonFilter, Debug::General, "ToggleButton::Constructor\n" );
+  SetTogglableButton( false );
+}
+
+ToggleButton::~ToggleButton()
+{
+}
+
+void ToggleButton::OnInitialize()
+{
+  DALI_LOG_INFO( gLogButtonFilter, Debug::General, "ToggleButton::OnInitialize\n" );
+  Button::OnInitialize();
+
+  // Toggle button requires the Leave event.
+  Actor self = Self();
+  self.SetLeaveRequired( true );
+}
+
+void ToggleButton::SetProperty( BaseObject* object, Property::Index propertyIndex, const Property::Value& value )
+{
+  Toolkit::ToggleButton toggleButton = Toolkit::ToggleButton::DownCast( Dali::BaseHandle( object ) );
+
+  DALI_LOG_INFO( gLogButtonFilter, Debug::Verbose, "ToggleButton::SetProperty index[%d]\n", propertyIndex );
+
+  if ( toggleButton )
+  {
+    ToggleButton& toggleButtonImpl( GetImplementation( toggleButton ) );
+
+    switch ( propertyIndex )
+    {
+      case Toolkit::ToggleButton::Property::STATE_VISUALS:
+      {
+        Property::Array stateArray;
+        if( value.Get( stateArray ) )
+        {
+          toggleButtonImpl.SetToggleStates( stateArray );
+        }
+
+        break;
+      }
+      case Toolkit::ToggleButton::Property::TOOLTIPS:
+      {
+        Property::Array* tipArray = value.GetArray();
+        if( tipArray )
+        {
+          std::vector<std::string> tips;
+          size_t tipsCount = tipArray->Count();
+          tips.resize( tipsCount );
+          for( size_t i = 0; i != tipsCount; ++i )
+          {
+            tipArray->GetElementAt( i ).Get( tips[i] );
+          }
+          toggleButtonImpl.SetToggleTooltips(tips);
+        }
+        break;
+      }
+      default :
+      {
+        break;
+      }
+    } // end of switch
+  }
+}
+
+Property::Value ToggleButton::GetProperty( BaseObject* object, Property::Index propertyIndex )
+{
+  Property::Value value;
+
+  Toolkit::ToggleButton toggleButton = Toolkit::ToggleButton::DownCast( Dali::BaseHandle( object ) );
+
+  DALI_LOG_INFO( gLogButtonFilter, Debug::Verbose, "ToggleButton::GetProperty index[%d]\n", propertyIndex );
+
+  if ( toggleButton )
+  {
+    ToggleButton& toggleButtonImpl( GetImplementation( toggleButton ) );
+
+    switch ( propertyIndex )
+    {
+      case Toolkit::ToggleButton::Property::STATE_VISUALS:
+      {
+        Property::Array array = toggleButtonImpl.GetToggleStates();
+        value = Property::Value( array );
+        break;
+      }
+      case Toolkit::ToggleButton::Property::TOOLTIPS:
+      {
+        Property::Value value1( Property::ARRAY );
+        Property::Array* tipArray = value1.GetArray();
+
+        if( tipArray )
+        {
+          std::vector<std::string> tips = toggleButtonImpl.GetToggleTooltips();
+          size_t tipsCount( tips.size() );
+          for( size_t i( 0 ); i != tipsCount; ++i )
+          {
+            tipArray->PushBack( tips[i] );
+          }
+        }
+        value = value1;
+        break;
+      }
+      case Toolkit::ToggleButton::Property::CURRENT_STATE_INDEX:
+      {
+        value = static_cast<int>(toggleButtonImpl.mCurrentToggleIndex);
+        break;
+      }
+    } // end of switch
+  }
+
+  return value;
+}
+
+void ToggleButton::CreateVisualsForAllStates( const Property::Array& states, std::vector<Toolkit::Visual::Base>& visuals )
+{
+  DALI_LOG_INFO( gLogButtonFilter, Debug::General, "ToggleButton::CreateVisualsForAllStates\n" );
+
+  visuals.clear();
+
+  for ( unsigned int i = 0; i < states.Count(); i++ )
+  {
+    Property::Value value(  states[i] );
+
+    Toolkit::VisualFactory visualFactory = Toolkit::VisualFactory::Get();
+    Toolkit::Visual::Base stateVisual;
+
+    if ( value.GetType() == Property::MAP )
+    {
+      Property::Map *map = value.GetMap();
+      if( map && !map->Empty() ) // Empty map results in current visual removal.
+      {
+        DALI_LOG_INFO( gLogButtonFilter, Debug::Verbose, "ToggleButton::CreateVisuals Using Map\n" );
+        stateVisual = visualFactory.CreateVisual( *map );
+      }
+    }
+    else if ( value.GetType() ==  Property::STRING )
+    {
+      std::string imageUrl = value.Get<std::string>();
+      DALI_LOG_INFO( gLogButtonFilter, Debug::Verbose, "ToggleButton::CreateVisuals Using image URL\n" );
+      if ( !imageUrl.empty() )
+      {
+        stateVisual = visualFactory.CreateVisual( imageUrl, ImageDimensions() );
+      }
+    }
+
+    if ( stateVisual )
+    {
+      stateVisual.SetDepthIndex( DepthIndex::CONTENT );
+      visuals.push_back( stateVisual );
+    }
+  } // end of for
+  DALI_LOG_INFO( gLogButtonFilter, Debug::Verbose, "ToggleButton::CreateVisuals mToggleVisuals:%d\n", mToggleVisuals.size() );
+}
+
+void ToggleButton::SetToggleStates( const Property::Array& states )
+{ //this should really be generalized to be either string or maps so that any visual can be created.
+  DALI_LOG_INFO( gLogButtonFilter, Debug::General, "ToggleButton::SetToggleStates\n" );
+  if ( !states.Empty() )
+  {
+    mToggleStates.Clear();
+    mToggleStates = states;
+    /* New toggle button index from 0. */
+    mCurrentToggleIndex = 0;
+
+    // Create all visuals, save to mToggleVisuals.
+    CreateVisualsForAllStates( states, mToggleVisuals );
+    CreateVisualsForAllStates( states, mToggleSelectedVisuals );
+    CreateVisualsForAllStates( states, mToggleDisabledVisuals );
+    CreateVisualsForAllStates( states, mToggleDisabledSelectedVisuals );
+
+    DALI_LOG_INFO( gLogButtonFilter, Debug::General, "ToggleButton::Began to register visual.\n" );
+
+    PrepareVisual( Toolkit::DevelButton::Property::UNSELECTED_VISUAL, mToggleVisuals[mCurrentToggleIndex] );
+    PrepareVisual( Toolkit::DevelButton::Property::SELECTED_VISUAL, mToggleSelectedVisuals[mCurrentToggleIndex] );
+    PrepareVisual( Toolkit::DevelButton::Property::DISABLED_UNSELECTED_VISUAL, mToggleDisabledVisuals[mCurrentToggleIndex] );
+    PrepareVisual( Toolkit::DevelButton::Property::DISABLED_SELECTED_VISUAL, mToggleDisabledSelectedVisuals[mCurrentToggleIndex] );
+
+    RelayoutRequest();
+  }
+}
+
+Property::Array ToggleButton::GetToggleStates() const
+{
+  return mToggleStates;
+}
+
+void ToggleButton::SetToggleTooltips( std::vector<std::string>& tips )
+{
+  DALI_LOG_INFO( gLogButtonFilter, Debug::General, "ToggleButton::SetToggleTooltips\n" );
+  if ( !tips.empty() )
+  {
+    mToggleTooltips.clear();
+    mToggleTooltips.swap( tips );
+  }
+
+  if ( !mToggleTooltips.empty() && ( mCurrentToggleIndex < mToggleTooltips.size() ) )
+  {
+    Self().SetProperty( Toolkit::DevelControl::Property::TOOLTIP, mToggleTooltips[mCurrentToggleIndex] );
+  }
+
+  RelayoutRequest();
+}
+
+const std::vector<std::string>& ToggleButton::GetToggleTooltips() const
+{
+  return mToggleTooltips;
+}
+
+void ToggleButton::PrepareVisual(Property::Index index, Toolkit::Visual::Base& visual)
+{
+  RegisterVisual( index, visual, true );
+  EnableVisual( index, false );
+}
+
+void ToggleButton::RelayoutVisual( Property::Index index, const Vector2& size )
+{
+  Toolkit::Visual::Base visual = GetVisual( index );
+  if ( visual )
+  {
+    Size visualSize = Size::ZERO;
+    Vector2 visualPosition = Vector2::ZERO;
+
+    visual.GetNaturalSize( visualSize );
+
+    DALI_LOG_INFO( gLogButtonFilter, Debug::General, "ToggleButton::OnRelayout Setting visual size to(%f,%f)\n", visualSize.width, visualSize.height );
+    DALI_LOG_INFO( gLogButtonFilter, Debug::General, "ToggleButton::OnRelayout Setting visual position to(%f,%f)\n", visualPosition.x, visualPosition.y );
+
+    Property::Map visualTransform;
+    visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, visualSize )
+                   .Add( Toolkit::DevelVisual::Transform::Property::OFFSET, visualPosition )
+                   .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_SIZE_MODE, Vector4( 1.0f, 1.0f, 1.0f, 1.0f ) )  // Use absolute size
+                   .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::CENTER )
+                   .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::CENTER );
+
+    visual.SetTransformAndSize( visualTransform, size );
+  }
+}
+
+void ToggleButton::OnRelayout( const Vector2& size, RelayoutContainer& container )
+{
+  DALI_LOG_INFO( gLogButtonFilter, Debug::General, "ToggleButton::OnRelayout targetSize(%f,%f) ptr(%p)\n", size.width, size.height, this );
+
+  RelayoutVisual( Toolkit::DevelButton::Property::UNSELECTED_VISUAL, size );
+  RelayoutVisual( Toolkit::DevelButton::Property::SELECTED_VISUAL, size );
+  RelayoutVisual( Toolkit::DevelButton::Property::DISABLED_UNSELECTED_VISUAL, size );
+  RelayoutVisual( Toolkit::DevelButton::Property::DISABLED_SELECTED_VISUAL, size );
+}
+
+void ToggleButton::OnPressed()
+{
+  DALI_LOG_INFO( gLogButtonFilter, Debug::General, "ToggleButton::OnPressed\n" );
+  // State index will add 1 only when button is pressed.
+  mCurrentToggleIndex = ( mCurrentToggleIndex + 1 ) % mToggleVisuals.size();
+
+  // Both create SelectedVisual and UnselectedVisual
+  PrepareVisual( Toolkit::DevelButton::Property::UNSELECTED_VISUAL, mToggleVisuals[mCurrentToggleIndex] );
+  PrepareVisual( Toolkit::DevelButton::Property::SELECTED_VISUAL, mToggleSelectedVisuals[mCurrentToggleIndex] );
+  PrepareVisual( Toolkit::DevelButton::Property::DISABLED_UNSELECTED_VISUAL, mToggleDisabledVisuals[mCurrentToggleIndex] );
+  PrepareVisual( Toolkit::DevelButton::Property::DISABLED_SELECTED_VISUAL, mToggleDisabledSelectedVisuals[mCurrentToggleIndex] );
+
+  //Need to check mCurrentToggleIndex, it must less than the size of mToggleTooltips.
+  if ( !mToggleTooltips.empty() && ( mCurrentToggleIndex < mToggleTooltips.size() ) )
+  {
+    Self().SetProperty( Toolkit::DevelControl::Property::TOOLTIP, mToggleTooltips[mCurrentToggleIndex] );
+  }
+
+  RelayoutRequest();
+}
+
+} // namespace Internal
+
+} // namespace Toolkit
+
+} // namespace Dali
diff --git a/dali-toolkit/internal/controls/buttons/toggle-button-impl.h b/dali-toolkit/internal/controls/buttons/toggle-button-impl.h
new file mode 100644 (file)
index 0000000..8c76eb4
--- /dev/null
@@ -0,0 +1,194 @@
+#ifndef __DALI_TOOLKIT_INTERNAL_TOGGLE_BUTTON_H__
+#define __DALI_TOOLKIT_INTERNAL_TOGGLE_BUTTON_H__
+
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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/common/vector-wrapper.h>
+#include <dali/public-api/object/property-value.h>
+#include <dali/public-api/object/property-array.h>
+
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/devel-api/controls/buttons/toggle-button.h>
+#include "button-impl.h"
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Internal
+{
+
+/**
+ * ToggleButton implementation class.
+ *
+ * \sa Dali::Toolkit::ToggleButton
+ */
+class ToggleButton : public Button
+{
+public:
+
+  /**
+   * Create a new ToggleButton.
+   * @return A smart-pointer to the newly allocated ToggleButton.
+   */
+  static Dali::Toolkit::ToggleButton New();
+
+protected:
+
+  /**
+   * Construct a new ToggleButton.
+   */
+  ToggleButton();
+
+  /**
+   * A reference counted object may only be deleted by calling Unreference()
+   */
+  virtual ~ToggleButton();
+
+public:
+
+  /**
+   * Called when a property of an object of this type is set.
+   * @param[in] object The object whose property is set.
+   * @param[in] index The property index.
+   * @param[in] value The new property value.
+   */
+  static void SetProperty( BaseObject* object, Property::Index index, const Property::Value& value );
+
+  /**
+   * Called to retrieve a property of an object of this type.
+   * @param[in] object The object whose property is to be retrieved.
+   * @param[in] index The property index.
+   * @return The current value of the property.
+   */
+  static Property::Value GetProperty( BaseObject* object, Property::Index propertyIndex );
+
+private:
+
+  /**
+   * Called to create all toggle visuals and save them to mToggleVisuals.
+   * @param[in] states The array store toggle states.
+   * @param[out] visuals The created state visual vector.
+   */
+  void CreateVisualsForAllStates( const Property::Array& states, std::vector<Toolkit::Visual::Base>& visuals );
+
+  /**
+   * Called to set toggle states when TOGGLE_STATES is set in SetProperty function.
+   * @param[in] states The array store toggle states.
+   */
+  void SetToggleStates( const Property::Array& states );
+
+  /**
+   * Called to retrieve toggle states.
+   * @return The toggle states array.
+   */
+  Property::Array GetToggleStates() const;
+
+  /**
+   * Called to set toggle tooltips when TOGGLE_TIPS is set in SetProperty function.
+   * @param[in] tips The array store toggle tips.
+   */
+  void SetToggleTooltips( std::vector<std::string>& tips );
+
+  /**
+   * Called to retrieve toggle tips.
+   * @return The toggle tips array.
+   */
+  const std::vector<std::string>& GetToggleTooltips() const;
+
+  /**
+   * Called to prepare visual for next state.
+   * @param[in] index The property index to set.
+   * @param[in] visual The visual to set.
+   */
+  void PrepareVisual(Property::Index index, Toolkit::Visual::Base& visual);
+
+  /**
+   * Called to relayout visual.
+   * @param[in] index The index of visual to relayout.
+   * @param[in] size The size of control.
+   */
+  void RelayoutVisual( Property::Index index, const Vector2& size );
+
+private: // From Button
+
+  /**
+   * @copydoc Toolkit::Internal::Button::OnInitialize
+   */
+  virtual void OnInitialize();
+
+  /**
+   * @copydoc Toolkit::Internal::Button::OnRelayout
+   */
+  virtual void OnRelayout( const Vector2& size, RelayoutContainer& container );
+
+  /**
+   * This method is called when the button is pressed.
+   */
+  virtual void OnPressed();
+
+private:
+
+  // Undefined
+  ToggleButton( const ToggleButton& );
+
+  // Undefined
+  ToggleButton& operator=( const ToggleButton& );
+
+private:
+
+  Property::Array mToggleStates;                              ///< Toggle states, string or map.
+  std::vector<Toolkit::Visual::Base> mToggleVisuals;          ///< Save all unselected visuals.
+  std::vector<Toolkit::Visual::Base> mToggleSelectedVisuals;  ///< Save all selected visuals.
+  std::vector<Toolkit::Visual::Base> mToggleDisabledVisuals;  ///< Save all disabled unselected visuals.
+  std::vector<Toolkit::Visual::Base> mToggleDisabledSelectedVisuals;  ///< Save all disabled selected visuals.
+  std::vector<std::string> mToggleTooltips;               ///< Toggle tooltips.
+  unsigned int             mCurrentToggleIndex;       ///< The index of state.
+};
+
+} // namespace Internal
+
+// Helpers for public-api forwarding methods
+
+inline Toolkit::Internal::ToggleButton& GetImplementation( Toolkit::ToggleButton& button )
+{
+  DALI_ASSERT_ALWAYS( button );
+
+  Dali::RefObject& handle = button.GetImplementation();
+
+  return static_cast<Toolkit::Internal::ToggleButton&>( handle );
+}
+
+inline const Toolkit::Internal::ToggleButton& GetImplementation( const Toolkit::ToggleButton& button )
+{
+  DALI_ASSERT_ALWAYS( button );
+
+  const Dali::RefObject& handle = button.GetImplementation();
+
+  return static_cast<const Toolkit::Internal::ToggleButton&>( handle );
+}
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // __DALI_TOOLKIT_INTERNAL_TOGGLE_BUTTON_H__
index ff3ed25..05005f5 100755 (executable)
 #include <dali/public-api/object/type-registry-helper.h>
 #include <dali/public-api/size-negotiation/relayout-container.h>
 #include <dali/public-api/math/math-utils.h>
+#include <dali-toolkit/devel-api/align-enums.h>
+#include <dali-toolkit/devel-api/visual-factory/visual-base.h>
+#include <dali-toolkit/public-api/visuals/color-visual-properties.h>
+#include <dali-toolkit/public-api/visuals/image-visual-properties.h>
+#include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
+#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
+
+#include <dali/integration-api/debug.h>
 
 namespace Dali
 {
@@ -46,19 +55,36 @@ BaseHandle Create()
 // Setup properties, signals and actions using the type-registry.
 DALI_TYPE_REGISTRATION_BEGIN( Toolkit::ProgressBar, Toolkit::Control, Create )
 
-DALI_PROPERTY_REGISTRATION( Toolkit, ProgressBar, "progressValue",          FLOAT,    PROGRESS_VALUE         )
-DALI_PROPERTY_REGISTRATION( Toolkit, ProgressBar, "trackVisual",            MAP,      TRACK_VISUAL           )
-DALI_PROPERTY_REGISTRATION( Toolkit, ProgressBar, "progressVisual",         MAP,      PROGRESS_VISUAL        )
-DALI_SIGNAL_REGISTRATION(   Toolkit, ProgressBar, "valueChanged",                     SIGNAL_VALUE_CHANGED   )
+DALI_PROPERTY_REGISTRATION( Toolkit, ProgressBar, "progressValue",                     FLOAT,    PROGRESS_VALUE                   )
+DALI_PROPERTY_REGISTRATION( Toolkit, ProgressBar, "secondaryProgressValue",            FLOAT,    SECONDARY_PROGRESS_VALUE         )
+DALI_PROPERTY_REGISTRATION( Toolkit, ProgressBar, "indeterminate",                     BOOLEAN,  INDETERMINATE                    )
+DALI_PROPERTY_REGISTRATION( Toolkit, ProgressBar, "trackVisual",                       MAP,      TRACK_VISUAL                     )
+DALI_PROPERTY_REGISTRATION( Toolkit, ProgressBar, "progressVisual",                    MAP,      PROGRESS_VISUAL                  )
+DALI_PROPERTY_REGISTRATION( Toolkit, ProgressBar, "secondaryProgressVisual",           MAP,      SECONDARY_PROGRESS_VISUAL        )
+DALI_PROPERTY_REGISTRATION( Toolkit, ProgressBar, "indeterminateVisual",               MAP,      INDETERMINATE_VISUAL             )
+DALI_PROPERTY_REGISTRATION( Toolkit, ProgressBar, "indeterminateVisualAnimation",      ARRAY,    INDETERMINATE_VISUAL_ANIMATION   )
+DALI_PROPERTY_REGISTRATION( Toolkit, ProgressBar, "labelVisual",                       MAP,      LABEL_VISUAL                     )
+DALI_SIGNAL_REGISTRATION(   Toolkit, ProgressBar, "valueChanged",                      SIGNAL_VALUE_CHANGED                       )
 
 DALI_TYPE_REGISTRATION_END()
 
-const char* SKINNED_TRACK_VISUAL = DALI_IMAGE_DIR "slider-skin.9.png";
-const char* SKINNED_PROGRESS_VISUAL = DALI_IMAGE_DIR "slider-skin-progress.9.png";
+struct ProgressDepthIndex
+{
+  // Enum to make sure the visual order
+  enum
+  {
+    TRACK_VISUAL,
+    SECONDARY_PROGRESS_VISUAL,
+    PROGRESS_VISUAL,
+    LABEL_VISUAL,
+    INDETERMINATE_VISUAL
+  };
+};
 
 float DEFAULT_VALUE = 0.0f;
 float DEFAULT_LOWER_BOUND = 0.0f;
 float DEFAULT_UPPER_BOUND = 1.0f;
+float DEFAULT_FONT_SIZE = 12.0f;
 
 } // Unnamed namespace
 
@@ -83,12 +109,9 @@ Dali::Toolkit::ProgressBar ProgressBar::New()
 
 ProgressBar::ProgressBar()
 : Control( ControlBehaviour( CONTROL_BEHAVIOUR_DEFAULT ) ),
-  mTrackVisual(""),
-  mProgressVisual(""),
-  mTrackMap(),
-  mTrackVisualSize(),
-  mProgressVisualSize(),
-  mValue( DEFAULT_VALUE )
+  mProgressValue( DEFAULT_VALUE ),
+  mSecondaryProgressValue( DEFAULT_VALUE ),
+  mIndeterminate( false )
 {
 }
 
@@ -98,49 +121,96 @@ ProgressBar::~ProgressBar()
 
 void ProgressBar::OnInitialize()
 {
-  // Setup
-  CreateChildren();
-
-  // Properties
-  SetTrackVisual( SKINNED_TRACK_VISUAL );
-  SetProgressVisual( SKINNED_PROGRESS_VISUAL );
-
-  DisplayValue( mValue, false );       // Run this last to display the correct value
 }
 
 void ProgressBar::OnRelayout( const Vector2& size, RelayoutContainer& container )
 {
-  // Track
-  if( mTrack )
+
+  Vector2 trackSize( size );
+  mDomain = CalcDomain( size );
+
+  trackSize.width = std::max( 0.0f, size.width ); // Ensure we don't go negative
+
+  Toolkit::Visual::Base trackVisual = GetVisual( Toolkit::ProgressBar::Property::TRACK_VISUAL );
+  Toolkit::Visual::Base secondProgressVisual = GetVisual( Toolkit::ProgressBar::Property::SECONDARY_PROGRESS_VISUAL );
+  Toolkit::Visual::Base progressVisual = GetVisual( Toolkit::ProgressBar::Property::PROGRESS_VISUAL );
+  Toolkit::Visual::Base labelVisual = GetVisual( Toolkit::ProgressBar::Property::LABEL_VISUAL );
+  Toolkit::Visual::Base indeterminateVisual = GetVisual( Toolkit::ProgressBar::Property::INDETERMINATE_VISUAL );
+
+  if( trackVisual )
+  {
+    Property::Map visualTransform;
+
+    visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, trackSize )
+                   .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_SIZE_MODE, Vector4( 1.0f, 1.0f, 1.0f, 1.0f ) );  // Use Absolute size
+    trackVisual.SetTransformAndSize( visualTransform, trackSize );
+  }
+
+  if( secondProgressVisual )
   {
-    container.Add( mTrack, size );
+    Property::Map visualTransform;
 
-    // mValueTextLabel will have its relayout method called automatically as it's a child of mTrack,
-    // which is added to the container
+    visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, Vector2( mDomain.from.x + mSecondaryProgressValue * ( mDomain.to.x - mDomain.from.x ), trackSize.height  ) )
+                   .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_SIZE_MODE, Vector4( 1.0f, 1.0f, 1.0f, 1.0f ) )  // Use Absolute size
+                   .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN )
+                   .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::TOP_BEGIN );
+    secondProgressVisual.SetTransformAndSize( visualTransform, trackSize );
   }
 
-  // Progress bar
-  if( mProgress )
+  if( progressVisual )
   {
-    mDomain = CalcDomain( size );
+    Property::Map visualTransform;
+
+    visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, Vector2( mDomain.from.x + mProgressValue * ( mDomain.to.x - mDomain.from.x ), trackSize.height ) )
+                   .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_SIZE_MODE, Vector4( 1.0f, 1.0f, 1.0f, 1.0f ) )  // Use Absolute size
+                   .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN )
+                   .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::TOP_BEGIN );
+    progressVisual.SetTransformAndSize( visualTransform, trackSize );
+  }
 
-    Vector2 progressSize( size );
+  if( labelVisual )
+  {
+    Property::Map visualTransform;
 
-    // If no progress, then we do not want a n-patch image shown incorrectly
-    progressSize.width = std::max( mProgressVisualSize.width, mDomain.from.x + mValue * ( mDomain.to.x - mDomain.from.x ) );
-    progressSize.width = std::min( progressSize.width, size.width ); // We should not exceed given size
+    visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, trackSize )
+                   .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_SIZE_MODE, Vector4( 1.0f, 1.0f, 1.0f, 1.0f ) );  // Use Absolute size
 
-    container.Add( mProgress, progressSize );
+    labelVisual.SetTransformAndSize( visualTransform, trackSize );
   }
+
+  if( indeterminateVisual )
+  {
+    Property::Map visualTransform;
+
+    visualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, trackSize )
+                   .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_SIZE_MODE, Vector4( 1.0f, 1.0f, 1.0f, 1.0f ) );  // Use Absolute size
+    indeterminateVisual.SetTransformAndSize( visualTransform, trackSize );
+  }
+
 }
 
 Vector3 ProgressBar::GetNaturalSize()
 {
-  // Return the maximum width/height combinations of our visuals
+  // Return the bigger size after comparing trackVisual naturalSize and labelVisual naturalSize
+  Toolkit::Visual::Base trackVisual =  GetVisual( Toolkit::ProgressBar::Property::TRACK_VISUAL );
+  Toolkit::Visual::Base labelVisual =  GetVisual( Toolkit::ProgressBar::Property::LABEL_VISUAL );
+
+  Size trackSize;
+  Size labelSize;
+
+  if ( trackVisual )
+  {
+    trackVisual.GetNaturalSize( trackSize );
+  }
+  if ( labelVisual )
+  {
+    labelVisual.GetNaturalSize( labelSize );
+  }
 
   Vector3 naturalSize;
-  naturalSize.width = std::max( mTrackVisualSize.width, mProgressVisualSize.width );
-  naturalSize.height = std::max( mTrackVisualSize.height, mProgressVisualSize.height );
+  naturalSize.width = ( trackSize.width > labelSize.width ) ? trackSize.width: labelSize.width;
+  naturalSize.height = ( trackSize.height > labelSize.height ) ? trackSize.height: labelSize.height;
+
   return naturalSize;
 }
 
@@ -149,202 +219,184 @@ ProgressBar::Domain ProgressBar::CalcDomain( const Vector2& currentSize )
    return Domain( Vector2( 0.0f, 0.0f ), currentSize );
 }
 
-void ProgressBar::DisplayValue( float value, bool raiseSignals )
+Toolkit::ProgressBar::ValueChangedSignalType& ProgressBar::ValueChangedSignal()
 {
-  // Signals
-  if( raiseSignals )
-  {
-    Toolkit::ProgressBar self = Toolkit::ProgressBar::DownCast( Self() );
-    mValueChangedSignal.Emit( self, value );
-  }
+  return mValueChangedSignal;
+}
 
-  // Change the value of the text label
-  if( mValueTextLabel )
+void ProgressBar::SetProgressValue( float value )
+{
+  // update the progress bar value (taking float precision errors into account)
+  // TODO : it seems 0.0f cannot into this statement.
+  if( ( mProgressValue != value ) &&
+      ( ( value >= DEFAULT_LOWER_BOUND ) || ( Equals( value, DEFAULT_LOWER_BOUND ) ) ) &&
+      ( ( value <= DEFAULT_UPPER_BOUND ) || ( Equals( value, DEFAULT_UPPER_BOUND ) ) ) )
   {
-    std::stringstream ss;
-    ss.precision( 0 );
-    ss << std::fixed << ( value * 100 ) << "%";
+    mProgressValue = Clamp( value, DEFAULT_LOWER_BOUND, DEFAULT_UPPER_BOUND );
 
-    std::string label = mValueTextLabel.GetProperty<std::string>( Toolkit::TextLabel::Property::TEXT );
-    if( label.compare(ss.str()) )
-    {
-      mValueTextLabel.SetProperty( Toolkit::TextLabel::Property::TEXT, ss.str() );
-    }
+    Toolkit::ProgressBar self = Toolkit::ProgressBar::DownCast( Self() );
+    mValueChangedSignal.Emit( self, mProgressValue, mSecondaryProgressValue );
+    RelayoutRequest();
   }
 }
 
-Toolkit::ImageView ProgressBar::CreateTrack()
+float ProgressBar::GetProgressValue() const
 {
-  Toolkit::ImageView track = Toolkit::ImageView::New();
-  track.SetParentOrigin( ParentOrigin::CENTER );
-  track.SetAnchorPoint( AnchorPoint::CENTER );
-  track.SetResizePolicy(ResizePolicy::USE_ASSIGNED_SIZE, Dimension::ALL_DIMENSIONS );
-
-  return track;
+  return mProgressValue;
 }
 
-void ProgressBar::SetTrackVisual( const std::string& filename )
+void ProgressBar::SetSecondaryProgressValue( float value )
 {
-  if( mTrack && filename.size() > 0 )
+  // update the progress bar value (taking float precision errors into account)
+  // TODO : it seems 0.0f cannot into this statement.
+  if( ( mSecondaryProgressValue != value ) &&
+      ( ( value >= DEFAULT_LOWER_BOUND ) || ( Equals( value, DEFAULT_LOWER_BOUND ) ) ) &&
+      ( ( value <= DEFAULT_UPPER_BOUND ) || ( Equals( value, DEFAULT_UPPER_BOUND ) ) ) )
   {
-    mTrack.SetImage( filename );
-    mTrackVisual = filename;
-    mTrackVisualSize = Vector2::ZERO;
+    mSecondaryProgressValue = Clamp( value, DEFAULT_LOWER_BOUND, DEFAULT_UPPER_BOUND );
+
+    Toolkit::ProgressBar self = Toolkit::ProgressBar::DownCast( Self() );
+    mValueChangedSignal.Emit( self, mProgressValue, mSecondaryProgressValue );
+
     RelayoutRequest();
   }
 }
 
-void ProgressBar::SetTrackVisual( Property::Map map )
+float ProgressBar::GetSecondaryProgressValue() const
 {
-  bool relayoutRequired = false;
+  return mSecondaryProgressValue;
+}
 
-  Property::Value* imageValue = map.Find( "url" );
-  if( imageValue )
+void ProgressBar::SetIndeterminate( bool value )
+{
+  mIndeterminate = value;
+  EnableVisual( Toolkit::ProgressBar::Property::INDETERMINATE_VISUAL, mIndeterminate );
+
+  if( mIndeterminate )
   {
-    mTrackVisual.clear();
-    std::string filename;
-    if( imageValue->Get( filename ) )
+    RelayoutRequest();
+    if( mIndeterminateVisualTransition )
     {
-      if( mTrack && ( filename.size() > 0 ) )
-      {
-        mTrack.SetImage( filename );
-        mTrackMap = map;
-        relayoutRequired = true;
-      }
+      PlayIndeterminateVisualTransition();
     }
   }
-
-  Property::Value* sizeValue = map.Find( "size" );
-  if( sizeValue )
+  else
   {
-    Vector2 size;
-    if( sizeValue->Get( size ) )
+    if( mIndeterminateVisualAni )
     {
-      mTrackVisualSize = size;
-      relayoutRequired = true;
+      mIndeterminateVisualAni.Stop();
     }
   }
+}
 
-  // Visual and/or visual size changed so we need to relayout
-  if( relayoutRequired )
-  {
-    RelayoutRequest();
-  }
+bool ProgressBar::GetIndeterminate() const
+{
+  return mIndeterminate;
 }
 
-std::string ProgressBar::GetTrackVisual()
+void ProgressBar::SetIndeterminateVisualTransition( Toolkit::TransitionData transition )
 {
-  return mTrackVisual;
+  mIndeterminateVisualTransition = transition;
+  if( mIndeterminate )
+  {
+    PlayIndeterminateVisualTransition();
+  }
 }
 
-Toolkit::ImageView ProgressBar::CreateProgress()
+void ProgressBar::PlayIndeterminateVisualTransition()
 {
-  Toolkit::ImageView progress = Toolkit::ImageView::New();
-  progress.SetParentOrigin( ParentOrigin::CENTER_LEFT );
-  progress.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
-  progress.SetResizePolicy(ResizePolicy::USE_ASSIGNED_SIZE, Dimension::ALL_DIMENSIONS );
+  if( mIndeterminateVisualAni )
+  {
+    mIndeterminateVisualAni.Stop();
+    mIndeterminateVisualAni.Clear();
+  }
+
+  mIndeterminateVisualAni = CreateTransition( mIndeterminateVisualTransition );
 
-  return progress;
+  if( mIndeterminate && mIndeterminateVisualAni )
+  {
+    mIndeterminateVisualAni.SetLooping(true);
+    mIndeterminateVisualAni.Play();
+  }
 }
 
-void ProgressBar::SetProgressVisual( const std::string& filename )
+Toolkit::TransitionData ProgressBar::ConvertPropertyToTransition( const Property::Value& value )
 {
-  if( mProgress && ( filename.size() > 0 ) )
+  Toolkit::TransitionData transitionData;
+
+  if( value.GetType() == Property::ARRAY )
   {
-    mProgress.SetImage( filename );
-    mProgressVisual = filename;
-    mProgressVisualSize = Vector2::ZERO;
-    RelayoutRequest();
+    transitionData = Toolkit::TransitionData::New( *value.GetArray() );
+  }
+  else if( value.GetType() == Property::MAP )
+  {
+    transitionData = Toolkit::TransitionData::New( *value.GetMap() );
   }
+
+  return transitionData;
 }
 
-void ProgressBar::SetProgressVisual( Property::Map map )
+/**
+ * Create Visual for given index from a property map or url.
+ * 1) Check if value passed in is a url and create visual
+ * 2) Create visual from map if step (1) is false
+ * 3) Register visual with control with false for enable flag.
+ * 4) Unregister visual if empty map was provided. This is the method to remove a visual
+ */
+
+void ProgressBar::CreateVisualsForComponent( Property::Index index, const Property::Value& value, const float visualDepth )
 {
-  bool relayoutRequired = false;
+  Toolkit::VisualFactory visualFactory = Toolkit::VisualFactory::Get();
+  Toolkit::Visual::Base progressVisual;
 
-  Property::Value* imageValue = map.Find( "url" );
-  if( imageValue )
+  std::string imageUrl;
+  if( value.Get( imageUrl ) )
   {
-    mProgressVisual.clear();
-    std::string filename;
-    if( imageValue->Get( filename ) )
+    if ( !imageUrl.empty() )
     {
-      if( mProgress && ( filename.size() > 0 ) )
-      {
-        mProgress.SetImage( filename );
-        mProgressMap = map;
-        relayoutRequired = true;
-      }
+      progressVisual = visualFactory.CreateVisual(  imageUrl, ImageDimensions()  );
     }
   }
-
-  Property::Value* sizeValue = map.Find( "size" );
-  if( sizeValue )
+  else // Does this code make text-visual can be accepted as visual?
   {
-    Vector2 size;
-    if( sizeValue->Get( size ) )
+    // if its not a string then get a Property::Map from the property if possible.
+    Property::Map *map = value.GetMap();
+    if( map && !map->Empty()  ) // Empty map results in current visual removal.
     {
-      mProgressVisualSize = size;
-      relayoutRequired = true;
+      progressVisual = visualFactory.CreateVisual( *map );
     }
   }
 
-  // Visual and/or visual size changed so we need to relayout
-  if( relayoutRequired )
+  if ( progressVisual )
   {
-    RelayoutRequest();
+    progressVisual.SetDepthIndex( visualDepth );
+    if( index == Toolkit::ProgressBar::Property::INDETERMINATE_VISUAL )
+    {
+      RegisterVisual( index, progressVisual, mIndeterminate );
+    }
+    else
+    {
+      RegisterVisual( index, progressVisual, true );
+    }
+  }
+  else
+  {
+    UnregisterVisual( index );
   }
 }
 
-std::string ProgressBar::GetProgressVisual()
-{
-  return mProgressVisual;
-}
-
-Toolkit::ProgressBar::ValueChangedSignalType& ProgressBar::ValueChangedSignal()
-{
-  return mValueChangedSignal;
-}
-
-void ProgressBar::CreateChildren()
+bool ProgressBar::GetPropertyMapForVisual( Property::Index visualIndex, Property::Map& retreivedMap ) const
 {
-  Actor self = Self();
-
-  // Track
-  mTrack = CreateTrack();
-  self.Add( mTrack ); // Needs to be a direct child as we want to manipulate its size
-
-  // Progress bar
-  mProgress = CreateProgress();
-  self.Add( mProgress ); // Needs to be a direct child as we want to manipulate its size
-
-  // Value Text
-  mValueTextLabel = Toolkit::TextLabel::New();
-  mValueTextLabel.SetName( "ProgressBarValueTextLabel" );
-  mValueTextLabel.SetStyleName( "ProgressBarValueTextLabel" );
-  mValueTextLabel.SetParentOrigin( ParentOrigin::CENTER );
-  mValueTextLabel.SetAnchorPoint( AnchorPoint::CENTER );
-  mValueTextLabel.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
-  mValueTextLabel.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
-  mTrack.Add( mValueTextLabel ); // Add to mTrack and let it automatically set its size
-}
+  bool success = false;
+  Toolkit::Visual::Base visual = GetVisual( visualIndex );
 
-void ProgressBar::SetProgressValue( float value )
-{
-  // update the progress bar value (taking float precision errors into account)
-  if( ( mValue != value ) &&
-      ( ( value >= DEFAULT_LOWER_BOUND ) || ( Equals( value, DEFAULT_LOWER_BOUND ) ) ) &&
-      ( ( value <= DEFAULT_UPPER_BOUND ) || ( Equals( value, DEFAULT_UPPER_BOUND ) ) ) )
+  if ( visual )
   {
-    mValue = Clamp( value, DEFAULT_LOWER_BOUND, DEFAULT_UPPER_BOUND );
-    DisplayValue( mValue, true );
-    RelayoutRequest();
+    visual.CreatePropertyMap( retreivedMap );
+    success = true;
   }
-}
 
-float ProgressBar::GetProgressValue() const
-{
-  return mValue;
+  return success;
 }
 
 // Static class method to support script connecting signals
@@ -378,29 +430,89 @@ void ProgressBar::SetProperty( BaseObject* object, Property::Index propertyIndex
 
     switch ( propertyIndex )
     {
-      case Toolkit::ProgressBar::Property::PROGRESS_VALUE:
+      case Toolkit::ProgressBar::Property::TRACK_VISUAL:
       {
-        progressBarImpl.SetProgressValue( value.Get< float >() );
+        progressBarImpl.CreateVisualsForComponent( propertyIndex, value, ProgressDepthIndex::TRACK_VISUAL );
         break;
       }
 
-      case Toolkit::ProgressBar::Property::TRACK_VISUAL:
+      case Toolkit::ProgressBar::Property::SECONDARY_PROGRESS_VISUAL:
       {
-        Property::Map map;
-        if( value.Get( map ) )
-        {
-          progressBarImpl.SetTrackVisual( map );
-        }
+        progressBarImpl.CreateVisualsForComponent( propertyIndex, value, ProgressDepthIndex::SECONDARY_PROGRESS_VISUAL );
         break;
       }
 
       case Toolkit::ProgressBar::Property::PROGRESS_VISUAL:
       {
+        progressBarImpl.CreateVisualsForComponent( propertyIndex, value, ProgressDepthIndex::PROGRESS_VISUAL );
+        break;
+      }
+
+      case Toolkit::ProgressBar::Property::INDETERMINATE_VISUAL:
+      {
+        progressBarImpl.CreateVisualsForComponent( propertyIndex, value, ProgressDepthIndex::INDETERMINATE_VISUAL );
+        break;
+      }
+
+      case Toolkit::ProgressBar::Property::LABEL_VISUAL:
+      {
         Property::Map map;
-        if( value.Get( map ) )
+        std::string textString;
+
+        if ( value.Get( textString ) )
+        {
+          // set new text string as TEXT property
+          Property::Map newTextMap;
+          Toolkit::Visual::Base label = progressBarImpl.GetVisual( Toolkit::ProgressBar::Property::LABEL_VISUAL );
+
+          if( label )
+          {
+            label.CreatePropertyMap( map );
+          }
+
+          // if LABEL_VISUAL doesn't set before, add Visual property "TYPE" to create new text Visual
+          if( map.Empty() )
+          {
+            newTextMap.Add( Toolkit::Visual::Property::TYPE, Toolkit::DevelVisual::TEXT );
+            newTextMap.Add( Toolkit::TextVisual::Property::POINT_SIZE, DEFAULT_FONT_SIZE );
+          }
+          newTextMap.Add( Toolkit::TextVisual::Property::TEXT, textString );
+
+          map.Merge( newTextMap );
+        }
+        else
         {
-          progressBarImpl.SetProgressVisual( map );
+          value.Get( map );
         }
+
+        if( !map.Empty() )
+        {
+          progressBarImpl.CreateVisualsForComponent( propertyIndex, map, ProgressDepthIndex::LABEL_VISUAL );
+        }
+        break;
+      }
+
+      case Toolkit::ProgressBar::Property::PROGRESS_VALUE:
+      {
+        progressBarImpl.SetProgressValue( value.Get< float >() );
+        break;
+      }
+
+      case Toolkit::ProgressBar::Property::SECONDARY_PROGRESS_VALUE:
+      {
+        progressBarImpl.SetSecondaryProgressValue( value.Get< float >() );
+        break;
+      }
+
+      case Toolkit::ProgressBar::Property::INDETERMINATE:
+      {
+        progressBarImpl.SetIndeterminate( value.Get< bool >() );
+        break;
+      }
+
+      case Toolkit::ProgressBar::Property::INDETERMINATE_VISUAL_ANIMATION:
+      {
+        progressBarImpl.SetIndeterminateVisualTransition( progressBarImpl.ConvertPropertyToTransition( value ) );
         break;
       }
     }
@@ -419,43 +531,59 @@ Property::Value ProgressBar::GetProperty( BaseObject* object, Property::Index pr
 
     switch ( propertyIndex )
     {
+      case Toolkit::ProgressBar::Property::TRACK_VISUAL:
+      case Toolkit::ProgressBar::Property::PROGRESS_VISUAL:
+      case Toolkit::ProgressBar::Property::SECONDARY_PROGRESS_VISUAL:
+      case Toolkit::ProgressBar::Property::INDETERMINATE_VISUAL:
+      case Toolkit::ProgressBar::Property::LABEL_VISUAL:
+      {
+        Property::Map visualProperty;
+        if ( progressBarImpl.GetPropertyMapForVisual( propertyIndex, visualProperty ) )
+        {
+          value = visualProperty;
+        }
+        break;
+      }
+
       case Toolkit::ProgressBar::Property::PROGRESS_VALUE:
       {
         value = progressBarImpl.GetProgressValue();
         break;
       }
 
-      case Toolkit::ProgressBar::Property::TRACK_VISUAL:
+      case Toolkit::ProgressBar::Property::SECONDARY_PROGRESS_VALUE:
       {
-        if( !progressBarImpl.mTrackVisual.empty() )
-        {
-          value = progressBarImpl.GetTrackVisual();
-        }
-        else if( !progressBarImpl.mTrackMap.Empty() )
-        {
-          value = progressBarImpl.mTrackMap;
-        }
+        value = progressBarImpl.GetSecondaryProgressValue();
         break;
       }
 
-      case Toolkit::ProgressBar::Property::PROGRESS_VISUAL:
+      case Toolkit::ProgressBar::Property::INDETERMINATE:
       {
-        if( !progressBarImpl.mProgressVisual.empty() )
-        {
-          value = progressBarImpl.GetProgressVisual();
-        }
-        else if( !progressBarImpl.mProgressMap.Empty() )
-        {
-          value = progressBarImpl.mProgressMap;
-        }
+        value = progressBarImpl.GetIndeterminate();
         break;
       }
+
+      case Toolkit::ProgressBar::Property::INDETERMINATE_VISUAL_ANIMATION:
+      {
+        //TODO: Return INDETERMINATE_VISUAL_TRANSITION;
+      }
     }
   }
 
   return value;
 }
 
+void ProgressBar::OnStageConnection( int depth )
+{
+  // Chain up first (ensures visuals are ready to draw)
+  Control::OnStageConnection( depth );
+
+  if( mIndeterminate )
+  {
+    PlayIndeterminateVisualTransition();
+  }
+}
+
 } // namespace Internal
 
 } // namespace Toolkit
index f5f7e91..b59c8b3 100755 (executable)
  *
  */
 
-// EXTERNAL INCLUDES
-#include <dali/public-api/object/property-map.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali/public-api/animation/animation.h>
 #include <dali-toolkit/devel-api/controls/progress-bar/progress-bar.h>
-#include <dali-toolkit/public-api/controls/image-view/image-view.h>
-#include <dali-toolkit/public-api/controls/text-controls/text-label.h>
+#include <dali-toolkit/devel-api/visual-factory/transition-data.h>
 
 namespace Dali
 {
@@ -63,7 +61,6 @@ public:
    *
    * @param[in] value The value to set. Will be clamped to [lowerBound .. upperBound]
    */
-
   void SetProgressValue( float value );
 
   /**
@@ -73,14 +70,62 @@ public:
    */
   float GetProgressValue() const;
 
+  /**
+   * Set the secondary progress value of the ProgressBar
+   *
+   * @param[in] value The secondary progress value to set. Will be clamped to [lowerBound .. upperBound]
+   */
+  void SetSecondaryProgressValue( float value );
+
+  /**
+   * Get the secondary progress value of the ProgressBar
+   *
+   * @return The current secondary progress value of the ProgressBar
+   */
+  float GetSecondaryProgressValue() const;
+
+  /**
+   * Set the indeterminate state of the ProgressBar
+   *
+   * @param[in] value The value to set.
+   */
+  void SetIndeterminate( bool value );
+
+  /**
+   * Get the indeterminate state value of the ProgressBar
+   *
+   * @return The current determined state of the ProgressBar
+   */
+  bool GetIndeterminate() const;
+
+  /**
+   * Set the indeterminate visual transition of the ProgressBar
+   *
+   * @param[in] Transition data map to set.
+   */
+  void SetIndeterminateVisualTransition( Property::Map transtion );
+
+  /**
+   * Get the indeterminate visual transition data map of the ProgressBar
+   *
+   * @return The current indeterminate visual transition data map of the ProgressBar
+   */
+  Property::Map GetIndeterminateVisualTransition() const;
+
+  /**
+   * Play the indeterminate visual transition
+   */
+  void PlayIndeterminateVisualTransition();
+
 public:
   //Signals
 
   /**
-   * @copydoc Toolkit::ProgressBar::ValueChangedSignal()
+   * @copydoc toolkit::progressbar::valuechangedsignal()
    */
   Toolkit::ProgressBar::ValueChangedSignalType& ValueChangedSignal();
 
+
   /**
    * Connects a callback function with the object's signals.
    * @param[in] object The object providing the signal.
@@ -168,73 +213,29 @@ private:
   Domain CalcDomain( const Vector2& currentSize );
 
   /**
-   * Create the track for the ProgressBar
-   *
-   * @return The track actor
-   */
-  Toolkit::ImageView CreateTrack();
-
-  /**
-   * Create the progress track for the ProgressBar
-   *
-   * @return The track actor
-   */
-  Toolkit::ImageView CreateProgress();
-
-  /**
-   * Create all the children
-   */
-  void CreateChildren();
-
-  /**
-   * Set value choosing whether to fire signals or not
-   *
-   * @paramp[in] value The value to set
-   * @param[in] raiseSignals Configure signals to be raised or not.
-   */
-  void DisplayValue( float value, bool raiseSignals );
-
-  /**
-   * Create the image for the track
-   *
-   * @param[in] filename The track image
-   */
-  void SetTrackVisual( const std::string& filename );
-
-  /**
-   * @brief Set the track visual from an Dali::Property::Map
-   *
-   * @param[in] map The Dali::Property::Map to use for to display
+   * Set indeterminate visual transition animation
    */
-  void SetTrackVisual( Dali::Property::Map map );
+  void SetIndeterminateVisualTransition( Toolkit::TransitionData transtion );
 
   /**
-   * @brief Return the track image.
-   *
-   * @return The track image.
+   * Convert value to transition data
    */
-  std::string GetTrackVisual();
+  Toolkit::TransitionData ConvertPropertyToTransition( const Property::Value& value );
 
   /**
-   * Create the image for the progress bar
-   *
-   * @param[in] filename The progress bar image
+   * Update progress bar label when progress value is changed
    */
-  void SetProgressVisual( const std::string& filename );
+  void CreateVisualsForComponent( Property::Index index, const Property::Value& value, const float visualDepth );
 
   /**
-   * @brief Set the progress visual from an Dali::Property::Map
-   *
-   * @param[in] map The Dali::Property::Map to use for to display
+   * Update progress bar label when progress value is changed
    */
-  void SetProgressVisual( Dali::Property::Map map );
+  bool GetPropertyMapForVisual( Property::Index visualIndex, Property::Map& retreivedMap ) const;
 
   /**
-   * @brief Return the progress bar image.
-   *
-   * @return The progress bar image if it exists.
+   * Check if we should start animating
    */
-  std::string GetProgressVisual();
+  virtual void OnStageConnection( int depth );
 
 private:
 
@@ -246,23 +247,15 @@ private:
 
 private:
 
-  Domain mDomain;                           ///< Current domain of the handle
-
-  Toolkit::ImageView mTrack;                ///< Track image
-  Toolkit::ImageView mProgress;             ///< Progress bar
-  Toolkit::TextLabel mValueTextLabel;       ///< Text value to show progress percentage
-  Toolkit::ProgressBar::ValueChangedSignalType mValueChangedSignal;       ///< Signal emitted when the value is changed
-
-  std::string mTrackVisual;           ///< Image for track image
-  std::string mProgressVisual;        ///< Image for progress bar image
-
-  Property::Map mTrackMap;         ///< the Property::Map if the image came from a Property::Map, empty otherwise
-  Property::Map mProgressMap;      ///< the Property::Map if the image came from a Property::Map, empty otherwise
+  Domain mDomain;                                                     ///< Current domain of the handle
 
-  Vector2 mTrackVisualSize;      ///< Size of the track image used
-  Vector2 mProgressVisualSize;   ///< Size of progress image used
+  Animation mIndeterminateVisualAni;                                  ///< Animation for indetrminate visual. Transition animation.
+  Toolkit::ProgressBar::ValueChangedSignalType mValueChangedSignal;   ///< Signal emitted when the value is changed
 
-  float mValue;             ///< Current value of ProgressBar
+  Toolkit::TransitionData mIndeterminateVisualTransition;             ///< Transition data map for mIndeterminateVisualAni
+  float mProgressValue;                                               ///< Current value of ProgressBar
+  float mSecondaryProgressValue;                                      ///< Current loading value of ProgressBar
+  bool mIndeterminate;                                                ///< Whether the progress state is determined or not
 };
 
 } // namespace Internal
index 6e301cb..7612185 100755 (executable)
@@ -234,7 +234,8 @@ void ScrollBar::CreateDefaultIndicatorActor()
   Toolkit::ImageView indicator = Toolkit::ImageView::New( DEFAULT_INDICATOR_IMAGE_PATH );
   indicator.SetParentOrigin( ParentOrigin::TOP_LEFT );
   indicator.SetAnchorPoint( AnchorPoint::TOP_LEFT );
-
+  indicator.SetStyleName( "ScrollBarIndicator" );
+  indicator.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR );
   SetScrollIndicator(indicator);
 }
 
@@ -249,6 +250,7 @@ void ScrollBar::SetScrollIndicator( Actor indicator )
       Self().Remove( mIndicator );
     }
     mIndicator = indicator;
+
     mIndicatorFirstShow = true;
     Self().Add( mIndicator );
 
index 3b53bac..4cb2043 100755 (executable)
@@ -447,10 +447,6 @@ Degree DepthLayout::GetScrollDirection() const
 void DepthLayout::ApplyConstraints( Actor& actor, const int itemId, const Vector3& layoutSize, const Actor& itemViewActor )
 {
 
-  if(HasLayoutChanged())
-  {
-    SetDepthLayoutProperties(GetLayoutProperties());
-  }
   Dali::Toolkit::ItemView itemView = Dali::Toolkit::ItemView::DownCast( itemViewActor );
   if( itemView )
   {
@@ -559,7 +555,6 @@ void DepthLayout::SetDepthLayoutProperties(const Property::Map& properties)
       }
     }
   }
-  ResetLayoutChangedFlag();
 }
 
 Vector3 DepthLayout::GetItemPosition( int itemID, float currentLayoutPosition, const Vector3& layoutSize ) const
index e002245..d362f05 100755 (executable)
@@ -534,10 +534,6 @@ Degree GridLayout::GetScrollDirection() const
 
 void GridLayout::ApplyConstraints( Actor& actor, const int itemId, const Vector3& layoutSize, const Actor& itemViewActor )
 {
-  if(HasLayoutChanged())
-  {
-    SetGridLayoutProperties(GetLayoutProperties());
-  }
   // This just implements the default behaviour of constraint application.
   // Custom layouts can override this function to apply their custom constraints.
   Dali::Toolkit::ItemView itemView = Dali::Toolkit::ItemView::DownCast( itemViewActor );
@@ -685,7 +681,6 @@ void GridLayout::SetGridLayoutProperties(const Property::Map& properties)
       }
     }
   }
-  ResetLayoutChangedFlag();
 }
 
 Vector3 GridLayout::GetItemPosition(int itemID, float currentLayoutPosition, const Vector3& layoutSize) const
index a5741ab..8b84088 100755 (executable)
@@ -69,6 +69,8 @@ const float OVERSHOOT_BOUNCE_ACTOR_RESIZE_THRESHOLD = 180.0f;
 const Vector4 OVERSHOOT_OVERLAY_NINE_PATCH_BORDER(0.0f, 0.0f, 1.0f, 12.0f);
 const float DEFAULT_KEYBOARD_FOCUS_SCROLL_DURATION = 0.2f;
 
+const unsigned int OVERSHOOT_SIZE_CONSTRAINT_TAG(42);
+
 /**
  * Local helper to convert pan distance (in actor coordinates) to the layout-specific scrolling direction
  */
@@ -291,6 +293,21 @@ bool FindById( const ItemContainer& items, ItemId id )
   return false;
 }
 
+/**
+  * Helper to apply size constraint to mOvershootOverlay
+  * @param[in] overshootOverlay The overshootOverlay actor
+  * @param[in] The required height
+  */
+void ApplyOvershootSizeConstraint( Actor overshootOverlay, float height )
+{
+  Constraint constraint = Constraint::New<Vector3>( overshootOverlay, Actor::Property::SIZE, OvershootOverlaySizeConstraint( height ) );
+  constraint.AddSource( ParentSource( Dali::Toolkit::ItemView::Property::SCROLL_DIRECTION ) );
+  constraint.AddSource( ParentSource( Dali::Toolkit::ItemView::Property::LAYOUT_ORIENTATION ) );
+  constraint.AddSource( ParentSource( Dali::Actor::Property::SIZE ) );
+  constraint.SetTag( OVERSHOOT_SIZE_CONSTRAINT_TAG );
+  constraint.Apply();
+}
+
 } // unnamed namespace
 
 Dali::Toolkit::ItemView ItemView::New(ItemFactory& factory)
@@ -1519,6 +1536,18 @@ void ItemView::ScrollTo(const Vector2& position, float duration)
   mRefreshEnabled = true;
 }
 
+void ItemView::SetOvershootSize( const Vector2& size )
+{
+  mOvershootSize = size;
+
+  if( mOvershootOverlay )
+  {
+    // Remove old & add new size constraint
+    mOvershootOverlay.RemoveConstraints( OVERSHOOT_SIZE_CONSTRAINT_TAG );
+    ApplyOvershootSizeConstraint( mOvershootOverlay, mOvershootSize.height );
+  }
+}
+
 void ItemView::SetOvershootEffectColor( const Vector4& color )
 {
   mOvershootEffectColor = color;
@@ -1543,15 +1572,9 @@ void ItemView::EnableScrollOvershoot( bool enable )
       mOvershootOverlay.SetDrawMode( DrawMode::OVERLAY_2D );
       self.Add(mOvershootOverlay);
 
-      Constraint constraint = Constraint::New<Vector3>( mOvershootOverlay, Actor::Property::SIZE, OvershootOverlaySizeConstraint(mOvershootSize.height) );
-      constraint.AddSource( ParentSource( Toolkit::ItemView::Property::SCROLL_DIRECTION ) );
-      constraint.AddSource( ParentSource( Toolkit::ItemView::Property::LAYOUT_ORIENTATION ) );
-      constraint.AddSource( ParentSource( Actor::Property::SIZE ) );
-      constraint.Apply();
-
-      mOvershootOverlay.SetSize(mOvershootSize.width, mOvershootSize.height);
+      ApplyOvershootSizeConstraint( mOvershootOverlay, mOvershootSize.height );
 
-      constraint = Constraint::New<Quaternion>( mOvershootOverlay, Actor::Property::ORIENTATION, OvershootOverlayRotationConstraint );
+      Constraint constraint = Constraint::New<Quaternion>( mOvershootOverlay, Actor::Property::ORIENTATION, OvershootOverlayRotationConstraint );
       constraint.AddSource( ParentSource( Toolkit::ItemView::Property::SCROLL_DIRECTION ) );
       constraint.AddSource( ParentSource( Toolkit::ItemView::Property::LAYOUT_ORIENTATION ) );
       constraint.AddSource( ParentSource( Toolkit::ItemView::Property::OVERSHOOT ) );
@@ -1800,6 +1823,7 @@ void ItemView::SetLayoutArray( const Property::Array& layouts )
               {
                 Internal::DepthLayoutPtr depthLayout = Internal::DepthLayout::New();
                 (*depthLayout).SetLayoutProperties(*layout);
+                (*depthLayout).SetDepthLayoutProperties(*layout);
                 AddLayout(*depthLayout);
                 break;
               }
@@ -1807,6 +1831,7 @@ void ItemView::SetLayoutArray( const Property::Array& layouts )
               {
                 Internal::GridLayoutPtr gridLayout = Internal::GridLayout::New();
                 (*gridLayout).SetLayoutProperties(*layout);
+                (*gridLayout).SetGridLayoutProperties(*layout);
                 AddLayout(*gridLayout);
                 break;
               }
@@ -1815,6 +1840,7 @@ void ItemView::SetLayoutArray( const Property::Array& layouts )
                 Internal::GridLayoutPtr listLayout = Internal::GridLayout::New();
                 listLayout->SetNumberOfColumns( 1 );
                 (*listLayout).SetLayoutProperties(*layout);
+                (*listLayout).SetGridLayoutProperties(*layout);
                 AddLayout(*listLayout);
                 break;
               }
@@ -1822,6 +1848,7 @@ void ItemView::SetLayoutArray( const Property::Array& layouts )
               {
                 Internal::SpiralLayoutPtr spiralLayout = Internal::SpiralLayout::New();
                 (*spiralLayout).SetLayoutProperties(*layout);
+                (*spiralLayout).SetSpiralLayoutProperties(*layout);
                 AddLayout(*spiralLayout);
                 break;
               }
index f49ee81..d0a2bf1 100755 (executable)
@@ -239,6 +239,11 @@ public:
   void ScrollTo(const Vector2& position, float duration);
 
   /**
+   * @copydoc Toolkit::Internal::Scrollable::SetOvershootSize
+   */
+  void SetOvershootSize( const Vector2& size );
+
+  /**
    * @copydoc Toolkit::Internal::Scrollable::SetOvershootEffectColor
    */
   void SetOvershootEffectColor( const Vector4& color );
index 9e8db62..e320fe1 100755 (executable)
@@ -426,10 +426,6 @@ Degree SpiralLayout::GetScrollDirection() const
 void SpiralLayout::ApplyConstraints( Actor& actor, const int itemId, const Vector3& layoutSize, const Actor& itemViewActor )
 {
 
-  if(HasLayoutChanged())
-  {
-    SetSpiralLayoutProperties(GetLayoutProperties());
-  }
   // This just implements the default behaviour of constraint application.
   // Custom layouts can override this function to apply their custom constraints.
   Dali::Toolkit::ItemView itemView = Dali::Toolkit::ItemView::DownCast( itemViewActor );
@@ -548,7 +544,6 @@ void SpiralLayout::SetSpiralLayoutProperties(const Property::Map& properties)
       }
     }
   }
-  ResetLayoutChangedFlag();
 }
 
 Vector3 SpiralLayout::GetItemPosition(int itemID, float currentLayoutPosition, const Vector3& layoutSize) const
index 0da1660..069d5b6 100644 (file)
@@ -658,7 +658,8 @@ ScrollView::ScrollView()
   mAlterChild(false),
   mDefaultMaxOvershoot(true),
   mCanScrollHorizontal(true),
-  mCanScrollVertical(true)
+  mCanScrollVertical(true),
+  mTransientScrollBar(true)
 {
 }
 
@@ -1781,6 +1782,15 @@ void ScrollView::RemoveOverlay(Actor actor)
   mInternalActor.Remove( actor );
 }
 
+void ScrollView::SetOvershootSize( const Vector2& size )
+{
+  mOvershootSize = size;
+  if( IsOvershootEnabled() && mOvershootIndicator )
+  {
+    mOvershootIndicator->AttachToScrollable(*this);
+  }
+}
+
 void ScrollView::SetOvershootEffectColor( const Vector4& color )
 {
   mOvershootEffectColor = color;
@@ -1951,24 +1961,33 @@ void ScrollView::OnChildAdd(Actor& child)
   ScrollBase::OnChildAdd( child );
 
   Dali::Toolkit::ScrollBar scrollBar = Dali::Toolkit::ScrollBar::DownCast(child);
-  if(scrollBar)
+  if( scrollBar )
   {
-    mInternalActor.Add(scrollBar);
-    if(scrollBar.GetScrollDirection() == Toolkit::ScrollBar::Horizontal)
+    mScrollBar = scrollBar;
+    scrollBar.SetName("ScrollBar");
+
+    mInternalActor.Add( scrollBar );
+    if( scrollBar.GetScrollDirection() == Toolkit::ScrollBar::Horizontal )
     {
-      scrollBar.SetScrollPropertySource(Self(),
-                                        Toolkit::ScrollView::Property::SCROLL_PRE_POSITION_X,
-                                        Toolkit::Scrollable::Property::SCROLL_POSITION_MIN_X,
-                                        Toolkit::ScrollView::Property::SCROLL_PRE_POSITION_MAX_X,
-                                        Toolkit::ScrollView::Property::SCROLL_DOMAIN_SIZE_X);
+      scrollBar.SetScrollPropertySource( Self(),
+                                         Toolkit::ScrollView::Property::SCROLL_PRE_POSITION_X,
+                                         Toolkit::Scrollable::Property::SCROLL_POSITION_MIN_X,
+                                         Toolkit::ScrollView::Property::SCROLL_PRE_POSITION_MAX_X,
+                                         Toolkit::ScrollView::Property::SCROLL_DOMAIN_SIZE_X );
     }
     else
     {
-      scrollBar.SetScrollPropertySource(Self(),
-                                        Toolkit::ScrollView::Property::SCROLL_PRE_POSITION_Y,
-                                        Toolkit::Scrollable::Property::SCROLL_POSITION_MIN_Y,
-                                        Toolkit::ScrollView::Property::SCROLL_PRE_POSITION_MAX_Y,
-                                        Toolkit::ScrollView::Property::SCROLL_DOMAIN_SIZE_Y);
+      scrollBar.SetScrollPropertySource( Self(),
+                                         Toolkit::ScrollView::Property::SCROLL_PRE_POSITION_Y,
+                                         Toolkit::Scrollable::Property::SCROLL_POSITION_MIN_Y,
+                                         Toolkit::ScrollView::Property::SCROLL_PRE_POSITION_MAX_Y,
+                                         Toolkit::ScrollView::Property::SCROLL_DOMAIN_SIZE_Y );
+    }
+
+    if( mTransientScrollBar )
+    {
+      scrollBar.SetVisible( false );
+      scrollBar.HideIndicator();
     }
   }
   else if(mAlterChild)
@@ -2467,6 +2486,19 @@ void ScrollView::OnPan( const PanGesture& gesture )
       self.SetProperty( Toolkit::ScrollView::Property::START_PAGE_POSITION, Vector3(gesture.position.x, gesture.position.y, 0.0f) );
 
       UpdateMainInternalConstraint();
+      Toolkit::ScrollBar scrollBar = mScrollBar.GetHandle();
+      if( scrollBar && mTransientScrollBar )
+      {
+        Vector3 size = Self().GetCurrentSize();
+        const Toolkit::RulerDomain& rulerDomainX = mRulerX->GetDomain();
+        const Toolkit::RulerDomain& rulerDomainY = mRulerY->GetDomain();
+
+        if( ( rulerDomainX.max > size.width ) || ( rulerDomainY.max > size.height ) )
+        {
+          scrollBar.SetVisible( true );
+          scrollBar.ShowIndicator();
+        }
+      }
       break;
     }
 
@@ -2501,6 +2533,12 @@ void ScrollView::OnPan( const PanGesture& gesture )
         {
           mScrollMainInternalPrePositionConstraint.Remove();
         }
+
+        Toolkit::ScrollBar scrollBar = mScrollBar.GetHandle();
+        if( scrollBar && mTransientScrollBar )
+        {
+          scrollBar.HideIndicator();
+        }
       }
       else
       {
index b288720..485d508 100644 (file)
 #include <dali/public-api/adaptor-framework/timer.h>
 #include <dali/public-api/animation/animation.h>
 #include <dali/public-api/object/property-notification.h>
+#include <dali/devel-api/object/weak-handle.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
 #include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-base-impl.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>
@@ -494,6 +496,11 @@ public:
   void RemoveOverlay(Actor actor);
 
   /**
+   * @copydoc Toolkit::Internal::Scrollable::SetOvershootSize
+   */
+  void SetOvershootSize( const Vector2& size );
+
+  /**
    * @copydoc Toolkit::Internal::Scrollable::SetOvershootEffectColor
    */
   void SetOvershootEffectColor( const Vector4& color );
@@ -932,6 +939,7 @@ private:
   Constraint mScrollMainInternalPrePositionMaxConstraint;
 
   ScrollOvershootIndicatorPtr mOvershootIndicator;
+  WeakHandle<Toolkit::ScrollBar> mScrollBar;
 
   Toolkit::ScrollView::SnapStartedSignalType mSnapStartedSignal;
 
@@ -949,6 +957,7 @@ private:
   bool mDefaultMaxOvershoot:1;            ///< Whether to use default max overshoot or application defined one
   bool mCanScrollHorizontal:1;            ///< Local value of our property to check against
   bool mCanScrollVertical:1;              ///< Local value of our property to check against
+  bool mTransientScrollBar:1;             ///< True if scroll-bar should be automatically show/hidden during/after panning
 };
 
 } // namespace Internal
index 20da41c..31201ee 100644 (file)
@@ -204,12 +204,7 @@ void Scrollable::SetProperty( BaseObject* object, Property::Index index, const P
       }
       case Toolkit::Scrollable::Property::OVERSHOOT_SIZE:
       {
-        Vector2 input;
-        if( value.Get( input ) )
-        {
-          scrollableImpl.mOvershootSize = input;
-        }
-        scrollableImpl.EnableScrollOvershoot( scrollableImpl.IsOvershootEnabled() );
+        scrollableImpl.SetOvershootSize( value.Get<Vector2>() );
         break;
       }
       case Toolkit::Scrollable::Property::SCROLL_TO_ALPHA_FUNCTION:
index 660606c..bf6fa98 100644 (file)
@@ -112,6 +112,12 @@ public:
    */
   const Vector2& GetOvershootSize() const;
 
+  /**
+   * Set the size of the overshoot effect.
+   * @parm[in] size The size of the overshoot effect
+   */
+  virtual void SetOvershootSize( const Vector2& size ) = 0;
+
 private:
 
   /**
index a674abb..b683987 100644 (file)
@@ -1078,12 +1078,11 @@ void TableView::OnChildRemove( Actor& child )
 TableView::TableView( unsigned int initialRows, unsigned int initialColumns )
 : Control( ControlBehaviour( CONTROL_BEHAVIOUR_DEFAULT ) ),
   mCellData( initialRows, initialColumns ),
+  mPreviousFocusedActor(),
   mLayoutingChild( false ),
   mRowDirty( true ),     // Force recalculation first time
   mColumnDirty( true )
 {
-  mCurrentColumn = 0;
-  mCurrentRow = 0;
   SetKeyboardNavigationSupport( true );
   ResizeContainers( initialRows, initialColumns );
 }
@@ -1405,29 +1404,37 @@ Actor TableView::GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolki
       // Move the focus if we haven't lost it.
       if(!focusLost)
       {
-        // Save the new focus cell positions of TableView.
-        mCurrentColumn = currentColumn;
-        mCurrentRow = currentRow;
-
         nextFocusableActor = GetChildAt(Toolkit::TableView::CellPosition(currentRow, currentColumn));
+
+        // Save the focused actor in the TableView.
+        mPreviousFocusedActor = nextFocusableActor;
       }
     }
     else
     {
-      // The current focused actor is not within TableView.
-      // This means that the TableView has gained the Focus again.
+      // The current focused actor is not within this TableView.
 
       unsigned int numberOfColumns = GetColumns();
       unsigned int numberOfRows = GetRows();
 
-      if( (mCurrentRow != 0 && mCurrentColumn != 0) && // Last saved cell was not the first cell
-          (mCurrentRow != numberOfRows - 1 && mCurrentColumn != numberOfColumns - 1) ) // Last saved cell was not the last cell
+      // Check whether the previous focused actor is a focus group (i.e. a layout container)
+      bool wasFocusedOnLayoutContainer = false;
+      Actor previousFocusedActor = mPreviousFocusedActor.GetHandle();
+      if( previousFocusedActor )
       {
-        // This condition handles the cases when parent TableView gained the focus again after the child layout
-        // container (i.e. TableView) has no more items (i.e. actors) to be focused on in a given direction.
+        Toolkit::Control control = Toolkit::Control::DownCast( previousFocusedActor );
+        if( control )
+        {
+          Internal::Control& controlImpl = static_cast<Internal::Control&>(control.GetImplementation());
+          wasFocusedOnLayoutContainer = controlImpl.IsKeyboardFocusGroup();
+        }
+      }
 
-        // Move the focus to next cell towards the given direction in a TableView if the last saved cell was not the first or last cell.
-        nextFocusableActor = GetNextKeyboardFocusableActor(GetChildAt(Toolkit::TableView::CellPosition(mCurrentRow, mCurrentColumn)), direction, loopEnabled);
+      // Check whether the previous focused actor is a layout container and also a child of this TableView
+      Toolkit::TableView::CellPosition position;
+      if( wasFocusedOnLayoutContainer && FindChildPosition( previousFocusedActor, position ) )
+      {
+        nextFocusableActor = GetNextKeyboardFocusableActor(previousFocusedActor, direction, loopEnabled);
       }
       else
       {
index be1f702..a8e8456 100644 (file)
@@ -18,6 +18,9 @@
  *
  */
 
+// EXTERNAL INCLUDES
+#include <dali/devel-api/object/weak-handle.h>
+
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/public-api/controls/table-view/table-view.h>
@@ -497,8 +500,8 @@ private: // Data
   Size mFixedTotals;             ///< Accumulated totals for fixed width and height
 
   Size mPadding;                 ///< Padding to apply to each cell
-  unsigned int mCurrentRow;      ///< Last / current focused row
-  unsigned int mCurrentColumn;   ///< Last / current focused column
+
+  WeakHandle<Actor> mPreviousFocusedActor; ///< Perviously focused actor
   bool mLayoutingChild;          ///< Can't be a bitfield due to Relayouting lock
   bool mRowDirty : 1;            ///< Flag to indicate the row data is dirty
   bool mColumnDirty : 1;         ///< Flag to indicate the column data is dirty
index aab4f95..b6d9900 100644 (file)
@@ -25,6 +25,7 @@
 #include <dali/public-api/common/stage.h>
 #include <dali/public-api/images/resource-image.h>
 #include <dali/devel-api/adaptor-framework/virtual-keyboard.h>
+#include <dali/devel-api/object/property-helper-devel.h>
 #include <dali/public-api/object/type-registry-helper.h>
 #include <dali/integration-api/adaptors/adaptor.h>
 #include <dali/integration-api/debug.h>
@@ -33,6 +34,7 @@
 #include <dali-toolkit/public-api/text/rendering-backend.h>
 #include <dali-toolkit/public-api/visuals/color-visual-properties.h>
 #include <dali-toolkit/devel-api/controls/control-depth-index-ranges.h>
+#include <dali-toolkit/devel-api/controls/text-controls/text-editor-devel.h>
 #include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 #include <dali-toolkit/internal/text/rendering/text-backend.h>
 #include <dali-toolkit/internal/text/text-effects-style.h>
@@ -122,6 +124,8 @@ DALI_PROPERTY_REGISTRATION( Toolkit, TextEditor, "emboss",
 DALI_PROPERTY_REGISTRATION( Toolkit, TextEditor, "inputEmboss",                          MAP,       INPUT_EMBOSS                         )
 DALI_PROPERTY_REGISTRATION( Toolkit, TextEditor, "outline",                              MAP,       OUTLINE                              )
 DALI_PROPERTY_REGISTRATION( Toolkit, TextEditor, "inputOutline",                         MAP,       INPUT_OUTLINE                        )
+DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "smoothScroll",                   BOOLEAN,   SMOOTH_SCROLL                        )
+DALI_DEVEL_PROPERTY_REGISTRATION( Toolkit, TextEditor, "smoothScrollDuration",           FLOAT,     SMOOTH_SCROLL_DURATION               )
 
 DALI_SIGNAL_REGISTRATION( Toolkit, TextEditor, "textChanged",        SIGNAL_TEXT_CHANGED )
 DALI_SIGNAL_REGISTRATION( Toolkit, TextEditor, "inputStyleChanged",  SIGNAL_INPUT_STYLE_CHANGED )
@@ -590,6 +594,26 @@ void TextEditor::SetProperty( BaseObject* object, Property::Index index, const P
         }
         break;
       }
+      case Toolkit::DevelTextEditor::Property::SMOOTH_SCROLL:
+      {
+        const bool enable = value.Get< bool >();
+        DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextEditor SMOOTH_SCROLL %d\n", enable );
+
+        impl.mScrollAnimationEnabled = enable;
+        break;
+      }
+      case Toolkit::DevelTextEditor::Property::SMOOTH_SCROLL_DURATION:
+      {
+        const float duration = value.Get< float >();
+        DALI_LOG_INFO( gLogFilter, Debug::General, "TextEditor SMOOTH_SCROLL_DURATION %f\n", duration );
+
+        impl.mScrollAnimationDuration = duration;
+        if ( impl.mTextVerticalScroller )
+        {
+          impl.mTextVerticalScroller->SetDuration( duration );
+        }
+        break;
+      }
     } // switch
   } // texteditor
 }
@@ -891,6 +915,16 @@ Property::Value TextEditor::GetProperty( BaseObject* object, Property::Index ind
         GetOutlineProperties( impl.mController, value, Text::EffectStyle::INPUT );
         break;
       }
+      case Toolkit::DevelTextEditor::Property::SMOOTH_SCROLL:
+      {
+        value = impl.mScrollAnimationEnabled;
+        break;
+      }
+      case Toolkit::DevelTextEditor::Property::SMOOTH_SCROLL_DURATION:
+      {
+        value = impl.mScrollAnimationDuration;
+        break;
+      }
     } //switch
   }
 
@@ -1094,7 +1128,7 @@ void TextEditor::RenderText( Text::Controller::UpdateTextType updateTextType )
     {
       renderableActor = mRenderer->Render( mController->GetView(),
                                            mAlignmentOffset,
-                                           DepthIndex::TEXT );
+                                           DepthIndex::CONTENT );
     }
 
     if( renderableActor != mRenderableActor )
@@ -1106,10 +1140,6 @@ void TextEditor::RenderText( Text::Controller::UpdateTextType updateTextType )
 
   if( mRenderableActor )
   {
-    const Vector2& scrollOffset = mController->GetTextModel()->GetScrollPosition();
-
-    mRenderableActor.SetPosition( scrollOffset.x + mAlignmentOffset, scrollOffset.y );
-
     // Make sure the actors are parented correctly with/without clipping
     Actor self = mStencil ? mStencil : Self();
 
@@ -1123,6 +1153,8 @@ void TextEditor::RenderText( Text::Controller::UpdateTextType updateTextType )
     mClippingDecorationActors.clear();
 
     self.Add( mRenderableActor );
+
+    ApplyScrollPosition();
   }
 }
 
@@ -1397,12 +1429,42 @@ void TextEditor::OnIdleSignal()
   mIdleCallback = NULL;
 }
 
+void TextEditor::ApplyScrollPosition()
+{
+  const Vector2& scrollOffset = mController->GetTextModel()->GetScrollPosition();
+  float scrollAmount = 0.0f;
+
+  if ( mScrollAnimationEnabled )
+  {
+    scrollAmount = mController->GetScrollAmountByUserInput();
+  }
+  if ( mTextVerticalScroller )
+  {
+    mTextVerticalScroller->CheckStartAnimation( mRenderableActor, scrollOffset.x + mAlignmentOffset, scrollOffset.y - scrollAmount, scrollAmount );
+  }
+  else if ( Equals( scrollAmount, 0.0f, Math::MACHINE_EPSILON_1 ))
+  {
+    mRenderableActor.SetPosition( scrollOffset.x + mAlignmentOffset, scrollOffset.y - scrollAmount );
+  }
+  else
+  {
+    mTextVerticalScroller = Text::TextVerticalScroller::New();
+    if ( !Equals( mScrollAnimationDuration, 0.0f, Math::MACHINE_EPSILON_1 ))
+    {
+      mTextVerticalScroller->SetDuration( mScrollAnimationDuration );
+    }
+    mTextVerticalScroller->CheckStartAnimation( mRenderableActor, scrollOffset.x + mAlignmentOffset, scrollOffset.y - scrollAmount, scrollAmount );
+  }
+}
+
 TextEditor::TextEditor()
 : Control( ControlBehaviour( CONTROL_BEHAVIOUR_DEFAULT ) ),
   mIdleCallback( NULL ),
   mAlignmentOffset( 0.f ),
+  mScrollAnimationDuration( 0.f ),
   mRenderingBackend( DEFAULT_RENDERING_BACKEND ),
-  mHasBeenStaged( false )
+  mHasBeenStaged( false ),
+  mScrollAnimationEnabled( false )
 {
 }
 
index 2be7072..09465a8 100644 (file)
@@ -28,6 +28,7 @@
 #include <dali-toolkit/internal/text/text-control-interface.h>
 #include <dali-toolkit/internal/text/text-editable-control-interface.h>
 #include <dali-toolkit/internal/text/text-controller.h>
+#include <dali-toolkit/internal/text/text-vertical-scroller.h>
 #include <dali-toolkit/internal/text/rendering/text-renderer.h>
 
 namespace Dali
@@ -227,6 +228,13 @@ private: // Implementation
   void OnIdleSignal();
 
   /**
+   * @brief set RenderActor's position with new scrollPosition
+   *
+   * Apply updated scroll position or start scroll animation if VerticalScrollAnimation is enabled
+   */
+  void ApplyScrollPosition();
+
+  /**
    * Construct a new TextEditor.
    */
   TextEditor();
@@ -257,6 +265,7 @@ private: // Data
   Text::ControllerPtr mController;
   Text::RendererPtr mRenderer;
   Text::DecoratorPtr mDecorator;
+  Text::TextVerticalScrollerPtr mTextVerticalScroller;
   Toolkit::Control mStencil;
   std::vector<Actor> mClippingDecorationActors;   ///< Decoration actors which need clipping.
 
@@ -264,8 +273,10 @@ private: // Data
   CallbackBase* mIdleCallback;
 
   float mAlignmentOffset;
+  float mScrollAnimationDuration;
   int mRenderingBackend;
   bool mHasBeenStaged:1;
+  bool mScrollAnimationEnabled:1;
 };
 
 } // namespace Internal
index 63568e6..6a846e4 100644 (file)
@@ -1272,7 +1272,7 @@ void TextField::RenderText( Text::Controller::UpdateTextType updateTextType )
     {
       renderableActor = mRenderer->Render( mController->GetView(),
                                            mAlignmentOffset,
-                                           DepthIndex::TEXT );
+                                           DepthIndex::CONTENT );
     }
 
     if( renderableActor != mRenderableActor )
index 9f7863f..b6b5db0 100644 (file)
@@ -731,7 +731,7 @@ void TextLabel::RenderText()
   {
     renderableActor = mRenderer->Render( mController->GetView(),
                                          alignmentOffset,
-                                         DepthIndex::TEXT );
+                                         DepthIndex::CONTENT );
   }
 
   if( renderableActor != mRenderableActor )
index cdd2226..0cb62af 100644 (file)
@@ -42,6 +42,8 @@ namespace Internal
 namespace
 {
 
+const Dali::Vector2 DEFAULT_SCROLL_BAR_PADDING( 8.0f, 6.0f );
+
 BaseHandle Create()
 {
   return Toolkit::TextSelectionToolbar::New();
@@ -53,6 +55,8 @@ DALI_TYPE_REGISTRATION_BEGIN( Toolkit::TextSelectionToolbar, Toolkit::Control, C
 
 DALI_PROPERTY_REGISTRATION( Toolkit, TextSelectionToolbar, "maxSize",  VECTOR2, MAX_SIZE )
 DALI_PROPERTY_REGISTRATION( Toolkit, TextSelectionToolbar, "enableOvershoot",  BOOLEAN, ENABLE_OVERSHOOT )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextSelectionToolbar, "enableScrollBar", BOOLEAN, ENABLE_SCROLL_BAR )
+DALI_PROPERTY_REGISTRATION( Toolkit, TextSelectionToolbar, "scrollBarPadding", VECTOR2, SCROLL_BAR_PADDING )
 DALI_PROPERTY_REGISTRATION( Toolkit, TextSelectionToolbar, "scrollView",  MAP, SCROLL_VIEW )
 
 DALI_TYPE_REGISTRATION_END()
@@ -98,6 +102,16 @@ void TextSelectionToolbar::SetProperty( BaseObject* object, Property::Index inde
         impl.mScrollView.SetOvershootEnabled( value.Get< bool >() );
         break;
       }
+      case Toolkit::TextSelectionToolbar::Property::ENABLE_SCROLL_BAR:
+      {
+        impl.SetUpScrollBar( value.Get< bool >() );
+        break;
+      }
+      case Toolkit::TextSelectionToolbar::Property::SCROLL_BAR_PADDING:
+      {
+        impl.SetScrollBarPadding( value.Get< Vector2 >() );
+        break;
+      }
       case Toolkit::TextSelectionToolbar::Property::SCROLL_VIEW:
       {
         // Get a Property::Map from the property if possible.
@@ -134,6 +148,16 @@ Property::Value TextSelectionToolbar::GetProperty( BaseObject* object, Property:
         value = impl.mScrollView.IsOvershootEnabled();
         break;
       }
+      case Toolkit::TextSelectionToolbar::Property::ENABLE_SCROLL_BAR:
+      {
+        value = impl.mScrollBar ? true : false;
+        break;
+      }
+      case Toolkit::TextSelectionToolbar::Property::SCROLL_BAR_PADDING:
+      {
+        value = impl.GetScrollBarPadding();
+        break;
+      }
     } // switch
   }
   return value;
@@ -149,6 +173,12 @@ void TextSelectionToolbar::OnRelayout( const Vector2& size, RelayoutContainer& c
   float width = std::max ( mTableOfButtons.GetNaturalSize().width, size.width );
   mRulerX->SetDomain( RulerDomain( 0.0, width, true ) );
   mScrollView.SetRulerX( mRulerX );
+
+  if( mScrollBar )
+  {
+    float barWidth = std::min( mTableOfButtons.GetNaturalSize().width, size.width ) - 2.f * mScrollBarPadding.x;
+    mScrollBar.SetSize( Vector2( 0.0f, barWidth ) );
+  }
 }
 
 void TextSelectionToolbar::SetPopupMaxSize( const Size& maxSize )
@@ -216,6 +246,36 @@ void TextSelectionToolbar::SetUp()
   self.Add( mToolbarLayer );
 }
 
+void TextSelectionToolbar::SetUpScrollBar( bool enable )
+{
+  if( enable )
+  {
+    if( ! mScrollBar )
+    {
+      Toolkit::ImageView indicator = Toolkit::ImageView::New();
+      indicator.SetParentOrigin( ParentOrigin::TOP_LEFT );
+      indicator.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+      indicator.SetStyleName( "TextSelectionScrollIndicator" );
+
+      mScrollBar = Toolkit::ScrollBar::New( Toolkit::ScrollBar::Horizontal );
+      mScrollBar.SetName( "Text popup scroll bar" );
+      mScrollBar.SetStyleName( "TextSelectionScrollBar" );
+      mScrollBar.SetParentOrigin( ParentOrigin::BOTTOM_LEFT );
+      mScrollBar.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+      mScrollBar.SetPosition( mScrollBarPadding.x, -mScrollBarPadding.y );
+      mScrollBar.SetResizePolicy( Dali::ResizePolicy::FIT_TO_CHILDREN, Dali::Dimension::WIDTH );
+      mScrollBar.SetOrientation( Quaternion( Radian( 1.5f * Math::PI ), Vector3::ZAXIS ) );
+      mScrollBar.SetScrollIndicator( indicator );
+      mScrollBar.GetPanGestureDetector().DetachAll();
+      mScrollView.Add( mScrollBar );
+    }
+  }
+  else
+  {
+    UnparentAndReset( mScrollBar );
+  }
+}
+
 void TextSelectionToolbar::OnScrollStarted( const Vector2& position )
 {
   mTableOfButtons.SetSensitive( false );
@@ -254,6 +314,17 @@ void TextSelectionToolbar::RaiseAbove( Layer target )
   mToolbarLayer.RaiseAbove( target );
 }
 
+void TextSelectionToolbar::SetScrollBarPadding( const Vector2& padding )
+{
+  mScrollBarPadding = padding;
+  if( mScrollBar )
+  {
+    mScrollBar.SetPosition( mScrollBarPadding.x, -mScrollBarPadding.y );
+  }
+
+  RelayoutRequest();
+}
+
 void TextSelectionToolbar::ConfigureScrollview( const Property::Map& properties )
 {
   // Set any properties specified for the label by iterating through all property key-value pairs.
@@ -274,10 +345,15 @@ void TextSelectionToolbar::ConfigureScrollview( const Property::Map& properties
   RelayoutRequest();
 }
 
+const Vector2& TextSelectionToolbar::GetScrollBarPadding() const
+{
+  return mScrollBarPadding;
+}
 
 TextSelectionToolbar::TextSelectionToolbar()
 : Control( ControlBehaviour( ControlBehaviour( CONTROL_BEHAVIOUR_DEFAULT ) ) ),
   mMaxSize (),
+  mScrollBarPadding( DEFAULT_SCROLL_BAR_PADDING ),
   mIndexInTable( 0 ),
   mDividerIndexes()
 {
index d44daf0..f5908bb 100644 (file)
@@ -21,6 +21,7 @@
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h>
+#include <dali-toolkit/public-api/controls/scroll-bar/scroll-bar.h>
 #include <dali-toolkit/public-api/controls/table-view/table-view.h>
 #include <dali-toolkit/devel-api/controls/text-controls/text-selection-toolbar.h>
 
@@ -84,6 +85,18 @@ public:
    */
   void RaiseAbove( Layer target );
 
+  /**
+   * Sets the scroll bar padding.
+   *
+   * @param[in] padding The padding value.
+   */
+  void SetScrollBarPadding( const Vector2& padding );
+
+  /**
+   * @return The padding value.
+   */
+  const Vector2& GetScrollBarPadding() const;
+
 private: // From Control
 
   /**
@@ -126,6 +139,13 @@ private: // Implementation
   void SetUp();
 
   /**
+   * @brief Enable or disable the scroll-bar
+   *
+   * @param[in] enable True if the scroll-bar is required
+   */
+  void SetUpScrollBar( bool enable );
+
+  /**
    * Toolbar has started to scroll
    * @param[in] position current scroll view position
    */
@@ -158,11 +178,12 @@ private: // Data
   Layer mToolbarLayer;                                ///< The layer used to house the toolbar.
   Toolkit::TableView mTableOfButtons;                 ///< Actor which holds all the buttons, sensitivity can be set on buttons via this actor
   Toolkit::ScrollView mScrollView;                    ///< Provides scrolling of Toolbar when content does not fit.
+  Toolkit::ScrollBar mScrollBar;                      ///< An horizontal scroll bar for the text's popup options.
   RulerPtr mRulerX;                                   ///< Ruler to clamp horizontal scrolling. Updates on Relayout
   Size mMaxSize;                                      ///< Max size of the Toolbar
+  Vector2 mScrollBarPadding;                          ///< The padding used to position the scroll indicator.
   unsigned int mIndexInTable;                         ///< Index in table to add option
   Dali::Vector< unsigned int > mDividerIndexes;       ///< Vector of indexes in the Toolbar that contain dividers.
-
 };
 
 } // namespace Internal
old mode 100644 (file)
new mode 100755 (executable)
index f003ce2..6ec0d0c
@@ -8,6 +8,7 @@ toolkit_src_files = \
    $(toolkit_src_dir)/builder/builder-signals.cpp \
    $(toolkit_src_dir)/builder/json-parser-state.cpp \
    $(toolkit_src_dir)/builder/json-parser-impl.cpp \
+   $(toolkit_src_dir)/builder/style.cpp \
    $(toolkit_src_dir)/builder/tree-node-manipulator.cpp \
    $(toolkit_src_dir)/builder/replacement.cpp \
    $(toolkit_src_dir)/visuals/visual-base-impl.cpp \
@@ -24,7 +25,6 @@ toolkit_src_files = \
    $(toolkit_src_dir)/visuals/gradient/linear-gradient.cpp \
    $(toolkit_src_dir)/visuals/gradient/radial-gradient.cpp \
    $(toolkit_src_dir)/visuals/gradient/gradient-visual.cpp \
-   $(toolkit_src_dir)/visuals/image/batch-image-visual.cpp \
    $(toolkit_src_dir)/visuals/image/image-visual.cpp \
    $(toolkit_src_dir)/visuals/mesh/mesh-visual.cpp \
    $(toolkit_src_dir)/visuals/npatch/npatch-visual.cpp \
@@ -42,6 +42,7 @@ toolkit_src_files = \
    $(toolkit_src_dir)/controls/buttons/check-box-button-impl.cpp \
    $(toolkit_src_dir)/controls/buttons/push-button-impl.cpp \
    $(toolkit_src_dir)/controls/buttons/radio-button-impl.cpp \
+   $(toolkit_src_dir)/controls/buttons/toggle-button-impl.cpp \
    $(toolkit_src_dir)/controls/effects-view/effects-view-impl.cpp \
    $(toolkit_src_dir)/controls/flex-container/flex-container-impl.cpp \
    $(toolkit_src_dir)/controls/gaussian-blur-view/gaussian-blur-view-impl.cpp \
@@ -87,6 +88,7 @@ toolkit_src_files = \
    \
    $(toolkit_src_dir)/focus-manager/keyboard-focus-manager-impl.cpp \
    $(toolkit_src_dir)/focus-manager/keyinput-focus-manager-impl.cpp \
+   $(toolkit_src_dir)/helpers/property-helper.cpp \
    $(toolkit_src_dir)/filters/blur-two-pass-filter.cpp \
    $(toolkit_src_dir)/filters/emboss-filter.cpp \
    $(toolkit_src_dir)/filters/image-filter.cpp \
@@ -117,6 +119,7 @@ toolkit_src_files = \
    $(toolkit_src_dir)/text/text-io.cpp \
    $(toolkit_src_dir)/text/text-model.cpp \
    $(toolkit_src_dir)/text/text-scroller.cpp \
+   $(toolkit_src_dir)/text/text-vertical-scroller.cpp \
    $(toolkit_src_dir)/text/text-view.cpp \
    $(toolkit_src_dir)/text/text-view-interface.cpp \
    $(toolkit_src_dir)/text/visual-model-impl.cpp \
index a9822e7..989997b 100644 (file)
@@ -38,6 +38,7 @@
 #include <dali-toolkit/public-api/controls/image-view/image-view.h>
 #include <dali-toolkit/public-api/accessibility-manager/accessibility-manager.h>
 #include <dali-toolkit/devel-api/focus-manager/keyinput-focus-manager.h>
+#include <dali-toolkit/devel-api/controls/control-devel.h>
 
 namespace Dali
 {
@@ -162,9 +163,18 @@ bool KeyboardFocusManager::DoSetCurrentFocusActor( const unsigned int actorID )
       actor.Add( GetFocusIndicatorActor() );
     }
     // Send notification for the change of focus actor
+    Actor currentFocusedActor = GetCurrentFocusActor();
+
     if( !mFocusChangedSignal.Empty() )
     {
-      mFocusChangedSignal.Emit(GetCurrentFocusActor(), actor);
+      mFocusChangedSignal.Emit(currentFocusedActor, actor);
+    }
+
+    Toolkit::Control currentlyFocusedControl = Toolkit::Control::DownCast(currentFocusedActor);
+    if( currentlyFocusedControl )
+    {
+      // Do we need it to remember if it was previously DISABLED?
+      currentlyFocusedControl.SetProperty(DevelControl::Property::STATE, DevelControl::NORMAL );
     }
 
     DALI_LOG_INFO( gLogFilter, Debug::General, "[%s:%d] Focus Changed\n", __FUNCTION__, __LINE__);
@@ -172,6 +182,12 @@ bool KeyboardFocusManager::DoSetCurrentFocusActor( const unsigned int actorID )
     // Save the current focused actor
     mCurrentFocusActor = actorID;
 
+    Toolkit::Control newlyFocusedControl = Toolkit::Control::DownCast(actor);
+    if( newlyFocusedControl )
+    {
+      newlyFocusedControl.SetProperty(DevelControl::Property::STATE, DevelControl::FOCUSED );
+    }
+
     // Push Current Focused Actor to FocusHistory
     mFocusHistory.PushBack( &actor.GetBaseObject() );
 
@@ -404,17 +420,23 @@ void KeyboardFocusManager::DoKeyboardEnter(Actor actor)
 void KeyboardFocusManager::ClearFocus()
 {
   Actor actor = GetCurrentFocusActor();
-  if(actor)
+  if( actor )
   {
-    if(mFocusIndicatorActor)
+    if( mFocusIndicatorActor )
     {
-      actor.Remove(mFocusIndicatorActor);
+      actor.Remove( mFocusIndicatorActor );
     }
 
     // Send notification for the change of focus actor
     if( !mFocusChangedSignal.Empty() )
     {
-      mFocusChangedSignal.Emit(actor, Actor());
+      mFocusChangedSignal.Emit( actor, Actor() );
+    }
+
+    Toolkit::Control currentlyFocusedControl = Toolkit::Control::DownCast( actor );
+    if( currentlyFocusedControl )
+    {
+      currentlyFocusedControl.SetProperty( DevelControl::Property::STATE, DevelControl::NORMAL );
     }
   }
 
@@ -627,6 +649,36 @@ void KeyboardFocusManager::OnKeyEvent(const KeyEvent& event)
 
       isFocusStartableKey = true;
     }
+    else if (keyName == "Prior" && !isAccessibilityEnabled)
+    {
+      if(!mIsFocusIndicatorEnabled)
+      {
+        // Show focus indicator
+        mIsFocusIndicatorEnabled = true;
+      }
+      else
+      {
+        // Move the focus towards the previous page
+        MoveFocus(Toolkit::Control::KeyboardFocus::PAGE_UP);
+      }
+
+      isFocusStartableKey = true;
+    }
+    else if (keyName == "Next" && !isAccessibilityEnabled)
+    {
+      if(!mIsFocusIndicatorEnabled)
+      {
+        // Show focus indicator
+        mIsFocusIndicatorEnabled = true;
+      }
+      else
+      {
+        // Move the focus towards the next page
+        MoveFocus(Toolkit::Control::KeyboardFocus::PAGE_DOWN);
+      }
+
+      isFocusStartableKey = true;
+    }
     else if (keyName == "Tab" && !isAccessibilityEnabled)
     {
       if(!mIsFocusIndicatorEnabled)
diff --git a/dali-toolkit/internal/helpers/property-helper.cpp b/dali-toolkit/internal/helpers/property-helper.cpp
new file mode 100644 (file)
index 0000000..94be023
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// HEADER
+#include <dali-toolkit/internal/helpers/property-helper.h>
+
+// EXTERNAL INCLUDES
+#include <dali/public-api/object/property-array.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Internal
+{
+
+bool GetStringFromProperty( const Property::Value& value, std::string& output )
+{
+  bool extracted = false;
+  if( value.Get( output ) )
+  {
+    extracted = true;
+  }
+  else
+  {
+    Property::Array* array = value.GetArray();
+    if( array )
+    {
+      const unsigned int arraySize = array->Size();
+      for( unsigned int i = 0; i < arraySize; ++i )
+      {
+        std::string element;
+        if( array->GetElementAt( i ).Get( element ) )
+        {
+          extracted = true;
+          output += element + '\n';
+        }
+        else
+        {
+          // If property in array is anything other than a string, then it is invalid so break and clear output.
+          output.clear();
+          extracted = false;
+          break;
+        }
+      }
+    }
+  }
+
+  return extracted;
+}
+
+} // namespace Internal
+
+} // namespace Toolkit
+
+} // namespace Dali
diff --git a/dali-toolkit/internal/helpers/property-helper.h b/dali-toolkit/internal/helpers/property-helper.h
new file mode 100644 (file)
index 0000000..e91062d
--- /dev/null
@@ -0,0 +1,52 @@
+#ifndef DALI_TOOLKIT_INTERNAL_PROPERTY_HELPER_H
+#define DALI_TOOLKIT_INTERNAL_PROPERTY_HELPER_H
+
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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 <string>
+#include <dali/public-api/object/property.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Internal
+{
+
+/**
+ * @brief Parses a Property::Value to retrieve the string.
+ *
+ * If value is a Property::STRING, then it simply extracts the required string.
+ * If value is a Property::ARRAY, then it combines all the strings it contains into one adding a newline character to each line.
+ * The second option allows users to write long strings over several lines in a JSON file.
+ *
+ * @return True if a string was extracted successfully.
+ */
+bool GetStringFromProperty( const Property::Value& value, std::string& output );
+
+} // namespace Internal
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+
+#endif // DALI_TOOLKIT_INTERNAL_PROPERTY_HELPER_H
index e02eba6..26ad3e0 100644 (file)
@@ -258,12 +258,11 @@ void AtlasPacker::GrowPack( SizeType blockWidth, SizeType blockHeight,
     firstFit = InsertNode( mRoot->child[1], blockWidth, blockHeight );
   }
 
-  if( firstFit != NULL )
-  {
-    firstFit->occupied = true;
-    packPositionX = firstFit->rectArea.x;
-    packPositionY = firstFit->rectArea.y;
-  }
+  DALI_ASSERT_ALWAYS( firstFit != NULL && "It should never happen!")
+
+  firstFit->occupied = true;
+  packPositionX = firstFit->rectArea.x;
+  packPositionY = firstFit->rectArea.y;
 }
 
 void AtlasPacker::GrowNode( SizeType blockWidth, SizeType blockHeight )
index da8fe90..d784d3e 100644 (file)
@@ -33,6 +33,7 @@ namespace Toolkit
 
 namespace Internal
 {
+typedef unsigned char PixelBuffer;
 
 Texture ImageAtlas::PackToAtlas( const std::vector<PixelData>& pixelData, Dali::Vector<Vector4>& textureRects  )
 {
index 2980627..25b50de 100644 (file)
@@ -22,7 +22,6 @@
 #include <dali/public-api/object/base-object.h>
 #include <dali/public-api/signals/connection-tracker.h>
 #include <dali/devel-api/common/owner-container.h>
-#include <dali/devel-api/images/atlas.h>
 #include <dali/devel-api/common/owner-container.h>
 
 // INTERNAL INCLUDES
index d1fa388..b38d23b 100644 (file)
@@ -25,6 +25,7 @@
 #include <dali/public-api/adaptor-framework/application.h>
 
 // INTERNAL INCLUDES
+#include <dali-toolkit/internal/builder/builder-impl.h>
 #include <dali-toolkit/public-api/controls/control.h>
 #include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/public-api/styling/style-manager.h>
@@ -291,7 +292,7 @@ bool StyleManager::LoadJSON( Toolkit::Builder builder, const std::string& jsonFi
   }
 }
 
-void StyleManager::CollectQualifiers( StringList& qualifiersOut )
+static void CollectQualifiers( std::vector<std::string>& qualifiersOut )
 {
   // Append the relevant qualifier for orientation
   int orientation = 0; // Get the orientation from the system
@@ -313,11 +314,24 @@ void StyleManager::CollectQualifiers( StringList& qualifiersOut )
   }
 }
 
-void StyleManager::BuildQualifiedStyleName( const std::string& styleName, const StringList& qualifiers, std::string& qualifiedStyleOut )
+/**
+ * @brief Construct a qualified style name out of qualifiers
+ *
+ * A qualifed style name will be in the format: style-qualifier0-qualifier1-qualifierN
+ *
+ * @param[in] styleName The root name of the style
+ * @param[in] qualifiers List of qualifier names
+ * @param[out] qualifiedStyleOut The qualified style name
+ */
+static void BuildQualifiedStyleName(
+  const std::string& styleName,
+  const std::vector<std::string>& qualifiers,
+  std::string& qualifiedStyleOut )
 {
   qualifiedStyleOut.append( styleName );
 
-  for( StringList::const_iterator it = qualifiers.begin(), itEnd = qualifiers.end(); it != itEnd; ++it )
+  for( std::vector<std::string>::const_iterator it = qualifiers.begin(),
+         itEnd = qualifiers.end(); it != itEnd; ++it )
   {
     const std::string& str = *it;
 
@@ -326,9 +340,9 @@ void StyleManager::BuildQualifiedStyleName( const std::string& styleName, const
   }
 }
 
-void StyleManager::ApplyStyle( Toolkit::Builder builder, Toolkit::Control control )
+static bool GetStyleNameForControl( Toolkit::Builder builder, Toolkit::Control control, std::string& styleName)
 {
-  std::string styleName = control.GetStyleName();
+  styleName = control.GetStyleName();
 
   if( styleName.empty() )
   {
@@ -336,22 +350,43 @@ void StyleManager::ApplyStyle( Toolkit::Builder builder, Toolkit::Control contro
   }
 
   // Apply the style after choosing the correct actual style (e.g. landscape or portrait)
-  StringList qualifiers;
+  std::vector<std::string> qualifiers;
   CollectQualifiers( qualifiers );
 
-  while( true )
+  bool found = 0;
+  std::string qualifiedStyleName;
+  do
   {
-    std::string qualifiedStyleName;
+    qualifiedStyleName.clear();
     BuildQualifiedStyleName( styleName, qualifiers, qualifiedStyleName );
 
     // Break if style found or we have tried the root style name (qualifiers is empty)
-    if( builder.ApplyStyle( qualifiedStyleName, control ) || qualifiers.size() == 0 )
+    if( GetImpl(builder).LookupStyleName( qualifiedStyleName ) )
+    {
+      found = true;
+      break;
+    }
+    if( qualifiers.size() == 0 )
     {
       break;
     }
-
     // Remove the last qualifier in an attempt to find a style that is valid
     qualifiers.pop_back();
+  } while (!found);
+
+  if(found)
+  {
+    styleName = qualifiedStyleName;
+  }
+  return found;
+}
+
+void StyleManager::ApplyStyle( Toolkit::Builder builder, Toolkit::Control control )
+{
+  std::string styleName = control.GetStyleName();
+  if( GetStyleNameForControl( builder, control, styleName ) )
+  {
+    builder.ApplyStyle( styleName, control );
   }
 
   if( mDefaultFontSize >= 0 )
@@ -363,6 +398,21 @@ void StyleManager::ApplyStyle( Toolkit::Builder builder, Toolkit::Control contro
   }
 }
 
+const StylePtr StyleManager::GetRecordedStyle( Toolkit::Control control )
+{
+  if( mThemeBuilder )
+  {
+    std::string styleName = control.GetStyleName();
+
+    if( GetStyleNameForControl( mThemeBuilder, control, styleName ) )
+    {
+      const StylePtr style = GetImpl(mThemeBuilder).GetStyle( styleName );
+      return style;
+    }
+  }
+  return StylePtr(NULL);
+}
+
 Toolkit::Builder StyleManager::FindCachedBuilder( const std::string& key )
 {
   BuilderMap::iterator builderIt = mBuilderCache.find( key );
index f0c217c..aa514ea 100644 (file)
@@ -29,6 +29,7 @@
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/styling/style-manager.h>
 #include <dali-toolkit/devel-api/builder/builder.h>
+#include <dali-toolkit/internal/builder/style.h>
 
 namespace Dali
 {
@@ -67,7 +68,7 @@ protected:
 
 public: // Public API
 
-/**
+  /**
    * @copydoc Toolkit::StyleManager::ApplyTheme
    */
   void ApplyTheme( const std::string& themeFile );
@@ -111,6 +112,13 @@ public: // Public API
    */
   void ApplyStyle( Toolkit::Control control, const std::string& jsonFileName, const std::string& styleName );
 
+  /**
+   * Get the state/style information for the given control
+   * @param[in] control The control to get state information for
+   * @return The style information (or empty ptr if not found)
+   */
+  const StylePtr GetRecordedStyle( Toolkit::Control control );
+
 public:
   // SIGNALS
 
@@ -164,24 +172,6 @@ private:
   bool LoadJSON( Toolkit::Builder builder, const std::string& jsonFileName );
 
   /**
-   * @brief Collect qualifiers (e.g. Landscape, portrait etc) for a given style
-   *
-   * @param[in,out] qualifiersOut The list to populate with qualifiers
-   */
-  void CollectQualifiers( StringList& qualifiersOut );
-
-  /**
-   * @brief Construct a qualified style name out of qualifiers
-   *
-   * A qualifed style name will be in the format: style-qualifier0-qualifier1-qualifierN
-   *
-   * @param[in] styleName The root name of the style
-   * @param[in] qualifiers List of qualifier names
-   * @param[out] qualifiedStyleOut The qualified style name
-   */
-  void BuildQualifiedStyleName( const std::string& styleName, const StringList& qualifiers, std::string& qualifiedStyleOut );
-
-  /**
    * @brief Apply a style to the control using the given builder
    *
    * @param[in] builder The builder to apply the style from
index 8532b93..12d39a5 100644 (file)
@@ -1,4 +1,4 @@
- /*
+/*
  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -61,12 +61,13 @@ void main()
 );
 
 const char* FRAGMENT_SHADER_RGBA = MAKE_SHADER(
+uniform lowp    vec4      uColor;
 uniform         sampler2D sTexture;
 varying mediump vec2      vTexCoord;
 
 void main()
 {
-  gl_FragColor = texture2D( sTexture, vTexCoord );
+  gl_FragColor = texture2D( sTexture, vTexCoord ) * uColor;
 }
 );
 
index 00fdc7a..3b567ef 100644 (file)
@@ -22,7 +22,6 @@
 #include <dali/public-api/common/dali-vector.h>
 #include <dali/public-api/images/buffer-image.h>
 #include <dali/public-api/rendering/texture-set.h>
-#include <dali/devel-api/images/atlas.h>
 
 namespace Dali
 {
index de437fb..2332c7a 100644 (file)
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/rendering/geometry.h>
 #include <dali/public-api/rendering/renderer.h>
+#include <dali/public-api/images/frame-buffer-image.h>
 #include <dali/devel-api/text-abstraction/font-client.h>
 #include <dali/integration-api/debug.h>
 
index 81b6554..424ac0b 100644 (file)
@@ -148,6 +148,7 @@ struct EventData
   bool mScrollAfterDelete               : 1;   ///< Whether to scroll after delete characters.
   bool mAllTextSelected                 : 1;   ///< True if the selection handles are selecting all the text.
   bool mUpdateInputStyle                : 1;   ///< Whether to update the input style after moving the cursor.
+  bool mCheckScrollAmount               : 1;   ///< Whether to check scrolled amount after updating the position
 };
 
 struct ModifyEvent
index 58def07..1bb0fed 100644 (file)
@@ -1344,16 +1344,17 @@ Vector3 Controller::GetNaturalSize()
                                                                            BIDI_INFO         |
                                                                            SHAPE_TEXT        |
                                                                            GET_GLYPH_METRICS );
+
+    // Set the update info to relayout the whole text.
+    mImpl->mTextUpdateInfo.mParagraphCharacterIndex = 0u;
+    mImpl->mTextUpdateInfo.mRequestedNumberOfCharacters = mImpl->mModel->mLogicalModel->mText.Count();
+
     // Make sure the model is up-to-date before layouting
     mImpl->UpdateModel( onlyOnceOperations );
 
     // Layout the text for the new width.
     mImpl->mOperationsPending = static_cast<OperationsMask>( mImpl->mOperationsPending | LAYOUT );
 
-    // Set the update info to relayout the whole text.
-    mImpl->mTextUpdateInfo.mParagraphCharacterIndex = 0u;
-    mImpl->mTextUpdateInfo.mRequestedNumberOfCharacters = mImpl->mModel->mLogicalModel->mText.Count();
-
     // Store the actual control's size to restore later.
     const Size actualControlSize = mImpl->mModel->mVisualModel->mControlSize;
 
@@ -1416,6 +1417,11 @@ float Controller::GetHeightForWidth( float width )
                                                                            BIDI_INFO         |
                                                                            SHAPE_TEXT        |
                                                                            GET_GLYPH_METRICS );
+
+    // Set the update info to relayout the whole text.
+    mImpl->mTextUpdateInfo.mParagraphCharacterIndex = 0u;
+    mImpl->mTextUpdateInfo.mRequestedNumberOfCharacters = mImpl->mModel->mLogicalModel->mText.Count();
+
     // Make sure the model is up-to-date before layouting
     mImpl->UpdateModel( onlyOnceOperations );
 
@@ -1423,10 +1429,6 @@ float Controller::GetHeightForWidth( float width )
     // Layout the text for the new width.
     mImpl->mOperationsPending = static_cast<OperationsMask>( mImpl->mOperationsPending | LAYOUT );
 
-    // Set the update info to relayout the whole text.
-    mImpl->mTextUpdateInfo.mParagraphCharacterIndex = 0u;
-    mImpl->mTextUpdateInfo.mRequestedNumberOfCharacters = mImpl->mModel->mLogicalModel->mText.Count();
-
     // Store the actual control's width.
     const float actualControlWidth = mImpl->mModel->mVisualModel->mControlSize.width;
 
@@ -1467,6 +1469,18 @@ const ModelInterface* const Controller::GetTextModel() const
   return mImpl->mModel.Get();
 }
 
+float Controller::GetScrollAmountByUserInput()
+{
+  float scrollAmount = 0.0f;
+
+  if (NULL != mImpl->mEventData && mImpl->mEventData->mCheckScrollAmount)
+  {
+    scrollAmount = mImpl->mModel->mScrollPosition.y -  mImpl->mModel->mScrollPositionLast.y;
+    mImpl->mEventData->mCheckScrollAmount = false;
+  }
+  return scrollAmount;
+}
+
 // public : Relayout.
 
 Controller::UpdateTextType Controller::Relayout( const Size& size )
@@ -1538,6 +1552,7 @@ Controller::UpdateTextType Controller::Relayout( const Size& size )
 
   // Do not re-do any operation until something changes.
   mImpl->mOperationsPending = NO_OPERATION;
+  mImpl->mModel->mScrollPositionLast = mImpl->mModel->mScrollPosition;
 
   // Whether the text control is editable
   const bool isEditable = NULL != mImpl->mEventData;
@@ -1686,6 +1701,8 @@ bool Controller::KeyEvent( const Dali::KeyEvent& keyEvent )
              ( Dali::DALI_KEY_CURSOR_UP    == keyCode ) ||
              ( Dali::DALI_KEY_CURSOR_DOWN  == keyCode ) )
     {
+      mImpl->mEventData->mCheckScrollAmount = true;
+
       Event event( Event::CURSOR_KEY_EVENT );
       event.p1.mInt = keyCode;
       mImpl->mEventData->mEventQueue.push_back( event );
@@ -1694,17 +1711,14 @@ bool Controller::KeyEvent( const Dali::KeyEvent& keyEvent )
     {
       textChanged = BackspaceKeyEvent();
     }
-    else if( IsKey( keyEvent,  Dali::DALI_KEY_POWER ) )
-    {
-      mImpl->ChangeState( EventData::INTERRUPTED ); // State is not INACTIVE as expect to return to edit mode.
-      // Avoids calling the InsertText() method which can delete selected text
-    }
-    else if( IsKey( keyEvent, Dali::DALI_KEY_MENU ) ||
+    else if( IsKey( keyEvent, Dali::DALI_KEY_POWER ) ||
+             IsKey( keyEvent, Dali::DALI_KEY_MENU ) ||
              IsKey( keyEvent, Dali::DALI_KEY_HOME ) )
     {
+      // Power key/Menu/Home key behaviour does not allow edit mode to resume.
       mImpl->ChangeState( EventData::INACTIVE );
-      // Menu/Home key behaviour does not allow edit mode to resume like Power key
-      // Avoids calling the InsertText() method which can delete selected text
+
+      // This branch avoids calling the InsertText() method of the 'else' branch which can delete selected text.
     }
     else if( Dali::DALI_KEY_SHIFT_LEFT == keyCode )
     {
@@ -2444,7 +2458,8 @@ bool Controller::RemoveText( int cursorOffset,
       numberOfCharacters = currentText.Count() - cursorIndex;
     }
 
-    if( ( cursorIndex + numberOfCharacters ) <= mImpl->mTextUpdateInfo.mPreviousNumberOfCharacters )
+    if( mImpl->mEventData->mPreEditFlag || // If the preedit flag is enabled, it means two (or more) of them came together i.e. when two keys have been pressed at the same time.
+        ( ( cursorIndex + numberOfCharacters ) <= mImpl->mTextUpdateInfo.mPreviousNumberOfCharacters ) )
     {
       // Mark the paragraphs to be updated.
       mImpl->mTextUpdateInfo.mCharacterIndex = std::min( cursorIndex, mImpl->mTextUpdateInfo.mCharacterIndex );
@@ -2792,6 +2807,8 @@ void Controller::TextInsertedEvent()
     return;
   }
 
+  mImpl->mEventData->mCheckScrollAmount = true;
+
   // The natural size needs to be re-calculated.
   mImpl->mRecalculateNaturalSize = true;
 
@@ -2808,6 +2825,8 @@ void Controller::TextDeletedEvent()
     return;
   }
 
+  mImpl->mEventData->mCheckScrollAmount = true;
+
   // The natural size needs to be re-calculated.
   mImpl->mRecalculateNaturalSize = true;
 
@@ -2834,6 +2853,7 @@ void Controller::SelectEvent( float x, float y, bool selectAll )
       mImpl->mEventData->mEventQueue.push_back( event );
     }
 
+    mImpl->mEventData->mCheckScrollAmount = true;
     mImpl->RequestRelayout();
   }
 }
index 6f4b864..f5b825e 100644 (file)
@@ -814,6 +814,13 @@ public: // Queries & retrieves.
    */
   const ModelInterface* const GetTextModel() const;
 
+  /**
+   * @brief Used to get scrolled distance by user input
+   *
+   * @return Distance from last scroll offset to new scroll offset
+   */
+  float GetScrollAmountByUserInput();
+
 public: // Relayout.
 
   /**
index 5de3e43..7eae0e1 100644 (file)
@@ -106,6 +106,7 @@ Model::Model()
 : mLogicalModel(),
   mVisualModel(),
   mScrollPosition(),
+  mScrollPositionLast(),
   mHorizontalAlignment( Layout::HORIZONTAL_ALIGN_BEGIN ),
   mVerticalAlignment( Layout::VERTICAL_ALIGN_TOP ),
   mAlignmentOffset( 0.0f ),
index e0dd85e..26b9f08 100644 (file)
@@ -156,6 +156,7 @@ public:
    * Typically this will have a negative value with scrolling occurs.
    */
   Vector2                     mScrollPosition;      ///< The text is offset by this position when scrolling.
+  Vector2                     mScrollPositionLast;  ///< The last offset value of mScrollPosition
   Layout::HorizontalAlignment mHorizontalAlignment; ///< The layout's horizontal alignment.
   Layout::VerticalAlignment   mVerticalAlignment;   ///< The layout's vertical alignment.
   float                       mAlignmentOffset;     ///< The alignment offset.
diff --git a/dali-toolkit/internal/text/text-vertical-scroller.cpp b/dali-toolkit/internal/text/text-vertical-scroller.cpp
new file mode 100644 (file)
index 0000000..b9d6606
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali-toolkit/internal/text/text-vertical-scroller.h>
+
+// EXTERNAL INCLUDES
+
+// INTERNAL INCLUDES
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace
+{
+
+const float DEFAULT_VERTICAL_SCROLL_DURATION(0.15f);     ///< Duration to complete scroll animation
+
+} // namespace
+
+namespace Text
+{
+
+TextVerticalScrollerPtr TextVerticalScroller::New()
+{
+  TextVerticalScrollerPtr textScroller( new TextVerticalScroller() );
+  return textScroller;
+}
+
+TextVerticalScroller::TextVerticalScroller()
+: mDuration( DEFAULT_VERTICAL_SCROLL_DURATION ),
+  mScrollTo( 0.0f )
+{
+}
+
+TextVerticalScroller::~TextVerticalScroller()
+{
+}
+
+void TextVerticalScroller::CheckStartAnimation( Actor& sourceActor, float x, float y, float scrollAmount )
+{
+  if ( Equals( scrollAmount, 0.0f, Math::MACHINE_EPSILON_1 ) )
+  {
+    // scroll animation isn't required, set position only
+    if( mScrollAnimation && mScrollAnimation.GetState() == Animation::PLAYING )
+    {
+      mScrollAnimation.Clear();
+    }
+    sourceActor.SetPosition( x, y );
+    return;
+  }
+  float toY = y + scrollAmount;
+  // Either actor or scroll area is changed, so restart animation
+  if( mScrollAnimation )
+  {
+    mScrollAnimation.Clear();
+  }
+  else
+  {
+    // Create animation at first
+    mScrollAnimation = Animation::New( mDuration );
+  }
+  mScrollingActor = sourceActor;
+  mScrollTo = toY;
+
+  // Set animation attribute
+  sourceActor.SetPosition( x, y );
+  mScrollAnimation.AnimateTo( Property(sourceActor, Actor::Property::POSITION_Y), mScrollTo, AlphaFunction::EASE_OUT_SINE );
+  mScrollAnimation.Play();
+}
+
+void TextVerticalScroller::SetDuration( float duration )
+{
+  mDuration = duration;
+}
+
+} // namespace Text
+
+} // namespace Toolkit
+
+} // namespace Dali
diff --git a/dali-toolkit/internal/text/text-vertical-scroller.h b/dali-toolkit/internal/text/text-vertical-scroller.h
new file mode 100644 (file)
index 0000000..f6a005a
--- /dev/null
@@ -0,0 +1,93 @@
+#ifndef DALI_TOOLKIT_TEXT_VERTICAL_SCROLLER_H
+#define DALI_TOOLKIT_TEXT_VERTICAL_SCROLLER_H
+
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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/actors/actor.h>
+#include <dali/public-api/animation/animation.h>
+
+// INTERNAL INCLUDES
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Text
+{
+
+class TextVerticalScroller;
+
+typedef IntrusivePtr<TextVerticalScroller> TextVerticalScrollerPtr;
+
+/**
+ * @brief A helper class for scrolling text vertically
+ */
+class TextVerticalScroller : public RefObject, public ConnectionTracker
+{
+public:
+
+  /**
+   * @brief Text Scrolling helper, used to automatically scroll text, StartScroll should be called when scrolling is needed.
+   *
+   */
+  static TextVerticalScrollerPtr New();
+
+  /**
+   * @brief variables required to set up scrolling animation
+   * @param[in] sourceActor actor to be animated
+   * @param[in] x The new x position
+   * @param[in] y The new y position
+   * @param[in] scrollAmount The distance to destination y position for actor to be animated
+   */
+  void CheckStartAnimation( Actor& sourceActor, float x, float y, float scrollAmount );
+
+  /**
+   * @brief Set duration the text should scroll
+   * @param[in] duration The duration in seconds
+   */
+  void SetDuration( float duration );
+
+private: // Implementation
+  /**
+   * Constructor
+   */
+  TextVerticalScroller();
+
+  /**
+   * @brief Virtual Destructor.
+   */
+  virtual ~TextVerticalScroller();
+
+private:
+
+  Animation          mScrollAnimation;          // Animation used to update the actor's position
+  Actor              mScrollingActor;           // The actor being animated
+  float              mDuration;                 // The duration of text scrolling
+  float              mScrollTo;                 // The destination y position
+}; // TextVerticalScroller class
+
+} // namespace Text
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // DALI_TOOLKIT_TEXT_VERTICAL_SCROLLER_H
index 5a3a154..2b58ce9 100644 (file)
@@ -40,6 +40,20 @@ namespace Toolkit
 namespace Internal
 {
 
+namespace
+{
+// wrap modes
+DALI_ENUM_TO_STRING_TABLE_BEGIN( WRAP_MODE )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::WrapMode, DEFAULT )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::WrapMode, CLAMP_TO_EDGE )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::WrapMode, REPEAT )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::WrapMode, MIRRORED_REPEAT )
+DALI_ENUM_TO_STRING_TABLE_END( WRAP_MODE )
+
+const Vector4 FULL_TEXTURE_RECT(0.f, 0.f, 1.f, 1.f);
+
+}
+
 AnimatedImageVisualPtr AnimatedImageVisual::New( VisualFactoryCache& factoryCache, const std::string& imageUrl, const Property::Map& properties )
 {
   AnimatedImageVisual* visual = new AnimatedImageVisual( factoryCache );
@@ -60,9 +74,12 @@ AnimatedImageVisualPtr AnimatedImageVisual::New( VisualFactoryCache& factoryCach
 AnimatedImageVisual::AnimatedImageVisual( VisualFactoryCache& factoryCache )
 : Visual::Base( factoryCache ),
   mFrameDelayTimer(),
+  mPixelArea( FULL_TEXTURE_RECT ),
   mImageUrl(),
   mImageSize(),
-  mCurrentFrameIndex( 0 )
+  mCurrentFrameIndex( 0 ),
+  mWrapModeU( WrapMode::DEFAULT ),
+  mWrapModeV( WrapMode::DEFAULT )
 {}
 
 AnimatedImageVisual::~AnimatedImageVisual()
@@ -83,16 +100,44 @@ void AnimatedImageVisual::GetNaturalSize( Vector2& naturalSize )
 void AnimatedImageVisual::DoCreatePropertyMap( Property::Map& map ) const
 {
   map.Clear();
+
   map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::IMAGE );
+
   if( !mImageUrl.empty() )
   {
     map.Insert( Toolkit::ImageVisual::Property::URL, mImageUrl );
   }
+
+  map.Insert( Toolkit::ImageVisual::Property::PIXEL_AREA, mPixelArea );
+  map.Insert( Toolkit::ImageVisual::Property::WRAP_MODE_U, mWrapModeU );
+  map.Insert( Toolkit::ImageVisual::Property::WRAP_MODE_V, mWrapModeV );
 }
 
 void AnimatedImageVisual::DoSetProperties( const Property::Map& propertyMap )
 {
   // url already passed in from constructor
+
+  Property::Value* pixelAreaValue = propertyMap.Find( Toolkit::ImageVisual::Property::PIXEL_AREA, PIXEL_AREA_UNIFORM_NAME );
+  if( pixelAreaValue )
+  {
+    pixelAreaValue->Get( mPixelArea );
+  }
+
+  Property::Value* wrapModeValueU = propertyMap.Find( Toolkit::ImageVisual::Property::WRAP_MODE_U, IMAGE_WRAP_MODE_U );
+  if( wrapModeValueU )
+  {
+    int value;
+    Scripting::GetEnumerationProperty( *wrapModeValueU, WRAP_MODE_TABLE, WRAP_MODE_TABLE_COUNT, value );
+    mWrapModeU = Dali::WrapMode::Type( value );
+  }
+
+  Property::Value* wrapModeValueV = propertyMap.Find( Toolkit::ImageVisual::Property::WRAP_MODE_V, IMAGE_WRAP_MODE_V );
+  if( wrapModeValueV )
+  {
+    int value;
+    Scripting::GetEnumerationProperty( *wrapModeValueV, WRAP_MODE_TABLE, WRAP_MODE_TABLE_COUNT, value );
+    mWrapModeV = Dali::WrapMode::Type( value );
+  }
 }
 
 void AnimatedImageVisual::DoSetOnStage( Actor& actor )
@@ -100,18 +145,34 @@ void AnimatedImageVisual::DoSetOnStage( Actor& actor )
   Texture texture = PrepareAnimatedImage();
   if( texture ) // if the image loading is successful
   {
-    Shader shader = ImageVisual::GetImageShader( mFactoryCache, true, true );
+    bool defaultWrapMode = mWrapModeU <= WrapMode::CLAMP_TO_EDGE && mWrapModeV <= WrapMode::CLAMP_TO_EDGE;
+    Shader shader = ImageVisual::GetImageShader( mFactoryCache, true, defaultWrapMode );
+
     Geometry geometry = mFactoryCache.GetGeometry( VisualFactoryCache::QUAD_GEOMETRY );
+
     TextureSet textureSet = TextureSet::New();
+    textureSet.SetTexture( 0u, texture );
+
     mImpl->mRenderer = Renderer::New( geometry, shader );
     mImpl->mRenderer.SetTextures( textureSet );
-    textureSet.SetTexture( 0u, PrepareAnimatedImage() );
-    mImpl->mRenderer.RegisterProperty( ATLAS_RECT_UNIFORM_NAME, mTextureRectContainer[0] );
 
     // Register transform properties
     mImpl->mTransform.RegisterUniforms( mImpl->mRenderer, Direction::LEFT_TO_RIGHT );
 
+    if( !defaultWrapMode ) // custom wrap mode
+    {
+      Vector2 wrapMode(mWrapModeU-WrapMode::CLAMP_TO_EDGE, mWrapModeV-WrapMode::CLAMP_TO_EDGE);
+      wrapMode.Clamp( Vector2::ZERO, Vector2( 2.f, 2.f ) );
+      mImpl->mRenderer.RegisterProperty( WRAP_MODE_UNIFORM_NAME, wrapMode );
+    }
+
+    if( mPixelArea != FULL_TEXTURE_RECT )
+    {
+      mImpl->mRenderer.RegisterProperty( PIXEL_AREA_UNIFORM_NAME, mPixelArea );
+    }
+
     mCurrentFrameIndex = 0;
+    mImpl->mRenderer.RegisterProperty( ATLAS_RECT_UNIFORM_NAME, mTextureRectContainer[mCurrentFrameIndex] );
     if( mFrameDelayContainer.Count() > 1 )
     {
       mFrameDelayTimer = Timer::New( mFrameDelayContainer[0] );
index 15dff43..d19fd09 100644 (file)
@@ -44,10 +44,24 @@ typedef IntrusivePtr< AnimatedImageVisual > AnimatedImageVisualPtr;
  *
  * The following property is essential
  *
- * | %Property Name           | Type             |
- * |--------------------------|------------------|
- * | url                      | STRING           |
+ * | %Property Name     | Type              |
+ * |------------------- |-------------------|
+ * | url                | STRING            |
+ * | pixelArea          | VECTOR4           |
+ * | wrapModeU          | INTEGER OR STRING |
+ * | wrapModeV          | INTEGER OR STRING |
  *
+ * where pixelArea is a rectangular area.
+ * In its Vector4 value, the first two elements indicate the top-left position of the area,
+ * and the last two elements are the area width and height respectively.
+ * If not specified, the default value is [0.0, 0.0, 1.0, 1.0], i.e. the entire area of the image.
+ *
+ * where wrapModeU and wrapModeV separately decide how the texture should be sampled when the u and v coordinate exceeds the range of 0.0 to 1.0.
+ * Its value should be one of the following wrap mode:
+ *   "DEFAULT"
+ *   "CLAMP_TO_EDGE"
+ *   "REPEAT"
+ *   "MIRRORED_REPEAT"
  */
 
 class AnimatedImageVisual : public Visual::Base, public ConnectionTracker
@@ -143,9 +157,13 @@ private:
   Timer mFrameDelayTimer;
   Dali::Vector<Vector4> mTextureRectContainer;
   Dali::Vector<uint32_t> mFrameDelayContainer;
+  Vector4 mPixelArea;
   std::string  mImageUrl;
+
   ImageDimensions mImageSize;
   uint32_t mCurrentFrameIndex;
+  Dali::WrapMode::Type mWrapModeU:3;
+  Dali::WrapMode::Type mWrapModeV:3;
 };
 
 } // namespace Internal
index 3811a64..05fa234 100644 (file)
@@ -82,10 +82,11 @@ const char* VERTEX_SHADER = DALI_COMPOSE_SHADER(
 const char* FRAGMENT_SHADER = DALI_COMPOSE_SHADER(
   uniform lowp vec4 uColor;\n
   uniform lowp vec4 borderColor;\n
+  uniform lowp vec4 mixColor;\n
   \n
   void main()\n
   {\n
-    gl_FragColor = borderColor*uColor;\n
+    gl_FragColor = mixColor*borderColor*uColor;\n
   }\n
 );
 
@@ -108,12 +109,13 @@ const char* VERTEX_SHADER_ANTI_ALIASING = DALI_COMPOSE_SHADER(
 const char* FRAGMENT_SHADER_ANTI_ALIASING = DALI_COMPOSE_SHADER(
   uniform lowp vec4 uColor;\n
   uniform lowp vec4 borderColor;\n
+  uniform lowp vec4 mixColor;\n
   uniform mediump float borderSize;\n
   varying mediump float vAlpha;\n
   \n
   void main()\n
   {\n
-    gl_FragColor = borderColor*uColor;\n
+    gl_FragColor = mixColor*borderColor*uColor;\n
     gl_FragColor.a *= smoothstep(0.0, 1.5, vAlpha)*smoothstep( borderSize+1.5, borderSize, vAlpha );\n
   }\n
 );
@@ -142,22 +144,60 @@ BorderVisual::~BorderVisual()
 
 void BorderVisual::DoSetProperties( const Property::Map& propertyMap )
 {
-  Property::Value* color = propertyMap.Find( Toolkit::BorderVisual::Property::COLOR, COLOR_NAME );
-  if( !( color && color->Get(mBorderColor) ) )
+  for( Property::Map::SizeType iter = 0; iter < propertyMap.Count(); ++iter )
   {
-    DALI_LOG_ERROR( "Fail to provide a border color to the BorderVisual object\n" );
-  }
-
-  Property::Value* size = propertyMap.Find( Toolkit::BorderVisual::Property::SIZE, SIZE_NAME );
-  if( !( size && size->Get(mBorderSize) ) )
-  {
-    DALI_LOG_ERROR( "Fail to provide a border size to the BorderVisual object\n" );
+    KeyValuePair keyValue = propertyMap.GetKeyValue( iter );
+    if( keyValue.first.type == Property::Key::INDEX )
+    {
+      DoSetProperty( keyValue.first.indexKey, keyValue.second );
+    }
+    else
+    {
+      if( keyValue.first == COLOR_NAME )
+      {
+        DoSetProperty( Toolkit::BorderVisual::Property::COLOR, keyValue.second );
+      }
+      else if( keyValue.first == SIZE_NAME )
+      {
+        DoSetProperty( Toolkit::BorderVisual::Property::SIZE, keyValue.second );
+      }
+      else if( keyValue.first == ANTI_ALIASING )
+      {
+        DoSetProperty( Toolkit::BorderVisual::Property::ANTI_ALIASING, keyValue.second );
+      }
+    }
   }
+}
 
-  Property::Value* antiAliasing = propertyMap.Find( Toolkit::BorderVisual::Property::ANTI_ALIASING, ANTI_ALIASING );
-  if( antiAliasing )
+void BorderVisual::DoSetProperty( Dali::Property::Index index,
+                                  const Dali::Property::Value& value )
+{
+  switch( index )
   {
-    antiAliasing->Get( mAntiAliasing );
+    case Toolkit::BorderVisual::Property::COLOR:
+    {
+      if( !value.Get( mBorderColor ) )
+      {
+        DALI_LOG_ERROR("BorderVisual: borderColor property has incorrect type\n");
+      }
+      break;
+    }
+    case Toolkit::BorderVisual::Property::SIZE:
+    {
+      if( !value.Get( mBorderSize ) )
+      {
+        DALI_LOG_ERROR("BorderVisual: borderSize property has incorrect type\n");
+      }
+      break;
+    }
+    case Toolkit::BorderVisual::Property::ANTI_ALIASING:
+    {
+      if( !value.Get( mAntiAliasing ) )
+      {
+        DALI_LOG_ERROR("BorderVisual: antiAliasing property has incorrect type\n");
+      }
+      break;
+    }
   }
 }
 
@@ -178,7 +218,7 @@ void BorderVisual::DoSetOnStage( Actor& actor )
 void BorderVisual::DoCreatePropertyMap( Property::Map& map ) const
 {
   map.Clear();
-  map.Insert( DevelVisual::Property::TYPE, Toolkit::Visual::BORDER );
+  map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::BORDER );
   map.Insert( Toolkit::BorderVisual::Property::COLOR, mBorderColor );
   map.Insert( Toolkit::BorderVisual::Property::SIZE, mBorderSize );
   map.Insert( Toolkit::BorderVisual::Property::ANTI_ALIASING, mAntiAliasing );
@@ -201,13 +241,11 @@ void BorderVisual::InitializeRenderer()
     mFactoryCache.SaveGeometry( VisualFactoryCache::BORDER_GEOMETRY, geometry );
   }
 
-
   Shader shader = GetBorderShader();
   mImpl->mRenderer = Renderer::New( geometry, shader  );
 
   //Register transform properties
   mImpl->mTransform.RegisterUniforms( mImpl->mRenderer, Direction::LEFT_TO_RIGHT );
-
 }
 
 void BorderVisual::SetBorderColor(const Vector4& color)
index c9d6465..7efb142 100644 (file)
@@ -134,6 +134,13 @@ private:
    */
   Geometry CreateBorderGeometry();
 
+  /**
+   * Helper method to set individual values by index key.
+   * @param[in] index The index key of the value
+   * @param[in] value The value
+   */
+  void DoSetProperty( Property::Index index, const Property::Value& value );
+
   // Undefined
   BorderVisual( const BorderVisual& borderRenderer );
 
index 5bc3c6e..6313211 100644 (file)
@@ -41,7 +41,6 @@ namespace Internal
 
 namespace
 {
-const char * const COLOR_NAME("mixColor");
 
 const char* VERTEX_SHADER = DALI_COMPOSE_SHADER(
   attribute mediump vec2 aPosition;\n
@@ -88,8 +87,7 @@ ColorVisualPtr ColorVisual::New( VisualFactoryCache& factoryCache, const Propert
 }
 
 ColorVisual::ColorVisual( VisualFactoryCache& factoryCache )
-: Visual::Base( factoryCache ),
-  mMixColorIndex( Property::INVALID_INDEX )
+: Visual::Base( factoryCache )
 {
 }
 
@@ -99,10 +97,20 @@ ColorVisual::~ColorVisual()
 
 void ColorVisual::DoSetProperties( const Property::Map& propertyMap )
 {
-  Property::Value* color = propertyMap.Find( Toolkit::ColorVisual::Property::MIX_COLOR, COLOR_NAME );
-  if( !( color && color->Get(mMixColor) ) )
+  // By virtue of DoSetProperties being called last, this will override
+  // anything set by DevelVisual::Property::MIX_COLOR
+  Property::Value* colorValue = propertyMap.Find( Toolkit::ColorVisual::Property::MIX_COLOR, MIX_COLOR );
+  if( colorValue )
   {
-    DALI_LOG_ERROR( "Fail to provide a color to the ColorVisual object\n" );
+    Vector4 color;
+    if( colorValue->Get( color ) )
+    {
+      SetMixColor( color );
+    }
+    else
+    {
+      DALI_LOG_ERROR("ColorVisual: mixColor property has incorrect type\n");
+    }
   }
 }
 
@@ -117,7 +125,7 @@ void ColorVisual::DoCreatePropertyMap( Property::Map& map ) const
 {
   map.Clear();
   map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::COLOR );
-  map.Insert( Toolkit::ColorVisual::Property::MIX_COLOR, mMixColor );
+  map.Insert( Toolkit::ColorVisual::Property::MIX_COLOR, mImpl->mMixColor );
 }
 
 void ColorVisual::OnSetTransform()
@@ -141,30 +149,19 @@ void ColorVisual::InitializeRenderer()
 
   mImpl->mRenderer = Renderer::New( geometry, shader );
 
-  mMixColorIndex = DevelHandle::RegisterProperty( mImpl->mRenderer, Toolkit::ColorVisual::Property::MIX_COLOR, COLOR_NAME, mMixColor );
-  if( mMixColor.a < 1.f )
+  // ColorVisual has it's own index key for mix color - use this instead
+  // of using the new base index to avoid changing existing applications
+  // String keys will get to this property.
+  mImpl->mMixColorIndex = DevelHandle::RegisterProperty( mImpl->mRenderer, Toolkit::ColorVisual::Property::MIX_COLOR, MIX_COLOR, mImpl->mMixColor );
+  if( mImpl->mMixColor.a < 1.f )
   {
     mImpl->mRenderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON );
   }
 
-  //Register transform properties
+  // Register transform properties
   mImpl->mTransform.RegisterUniforms( mImpl->mRenderer, Direction::LEFT_TO_RIGHT );
 }
 
-void ColorVisual::SetColor(const Vector4& color)
-{
-  mMixColor = color;
-
-  if( mImpl->mRenderer )
-  {
-    (mImpl->mRenderer).SetProperty( mMixColorIndex, color );
-    if( color.a < 1.f )
-    {
-      mImpl->mRenderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON );
-    }
-  }
-}
-
 } // namespace Internal
 
 } // namespace Toolkit
index 99758d1..e5f6df1 100644 (file)
@@ -94,14 +94,6 @@ protected:
    */
   virtual void OnSetTransform();
 
-public:
-
-  /**
-   * Set the color for rendering.
-   * @param[in] color The color to be rendered.
-   */
-  void SetColor( const Vector4& color );
-
 private:
   /**
    * @brief Initialize the renderer with the geometry and shader from the cache, if not available, create and save to the cache for sharing.
@@ -115,12 +107,6 @@ private:
 
   // Undefined
   ColorVisual& operator=( const ColorVisual& colorRenderer );
-
-private:
-
-  Vector4 mMixColor;
-  Property::Index mMixColorIndex;
-
 };
 
 } // namespace Internal
index 7826984..7f58d66 100644 (file)
@@ -172,11 +172,12 @@ const char* FRAGMENT_SHADER[] =
 DALI_COMPOSE_SHADER(
   uniform sampler2D sTexture;\n // sampler1D?
   uniform lowp vec4 uColor;\n
+  uniform lowp vec4 mixColor;\n
   varying mediump vec2 vTexCoord;\n
   \n
   void main()\n
   {\n
-    gl_FragColor = texture2D( sTexture, vec2( vTexCoord.y, 0.5 ) ) * uColor;\n
+      gl_FragColor = texture2D( sTexture, vec2( vTexCoord.y, 0.5 ) ) * vec4(mixColor.rgb*mixColor.a, mixColor.a) * uColor;\n
   }\n
 ),
 
@@ -184,11 +185,12 @@ DALI_COMPOSE_SHADER(
 DALI_COMPOSE_SHADER(
   uniform sampler2D sTexture;\n // sampler1D?
   uniform lowp vec4 uColor;\n
+  uniform lowp vec4 mixColor;\n
   varying mediump vec2 vTexCoord;\n
   \n
   void main()\n
   {\n
-    gl_FragColor = texture2D( sTexture, vec2( length(vTexCoord), 0.5 ) ) * uColor;\n
+    gl_FragColor = texture2D( sTexture, vec2( length(vTexCoord), 0.5 ) ) * vec4(mixColor.rgb*mixColor.a, mixColor.a) * uColor;\n
   }\n
 )
 };
diff --git a/dali-toolkit/internal/visuals/image/batch-image-visual.cpp b/dali-toolkit/internal/visuals/image/batch-image-visual.cpp
deleted file mode 100644 (file)
index f5b4392..0000000
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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 "batch-image-visual.h"
-
-// EXTERNAL HEADER
-#include <cstring> // for strncasecmp
-#include <dali/public-api/images/resource-image.h>
-#include <dali/public-api/images/native-image.h>
-#include <dali/integration-api/debug.h>
-#include <dali/devel-api/adaptor-framework/bitmap-loader.h>
-#include <dali/devel-api/rendering/renderer-devel.h>
-#include <dali/public-api/images/pixel-data.h>
-#include <dali/public-api/rendering/texture.h>
-#include <dali/public-api/rendering/texture-set.h>
-#include <dali/public-api/rendering/texture-set.h>
-
-// INTERNAL HEADER
-#include <dali-toolkit/public-api/visuals/image-visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
-#include <dali-toolkit/internal/visuals/visual-factory-impl.h>
-#include <dali-toolkit/internal/visuals/visual-factory-cache.h>
-#include <dali-toolkit/internal/visuals/visual-base-impl.h>
-#include <dali-toolkit/internal/visuals/visual-base-data-impl.h>
-#include <dali-toolkit/internal/visuals/visual-string-constants.h>
-#include <dali-toolkit/internal/visuals/image-atlas-manager.h>
-
-namespace Dali
-{
-
-namespace Toolkit
-{
-
-namespace Internal
-{
-
-namespace
-{
-const char HTTP_URL[] = "http://";
-const char HTTPS_URL[] = "https://";
-
-// Properties:
-const char * const DESIRED_WIDTH( "desiredWidth" );
-const char * const DESIRED_HEIGHT( "desiredHeight" );
-
-const Vector4 FULL_TEXTURE_RECT( 0.f, 0.f, 1.f, 1.f );
-
-// The shader used for batched rendering. It uses interleaved data for
-// attributes. Limitation is that all batched renderers will share same set of uniforms.
-const char* VERTEX_SHADER = DALI_COMPOSE_SHADER(
-  attribute mediump vec2 aPosition;\n
-  attribute mediump vec2 aTexCoord;\n
-  uniform mediump mat4 uMvpMatrix;\n
-  varying mediump vec2 vTexCoord;\n
-  \n
-  void main()\n
-  {\n
-    vTexCoord = aTexCoord;\n
-    gl_Position = uMvpMatrix * vec4( aPosition, 0.0, 1.0 );\n
-  }\n
-);
-
-const char* FRAGMENT_SHADER = DALI_COMPOSE_SHADER(
-  varying mediump vec2 vTexCoord;\n
-  uniform sampler2D sTexture;\n
-  uniform lowp vec4 uColor;\n
-  uniform lowp float uAlphaBlending; // Set to 1.0 for conventional alpha blending; if pre-multiplied alpha blending, set to 0.0
-  \n
-  void main()\n
-  {\n
-    gl_FragColor = texture2D( sTexture, vTexCoord ) * vec4( uColor.rgb*max( uAlphaBlending, uColor.a ), uColor.a );\n
-  }\n
-);
-
-} // unnamed namespace
-
-BatchImageVisualPtr BatchImageVisual::New( VisualFactoryCache& factoryCache, const std::string& url, const Property::Map& properties )
-{
-  BatchImageVisualPtr visual = new BatchImageVisual( factoryCache );
-  visual->mImageUrl = url;
-  visual->SetProperties( properties );
-
-  return visual;
-}
-
-BatchImageVisual::BatchImageVisual( VisualFactoryCache& factoryCache )
-: Visual::Base( factoryCache ),
-  mImageUrl(""),
-  mDesiredSize()
-{
-}
-
-BatchImageVisual::~BatchImageVisual()
-{
-}
-
-void BatchImageVisual::DoSetProperties( const Property::Map& propertyMap )
-{
-  // url already passed in constructor
-
-  int desiredWidth = 0;
-  Property::Value* desiredWidthValue = propertyMap.Find( Dali::Toolkit::ImageVisual::Property::DESIRED_WIDTH, DESIRED_WIDTH );
-  if( desiredWidthValue )
-  {
-    desiredWidthValue->Get( desiredWidth );
-  }
-
-  int desiredHeight = 0;
-  Property::Value* desiredHeightValue = propertyMap.Find( Dali::Toolkit::ImageVisual::Property::DESIRED_HEIGHT, DESIRED_HEIGHT );
-  if( desiredHeightValue )
-  {
-    desiredHeightValue->Get( desiredHeight );
-  }
-
-  mDesiredSize = ImageDimensions( desiredWidth, desiredHeight );
-}
-
-void BatchImageVisual::GetNaturalSize( Vector2& naturalSize )
-{
-  if( mDesiredSize.GetWidth() > 0 && mDesiredSize.GetHeight() > 0 )
-  {
-    naturalSize.x = mDesiredSize.GetWidth();
-    naturalSize.y = mDesiredSize.GetHeight();
-    return;
-  }
-  else if( !mImageUrl.empty() )
-  {
-    ImageDimensions dimentions = ResourceImage::GetImageSize( mImageUrl );
-    naturalSize.x = dimentions.GetWidth();
-    naturalSize.y = dimentions.GetHeight();
-    return;
-  }
-
-  naturalSize = Vector2::ZERO;
-}
-
-void BatchImageVisual::InitializeRenderer( const std::string& imageUrl )
-{
-  if( imageUrl.empty() )
-  {
-    return;
-  }
-
-  mImageUrl = imageUrl;
-  mImpl->mRenderer.Reset();
-  mAtlasRect = FULL_TEXTURE_RECT;
-
-  if( !mImpl->mCustomShader &&
-      ( strncasecmp( imageUrl.c_str(),HTTP_URL,  sizeof( HTTP_URL )  -1 ) != 0 ) && // Ignore remote images
-      ( strncasecmp( imageUrl.c_str(), HTTPS_URL, sizeof( HTTPS_URL ) -1 ) != 0 ) )
-  {
-    if( !mImpl->mRenderer )
-    {
-      TextureSet textureSet = mFactoryCache.GetAtlasManager()->Add(
-            mAtlasRect,
-            imageUrl,
-            mDesiredSize );
-
-      // If image doesn't fit the atlas, create new texture set with texture that
-      // is used as whole.
-      if( !textureSet )
-      {
-        BitmapLoader loader = BitmapLoader::New( imageUrl, mDesiredSize );
-        loader.Load();
-        Dali::PixelData pixelData = loader.GetPixelData();
-        Texture texture = Texture::New( TextureType::TEXTURE_2D,
-                                        pixelData.GetPixelFormat(),
-                                        pixelData.GetWidth(),
-                                        pixelData.GetHeight() );
-        texture.Upload( pixelData );
-        textureSet = TextureSet::New();
-        textureSet.SetTexture( 0, texture );
-        mAtlasRect = FULL_TEXTURE_RECT;
-      }
-
-      Geometry geometry = mFactoryCache.CreateBatchQuadGeometry( mAtlasRect );
-      Shader shader( GetBatchShader( mFactoryCache ) );
-      mImpl->mRenderer = Renderer::New( geometry, shader );
-      mImpl->mRenderer.SetTextures( textureSet );
-
-      // Turn batching on, to send message it must be on stage.
-      mImpl->mRenderer.SetProperty( Dali::DevelRenderer::Property::BATCHING_ENABLED, true );
-    }
-    mImpl->mFlags |= Impl::IS_FROM_CACHE;
-  }
-}
-
-void BatchImageVisual::DoSetOnStage( Actor& actor )
-{
-  if( !mImageUrl.empty() )
-  {
-    InitializeRenderer( mImageUrl );
-  }
-  // Turn batching on, to send message it must be on stage
-  mImpl->mRenderer.SetProperty( Dali::DevelRenderer::Property::BATCHING_ENABLED, true );
-
-  actor.AddRenderer( mImpl->mRenderer );
-}
-
-void BatchImageVisual::DoSetOffStage( Actor& actor )
-{
-  actor.RemoveRenderer( mImpl->mRenderer );
-
-  // If we own the image then make sure we release it when we go off stage
-  if( !mImageUrl.empty() )
-  {
-    CleanCache( mImageUrl );
-  }
-  else
-  {
-    mImpl->mRenderer.Reset();
-  }
-}
-
-void BatchImageVisual::DoCreatePropertyMap( Property::Map& map ) const
-{
-  map.Clear();
-  map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::IMAGE );
-
-  if( !mImageUrl.empty() )
-  {
-    map.Insert( Toolkit::ImageVisual::Property::URL, mImageUrl );
-    map.Insert( Toolkit::ImageVisual::Property::BATCHING_ENABLED, true );
-    map.Insert( Toolkit::ImageVisual::Property::DESIRED_WIDTH, mDesiredSize.GetWidth() );
-    map.Insert( Toolkit::ImageVisual::Property::DESIRED_HEIGHT, mDesiredSize.GetHeight() );
-  }
-}
-
-Shader BatchImageVisual::GetBatchShader( VisualFactoryCache& factoryCache )
-{
-  Shader shader = factoryCache.GetShader( VisualFactoryCache::BATCH_IMAGE_SHADER );
-  if( !shader )
-  {
-    shader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER );
-    factoryCache.SaveShader( VisualFactoryCache::BATCH_IMAGE_SHADER, shader );
-  }
-  return shader;
-}
-
-void BatchImageVisual::CleanCache(const std::string& url)
-{
-  TextureSet textureSet = mImpl->mRenderer.GetTextures();
-  mImpl->mRenderer.Reset();
-  if( mFactoryCache.CleanRendererCache( url ) )
-  {
-    mFactoryCache.GetAtlasManager()->Remove( textureSet, mAtlasRect );
-  }
-}
-
-void BatchImageVisual::OnSetTransform()
-{
-  if( mImpl->mRenderer )
-  {
-    //Register transform properties
-    mImpl->mTransform.RegisterUniforms( mImpl->mRenderer, Direction::LEFT_TO_RIGHT );
-  }
-}
-
-} // namespace Internal
-
-} // namespace Toolkit
-
-} // namespace Dali
diff --git a/dali-toolkit/internal/visuals/image/batch-image-visual.h b/dali-toolkit/internal/visuals/image/batch-image-visual.h
deleted file mode 100644 (file)
index 84953f5..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-#ifndef DALI_TOOLKIT_INTERNAL_BATCH_IMAGE_VISUAL_H
-#define DALI_TOOLKIT_INTERNAL_BATCH_IMAGE_VISUAL_H
-
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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/common/intrusive-ptr.h>
-
-// INTERNAL HEADER
-#include <dali-toolkit/internal/visuals/visual-base-impl.h>
-#include <dali-toolkit/internal/visuals/image-atlas-manager.h>
-
-namespace Dali
-{
-namespace Toolkit
-{
-namespace Internal
-{
-
-class BatchImageVisual;
-typedef IntrusivePtr< BatchImageVisual > BatchImageVisualPtr;
-
-class BatchImageVisual: public Visual::Base, public ConnectionTracker
-{
-public:
-
-  /**
-   * @brief Create a new batch-image visual.
-   *
-   * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
-   * @param[in] url The URL of the image to use
-   * @param[in] properties A Property::Map containing settings for this visual
-   * @return A smart-pointer to the newly allocated visual.
-   */
-  static BatchImageVisualPtr New( VisualFactoryCache& factoryCache, const std::string& url, const Property::Map& properties = Property::Map() );
-
-public:  // from Visual
-
-  /**
-   * @copydoc Visual::Base::GetNaturalSize
-   */
-  virtual void GetNaturalSize( Vector2& naturalSize );
-
-  /**
-   * @copydoc Visual::Base::CreatePropertyMap
-   */
-  virtual void DoCreatePropertyMap( Property::Map& map ) const;
-
-protected:
-
-  /**
-   * @brief Constructor.
-   *
-   * @param[in] factoryCache The VisualFactoryCache object
-   */
-  BatchImageVisual( VisualFactoryCache& factoryCache );
-
-  /**
-   * @brief A reference counted object may only be deleted by calling Unreference().
-   */
-  ~BatchImageVisual();
-
-  /**
-   * @copydoc Visua::Base::DoSetProperties
-   */
-  virtual void DoSetProperties( const Property::Map& propertyMap );
-
-  /**
-   * @copydoc Visual::Base::DoSetOnStage
-   */
-  virtual void DoSetOnStage( Actor& actor );
-
-  /**
-   * @copydoc Visual::Base::DoSetOffStage
-   */
-  virtual void DoSetOffStage( Actor& actor );
-
-  /**
-   * @copydoc Visual::Base::OnSetTransform
-   */
-  virtual void OnSetTransform();
-
-private:
-
-  /**
-   * Get the batch image rendering shader.
-   * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
-   */
-  static Shader GetBatchShader( VisualFactoryCache& factoryCache );
-
-  /**
-   * @brief Initializes the Dali::Renderer from an image url string
-   *
-   * @param[in] imageUrl The image url string to intialize this ImageVisual from
-   */
-  void InitializeRenderer( const std::string& imageUrl );
-
-  /**
-   * Clean the Visual from cache, and remove the image from atlas if it is not used anymore
-   */
-  void CleanCache( const std::string& url );
-
-private:
-
-  Vector4                 mAtlasRect;
-  std::string             mImageUrl;
-  Dali::ImageDimensions   mDesiredSize;
-};
-
-} // namespace Internal
-
-} // namespace Toolkit
-
-} // namespace Dali
-
-#endif // DALI_TOOLKIT_INTERNAL_BATCH_IMAGE_VISUAL_H
index b61c23b..a0197cd 100644 (file)
@@ -22,7 +22,6 @@
 #include <cstring> // for strncasecmp
 #include <dali/public-api/images/resource-image.h>
 #include <dali/public-api/images/native-image.h>
-#include <dali/devel-api/images/atlas.h>
 #include <dali/devel-api/images/texture-set-image.h>
 #include <dali/devel-api/adaptor-framework/bitmap-loader.h>
 #include <dali/devel-api/scripting/enum-helper.h>
@@ -58,10 +57,7 @@ const char * const IMAGE_FITTING_MODE( "fittingMode" );
 const char * const IMAGE_SAMPLING_MODE( "samplingMode" );
 const char * const IMAGE_DESIRED_WIDTH( "desiredWidth" );
 const char * const IMAGE_DESIRED_HEIGHT( "desiredHeight" );
-const char * const IMAGE_WRAP_MODE_U("wrapModeU");
-const char * const IMAGE_WRAP_MODE_V("wrapModeV");
 const char * const SYNCHRONOUS_LOADING( "synchronousLoading" );
-const char * const BATCHING_ENABLED( "batchingEnabled" );
 
 // fitting modes
 DALI_ENUM_TO_STRING_TABLE_BEGIN( FITTING_MODE )
@@ -91,9 +87,6 @@ DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::WrapMode, REPEAT )
 DALI_ENUM_TO_STRING_WITH_SCOPE( Dali::WrapMode, MIRRORED_REPEAT )
 DALI_ENUM_TO_STRING_TABLE_END( WRAP_MODE )
 
-const std::string PIXEL_AREA_UNIFORM_NAME = "pixelArea";
-const std::string WRAP_MODE_UNIFORM_NAME = "wrapMode";
-
 const Vector4 FULL_TEXTURE_RECT(0.f, 0.f, 1.f, 1.f);
 
 const char* DEFAULT_SAMPLER_TYPENAME = "sampler2D";
@@ -132,10 +125,16 @@ const char* FRAGMENT_SHADER_NO_ATLAS = DALI_COMPOSE_SHADER(
   varying mediump vec2 vTexCoord;\n
   uniform sampler2D sTexture;\n
   uniform lowp vec4 uColor;\n
+  uniform lowp vec4 mixColor;\n
+  uniform lowp float preMultipliedAlpha;\n
   \n
+  lowp vec4 visualMixColor()\n
+  {\n
+    return vec4( mixColor.rgb * mix( 1.0, mixColor.a, preMultipliedAlpha ), mixColor.a );\n
+  }\n
   void main()\n
   {\n
-    gl_FragColor = texture2D( sTexture, vTexCoord ) * uColor;\n
+      gl_FragColor = texture2D( sTexture, vTexCoord ) * uColor * visualMixColor();\n
   }\n
 );
 
@@ -144,12 +143,19 @@ const char* FRAGMENT_SHADER_ATLAS_CLAMP = DALI_COMPOSE_SHADER(
     uniform sampler2D sTexture;\n
     uniform mediump vec4 uAtlasRect;\n
     uniform lowp vec4 uColor;\n
+    uniform lowp vec4 mixColor;\n
+    uniform lowp float preMultipliedAlpha;\n
     \n
-    void main()\n
+    lowp vec4 visualMixColor()\n
     {\n
-      mediump vec2 texCoord = clamp( mix( uAtlasRect.xy, uAtlasRect.zw, vTexCoord ), uAtlasRect.xy, uAtlasRect.zw );\n
-      gl_FragColor = texture2D( sTexture, texCoord ) * uColor;\n
+        return vec4( mixColor.rgb * mix( 1.0, mixColor.a, preMultipliedAlpha ), mixColor.a );\n
     }\n
+    \n
+    void main()\n
+    {\n
+        mediump vec2 texCoord = clamp( mix( uAtlasRect.xy, uAtlasRect.zw, vTexCoord ), uAtlasRect.xy, uAtlasRect.zw );\n
+        gl_FragColor = texture2D( sTexture, texCoord ) * uColor * visualMixColor();\n
+     }\n
 );
 
 const char* FRAGMENT_SHADER_ATLAS_VARIOUS_WRAP = DALI_COMPOSE_SHADER(
@@ -159,6 +165,8 @@ const char* FRAGMENT_SHADER_ATLAS_VARIOUS_WRAP = DALI_COMPOSE_SHADER(
     // WrapMode -- 0: CLAMP; 1: REPEAT; 2: REFLECT;
     uniform lowp vec2 wrapMode;\n
     uniform lowp vec4 uColor;\n
+    uniform lowp vec4 mixColor;\n
+    uniform lowp float preMultipliedAlpha;\n
     \n
     mediump float wrapCoordinate( mediump vec2 range, mediump float coordinate, lowp float wrap )\n
     {\n
@@ -170,11 +178,16 @@ const char* FRAGMENT_SHADER_ATLAS_VARIOUS_WRAP = DALI_COMPOSE_SHADER(
       return clamp( mix(range.x, range.y, coord), range.x, range.y );
     }\n
     \n
+    lowp vec4 visualMixColor()\n
+    {\n
+      return vec4( mixColor.rgb * mix( 1.0, mixColor.a, preMultipliedAlpha ), mixColor.a );\n
+    }\n
+    \n
     void main()\n
     {\n
-      mediump vec2 texCoord = vec2( wrapCoordinate( uAtlasRect.xz, vTexCoord.x, wrapMode.x ),
-                                    wrapCoordinate( uAtlasRect.yw, vTexCoord.y, wrapMode.y ) );\n
-      gl_FragColor = texture2D( sTexture, texCoord ) * uColor;\n
+        mediump vec2 texCoord = vec2( wrapCoordinate( uAtlasRect.xz, vTexCoord.x, wrapMode.x ),
+                                      wrapCoordinate( uAtlasRect.yw, vTexCoord.y, wrapMode.y ) );\n
+        gl_FragColor = texture2D( sTexture, texCoord ) * uColor * visualMixColor();\n
     }\n
 );
 
@@ -263,86 +276,149 @@ ImageVisual::~ImageVisual()
 void ImageVisual::DoSetProperties( const Property::Map& propertyMap )
 {
   // Url is already received in constructor
-  Property::Value* fittingValue = propertyMap.Find( Toolkit::ImageVisual::Property::FITTING_MODE, IMAGE_FITTING_MODE );
-  if( fittingValue )
+  for( Property::Map::SizeType iter = 0; iter < propertyMap.Count(); ++iter )
   {
-    int value;
-    Scripting::GetEnumerationProperty( *fittingValue, FITTING_MODE_TABLE, FITTING_MODE_TABLE_COUNT, value );
-    mFittingMode = Dali::FittingMode::Type( value );
+    KeyValuePair keyValue = propertyMap.GetKeyValue( iter );
+    if( keyValue.first.type == Property::Key::INDEX )
+    {
+      DoSetProperty( keyValue.first.indexKey, keyValue.second );
+    }
+    else
+    {
+      if( keyValue.first == IMAGE_FITTING_MODE )
+      {
+        DoSetProperty( Toolkit::ImageVisual::Property::FITTING_MODE, keyValue.second );
+      }
+      else if( keyValue.first == IMAGE_SAMPLING_MODE )
+      {
+        DoSetProperty( Toolkit::ImageVisual::Property::SAMPLING_MODE, keyValue.second );
+      }
+      else if( keyValue.first == IMAGE_DESIRED_WIDTH )
+      {
+        DoSetProperty( Toolkit::ImageVisual::Property::DESIRED_WIDTH, keyValue.second );
+      }
+      else if( keyValue.first == IMAGE_DESIRED_HEIGHT )
+      {
+        DoSetProperty( Toolkit::ImageVisual::Property::DESIRED_HEIGHT, keyValue.second );
+      }
+      else if( keyValue.first == PIXEL_AREA_UNIFORM_NAME )
+      {
+        DoSetProperty( Toolkit::ImageVisual::Property::PIXEL_AREA, keyValue.second );
+      }
+      else if( keyValue.first == IMAGE_WRAP_MODE_U )
+      {
+        DoSetProperty( Toolkit::ImageVisual::Property::WRAP_MODE_U, keyValue.second );
+      }
+      else if( keyValue.first == IMAGE_WRAP_MODE_V )
+      {
+        DoSetProperty( Toolkit::ImageVisual::Property::WRAP_MODE_V, keyValue.second );
+      }
+      else if( keyValue.first == SYNCHRONOUS_LOADING )
+      {
+        DoSetProperty( Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING, keyValue.second );
+      }
+    }
   }
 
-  Property::Value* samplingValue = propertyMap.Find( Toolkit::ImageVisual::Property::SAMPLING_MODE, IMAGE_SAMPLING_MODE );
-  if( samplingValue )
+  if( mImpl->mFlags & Impl::IS_SYNCHRONOUS_RESOURCE_LOADING && mImageUrl.size() > 0u )
   {
-    int value;
-    Scripting::GetEnumerationProperty( *samplingValue, SAMPLING_MODE_TABLE, SAMPLING_MODE_TABLE_COUNT, value );
-    mSamplingMode = Dali::SamplingMode::Type( value );
+    // if sync loading is required, the loading should start
+    // immediately when new image url is set or the actor is off stage
+    // ( for on-stage actor with image url unchanged, resource loading
+    // is already finished )
+    LoadResourceSynchronously();
   }
+}
 
-  // Use a variable to detect if the width or height have been modified by the property map.
-  bool desiredSizeSpecified = false;
-  int desiredWidth = 0;
-  Property::Value* desiredWidthValue = propertyMap.Find( Toolkit::ImageVisual::Property::DESIRED_WIDTH, IMAGE_DESIRED_WIDTH );
-  if( desiredWidthValue )
+void ImageVisual::DoSetProperty( Property::Index index, const Property::Value& value )
+{
+  switch( index )
   {
-    desiredWidthValue->Get( desiredWidth );
-    desiredSizeSpecified = true;
-  }
+    case Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING:
+    {
+      bool sync;
+      if( value.Get( sync ) )
+      {
+        if( sync )
+        {
+          mImpl->mFlags |= Impl::IS_SYNCHRONOUS_RESOURCE_LOADING;
+        }
+        else
+        {
+          mImpl->mFlags &= ~Impl::IS_SYNCHRONOUS_RESOURCE_LOADING;
+        }
+      }
+      else
+      {
+        DALI_LOG_ERROR("ImageVisual: synchronousLoading property has incorrect type\n");
+      }
+      break;
+    }
 
-  int desiredHeight = 0;
-  Property::Value* desiredHeightValue = propertyMap.Find( Toolkit::ImageVisual::Property::DESIRED_HEIGHT, IMAGE_DESIRED_HEIGHT );
-  if( desiredHeightValue )
-  {
-    desiredHeightValue->Get( desiredHeight );
-    desiredSizeSpecified = true;
-  }
+    case Toolkit::ImageVisual::Property::DESIRED_WIDTH:
+    {
+      float desiredWidth;
+      if( value.Get( desiredWidth ) )
+      {
+        mDesiredSize.SetWidth( desiredWidth );
+      }
+      else
+      {
+        DALI_LOG_ERROR("ImageVisual: desiredWidth property has incorrect type\n");
+      }
+      break;
+    }
 
-  // Only update the desired size if specified in the property map.
-  if( desiredSizeSpecified )
-  {
-    mDesiredSize = ImageDimensions( desiredWidth, desiredHeight );
-  }
+    case Toolkit::ImageVisual::Property::DESIRED_HEIGHT:
+    {
+      float desiredHeight;
+      if( value.Get( desiredHeight ) )
+      {
+        mDesiredSize.SetHeight( desiredHeight );
+      }
+      else
+      {
+        DALI_LOG_ERROR("ImageVisual: desiredHeight property has incorrect type\n");
+      }
+      break;
+    }
 
-  Property::Value* pixelAreaValue = propertyMap.Find( Toolkit::ImageVisual::Property::PIXEL_AREA, PIXEL_AREA_UNIFORM_NAME );
-  if( pixelAreaValue )
-  {
-    pixelAreaValue->Get( mPixelArea );
-  }
+    case Toolkit::ImageVisual::Property::FITTING_MODE:
+    {
+      int fittingMode;
+      Scripting::GetEnumerationProperty( value, FITTING_MODE_TABLE, FITTING_MODE_TABLE_COUNT, fittingMode );
+      mFittingMode = Dali::FittingMode::Type( fittingMode );
+      break;
+    }
 
-  Property::Value* wrapModeValueU = propertyMap.Find( Toolkit::ImageVisual::Property::WRAP_MODE_U, IMAGE_WRAP_MODE_U );
-  if( wrapModeValueU )
-  {
-    int value;
-    Scripting::GetEnumerationProperty( *wrapModeValueU, WRAP_MODE_TABLE, WRAP_MODE_TABLE_COUNT, value );
-    mWrapModeU = Dali::WrapMode::Type( value );
-  }
+    case Toolkit::ImageVisual::Property::SAMPLING_MODE:
+    {
+      int samplingMode;
+      Scripting::GetEnumerationProperty( value, SAMPLING_MODE_TABLE, SAMPLING_MODE_TABLE_COUNT, samplingMode );
+      mSamplingMode = Dali::SamplingMode::Type( samplingMode );
+      break;
+    }
 
-  Property::Value* wrapModeValueV = propertyMap.Find( Toolkit::ImageVisual::Property::WRAP_MODE_V, IMAGE_WRAP_MODE_V );
-  if( wrapModeValueV )
-  {
-    int value;
-    Scripting::GetEnumerationProperty( *wrapModeValueV, WRAP_MODE_TABLE, WRAP_MODE_TABLE_COUNT, value );
-    mWrapModeV = Dali::WrapMode::Type( value );
-  }
+    case Toolkit::ImageVisual::Property::PIXEL_AREA:
+    {
+      value.Get( mPixelArea );
+      break;
+    }
 
-  Property::Value* syncLoading = propertyMap.Find( Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING, SYNCHRONOUS_LOADING );
-  if( syncLoading )
-  {
-    bool sync;
-    syncLoading->Get( sync );
-    if( sync )
+    case Toolkit::ImageVisual::Property::WRAP_MODE_U:
     {
-      mImpl->mFlags |= Impl::IS_SYNCHRONOUS_RESOURCE_LOADING;
-      // if sync loading is required, the loading should start immediately when new image url is set or the actor is off stage
-      // ( for on-stage actor with image url unchanged, resource loading is already finished)
-      if( mImageUrl.size() > 0u )
-      {
-        LoadResourceSynchronously();
-      }
+      int wrapMode;
+      Scripting::GetEnumerationProperty( value, WRAP_MODE_TABLE, WRAP_MODE_TABLE_COUNT, wrapMode );
+      mWrapModeU = Dali::WrapMode::Type( wrapMode );
+      break;
     }
-    else
+
+    case Toolkit::ImageVisual::Property::WRAP_MODE_V:
     {
-      mImpl->mFlags &= ~Impl::IS_SYNCHRONOUS_RESOURCE_LOADING;
+      int wrapMode;
+      Scripting::GetEnumerationProperty( value, WRAP_MODE_TABLE, WRAP_MODE_TABLE_COUNT, wrapMode );
+      mWrapModeV = Dali::WrapMode::Type( wrapMode );
+      break;
     }
   }
 }
@@ -599,7 +675,6 @@ void ImageVisual::InitializeRenderer( const std::string& imageUrl )
 
 void ImageVisual::InitializeRenderer( const Image& image )
 {
-
   mImpl->mFlags &= ~Impl::IS_FROM_CACHE;
 
   // don't reuse CreateTextureSet
@@ -643,7 +718,7 @@ void ImageVisual::DoSetOnStage( Actor& actor )
     InitializeRenderer( mImage );
   }
 
-  if ( !mImpl->mRenderer)
+  if ( !mImpl->mRenderer )
   {
     return;
   }
index 56c45fb..52312ea 100644 (file)
@@ -48,14 +48,29 @@ typedef IntrusivePtr< ImageVisual > ImageVisualPtr;
  *
  * The following properties are optional
  *
- * | %Property Name     | Type             |
- * |--------------------|------------------|
- * | url                | STRING           |
- * | fittingMode        | STRING           |
- * | samplingMode       | STRING           |
- * | desiredWidth       | INT              |
- * | desiredHeight      | INT              |
- * | synchronousLoading | BOOLEAN          |
+ * | %Property Name     | Type              |
+ * |--------------------|-------------------|
+ * | url                | STRING            |
+ * | fittingMode        | INTEGER OR STRING |
+ * | samplingMode       | INTEGER OR STRING |
+ * | desiredWidth       | INTEGER           |
+ * | desiredHeight      | INTEGER           |
+ * | synchronousLoading | BOOLEAN           |
+ * | pixelArea          | VECTOR4           |
+ * | wrapModeU          | INTEGER OR STRING |
+ * | wrapModeV          | INTEGER OR STRING |
+ *
+ * where pixelArea is a rectangular area.
+ * In its Vector4 value, the first two elements indicate the top-left position of the area,
+ * and the last two elements are the area width and height respectively.
+ * If not specified, the default value is [0.0, 0.0, 1.0, 1.0], i.e. the entire area of the image.
+ *
+ * where wrapModeU and wrapModeV separately decide how the texture should be sampled when the u and v coordinate exceeds the range of 0.0 to 1.0.
+ * Its value should be one of the following wrap mode:
+ *   "DEFAULT"
+ *   "CLAMP_TO_EDGE"
+ *   "REPEAT"
+ *   "MIRRORED_REPEAT"
  *
  * where imageFittingMode should be one of the following fitting modes:
  *   "SHRINK_TO_FIT"
@@ -280,6 +295,13 @@ private:
    */
   void CleanCache(const std::string& url);
 
+  /**
+   * Helper method to set individual values by index key.
+   * @param[in] index The index key of the value
+   * @param[in] value The value
+   */
+  void DoSetProperty( Property::Index index, const Property::Value& value );
+
 private:
 
   Image mImage;
index 41b99ad..73140cf 100644 (file)
@@ -164,10 +164,16 @@ const char* SIMPLE_FRAGMENT_SHADER = DALI_COMPOSE_SHADER(
   precision mediump float;\n
   varying mediump vec3 vIllumination;\n
   uniform lowp vec4 uColor;\n
+  uniform lowp vec4 mixColor;\n
+  uniform lowp float preMultipliedAlpha;\n
 
+  lowp vec4 visualMixColor()\n
+  {\n
+    return vec4( mixColor.rgb * mix( 1.0, mixColor.a, preMultipliedAlpha ), mixColor.a );\n
+  }\n
   void main()\n
   {\n
-    gl_FragColor = vec4( vIllumination.rgb * uColor.rgb, uColor.a );\n
+    gl_FragColor = vec4( vIllumination.rgb * uColor.rgb, uColor.a ) * visualMixColor();\n
   }\n
 );
 
@@ -241,11 +247,18 @@ const char* FRAGMENT_SHADER = DALI_COMPOSE_SHADER(
   varying mediump float vSpecular;\n
   uniform sampler2D sDiffuse;\n
   uniform lowp vec4 uColor;\n
+  uniform lowp vec4 mixColor;\n
+  uniform lowp float preMultipliedAlpha;\n
 
+  lowp vec4 visualMixColor()\n
+  {\n
+    return vec4( mixColor.rgb * mix( 1.0, mixColor.a, preMultipliedAlpha ), mixColor.a );\n
+  }\n
   void main()\n
   {\n
     vec4 texture = texture2D( sDiffuse, vTexCoord );\n
-    gl_FragColor = vec4( vIllumination.rgb * texture.rgb * uColor.rgb + vSpecular * 0.3, texture.a * uColor.a );\n
+    vec4 visualMixColor = visualMixColor();\n
+    gl_FragColor = vec4( vIllumination.rgb * texture.rgb * uColor.rgb * visualMixColor.rgb + vSpecular * 0.3, texture.a * uColor.a * visualMixColor.a );\n
   }\n
 );
 
@@ -326,19 +339,26 @@ const char* NORMAL_MAP_FRAGMENT_SHADER = DALI_COMPOSE_SHADER(
   uniform sampler2D sNormal;\n
   uniform sampler2D sGloss;\n
   uniform lowp vec4 uColor;\n
+  uniform lowp vec4 mixColor;\n
+  uniform lowp float preMultipliedAlpha;\n
 
+  lowp vec4 visualMixColor()\n
+  {\n
+    return vec4( mixColor.rgb * mix( 1.0, mixColor.a, preMultipliedAlpha ), mixColor.a );\n
+  }\n
   void main()\n
   {\n
     vec4 texture = texture2D( sDiffuse, vTexCoord );\n
     vec3 normal = normalize( texture2D( sNormal, vTexCoord ).xyz * 2.0 - 1.0 );\n
     vec4 glossMap = texture2D( sGloss, vTexCoord );\n
+    vec4 visualMixColor = visualMixColor();\n
 
     float lightDiffuse = max( 0.0, dot( normal, normalize( vLightDirection ) ) );\n
     lightDiffuse = lightDiffuse * 0.5 + 0.5;\n
 
     float shininess = pow ( max ( dot ( normalize( vHalfVector ), normal ), 0.0 ), 16.0 )  ;
 
-    gl_FragColor = vec4( texture.rgb * uColor.rgb * lightDiffuse + shininess * glossMap.rgb, texture.a * uColor.a );\n
+    gl_FragColor = vec4( texture.rgb * uColor.rgb * visualMixColor.rgb * lightDiffuse + shininess * glossMap.rgb, texture.a * uColor.a * visualMixColor.a );\n
   }\n
 );
 
@@ -366,60 +386,119 @@ MeshVisual::~MeshVisual()
 
 void MeshVisual::DoSetProperties( const Property::Map& propertyMap )
 {
-  Property::Value* objectUrl = propertyMap.Find( Toolkit::MeshVisual::Property::OBJECT_URL, OBJECT_URL_NAME );
-  if( !objectUrl || !objectUrl->Get( mObjectUrl ) )
+  for( Property::Map::SizeType iter = 0; iter < propertyMap.Count(); ++iter )
   {
-    DALI_LOG_ERROR( "Fail to provide object URL to the MeshVisual object.\n" );
+    KeyValuePair keyValue = propertyMap.GetKeyValue( iter );
+    if( keyValue.first.type == Property::Key::INDEX )
+    {
+      DoSetProperty( keyValue.first.indexKey, keyValue.second );
+    }
+    else
+    {
+      if( keyValue.first == OBJECT_URL_NAME )
+      {
+        DoSetProperty( Toolkit::MeshVisual::Property::OBJECT_URL, keyValue.second );
+      }
+      else if( keyValue.first == MATERIAL_URL_NAME )
+      {
+        DoSetProperty( Toolkit::MeshVisual::Property::MATERIAL_URL, keyValue.second );
+      }
+      else if( keyValue.first == TEXTURES_PATH_NAME )
+      {
+        DoSetProperty( Toolkit::MeshVisual::Property::TEXTURES_PATH, keyValue.second );
+      }
+      else if( keyValue.first == SHADING_MODE_NAME )
+      {
+        DoSetProperty( Toolkit::MeshVisual::Property::SHADING_MODE, keyValue.second );
+      }
+      else if( keyValue.first == USE_MIPMAPPING_NAME )
+      {
+        DoSetProperty( Toolkit::MeshVisual::Property::USE_MIPMAPPING, keyValue.second );
+      }
+      else if( keyValue.first == USE_SOFT_NORMALS_NAME )
+      {
+        DoSetProperty( Toolkit::MeshVisual::Property::USE_SOFT_NORMALS, keyValue.second );
+      }
+      else if( keyValue.first == LIGHT_POSITION_NAME )
+      {
+        DoSetProperty( Toolkit::MeshVisual::Property::LIGHT_POSITION, keyValue.second );
+      }
+    }
   }
 
-  Property::Value* materialUrl = propertyMap.Find( Toolkit::MeshVisual::Property::MATERIAL_URL, MATERIAL_URL_NAME );
-  if( !materialUrl || !materialUrl->Get( mMaterialUrl ) || mMaterialUrl.empty() )
+  if( mMaterialUrl.empty() )
   {
     mUseTexture = false;
   }
 
-  Property::Value* imagesUrl = propertyMap.Find( Toolkit::MeshVisual::Property::TEXTURES_PATH, TEXTURES_PATH_NAME );
-  if( !imagesUrl || !imagesUrl->Get( mTexturesPath ) )
+  if( mLightPosition == Vector3::ZERO )
   {
-    //Default behaviour is to assume files are in the same directory,
-    // or have their locations detailed in full when supplied.
-    mTexturesPath.clear();
-  }
-
-  Property::Value* shadingMode = propertyMap.Find( Toolkit::MeshVisual::Property::SHADING_MODE, SHADING_MODE_NAME );
-  if( shadingMode )
-  {
-    Scripting::GetEnumerationProperty( *shadingMode, SHADING_MODE_TABLE, SHADING_MODE_TABLE_COUNT, mShadingMode );
-  }
-
-  Property::Value* useMipmapping = propertyMap.Find( Toolkit::MeshVisual::Property::USE_MIPMAPPING, USE_MIPMAPPING_NAME );
-  if( useMipmapping )
-  {
-    useMipmapping->Get( mUseMipmapping );
-  }
+    // Default behaviour is to place the light directly in front of the object,
+    // at a reasonable distance to light everything on screen.
+    Stage stage = Stage::GetCurrent();
 
-  Property::Value* useSoftNormals = propertyMap.Find( Toolkit::MeshVisual::Property::USE_SOFT_NORMALS, USE_SOFT_NORMALS_NAME );
-  if( useSoftNormals )
-  {
-    useSoftNormals->Get( mUseSoftNormals );
+    mLightPosition = Vector3( stage.GetSize().width / 2, stage.GetSize().height / 2, stage.GetSize().width * 5 );
   }
+}
 
-  Property::Value* lightPosition = propertyMap.Find( Toolkit::MeshVisual::Property::LIGHT_POSITION, LIGHT_POSITION_NAME );
-  if( lightPosition )
+void MeshVisual::DoSetProperty( Property::Index index, const Property::Value& value )
+{
+  switch( index )
   {
-    if( !lightPosition->Get( mLightPosition ) )
+    case Toolkit::MeshVisual::Property::OBJECT_URL:
     {
-      DALI_LOG_ERROR( "Invalid value passed for light position in MeshRenderer object.\n" );
-      mLightPosition = Vector3::ZERO;
+      if( !value.Get( mObjectUrl ) )
+      {
+        DALI_LOG_ERROR("MeshVisual: property objectUrl is the wrong type, use STRING\n");
+      }
+      break;
+    }
+    case Toolkit::MeshVisual::Property::MATERIAL_URL:
+    {
+      if( ! value.Get( mMaterialUrl ) )
+      {
+        DALI_LOG_ERROR("MeshVisual: property materialUrl is the wrong type, use STRING\n");
+      }
+      break;
+    }
+    case Toolkit::MeshVisual::Property::TEXTURES_PATH:
+    {
+      if( ! value.Get( mTexturesPath ) )
+      {
+        mTexturesPath.clear();
+      }
+      break;
+    }
+    case Toolkit::MeshVisual::Property::SHADING_MODE:
+    {
+      Scripting::GetEnumerationProperty( value, SHADING_MODE_TABLE, SHADING_MODE_TABLE_COUNT, mShadingMode );
+      break;
+    }
+    case Toolkit::MeshVisual::Property::USE_MIPMAPPING:
+    {
+      if( !value.Get( mUseMipmapping ) )
+      {
+        DALI_LOG_ERROR("MeshVisual: property useMipmapping is the wrong type, use BOOLEAN\n");
+      }
+      break;
+    }
+    case Toolkit::MeshVisual::Property::USE_SOFT_NORMALS:
+    {
+      if( !value.Get( mUseSoftNormals ) )
+      {
+        DALI_LOG_ERROR("MeshVisual: property useSoftNormals is the wrong type, use BOOLEAN\n");
+      }
+      break;
+    }
+    case Toolkit::MeshVisual::Property::LIGHT_POSITION:
+    {
+      if( !value.Get( mLightPosition ) )
+      {
+        mLightPosition = Vector3::ZERO;
+        DALI_LOG_ERROR("MeshVisual: property lightPosition is the wrong type, use VECTOR3\n");
+      }
+      break;
     }
-  }
-  else
-  {
-    //Default behaviour is to place the light directly in front of the object,
-    // at a reasonable distance to light everything on screen.
-    Stage stage = Stage::GetCurrent();
-
-    mLightPosition = Vector3( stage.GetSize().width / 2, stage.GetSize().height / 2, stage.GetSize().width * 5 );
   }
 }
 
index c28b1b2..2c227a3 100644 (file)
@@ -165,6 +165,13 @@ private:
    */
   bool LoadTextures();
 
+  /**
+   * Helper method to set individual values by index key.
+   * @param[in] index The index key of the value
+   * @param[in] value The value
+   */
+  void DoSetProperty( Property::Index index, const Property::Value& value );
+
 private:
 
   // Undefined
index 3af7b72..b2f0cbb 100644 (file)
@@ -110,7 +110,7 @@ const char* VERTEX_SHADER_3X3 = DALI_COMPOSE_SHADER(
       vec2 visualOffset = mix( offset, offset/uSize.xy, offsetSizeMode.xy);\n
 
       mediump vec2 scale        = vec2( length( uModelMatrix[ 0 ].xyz ), length( uModelMatrix[ 1 ].xyz ) );\n
-      mediump vec2 size         = visualSize.xy * scale;\n
+      mediump vec2 size         = visualSize.xy;\n
       \n
       mediump vec2 fixedFactor  = vec2( uFixed[ int( ( aPosition.x + 1.0 ) * 0.5 ) ].x, uFixed[ int( ( aPosition.y  + 1.0 ) * 0.5 ) ].y );\n
       mediump vec2 stretch      = floor( aPosition * 0.5 );\n
@@ -118,7 +118,7 @@ const char* VERTEX_SHADER_3X3 = DALI_COMPOSE_SHADER(
       \n
       mediump vec4 vertexPosition = vec4( fixedFactor + ( size - fixedTotal ) * stretch, 0.0, 1.0 );
       vertexPosition.xy -= size * vec2( 0.5, 0.5 );\n
-      vertexPosition.xy =  vertexPosition.xy / scale + anchorPoint*size + (visualOffset + origin)*uSize.xy;\
+      vertexPosition.xy =  vertexPosition.xy + anchorPoint*size + (visualOffset + origin)*uSize.xy;\
       \n
       vertexPosition = uMvpMatrix * vertexPosition;\n
       \n
@@ -132,10 +132,15 @@ const char* FRAGMENT_SHADER = DALI_COMPOSE_SHADER(
   varying mediump vec2 vTexCoord;\n
   uniform sampler2D sTexture;\n
   uniform lowp vec4 uColor;\n
-  \n
+  uniform lowp vec4 mixColor;\n
+  uniform lowp float preMultipliedAlpha;\n
+  lowp vec4 visualMixColor()\n
+  {\n
+    return vec4( mixColor.rgb * mix( 1.0, mixColor.a, preMultipliedAlpha ), mixColor.a );\n
+  }\n
   void main()\n
   {\n
-    gl_FragColor = texture2D( sTexture, vTexCoord ) * uColor;\n
+    gl_FragColor = texture2D( sTexture, vTexCoord ) * uColor * visualMixColor();\n
   }\n
 );
 
index 4fb6e82..78f4c88 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -56,7 +56,6 @@ DALI_ENUM_TO_STRING_TABLE_END( SHAPE_TYPE )
 
 //Property names
 const char * const PRIMITIVE_SHAPE( "shape" );
-const char * const SHAPE_COLOR( "mixColor" );
 const char * const SLICES( "slices" );
 const char * const STACKS( "stacks" );
 const char * const SCALE_TOP_RADIUS( "scaleTopRadius" );
@@ -99,7 +98,6 @@ const char * const BEVELLED_CUBE_LABEL( "BEVELLED_CUBE" );
 
 //Shader properties
 const char * const OBJECT_MATRIX_UNIFORM_NAME( "uObjectMatrix" );
-const char * const COLOR_UNIFORM_NAME( "mixColor" );
 const char * const OBJECT_DIMENSIONS_UNIFORM_NAME( "uObjectDimensions" );
 const char * const STAGE_OFFSET_UNIFORM_NAME( "uStageOffset" );
 
@@ -138,6 +136,7 @@ const char* VERTEX_SHADER = DALI_COMPOSE_SHADER(
     vec3 originFlipY =  vec3(origin.x, -origin.y, 0.0);
     vec3 anchorPointFlipY = vec3( anchorPoint.x, -anchorPoint.y, 0.0);
     vec3 offset = vec3( ( offset / uSize.xy ) * offsetSizeMode.xy + offset * (1.0-offsetSizeMode.xy), 0.0) * vec3(1.0,-1.0,1.0);\n
+
     return vec4( (aPosition + anchorPointFlipY)*scaleFactor + (offset + originFlipY)*uSize, 1.0 );\n
   }\n
 
@@ -147,18 +146,18 @@ const char* VERTEX_SHADER = DALI_COMPOSE_SHADER(
     vec4 vertexPosition = uObjectMatrix * normalisedVertexPosition;\n
     vertexPosition = uMvpMatrix * vertexPosition;\n
 
-    //Illumination in Model-View space - Transform attributes and uniforms\n
-    vec4 mvVertexPosition = uModelView * normalisedVertexPosition;\n
-    vec3 normal = uNormalMatrix * mat3( uObjectMatrix ) * aNormal;\n
+     //Illumination in Model-View space - Transform attributes and uniforms\n
+     vec4 mvVertexPosition = uModelView * normalisedVertexPosition;\n
+     vec3 normal = uNormalMatrix * mat3( uObjectMatrix ) * aNormal;\n
 
-    vec4 mvLightPosition = vec4( ( lightPosition.xy - uStageOffset ), lightPosition.z, 1.0 );\n
-    mvLightPosition = uViewMatrix * mvLightPosition;\n
-    vec3 vectorToLight = normalize( mvLightPosition.xyz - mvVertexPosition.xyz );\n
+     vec4 mvLightPosition = vec4( ( lightPosition.xy - uStageOffset ), lightPosition.z, 1.0 );\n
+     mvLightPosition = uViewMatrix * mvLightPosition;\n
+     vec3 vectorToLight = normalize( mvLightPosition.xyz - mvVertexPosition.xyz );\n
 
-    float lightDiffuse = max( dot( vectorToLight, normal ), 0.0 );\n
-    vIllumination = vec3( lightDiffuse * 0.5 + 0.5 );\n
+     float lightDiffuse = max( dot( vectorToLight, normal ), 0.0 );\n
+     vIllumination = vec3( lightDiffuse * 0.5 + 0.5 );\n
 
-    gl_Position = vertexPosition;\n
+     gl_Position = vertexPosition;\n
   }\n
 );
 
@@ -187,7 +186,6 @@ PrimitiveVisualPtr PrimitiveVisual::New( VisualFactoryCache& factoryCache, const
 
 PrimitiveVisual::PrimitiveVisual( VisualFactoryCache& factoryCache )
 : Visual::Base( factoryCache ),
-  mColor( DEFAULT_COLOR ),
   mScaleDimensions( Vector3::ONE ),
   mScaleTopRadius( DEFAULT_SCALE_TOP_RADIUS ),
   mScaleBottomRadius( DEFAULT_SCALE_BOTTOM_RADIUS ),
@@ -199,6 +197,7 @@ PrimitiveVisual::PrimitiveVisual( VisualFactoryCache& factoryCache )
   mStacks( DEFAULT_STACKS ),
   mPrimitiveType( Toolkit::PrimitiveVisual::Shape::SPHERE )
 {
+  mImpl->mMixColor = DEFAULT_COLOR;
 }
 
 PrimitiveVisual::~PrimitiveVisual()
@@ -218,12 +217,16 @@ void PrimitiveVisual::DoSetProperties( const Property::Map& propertyMap )
     DALI_LOG_ERROR( "Fail to provide shape to the PrimitiveVisual object.\n" );
   }
 
-  //Read in other potential properties.
-
-  Property::Value* color = propertyMap.Find( Toolkit::PrimitiveVisual::Property::MIX_COLOR, SHAPE_COLOR );
-  if( color && !color->Get( mColor ) )
+  // By virtue of DoSetProperties being called last, this will override
+  // anything set by DevelVisual::Property::MIX_COLOR
+  Property::Value* colorValue = propertyMap.Find( Toolkit::PrimitiveVisual::Property::MIX_COLOR, MIX_COLOR );
+  if( colorValue )
   {
-    DALI_LOG_ERROR( "Invalid type for color in PrimitiveVisual.\n" );
+    Vector4 color;
+    if( colorValue->Get( color ) )
+    {
+      SetMixColor( color );
+    }
   }
 
   Property::Value* slices = propertyMap.Find( Toolkit::PrimitiveVisual::Property::SLICES, SLICES );
@@ -412,8 +415,8 @@ void PrimitiveVisual::DoCreatePropertyMap( Property::Map& map ) const
 {
   map.Clear();
   map.Insert( Toolkit::DevelVisual::Property::TYPE, Toolkit::Visual::PRIMITIVE );
+  map.Insert( Toolkit::PrimitiveVisual::Property::MIX_COLOR, mImpl->mMixColor );
   map.Insert( Toolkit::PrimitiveVisual::Property::SHAPE, mPrimitiveType );
-  map.Insert( Toolkit::PrimitiveVisual::Property::MIX_COLOR, mColor );
   map.Insert( Toolkit::PrimitiveVisual::Property::SLICES, mSlices );
   map.Insert( Toolkit::PrimitiveVisual::Property::STACKS, mStacks );
   map.Insert( Toolkit::PrimitiveVisual::Property::SCALE_TOP_RADIUS, mScaleTopRadius );
@@ -449,8 +452,10 @@ void PrimitiveVisual::InitializeRenderer()
   mImpl->mRenderer = Renderer::New( mGeometry, mShader );
   mImpl->mRenderer.SetProperty( Renderer::Property::FACE_CULLING_MODE, FaceCullingMode::BACK );
 
-  //Register transform properties
+  // Register transform properties
   mImpl->mTransform.RegisterUniforms( mImpl->mRenderer, Direction::LEFT_TO_RIGHT );
+
+  mImpl->mMixColorIndex = DevelHandle::RegisterProperty( mImpl->mRenderer, Toolkit::PrimitiveVisual::Property::MIX_COLOR, MIX_COLOR, mImpl->mMixColor );
 }
 
 void PrimitiveVisual::UpdateShaderUniforms()
@@ -466,7 +471,6 @@ void PrimitiveVisual::UpdateShaderUniforms()
   mShader.RegisterProperty( STAGE_OFFSET_UNIFORM_NAME, Vector2( width, height ) / 2.0f );
   mShader.RegisterProperty( LIGHT_POSITION_UNIFORM_NAME, mLightPosition );
   mShader.RegisterProperty( OBJECT_MATRIX_UNIFORM_NAME, scaleMatrix );
-  DevelHandle::RegisterProperty( mShader, Toolkit::PrimitiveVisual::Property::MIX_COLOR, COLOR_UNIFORM_NAME, mColor );
   mShader.RegisterProperty( OBJECT_DIMENSIONS_UNIFORM_NAME, mObjectDimensions );
 }
 
@@ -548,7 +552,7 @@ void PrimitiveVisual::CreateSphere( Vector<Vertex>& vertices, Vector<unsigned sh
 }
 
 void PrimitiveVisual::CreateConic( Vector<Vertex>& vertices, Vector<unsigned short>& indices, float scaleTopRadius,
-                                     float scaleBottomRadius, float scaleHeight, int slices )
+                                   float scaleBottomRadius, float scaleHeight, int slices )
 {
   ComputeConicVertices( vertices, scaleTopRadius, scaleBottomRadius, scaleHeight, slices );
   FormConicTriangles( indices, scaleTopRadius, scaleBottomRadius, slices );
@@ -563,7 +567,7 @@ void PrimitiveVisual::CreateConic( Vector<Vertex>& vertices, Vector<unsigned sho
 }
 
 void PrimitiveVisual::CreateBevelledCube( Vector<Vertex>& vertices, Vector<unsigned short>& indices,
-                                            Vector3 dimensions, float bevelPercentage, float bevelSmoothness )
+                                          Vector3 dimensions, float bevelPercentage, float bevelSmoothness )
 {
   float maxDimension = std::max( std::max( dimensions.x, dimensions.y ), dimensions.z );
   dimensions = dimensions / maxDimension;
@@ -588,7 +592,7 @@ void PrimitiveVisual::CreateBevelledCube( Vector<Vertex>& vertices, Vector<unsig
 }
 
 void PrimitiveVisual::ComputeCircleTables( Vector<float>& sinTable, Vector<float>& cosTable, int divisions,
-                                             bool halfCircle )
+                                           bool halfCircle )
 {
   if( divisions < 0 )
   {
@@ -729,7 +733,7 @@ void PrimitiveVisual::FormSphereTriangles( Vector<unsigned short>& indices, int
 }
 
 void PrimitiveVisual::ComputeConicVertices( Vector<Vertex>& vertices, float scaleTopRadius,
-                                                     float scaleBottomRadius, float scaleHeight, int slices )
+                                            float scaleBottomRadius, float scaleHeight, int slices )
 {
   int vertexIndex = 0;  //Track progress through vertices.
   Vector<float> sinTable;
@@ -816,7 +820,7 @@ void PrimitiveVisual::ComputeConicVertices( Vector<Vertex>& vertices, float scal
 }
 
 void PrimitiveVisual::FormConicTriangles( Vector<unsigned short>& indices, float scaleTopRadius,
-                                                   float scaleBottomRadius, int slices )
+                                          float scaleBottomRadius, int slices )
 {
   int  indiceIndex = 0;  //Track progress through indices.
   int  numTriangles = 0;
@@ -1167,7 +1171,7 @@ void PrimitiveVisual::FormOctahedronTriangles( Vector<unsigned short>& indices )
 }
 
 void PrimitiveVisual::ComputeBevelledCubeVertices( Vector<Vertex>& vertices, Vector3 dimensions,
-                                                     float bevelPercentage, float bevelSmoothness )
+                                                   float bevelPercentage, float bevelSmoothness )
 {
   int numPositions = 24;
   int numFaces = 26;
index 7792321..6b210bd 100644 (file)
@@ -320,7 +320,6 @@ private:
   Shader mShader;
   Geometry mGeometry;
 
-  Vector4 mColor;                //Color of shape.
   Vector3 mObjectDimensions;     //Dimensions of shape, scaled to be between 0.0 and 1.0.
 
   Vector3 mSceneCenter;
index 955b84c..ad352af 100644 (file)
@@ -22,7 +22,6 @@
 #include <dali/public-api/images/buffer-image.h>
 #include <dali/public-api/common/stage.h>
 #include <dali/public-api/math/vector4.h>
-#include <dali/devel-api/images/atlas.h>
 #include <dali/devel-api/images/texture-set-image.h>
 #include <dali/integration-api/debug.h>
 
index 2b40d32..280fac2 100644 (file)
@@ -50,8 +50,6 @@ const char * const VERTICAL_ALIGNMENT_PROPERTY( "verticalAlignment" );
 const char * const TEXT_COLOR_PROPERTY( "textColor" );
 const char * const ENABLE_MARKUP_PROPERTY( "enableMarkup" );
 
-const std::string PIXEL_AREA_UNIFORM_NAME = "pixelArea";
-
 const Scripting::StringEnum HORIZONTAL_ALIGNMENT_STRING_TABLE[] =
 {
   { "BEGIN",  Toolkit::Text::Layout::HORIZONTAL_ALIGN_BEGIN  },
@@ -130,14 +128,69 @@ const char* FRAGMENT_SHADER_ATLAS_CLAMP = DALI_COMPOSE_SHADER(
     uniform sampler2D sTexture;\n
     uniform mediump vec4 uAtlasRect;\n
     uniform lowp vec4 uColor;\n
+    uniform lowp vec4 mixColor;\n
     \n
     void main()\n
     {\n
       mediump vec2 texCoord = clamp( mix( uAtlasRect.xy, uAtlasRect.zw, vTexCoord ), uAtlasRect.xy, uAtlasRect.zw );\n
-      gl_FragColor = texture2D( sTexture, texCoord ) * uColor;\n
+      gl_FragColor = texture2D( sTexture, texCoord ) * uColor * mixColor;\n
     }\n
 );
 
+/**
+ * Return Property index for the given string key
+ * param[in] stringKey the string index key
+ * return the key as an index
+ */
+
+Dali::Property::Index StringKeyToIndexKey( const std::string& stringKey )
+{
+  Dali::Property::Index result = Property::INVALID_KEY;
+
+  if( stringKey == VISUAL_TYPE )
+  {
+    result = Toolkit::Visual::Property::TYPE;
+  }
+  else if( stringKey == TEXT_PROPERTY )
+  {
+    result = Toolkit::TextVisual::Property::TEXT;
+  }
+  else if( stringKey == FONT_FAMILY_PROPERTY )
+  {
+    result = Toolkit::TextVisual::Property::FONT_FAMILY;
+  }
+  else if( stringKey == FONT_STYLE_PROPERTY )
+  {
+    result = Toolkit::TextVisual::Property::FONT_STYLE;
+  }
+  else if( stringKey == POINT_SIZE_PROPERTY )
+  {
+    result = Toolkit::TextVisual::Property::POINT_SIZE;
+  }
+  else if( stringKey == MULTI_LINE_PROPERTY )
+  {
+    result = Toolkit::TextVisual::Property::MULTI_LINE;
+  }
+  else if( stringKey == HORIZONTAL_ALIGNMENT_PROPERTY )
+  {
+    result = Toolkit::TextVisual::Property::HORIZONTAL_ALIGNMENT;
+  }
+  else if( stringKey == VERTICAL_ALIGNMENT_PROPERTY )
+  {
+    result = Toolkit::TextVisual::Property::VERTICAL_ALIGNMENT;
+  }
+  else if( stringKey == TEXT_COLOR_PROPERTY )
+  {
+    result = Toolkit::TextVisual::Property::TEXT_COLOR;
+  }
+  else if( stringKey == ENABLE_MARKUP_PROPERTY )
+  {
+    result = Toolkit::TextVisual::Property::ENABLE_MARKUP;
+  }
+
+  return result;
+}
+
 } // unnamed namespace
 
 TextVisualPtr TextVisual::New( VisualFactoryCache& factoryCache, const Property::Map& properties )
@@ -147,6 +200,27 @@ TextVisualPtr TextVisual::New( VisualFactoryCache& factoryCache, const Property:
   return TextVisualPtr;
 }
 
+void TextVisual::ConvertStringKeysToIndexKeys( Property::Map& propertyMap )
+{
+  Property::Map outMap;
+
+  for( Property::Map::SizeType index = 0u, count = propertyMap.Count(); index < count; ++index )
+  {
+    const KeyValuePair& keyValue = propertyMap.GetKeyValue( index );
+
+    Property::Index indexKey = keyValue.first.indexKey;
+
+    if ( keyValue.first.type == Property::Key::STRING )
+    {
+      indexKey = StringKeyToIndexKey( keyValue.first.stringKey );
+    }
+
+    outMap.Insert( indexKey, keyValue.second );
+  }
+
+  propertyMap = outMap;
+}
+
 float TextVisual::GetHeightForWidth( float width )
 {
   return mController->GetHeightForWidth( width );
@@ -203,54 +277,14 @@ void TextVisual::DoSetProperties( const Property::Map& propertyMap )
   {
     const KeyValuePair& keyValue = propertyMap.GetKeyValue( index );
 
-    switch( keyValue.first.type )
+    Property::Index indexKey = keyValue.first.indexKey;
+
+    if( keyValue.first.type == Property::Key::STRING )
     {
-      case Property::Key::INDEX:
-      {
-        DoSetProperty( keyValue.first.indexKey, keyValue.second );
-        break;
-      }
-      case Property::Key::STRING:
-      {
-        if( keyValue.first.stringKey == TEXT_PROPERTY )
-        {
-          DoSetProperty( Toolkit::TextVisual::Property::TEXT, keyValue.second );
-        }
-        else if( keyValue.first.stringKey == FONT_FAMILY_PROPERTY )
-        {
-          DoSetProperty( Toolkit::TextVisual::Property::FONT_FAMILY, keyValue.second );
-        }
-        else if( keyValue.first.stringKey == FONT_STYLE_PROPERTY )
-        {
-          DoSetProperty( Toolkit::TextVisual::Property::FONT_STYLE, keyValue.second );
-        }
-        else if( keyValue.first.stringKey == POINT_SIZE_PROPERTY )
-        {
-          DoSetProperty( Toolkit::TextVisual::Property::POINT_SIZE, keyValue.second );
-        }
-        else if( keyValue.first.stringKey == MULTI_LINE_PROPERTY )
-        {
-          DoSetProperty( Toolkit::TextVisual::Property::MULTI_LINE, keyValue.second );
-        }
-        else if( keyValue.first.stringKey == HORIZONTAL_ALIGNMENT_PROPERTY )
-        {
-          DoSetProperty( Toolkit::TextVisual::Property::HORIZONTAL_ALIGNMENT, keyValue.second );
-        }
-        else if( keyValue.first.stringKey == VERTICAL_ALIGNMENT_PROPERTY )
-        {
-          DoSetProperty( Toolkit::TextVisual::Property::VERTICAL_ALIGNMENT, keyValue.second );
-        }
-        else if( keyValue.first.stringKey == TEXT_COLOR_PROPERTY )
-        {
-          DoSetProperty( Toolkit::TextVisual::Property::TEXT_COLOR, keyValue.second );
-        }
-        else if( keyValue.first.stringKey == ENABLE_MARKUP_PROPERTY )
-        {
-          DoSetProperty( Toolkit::TextVisual::Property::ENABLE_MARKUP, keyValue.second );
-        }
-        break;
-      }
+      indexKey = StringKeyToIndexKey( keyValue.first.stringKey );
     }
+
+    DoSetProperty( indexKey, keyValue.second );
   }
 
   // Elide the text if it exceeds the boundaries.
@@ -269,15 +303,19 @@ void TextVisual::DoSetOnStage( Actor& actor )
 
   Geometry geometry = mFactoryCache.GetGeometry( VisualFactoryCache::QUAD_GEOMETRY );
 
-  Shader shader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER_ATLAS_CLAMP );
-  mFactoryCache.SaveShader( VisualFactoryCache::IMAGE_SHADER_ATLAS_DEFAULT_WRAP, shader );
+  Shader shader = mFactoryCache.GetShader( VisualFactoryCache::TEXT_SHADER );
+  if( ! shader )
+  {
+    shader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER_ATLAS_CLAMP );
+    shader.RegisterProperty( PIXEL_AREA_UNIFORM_NAME, FULL_TEXTURE_RECT );
 
-  shader.RegisterProperty( PIXEL_AREA_UNIFORM_NAME, FULL_TEXTURE_RECT );
+    mFactoryCache.SaveShader( VisualFactoryCache::TEXT_SHADER, shader );
+  }
 
   mImpl->mRenderer = Renderer::New( geometry, shader );
-  mImpl->mRenderer.SetProperty( Dali::Renderer::Property::DEPTH_INDEX, Toolkit::DepthIndex::TEXT );
+  mImpl->mRenderer.SetProperty( Dali::Renderer::Property::DEPTH_INDEX, Toolkit::DepthIndex::CONTENT );
 
-  UpdateRenderer();
+  UpdateRenderer( true ); // Renderer needs textures and to be added to control
 }
 
 void TextVisual::DoSetOffStage( Actor& actor )
@@ -299,7 +337,7 @@ void TextVisual::DoSetOffStage( Actor& actor )
 
 void TextVisual::OnSetTransform()
 {
-  UpdateRenderer();
+  UpdateRenderer( false );
 }
 
 void TextVisual::DoSetProperty( Dali::Property::Index index, const Dali::Property::Value& propertyValue )
@@ -377,7 +415,7 @@ void TextVisual::DoSetProperty( Dali::Property::Index index, const Dali::Propert
   }
 }
 
-void TextVisual::UpdateRenderer()
+void TextVisual::UpdateRenderer( bool initializeRendererAndTexture )
 {
   Actor control = mControl.GetHandle();
   if( !control )
@@ -413,7 +451,7 @@ void TextVisual::UpdateRenderer()
 
   const Text::Controller::UpdateTextType updateTextType = mController->Relayout( relayoutSize );
 
-  if( Text::Controller::NONE_UPDATED != ( Text::Controller::MODEL_UPDATED & updateTextType ) )
+  if( Text::Controller::NONE_UPDATED != ( Text::Controller::MODEL_UPDATED & updateTextType ) || initializeRendererAndTexture )
   {
     // Removes the texture set.
     RemoveTextureSet();
index 5ce01ed..b0bf8c3 100644 (file)
@@ -60,7 +60,6 @@ typedef IntrusivePtr< TextVisual > TextVisualPtr;
  * | underline           | STRING  |
  * | shadow              | STRING  |
  * | outline             | STRING  |
- * | batchingEnabled     | BOOLEAN |
  *
  */
 class TextVisual : public Visual::Base
@@ -76,6 +75,12 @@ public:
    */
   static TextVisualPtr New( VisualFactoryCache& factoryCache, const Property::Map& properties );
 
+  /**
+   * @brief Converts all strings keys in property map to index keys.  Property Map can then be merged correctly.
+   * @param[in,out] propertyMap containing string keys or a mix of strings and indexes. Will be changed to index keys.
+   */
+  static void ConvertStringKeysToIndexKeys( Property::Map& propertyMap );
+
 public: // from Visual::Base
 
   /**
@@ -141,8 +146,9 @@ private:
 
   /**
    * @brief Updates the text's renderer.
+   * @param[in] initializeRendererAndTexture Set flag to true to initialize textures and add renderer to control.
    */
-  void UpdateRenderer();
+  void UpdateRenderer( bool initializeRendererAndTexture );
 
   /**
    * @brief Removes the texture set from the renderer.
index f8d3e5f..8990c9a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/internal/helpers/property-helper.h>
 #include <dali-toolkit/internal/visuals/visual-string-constants.h>
 
 namespace Dali
@@ -83,9 +84,12 @@ Dali::Vector2 PointToVector2( Toolkit::Align::Type point, Toolkit::Direction::Ty
 
 Internal::Visual::Base::Impl::Impl()
 : mCustomShader( NULL ),
+  mBlendSlotDelegate( NULL ),
   mTransform(),
+  mMixColor( Color::WHITE ),
   mControlSize( Vector2::ZERO ),
   mDepthIndex( 0.0f ),
+  mMixColorIndex( Property::INVALID_INDEX ),
   mFlags( 0 )
 {
 }
@@ -93,6 +97,7 @@ Internal::Visual::Base::Impl::Impl()
 Internal::Visual::Base::Impl::~Impl()
 {
   delete mCustomShader;
+  delete mBlendSlotDelegate;
 }
 
 Internal::Visual::Base::Impl::CustomShader::CustomShader( const Property::Map& map )
@@ -112,7 +117,7 @@ void Internal::Visual::Base::Impl::CustomShader::SetPropertyMap( const Property:
   Property::Value* vertexShaderValue = shaderMap.Find( Toolkit::Visual::Shader::Property::VERTEX_SHADER, CUSTOM_VERTEX_SHADER );
   if( vertexShaderValue )
   {
-    if( !vertexShaderValue->Get( mVertexShader ) )
+    if( ! GetStringFromProperty( *vertexShaderValue, mVertexShader ) )
     {
       DALI_LOG_ERROR( "'%s' parameter does not correctly specify a string\n", CUSTOM_VERTEX_SHADER );
     }
@@ -121,7 +126,7 @@ void Internal::Visual::Base::Impl::CustomShader::SetPropertyMap( const Property:
   Property::Value* fragmentShaderValue = shaderMap.Find( Toolkit::Visual::Shader::Property::FRAGMENT_SHADER, CUSTOM_FRAGMENT_SHADER );
   if( fragmentShaderValue )
   {
-    if( !fragmentShaderValue->Get( mFragmentShader ) )
+    if( ! GetStringFromProperty( *fragmentShaderValue, mFragmentShader ) )
     {
       DALI_LOG_ERROR( "'%s' parameter does not correctly specify a string\n", CUSTOM_FRAGMENT_SHADER );
     }
@@ -215,6 +220,11 @@ void Internal::Visual::Base::Impl::Transform::SetPropertyMap( const Property::Ma
   mOrigin = Toolkit::Align::CENTER;
   mAnchorPoint = Toolkit::Align::CENTER;
 
+  UpdatePropertyMap( map );
+}
+
+void Internal::Visual::Base::Impl::Transform::UpdatePropertyMap( const Property::Map& map )
+{
   for( Property::Map::SizeType i(0); i<map.Count(); ++i )
   {
     KeyValuePair keyValue = map.GetKeyValue( i );
index 098ad1e..999b41c 100644 (file)
@@ -73,10 +73,37 @@ struct Base::Impl
 
   struct Transform
   {
+    /**
+     * Default constructor ensures the visual fills the control
+     */
     Transform();
+
+    /**
+     * Use the property map to set zero or more of the transform
+     * attributes, and sets the remaining attributes to their default
+     * values.
+     */
     void SetPropertyMap( const Property::Map& map );
+
+    /**
+     * Add the transform attributes to the map (using integer keys)
+     */
     void GetPropertyMap( Property::Map& map ) const;
+
+    /**
+     * Update zero or more attributes from the property map.
+     */
+    void UpdatePropertyMap( const Property::Map& map );
+
+    /**
+     * Register or set the uniform properties onto the renderer
+     */
     void RegisterUniforms( Renderer renderer, Toolkit::Direction::Type direction );
+
+    /**
+     * Convert the control size and the transform attributes into the actual
+     * size of the visual.
+     */
     Vector2 GetVisualSize( const Vector2& controlSize );
 
     Vector2 mOffset;
@@ -86,13 +113,16 @@ struct Base::Impl
     Toolkit::Align::Type mAnchorPoint;
   };
 
-  Renderer      mRenderer;
-  CustomShader* mCustomShader;
-  std::string   mName;
-  Transform     mTransform;
-  Size          mControlSize;
-  float         mDepthIndex;
-  int           mFlags;
+  Renderer        mRenderer;
+  CustomShader*   mCustomShader;
+  SlotDelegate<Visual::Base>* mBlendSlotDelegate; ///< Used to own mix color animation connection
+  std::string     mName;
+  Transform       mTransform;
+  Vector4         mMixColor;
+  Size            mControlSize;
+  float           mDepthIndex;
+  Property::Index mMixColorIndex;
+  int             mFlags;
 };
 
 } // namespace Visual
index 5815c4a..701da0e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@
 
 // EXTERNAL HEADER
 #include <dali/public-api/common/dali-common.h>
+#include <dali/devel-api/object/handle-devel.h>
 #include <dali/integration-api/debug.h>
 
 //INTERNAL HEARDER
@@ -73,7 +74,29 @@ void Visual::Base::SetProperties( const Property::Map& propertyMap )
     const KeyValuePair& pair = propertyMap.GetKeyValue( i );
     const Property::Key& key = pair.first;
     const Property::Value& value = pair.second;
-    switch( key.indexKey )
+
+    Property::Key matchKey = key;
+    if( matchKey.type == Property::Key::STRING )
+    {
+      if( matchKey == CUSTOM_SHADER )
+      {
+        matchKey = Property::Key( DevelVisual::Property::SHADER );
+      }
+      else if( matchKey == TRANSFORM )
+      {
+        matchKey = Property::Key( DevelVisual::Property::TRANSFORM );
+      }
+      else if( matchKey == PREMULTIPLIED_ALPHA )
+      {
+        matchKey = Property::Key( DevelVisual::Property::PREMULTIPLIED_ALPHA );
+      }
+      else if( matchKey == MIX_COLOR )
+      {
+        matchKey = Property::Key( DevelVisual::Property::MIX_COLOR );
+      }
+    }
+
+    switch( matchKey.indexKey )
     {
       case DevelVisual::Property::SHADER:
       {
@@ -104,6 +127,16 @@ void Visual::Base::SetProperties( const Property::Map& propertyMap )
         }
         break;
       }
+
+      case DevelVisual::Property::MIX_COLOR:
+      {
+        Vector4 mixColor;
+        if( value.Get( mixColor ) )
+        {
+          SetMixColor( mixColor );
+        }
+        break;
+      }
     }
   }
 
@@ -113,7 +146,7 @@ void Visual::Base::SetProperties( const Property::Map& propertyMap )
 void Visual::Base::SetTransformAndSize( const Property::Map& transform, Size controlSize )
 {
   mImpl->mControlSize = controlSize;
-  mImpl->mTransform.SetPropertyMap( transform );
+  mImpl->mTransform.UpdatePropertyMap( transform );
 
 #if defined(DEBUG_ENABLED)
   std::ostringstream oss;
@@ -188,6 +221,8 @@ void Visual::Base::SetOnStage( Actor& actor )
 
     if( mImpl->mRenderer )
     {
+      RegisterMixColor();
+
       mImpl->mRenderer.SetProperty( Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA, IsPreMultipliedAlphaEnabled());
       mImpl->mRenderer.SetProperty( Renderer::Property::DEPTH_INDEX, mImpl->mDepthIndex );
       mImpl->mFlags |= Impl::IS_ON_STAGE; // Only sets the flag if renderer exists
@@ -200,7 +235,7 @@ void Visual::Base::SetOffStage( Actor& actor )
   if( IsOnStage() )
   {
     DoSetOffStage( actor );
-
+    mImpl->mMixColorIndex = Property::INVALID_INDEX;
     mImpl->mFlags &= ~Impl::IS_ON_STAGE;
   }
 }
@@ -220,6 +255,10 @@ void Visual::Base::CreatePropertyMap( Property::Map& map ) const
 
   bool premultipliedAlpha( IsPreMultipliedAlphaEnabled() );
   map.Insert( DevelVisual::Property::PREMULTIPLIED_ALPHA, premultipliedAlpha );
+
+  // Note, Color and Primitive will also insert their own mix color into the map
+  // which is ok, because they have a different key value range.
+  map.Insert( DevelVisual::Property::MIX_COLOR, GetMixColor() );
 }
 
 void Visual::Base::EnablePreMultipliedAlpha( bool preMultipled )
@@ -260,11 +299,224 @@ bool Visual::Base::IsFromCache() const
   return mImpl->mFlags & Impl::IS_FROM_CACHE;
 }
 
+void Visual::Base::RegisterMixColor()
+{
+  // Only register if not already registered.
+  // (Color and Primitive visuals will register their own and save to this index)
+  if( mImpl->mMixColorIndex == Property::INVALID_INDEX )
+  {
+    mImpl->mMixColorIndex = DevelHandle::RegisterProperty(
+      mImpl->mRenderer,
+      Toolkit::DevelVisual::Property::MIX_COLOR,
+      MIX_COLOR,
+      mImpl->mMixColor );
+
+    if( mImpl->mMixColor.a < 1.f )
+    {
+      mImpl->mRenderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON );
+    }
+
+    float preMultipliedAlpha = 0.0f;
+    if( IsPreMultipliedAlphaEnabled() )
+    {
+      preMultipliedAlpha = 1.0f;
+    }
+    mImpl->mRenderer.RegisterProperty( "preMultipliedAlpha", preMultipliedAlpha );
+  }
+}
+
+void Visual::Base::SetMixColor( const Vector4& color )
+{
+  mImpl->mMixColor = color;
+
+  if( mImpl->mRenderer )
+  {
+    mImpl->mRenderer.SetProperty( mImpl->mMixColorIndex, color );
+    if( color.a < 1.f )
+    {
+      mImpl->mRenderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON );
+    }
+  }
+}
+
+const Vector4& Visual::Base::GetMixColor() const
+{
+  return mImpl->mMixColor;
+}
+
 Renderer Visual::Base::GetRenderer()
 {
   return mImpl->mRenderer;
 }
 
+
+Property::Index Visual::Base::GetPropertyIndex( Property::Key key )
+{
+  Property::Index index = DevelHandle::GetPropertyIndex( mImpl->mRenderer, key );
+
+  if( index == Property::INVALID_INDEX )
+  {
+    // Is it a shader property?
+    Shader shader = mImpl->mRenderer.GetShader();
+    index = DevelHandle::GetPropertyIndex( shader, key );
+    if( index != Property::INVALID_INDEX )
+    {
+      // Yes - we should register it in the Renderer so it can be set / animated
+      // independently, as shaders are shared across multiple renderers.
+      std::string keyName;
+      Property::Index keyIndex( Property::INVALID_KEY );
+      if( key.type == Property::Key::INDEX )
+      {
+        keyName = shader.GetPropertyName( index );
+        keyIndex = key.indexKey;
+      }
+      else
+      {
+        keyName = key.stringKey;
+        // Leave keyIndex as INVALID_KEY - it can still be registered against the string key.
+      }
+      Property::Value value = shader.GetProperty( index );
+      index = DevelHandle::RegisterProperty( mImpl->mRenderer, keyIndex, keyName, value );
+    }
+  }
+  return index;
+}
+
+void Visual::Base::SetupTransition(
+  Dali::Animation& transition,
+  Internal::TransitionData::Animator& animator,
+  Property::Index index )
+{
+  if( index != Property::INVALID_INDEX )
+  {
+    if( mImpl->mRenderer )
+    {
+      if( animator.animate == false )
+      {
+        mImpl->mRenderer.SetProperty( index, animator.targetValue );
+      }
+      else
+      {
+        if( animator.initialValue.GetType() != Property::NONE )
+        {
+          mImpl->mRenderer.SetProperty( index, animator.initialValue );
+        }
+
+        if( ! transition )
+        {
+          transition = Dali::Animation::New( 0.1f );
+        }
+
+        transition.AnimateTo( Property( mImpl->mRenderer, index ),
+                              animator.targetValue,
+                              animator.alphaFunction,
+                              TimePeriod( animator.timePeriodDelay,
+                                          animator.timePeriodDuration ) );
+      }
+    }
+  }
+}
+
+void Visual::Base::AnimateProperty(
+  Dali::Animation& transition,
+  Internal::TransitionData::Animator& animator )
+{
+#if defined(DEBUG_ENABLED)
+  {
+    std::ostringstream oss;
+    oss << "Visual::Base::AnimateProperty(Visual:" << mImpl->mName << " Property:" << animator.propertyKey << " Target: " << animator.targetValue << std::endl;
+    DALI_LOG_INFO( gVisualBaseLogFilter, Debug::General, oss.str().c_str() );
+  }
+#endif
+
+  Property::Index index = Property::INVALID_INDEX;
+
+  bool isMixColor = false;
+  bool isMixColorOpaque = true;
+
+  // Get the property index
+  if( animator.propertyKey == Toolkit::DevelVisual::Property::MIX_COLOR ||
+      animator.propertyKey == MIX_COLOR )
+  {
+    isMixColor = true;
+    index = mImpl->mMixColorIndex;
+
+    Vector4 initialColor;
+    if( animator.initialValue.Get(initialColor) ) // if there is an initial color, test it
+    {
+      isMixColorOpaque = initialColor.a >= 1.0f;
+    }
+    else
+    {
+      isMixColorOpaque = mImpl->mMixColor.a >= 1.0f; // otherwise, test the current color
+    }
+  }
+  else if( mImpl->mRenderer )
+  {
+    index = GetPropertyIndex( animator.propertyKey );
+  }
+
+  // Set target value into data store
+  if( animator.targetValue.GetType() != Property::NONE )
+  {
+    if( isMixColor )
+    {
+      animator.targetValue.Get( mImpl->mMixColor );
+    }
+    else
+    {
+      // Note: there may be several of these calls if more than one
+      // transform property is animated.
+      Property::Map map;
+      if( animator.propertyKey.type == Property::Key::INDEX )
+      {
+        map.Add( animator.propertyKey.indexKey, animator.targetValue );
+      }
+      else
+      {
+        map.Add( animator.propertyKey.stringKey, animator.targetValue );
+      }
+
+      mImpl->mTransform.UpdatePropertyMap( map );
+    }
+  }
+
+  if( index != Property::INVALID_INDEX )
+  {
+    SetupTransition( transition, animator, index );
+
+    // For mix color, ensure the blend mode is on if the initial or final values are not opaque,
+    // and that it is turned off after the animation ends if the final value is opaque
+    if( isMixColor && (!isMixColorOpaque || mImpl->mMixColor.a < 1.0f) )
+    {
+      mImpl->mRenderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON );
+
+      if( animator.animate == true && mImpl->mMixColor.a >= 1.0f )
+      {
+        // When it becomes opaque, set the blend mode back to automatically
+        if( ! mImpl->mBlendSlotDelegate )
+        {
+          mImpl->mBlendSlotDelegate = new SlotDelegate<Visual::Base>(this);
+        }
+        transition.FinishedSignal().Connect( *(mImpl->mBlendSlotDelegate),
+                                             &Visual::Base::OnMixColorFinished );
+      }
+    }
+  }
+}
+
+void Visual::Base::OnMixColorFinished( Animation& animation )
+{
+  if( mImpl->mRenderer )
+  {
+    DALI_LOG_INFO( gVisualBaseLogFilter, Debug::General, "Visual::Base::OnMixColorFinished()\n");
+    mImpl->mRenderer.SetProperty( Renderer::Property::BLEND_MODE,
+                                  ( mImpl->mMixColor.a < 1.0 ) ? BlendMode::ON : BlendMode::AUTO );
+  }
+  delete mImpl->mBlendSlotDelegate;
+  mImpl->mBlendSlotDelegate = NULL;
+}
+
 } // namespace Internal
 
 } // namespace Toolkit
index f740909..1722964 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
+#include <dali/public-api/animation/animation.h>
 #include <dali/public-api/common/intrusive-ptr.h>
 #include <dali/public-api/images/image-operations.h>
 #include <dali/public-api/object/base-object.h>
@@ -27,8 +28,9 @@
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
-#include <dali-toolkit/internal/visuals/visual-factory-cache.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-base.h>
+#include <dali-toolkit/internal/visuals/transition-data-impl.h>
+#include <dali-toolkit/internal/visuals/visual-factory-cache.h>
 
 namespace Dali
 {
@@ -163,6 +165,33 @@ public:
    */
   Renderer GetRenderer();
 
+  /**
+   * Sets the mix color of the visual.
+   * @param[in] mixColor The new mix color
+   */
+  void SetMixColor( const Vector4& color );
+
+  /**
+   * Gets the mix color of the visual.
+   * @return The mix color
+   */
+  const Vector4& GetMixColor() const;
+
+  /**
+   * Animate the property if it exists in the visual or renderer.
+   *
+   * If it's a visual property such as mix color or a transform property,
+   * saves the target value to the local data.
+   *
+   * If the visual isn't staged (i.e. it doesn't have a renderer),
+   * then this will not add an animation.
+   *
+   * @param[in] transition The animation to create or attach to
+   * @param[in] animator The animation parameters of the property.
+   */
+  void AnimateProperty( Dali::Animation& transition,
+                        Internal::TransitionData::Animator& animator );
+
 protected:
 
   /**
@@ -233,6 +262,40 @@ protected:
 
 private:
 
+  /**
+   * Register the mix color uniform on the Renderer and store the property index.
+   * Note, this is not used by Color or Primitive Visuals, which will use their
+   * own property index.
+   */
+  void RegisterMixColor();
+
+  /**
+   * Find the matching property on the renderer or shader. If it's a shader
+   * property, register it on the renderer in order to animate it for this
+   * visual independently.
+   * @param[in] key The key to match.
+   * @return the matching index, or INVALID_INDEX if it's not found
+   */
+  Property::Index GetPropertyIndex( Property::Key key );
+
+  /**
+   * Set up the transition. If no animation is required, then
+   * transition will be untouched.
+   *
+   * @param[in] transition The transition to use or set up.
+   * @param[in] animator The animation data to use
+   * @param[in] index The property index on the renderer to animate
+   */
+  void SetupTransition( Dali::Animation& transition,
+                        Internal::TransitionData::Animator& animator,
+                        Property::Index index );
+
+  /**
+   * When a mix color animation has finished, ensure the blend mode is set back
+   * to the right value for the target opacity.
+   */
+  void OnMixColorFinished( Animation& animation );
+
   // Undefined
   Base( const Visual::Base& visual );
 
index 05e32ff..03f31de 100644 (file)
@@ -284,49 +284,6 @@ Geometry VisualFactoryCache::CreateGridGeometry( Uint16Pair gridSize )
   return geometry;
 }
 
-Geometry VisualFactoryCache::CreateBatchQuadGeometry( Vector4 texCoords )
-{
-  const float halfWidth = 0.5f;
-  const float halfHeight = 0.5f;
-  struct QuadVertex {
-    QuadVertex( const Vector2& vertexPosition, const Vector2& vertexTexCoords )
-      : position( vertexPosition ),
-        texCoords( vertexTexCoords )
-    {}
-    Vector2 position;
-    Vector2 texCoords;
-  };
-
-  // special case, when texture takes whole space
-  if( texCoords == Vector4::ZERO )
-  {
-    texCoords = Vector4(0.0f, 0.0f, 1.0f, 1.0f);
-  }
-
-  QuadVertex quadVertexData[6] =
-  {
-    QuadVertex( Vector2(-halfWidth,   -halfHeight ),   Vector2(texCoords.x, texCoords.y) ),
-    QuadVertex( Vector2( halfWidth,   -halfHeight ),   Vector2(texCoords.z, texCoords.y) ),
-    QuadVertex( Vector2(-halfWidth,    halfHeight ),   Vector2(texCoords.x, texCoords.w) ),
-    QuadVertex( Vector2( halfWidth,   -halfHeight ),   Vector2(texCoords.z, texCoords.y) ),
-    QuadVertex( Vector2(-halfWidth,    halfHeight ),   Vector2(texCoords.x, texCoords.w) ),
-    QuadVertex( Vector2( halfWidth,    halfHeight ),   Vector2(texCoords.z, texCoords.w) ),
-  };
-
-  Property::Map vertexFormat;
-  vertexFormat[ "aPosition" ] = Property::VECTOR2;
-  vertexFormat[ "aTexCoord" ] = Property::VECTOR2;
-  PropertyBuffer vertexBuffer = PropertyBuffer::New( vertexFormat );
-  vertexBuffer.SetData( quadVertexData, 6 );
-
-  // create geometry as normal, single quad
-  Geometry geometry = Geometry::New();
-  geometry.AddVertexBuffer( vertexBuffer );
-  geometry.SetType( Geometry::TRIANGLES );
-
-  return geometry;
-}
-
 Image VisualFactoryCache::GetBrokenVisualImage()
 {
   return ResourceImage::New( BROKEN_VISUAL_IMAGE_URL );
index 8bbae5c..c674aac 100644 (file)
@@ -64,11 +64,11 @@ public:
     GRADIENT_SHADER_RADIAL_USER_SPACE,
     GRADIENT_SHADER_RADIAL_BOUNDING_BOX,
     IMAGE_SHADER,
-    BATCH_IMAGE_SHADER,
     IMAGE_SHADER_ATLAS_DEFAULT_WRAP,
     IMAGE_SHADER_ATLAS_CUSTOM_WRAP,
     NINE_PATCH_SHADER,
     SVG_SHADER,
+    TEXT_SHADER,
     WIREFRAME_SHADER,
     SHADER_TYPE_MAX = WIREFRAME_SHADER
   };
@@ -133,13 +133,6 @@ public:
   static Geometry CreateGridGeometry( Uint16Pair gridSize );
 
   /**
-   * Create the batchable geometry
-   * @param[in] texCoords The texture atlas rect coordinates
-   * @return The created batchable geometry
-   */
-  static Geometry CreateBatchQuadGeometry( Vector4 texCoords );
-
-  /**
    * @brief Returns an image to be used when a visual has failed to correctly render
    * @return The broken image handle.
    */
index 2410f0a..909cfcc 100644 (file)
@@ -32,7 +32,6 @@
 #include <dali-toolkit/internal/visuals/border/border-visual.h>
 #include <dali-toolkit/internal/visuals/color/color-visual.h>
 #include <dali-toolkit/internal/visuals/gradient/gradient-visual.h>
-#include <dali-toolkit/internal/visuals/image/batch-image-visual.h>
 #include <dali-toolkit/internal/visuals/image/image-visual.h>
 #include <dali-toolkit/internal/visuals/mesh/mesh-visual.h>
 #include <dali-toolkit/internal/visuals/npatch/npatch-visual.h>
@@ -57,7 +56,6 @@ namespace Internal
 namespace
 {
 
-const char * const BATCHING_ENABLED( "batchingEnabled" );
 BaseHandle Create()
 {
   BaseHandle handle = Toolkit::VisualFactory::Get();
@@ -138,21 +136,7 @@ Toolkit::Visual::Base VisualFactory::CreateVisual( const Property::Map& property
         }
         else // Regular image
         {
-          bool batchingEnabled( false );
-          Property::Value* batchingEnabledValue = propertyMap.Find( Toolkit::ImageVisual::Property::BATCHING_ENABLED, BATCHING_ENABLED );
-          if( batchingEnabledValue  )
-          {
-            batchingEnabledValue->Get( batchingEnabled );
-          }
-
-          if( batchingEnabled )
-          {
-            visualPtr = BatchImageVisual::New( *( mFactoryCache.Get() ), imageUrl, propertyMap );
-          }
-          else
-          {
-            visualPtr = ImageVisual::New( *( mFactoryCache.Get() ), imageUrl, propertyMap );
-          }
+          visualPtr = ImageVisual::New( *( mFactoryCache.Get() ), imageUrl, propertyMap );
         }
       }
 
index 9126fce..864227e 100644 (file)
@@ -54,19 +54,26 @@ const char * const CUSTOM_SUBDIVIDE_GRID_Y( "subdivideGridY" );
 const char * const CUSTOM_SHADER_HINTS( "hints" );
 
 // Transform
-extern const char * const TRANSFORM( "transform" );
-extern const char * const SIZE( "size" );
-extern const char * const OFFSET( "offset" );
-extern const char * const OFFSET_SIZE_MODE( "offsetSizeMode" );
-extern const char * const ORIGIN( "origin" );
-extern const char * const ANCHOR_POINT( "anchorPoint" );
+const char * const TRANSFORM( "transform" );
+const char * const SIZE( "size" );
+const char * const OFFSET( "offset" );
+const char * const OFFSET_SIZE_MODE( "offsetSizeMode" );
+const char * const ORIGIN( "origin" );
+const char * const ANCHOR_POINT( "anchorPoint" );
 
 // Premultipled alpha
-extern const char * const PREMULTIPLIED_ALPHA( "premultipliedAlpha" );
+const char * const PREMULTIPLIED_ALPHA( "premultipliedAlpha" );
+
+// Mix color
+const char * const MIX_COLOR( "mixColor" );
 
 // Image visual
 const char * const IMAGE_URL_NAME( "url" );
-const char * const ATLAS_RECT_UNIFORM_NAME ( "uAtlasRect" );
+const char * const ATLAS_RECT_UNIFORM_NAME( "uAtlasRect" );
+const char * const PIXEL_AREA_UNIFORM_NAME( "pixelArea" );
+const char * const WRAP_MODE_UNIFORM_NAME( "wrapMode" );
+const char * const IMAGE_WRAP_MODE_U("wrapModeU");
+const char * const IMAGE_WRAP_MODE_V("wrapModeV");
 
 // Text visual
 const char * const TEXT_PROPERTY( "text" );
index c6692c0..8079d34 100644 (file)
@@ -54,9 +54,16 @@ extern const char * const ANCHOR_POINT;
 // Premultiplied alpha
 extern const char * const PREMULTIPLIED_ALPHA;
 
+// Mix color
+extern const char * const MIX_COLOR;
+
 // Image visual
 extern const char * const IMAGE_URL_NAME;
 extern const char * const ATLAS_RECT_UNIFORM_NAME;
+extern const char * const PIXEL_AREA_UNIFORM_NAME;
+extern const char * const WRAP_MODE_UNIFORM_NAME;
+extern const char * const IMAGE_WRAP_MODE_U;
+extern const char * const IMAGE_WRAP_MODE_V;
 
 // Text visual
 extern const char * const TEXT_PROPERTY;
index 5fd3160..0a5221d 100644 (file)
@@ -68,10 +68,11 @@ void main()\n
 
 const char* FRAGMENT_SHADER = DALI_COMPOSE_SHADER(\n
 uniform lowp vec4 uColor;\n
+uniform lowp vec4 mixColor;\n
 \n
 void main()\n
 {\n
-  gl_FragColor = uColor;\n
+  gl_FragColor = uColor*mixColor;\n
 }\n
 );
 
@@ -153,7 +154,13 @@ void WireframeVisual::DoCreatePropertyMap( Property::Map& map ) const
 
 void WireframeVisual::DoSetProperties( const Property::Map& propertyMap )
 {
-  // no properties supported at the moment
+  Property::Value* mixValue = propertyMap.Find( Toolkit::DevelVisual::Property::MIX_COLOR, MIX_COLOR );
+  if( mixValue )
+  {
+    Vector4 mixColor;
+    mixValue->Get( mixColor );
+    SetMixColor( mixColor );
+  }
 }
 
 void WireframeVisual::DoSetOnStage( Actor& actor )
index ac61e9e..4a1c148 100644 (file)
@@ -71,7 +71,7 @@ public:
   typedef Signal< bool ( AccessibilityManager&, const Dali::TouchEvent& )> AccessibilityActionScrollSignalType; ///< Scroll signal type @SINCE_1_0.0
 
   /**
-   * @brief Accessibility needs four information which will be read by screen-reader.
+   * @brief Enumeration for accessibility that needs four information which will be read by screen-reader.
    *
    * Reading order : Label -> Trait -> Optional (Value and Hint)
    * @SINCE_1_0.0
@@ -86,7 +86,7 @@ public:
   };
 
    /**
-    * @brief Overshoot direction.
+    * @brief Enumeration for overshoot direction.
     * @SINCE_1_0.0
     */
   enum FocusOvershotDirection
@@ -110,15 +110,15 @@ public:
   typedef Signal< void ( Actor ) > FocusedActorActivatedSignalType;
 
   /**
-   * @brief Create a AccessibilityManager handle; this can be initialised with AccessibilityManager::New().
+   * @brief Creates an AccessibilityManager handle; this can be initialised with AccessibilityManager::New().
    *
-   * Calling member functions with an uninitialised handle is not allowed.
+   * Calling member functions with an uninitialized handle is not allowed.
    * @SINCE_1_0.0
    */
   AccessibilityManager();
 
   /**
-   * @brief Destructor
+   * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    * @SINCE_1_0.0
@@ -126,18 +126,18 @@ public:
   ~AccessibilityManager();
 
   /**
-   * @brief Get the singleton of AccessibilityManager object.
+   * @brief Gets the singleton of AccessibilityManager object.
    *
    * @SINCE_1_0.0
-   * @return A handle to the AccessibilityManager control.
+   * @return A handle to the AccessibilityManager control
    */
   static AccessibilityManager Get();
 
   /**
-   * @brief Set the information of the specified actor's accessibility attribute.
+   * @brief Sets the information of the specified actor's accessibility attribute.
    *
    * @SINCE_1_0.0
-   * @param actor The actor the text to be set with
+   * @param actor The actor, the text to be set with
    * @param type The attribute type the text to be set with
    * @param text The text for the actor's accessibility information
    * @pre The AccessibilityManager has been initialized.
@@ -146,7 +146,7 @@ public:
   void SetAccessibilityAttribute(Actor actor, AccessibilityAttribute type, const std::string& text);
 
   /**
-   * @brief Get the text of the specified actor's accessibility attribute.
+   * @brief Gets the text of the specified actor's accessibility attribute.
    *
    * @SINCE_1_0.0
    * @param actor The actor to be queried
@@ -158,10 +158,10 @@ public:
   std::string GetAccessibilityAttribute(Actor actor, AccessibilityAttribute type) const;
 
   /**
-   * @brief Set the focus order of the actor.
+   * @brief Sets the focus order of the actor.
    *
-   * The focus order of each actor in the focus chain is unique. If
-   * there is another actor assigned with the same focus order
+   * The focus order of each actor in the focus chain is unique.
+   * If there is another actor assigned with the same focus order
    * already, the new actor will be inserted to the focus chain with
    * that focus order, and the focus order of the original actor and
    * all the actors followed in the focus chain will be increased
@@ -179,7 +179,7 @@ public:
   void SetFocusOrder(Actor actor, const unsigned int order);
 
   /**
-   * @brief Get the focus order of the actor.
+   * @brief Gets the focus order of the actor.
    *
    * When the focus order is 0, it means the focus order of the actor
    * is undefined.
@@ -210,7 +210,7 @@ public:
   unsigned int GenerateNewFocusOrder() const;
 
   /**
-   * @brief Get the actor that has the specified focus order.
+   * @brief Gets the actor that has the specified focus order.
    *
    * It will return an empty handle if no actor in the stage
    * has the specified focus order.
@@ -219,15 +219,15 @@ public:
    * @param order The focus order of the actor
    *
    * @return The actor that has the specified focus order or an empty
-   * handle if no actor in the stage has the specified focus order.
+   * handle if no actor in the stage has the specified focus order
    * @pre The AccessibilityManager has been initialized.
    */
   Actor GetActorByFocusOrder(const unsigned int order);
 
   /**
-   * @brief Move the focus to the specified actor.
+   * @brief Moves the focus to the specified actor.
    *
-   * Only one actor can be focused at the same time.  The actor must
+   * Only one actor can be focused at the same time. The actor must
    * have a defined focus order and must be focusable, visible and in
    * the stage.
    *
@@ -240,38 +240,38 @@ public:
   bool SetCurrentFocusActor(Actor actor);
 
   /**
-   * @brief Get the current focused actor.
+   * @brief Gets the current focused actor.
    *
    * @SINCE_1_0.0
-   * @return A handle to the current focused actor or an empty handle if no actor is focused.
+   * @return A handle to the current focused actor or an empty handle if no actor is focused
    * @pre The AccessibilityManager has been initialized.
    */
   Actor GetCurrentFocusActor();
 
   /**
-   * @brief Get the focus group of current focused actor.
+   * @brief Gets the focus group of current focused actor.
    *
    * @SINCE_1_0.0
    * @return A handle to the immediate parent of the current focused
    * actor which is also a focus group, or an empty handle if no actor
-   * is focused.
+   * is focused
    * @pre The AccessibilityManager has been initialized.
    *
    */
   Actor GetCurrentFocusGroup();
 
   /**
-   * @brief Get the focus order of currently focused actor.
+   * @brief Gets the focus order of currently focused actor.
    * @SINCE_1_0.0
    * @return The focus order of the currently focused actor or 0 if no
-   * actor is in focus.
+   * actor is in focus
    * @pre The AccessibilityManager has been initialized.
    *
    */
   unsigned int GetCurrentFocusOrder();
 
   /**
-   * @brief Move the focus to the next focusable actor in the focus
+   * @brief Moves the focus to the next focusable actor in the focus
    * chain (according to the focus traversal order).
    *
    * When the focus movement is wrapped around, the focus will be moved
@@ -284,7 +284,7 @@ public:
   bool MoveFocusForward();
 
   /**
-   * @brief Move the focus to the previous focusable actor in the
+   * @brief Moves the focus to the previous focusable actor in the
    * focus chain (according to the focus traversal order).
    *
    * When the focus movement is wrapped around, the focus will be
@@ -298,7 +298,7 @@ public:
   bool MoveFocusBackward();
 
   /**
-   * @brief Clear the focus from the current focused actor if any, so
+   * @brief Clears the focus from the current focused actor if any, so
    * that no actor is focused in the focus chain.
    *
    * It will emit focus changed signal without current focused actor.
@@ -308,41 +308,41 @@ public:
   void ClearFocus();
 
   /**
-   * @brief Clear the every registered focusable actor from focus-manager.
+   * @brief Clears every registered focusable actor from focus-manager.
    * @SINCE_1_0.0
    * @pre The AccessibilityManager has been initialized.
    */
   void Reset();
 
   /**
-   * @brief Set whether an actor is a focus group that can limit the
+   * @brief Sets whether an actor is a focus group that can limit the
    * scope of focus movement to its child actors in the focus chain.
    *
    * @SINCE_1_0.0
-   * @param actor The actor to be set as a focus group.
-   * @param isFocusGroup Whether to set the actor to be a focus group or not.
+   * @param actor The actor to be set as a focus group
+   * @param isFocusGroup Whether to set the actor to be a focus group or not
    * @pre The AccessibilityManager has been initialized.
    * @pre The Actor has been initialized.
    */
   void SetFocusGroup(Actor actor, bool isFocusGroup);
 
   /**
-   * @brief Check whether the actor is set as a focus group or not.
+   * @brief Checks whether the actor is set as a focus group or not.
    *
    * @SINCE_1_0.0
-   * @param actor The actor to be checked.
-   * @return Whether the actor is set as a focus group.
+   * @param actor The actor to be checked
+   * @return Whether the actor is set as a focus group
    * @pre The AccessibilityManager has been initialized.
    * @pre The Actor has been initialized.
    */
   bool IsFocusGroup(Actor actor) const;
 
   /**
-   * @brief Set whether the group mode is enabled or not.
+   * @brief Sets whether the group mode is enabled or not.
    *
    * When the group mode is enabled, the focus movement will be limited to the child actors
    * of the current focus group including the current focus group itself. The current focus
-   * group is the closest ancestor of the current focused actor that set as a focus group.
+   * group is the closest ancestor of the current focused actor that is set as a focus group.
    * @SINCE_1_0.0
    * @param enabled Whether the group mode is enabled or not
    * @pre The AccessibilityManager has been initialized.
@@ -350,7 +350,7 @@ public:
   void SetGroupMode(bool enabled);
 
   /**
-   * @brief Get whether the group mode is enabled or not.
+   * @brief Gets whether the group mode is enabled or not.
    *
    * @SINCE_1_0.0
    * @return Whether the group mode is enabled or not.
@@ -359,7 +359,7 @@ public:
   bool GetGroupMode() const;
 
   /**
-   * @brief Set whether focus will be moved to the beginning of the
+   * @brief Sets whether focus will be moved to the beginning of the
    * focus chain when it reaches the end or vice versa.
    *
    * When both the wrap mode and the group mode are enabled, focus will be
@@ -371,7 +371,7 @@ public:
   void SetWrapMode(bool wrapped);
 
   /**
-   * @brief Get whether the wrap mode is enabled or not.
+   * @brief Gets whether the wrap mode is enabled or not.
    *
    * @SINCE_1_0.0
    * @return Whether the wrap mode is enabled or not.
@@ -380,7 +380,7 @@ public:
   bool GetWrapMode() const;
 
   /**
-   * @brief Set the focus indicator actor.
+   * @brief Sets the focus indicator actor.
    *
    * This will replace the default focus indicator actor in
    * AccessibilityManager and will be added to the focused actor as a
@@ -394,7 +394,7 @@ public:
   void SetFocusIndicatorActor(Actor indicator);
 
   /**
-   * @brief Get the focus indicator actor.
+   * @brief Gets the focus indicator actor.
    *
    * @SINCE_1_0.0
    * @return A handle to the focus indicator actor
@@ -414,7 +414,7 @@ public:
   /**
    * @brief Returns the current position of the read action.
    * @SINCE_1_0.0
-   * @return The current event position.
+   * @return The current event position
    */
   Vector2 GetReadPosition() const;
 
@@ -428,7 +428,7 @@ public:
    *   void YourCallbackName(Actor originalFocusedActor, Actor currentFocusedActor);
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    * @pre The Object has been initialized.
    */
   FocusChangedSignalType& FocusChangedSignal();
@@ -441,7 +441,7 @@ public:
    *   void YourCallbackName(Actor currentFocusedActor, FocusOvershotDirection direction);
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    * @pre The Object has been initialized.
    */
   FocusOvershotSignalType& FocusOvershotSignal();
@@ -454,7 +454,7 @@ public:
    *   void YourCallbackName(Actor activatedActor);
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    * @pre The Object has been initialized.
    */
   FocusedActorActivatedSignalType& FocusedActorActivatedSignal();
@@ -469,7 +469,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& StatusChangedSignal();
 
@@ -482,7 +482,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionNextSignal();
 
@@ -495,7 +495,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionPreviousSignal();
 
@@ -508,7 +508,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionActivateSignal();
 
@@ -521,7 +521,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionReadSignal();
 
@@ -534,7 +534,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionOverSignal();
 
@@ -547,7 +547,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionReadNextSignal();
 
@@ -560,7 +560,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionReadPreviousSignal();
 
@@ -573,7 +573,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionUpSignal();
 
@@ -586,7 +586,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionDownSignal();
 
@@ -599,7 +599,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionClearFocusSignal();
 
@@ -612,7 +612,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionBackSignal();
 
@@ -625,7 +625,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionScrollUpSignal();
 
@@ -638,7 +638,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionScrollDownSignal();
 
@@ -651,7 +651,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionPageLeftSignal();
 
@@ -664,7 +664,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionPageRightSignal();
 
@@ -677,7 +677,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionPageUpSignal();
 
@@ -690,7 +690,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionPageDownSignal();
 
@@ -703,7 +703,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionMoveToFirstSignal();
 
@@ -716,7 +716,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionMoveToLastSignal();
 
@@ -742,7 +742,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionReadFromNextSignal();
 
@@ -755,7 +755,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionZoomSignal();
 
@@ -768,7 +768,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionReadIndicatorInformationSignal();
 
@@ -781,7 +781,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionReadPauseResumeSignal();
 
@@ -794,7 +794,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionSignalType& ActionStartStopSignal();
 
@@ -807,7 +807,7 @@ public:
    *   bool YourCallback( AccessibilityManager& manager, const TouchEvent& event );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   AccessibilityActionScrollSignalType& ActionScrollSignal();
 
index b290856..48e2c8e 100644 (file)
@@ -39,18 +39,18 @@ class Alignment;
 /**
  * @brief Alignment is a container which provides an easy way to align other actors inside its boundary.
  *
- * Additionaly it provides a scaling property to resize the contained actors @see Scaling.
+ * Additionally, it provides a scaling property to resize the contained actors @see Scaling.
  * @SINCE_1_0.0
  * @note The use of scaling property will override all constraints applied to actors.
  *
- * All actors added to an alignment are going to be set with the same anchor point and parent origin. And, if the scaling property is set to a value
+ * All actors added to an alignment are going to be set with the same anchor point and parent origin. And if the scaling property is set to a value
  * different than ScaleNone, constraints as well.
  */
 class DALI_IMPORT_API Alignment : public Control
 {
 public:
   /**
-   * @brief Different types of alignment.
+   * @brief Enumeration for different types of alignment.
    * @SINCE_1_0.0
    */
   enum Type
@@ -64,7 +64,7 @@ public:
   };
 
   /**
-   * @brief Scaling determines how actors are scaled, to match the alignment's boundary.
+   * @brief Scaling determines how actors are scaled to match the alignment's boundary.
    * @SINCE_1_0.0
    */
   enum Scaling
@@ -84,7 +84,7 @@ public:
   struct Padding
   {
     /**
-     * @brief Constructor
+     * @brief Constructor.
      * @SINCE_1_0.0
      */
     Padding()
@@ -96,7 +96,7 @@ public:
     }
 
     /**
-     * @brief Constructor
+     * @brief Constructor.
      *
      * @SINCE_1_0.0
      * @param[in] l Left padding
@@ -119,9 +119,9 @@ public:
   };
 
   /**
-   * @brief Create an Alignment handle; this can be initialised with Alignment::New().
+   * @brief Creates an Alignment handle; this can be initialized with Alignment::New().
    *
-   * Calling member functions with an uninitialised handle is not allowed.
+   * Calling member functions with an uninitialized handle is not allowed.
    * @SINCE_1_0.0
    */
   Alignment();
@@ -130,9 +130,9 @@ public:
    * @brief Creates an alignment control.
    *
    * @SINCE_1_0.0
-   * @param [in] horizontal Specifies how to align actors horizontally. Could be HorizontalLeft, HorizontalCenter or HorizontalRight. By default HorizontalCenter.
-   * @param [in] vertical Specifies how to align actors vertically. Could be VerticalTop, VerticalCenter or VerticalBottom. By default VerticalCenter.
-   * @return A handle to the Alignment control.
+   * @param[in] horizontal Specifies how to align actors horizontally. Could be HorizontalLeft, HorizontalCenter or HorizontalRight. By default, HorizontalCenter
+   * @param[in] vertical Specifies how to align actors vertically. Could be VerticalTop, VerticalCenter or VerticalBottom. By default, VerticalCenter
+   * @return A handle to the Alignment control
    */
   static Alignment New( Type horizontal = HorizontalCenter, Type vertical = VerticalCenter );
 
@@ -140,12 +140,12 @@ public:
    * @brief Copy constructor. Creates another handle that points to the same real object.
    *
    * @SINCE_1_0.0
-   * @param[in] alignment Object to copy.
+   * @param[in] alignment Object to copy
    */
   Alignment(const Alignment& alignment);
 
   /**
-   * @brief Destructor
+   * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    * @SINCE_1_0.0
@@ -153,10 +153,10 @@ public:
   ~Alignment();
 
   /**
-   * @brief Downcast a handle to Alignment handle.
+   * @brief Downcasts a handle to Alignment handle.
    *
-   * If handle points to a Alignment the downcast produces valid
-   * handle. If not the returned handle is left uninitialized.
+   * If handle points to an Alignment, the downcast produces valid handle.
+   * If not, the returned handle is left uninitialized.
    *
    * @SINCE_1_0.0
    * @param[in] handle Handle to an object
@@ -165,16 +165,16 @@ public:
   static Alignment DownCast( BaseHandle handle );
 
   /**
-   * @brief Sets the new alignment. By default ( HorizontalCenter | VerticalCenter ).
+   * @brief Sets the new alignment. By default, ( HorizontalCenter | VerticalCenter ).
    *
    * @SINCE_1_0.0
-   * @param [in] type The new alignment option.
+   * @param[in] type The new alignment option
    * @note There should only be one horizontal and one vertical policy.
    */
   void SetAlignmentType( Type type );
 
   /**
-   * @brief Get the current alignment combined into a single value.
+   * @brief Gets the current alignment combined into a single value.
    *
    * The values can be tested by using the & operator and the desired
    * flag. e.g.
@@ -186,7 +186,7 @@ public:
    * @endcode
    *
    * @SINCE_1_0.0
-   * @return the alignment value.
+   * @return the alignment value
    */
   Type GetAlignmentType() const;
 
@@ -194,7 +194,7 @@ public:
    * @brief Sets how added actors scale to fit the alignment's boundary.
    *
    * @SINCE_1_0.0
-   * @param[in] scaling The scaling property.
+   * @param[in] scaling The scaling property
    * @see Scaling.
    */
   void SetScaling( Scaling scaling );
@@ -203,24 +203,24 @@ public:
    * @brief Retrieves the scaling property.
    *
    * @SINCE_1_0.0
-   * @return The scaling.
+   * @return The scaling
    * @see Scaling.
    */
   Scaling GetScaling() const;
 
   /**
-   * @brief Set a padding value.
+   * @brief Sets a padding value.
    *
    * @SINCE_1_0.0
-   * @param [in] padding The left, right, top, bottom padding values.
+   * @param[in] padding The left, right, top, bottom padding values
    */
   void SetPadding( const Padding& padding );
 
   /**
-   * @brief Get the padding values.
+   * @brief Gets the padding values.
    *
    * @SINCE_1_0.0
-   * @return The left, right, top, bottom padding values.
+   * @return The left, right, top, bottom padding values
    */
   const Padding& GetPadding() const;
 
@@ -241,7 +241,7 @@ public: // Not intended for application developers
    * @brief Creates a handle using the Toolkit::Internal implementation.
    *
    * @SINCE_1_0.0
-   * @param[in]  implementation  The Control implementation.
+   * @param[in] implementation The Control implementation
    */
   DALI_INTERNAL Alignment( Internal::Alignment& implementation );
 
@@ -249,7 +249,7 @@ public: // Not intended for application developers
    * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
    *
    * @SINCE_1_0.0
-   * @param[in]  internal  A pointer to the internal CustomActor.
+   * @param[in] internal A pointer to the internal CustomActor
    */
   explicit DALI_INTERNAL Alignment( Dali::Internal::CustomActor* internal );
   /// @endcond
index 3ccf2d4..d9fc769 100644 (file)
@@ -90,7 +90,7 @@ class DALI_IMPORT_API Button : public Control
 public:
 
   /**
-   * @brief The start and end property ranges for this control.
+   * @brief Enumeration for the start and end property ranges for this control.
    * @SINCE_1_0.0
    */
   enum PropertyRange
@@ -100,13 +100,13 @@ public:
   };
 
   /**
-   * @brief An enumeration of properties belonging to the Button class.
+   * @brief Enumeration for the instance of properties belonging to the Button class.
    * @SINCE_1_0.0
    */
   struct Property
   {
     /**
-     * @brief An enumeration of properties belonging to the Button class.
+     * @brief Enumeration for the instance of properties belonging to the Button class.
      * @SINCE_1_0.0
      */
     enum
@@ -192,7 +192,7 @@ public:
       SELECTED_COLOR,
 
       /**
-       * @brief name "label", type Property::Map
+       * @brief name "label", type Property::Map or std::string
        * @SINCE_1_0.0
        */
       LABEL,
@@ -209,7 +209,7 @@ public:
 public:
 
   /**
-   * @brief Create an uninitialized Button.
+   * @brief Creates an uninitialized Button.
    *
    * Only derived versions can be instantiated.  Calling member
    * functions with an uninitialized Dali::Object is not allowed.
@@ -233,10 +233,10 @@ public:
   Button& operator=( const Button& button );
 
   /**
-   * @brief Downcast a handle to Button handle.
+   * @brief Downcasts a handle to Button handle.
    *
-   * If handle points to a Button the downcast produces valid
-   * handle. If not the returned handle is left uninitialized.
+   * If handle points to a Button, the downcast produces valid handle.
+   * If not the returned handle is left uninitialized.
    *
    * @SINCE_1_0.0
    * @param[in] handle Handle to an object
@@ -245,7 +245,7 @@ public:
   static Button DownCast( BaseHandle handle );
 
   /**
-   * @brief Destructor
+   * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    * @SINCE_1_0.0
@@ -262,7 +262,7 @@ public:
    * No signals are emitted when the \e disabled property is set.
    *
    * @SINCE_1_0.0
-   * @param[in] disabled property.
+   * @param[in] disabled Disabled property
    */
   void SetDisabled( bool disabled ) DALI_DEPRECATED_API;
 
@@ -271,7 +271,7 @@ public:
    *
    * @brief Returns if the button is disabled.
    * @SINCE_1_0.0
-   * @return \e true if the button is \e disabled.
+   * @return \e true if the button is \e disabled
    */
   bool IsDisabled() const DALI_DEPRECATED_API;
 
@@ -284,7 +284,7 @@ public:
    * but no signal is emitted.
    *
    * @SINCE_1_0.0
-   * @param[in] autoRepeating \e autorepeating property.
+   * @param[in] autoRepeating \e autorepeating property
    */
   void SetAutoRepeating( bool autoRepeating ) DALI_DEPRECATED_API;
 
@@ -293,7 +293,7 @@ public:
    *
    * @brief Returns if the autorepeating property is set.
    * @SINCE_1_0.0
-   * @return \e true if the \e autorepeating property is set.
+   * @return \e true if the \e autorepeating property is set
    */
   bool IsAutoRepeating() const DALI_DEPRECATED_API;
 
@@ -302,10 +302,10 @@ public:
    *
    * @brief Sets the initial autorepeating delay.
    *
-   * By default this value is set to 0.15 seconds.
+   * By default, this value is set to 0.15 seconds.
    *
    * @SINCE_1_0.0
-   * @param[in] initialAutoRepeatingDelay in seconds.
+   * @param[in] initialAutoRepeatingDelay in seconds
    * @pre initialAutoRepeatingDelay must be greater than zero.
    */
   void SetInitialAutoRepeatingDelay( float initialAutoRepeatingDelay ) DALI_DEPRECATED_API;
@@ -315,7 +315,7 @@ public:
    *
    * @brief Gets the initial autorepeating delay in seconds.
    * @SINCE_1_0.0
-   * @return the initial autorepeating delay in seconds.
+   * @return The initial autorepeating delay in seconds
    */
   float GetInitialAutoRepeatingDelay() const DALI_DEPRECATED_API;
 
@@ -324,10 +324,10 @@ public:
    *
    * @brief Sets the next autorepeating delay.
    *
-   * By default this value is set to 0.05 seconds.
+   * By default, this value is set to 0.05 seconds.
    *
    * @SINCE_1_0.0
-   * @param[in] nextAutoRepeatingDelay in seconds.
+   * @param[in] nextAutoRepeatingDelay in seconds
    * @pre nextAutoRepeatingDelay must be greater than zero.
    */
   void SetNextAutoRepeatingDelay( float nextAutoRepeatingDelay ) DALI_DEPRECATED_API;
@@ -337,7 +337,7 @@ public:
    *
    * @brief Gets the next autorepeating delay in seconds.
    * @SINCE_1_0.0
-   * @return the next autorepeating delay in seconds.
+   * @return The next autorepeating delay in seconds
    */
   float GetNextAutoRepeatingDelay() const DALI_DEPRECATED_API;
 
@@ -349,7 +349,7 @@ public:
    * If the \e togglable property is set to \e true, then the \e autorepeating property is set to false.
    *
    * @SINCE_1_0.0
-   * @param[in] togglable property.
+   * @param[in] togglable Togglable property
    */
   void SetTogglableButton( bool togglable ) DALI_DEPRECATED_API;
 
@@ -358,7 +358,7 @@ public:
    *
    * @brief Returns if the togglable property is set.
    * @SINCE_1_0.0
-   * @return \e true if the \e togglable property is set.
+   * @return \e true if the \e togglable property is set
    */
   bool IsTogglableButton() const DALI_DEPRECATED_API;
 
@@ -372,7 +372,7 @@ public:
    * Emits a Button::StateChangedSignal() signal.
    *
    * @SINCE_1_0.0
-   * @param[in] selected property.
+   * @param[in] selected Selected property
    */
   void SetSelected( bool selected ) DALI_DEPRECATED_API;
 
@@ -381,7 +381,7 @@ public:
    *
    * @brief Returns if the selected property is set and the button is togglable.
    * @SINCE_1_0.0
-   * @return \e true if the button is \e selected.
+   * @return \e true if the button is \e selected
    */
   bool IsSelected() const DALI_DEPRECATED_API;
 
@@ -391,7 +391,7 @@ public:
    * @brief Sets the animation time.
    *
    * @SINCE_1_0.0
-   * @param[in] animationTime The animation time in seconds.
+   * @param[in] animationTime The animation time in seconds
    */
   void SetAnimationTime( float animationTime ) DALI_DEPRECATED_API;
 
@@ -401,7 +401,7 @@ public:
    * @brief Retrieves button's animation time.
    *
    * @SINCE_1_0.0
-   * @return The animation time in seconds.
+   * @return The animation time in seconds
    */
   float GetAnimationTime() const DALI_DEPRECATED_API;
 
@@ -411,7 +411,7 @@ public:
    * @brief Sets the button's label.
    *
    * @SINCE_1_0.0
-   * @param[in] label The label text.
+   * @param[in] label The label text
    */
   void SetLabelText( const std::string& label ) DALI_DEPRECATED_API;
 
@@ -421,7 +421,7 @@ public:
    * @brief Gets the label.
    *
    * @SINCE_1_0.0
-   * @return The label text.
+   * @return The label text
    */
   std::string GetLabelText() const DALI_DEPRECATED_API;
 
@@ -431,7 +431,7 @@ public:
    * @brief Sets the unselected button image.
    *
    * @SINCE_1_0.0
-   * @param[in] filename The button image.
+   * @param[in] filename The button image
    */
   void SetUnselectedImage( const std::string& filename ) DALI_DEPRECATED_API;
 
@@ -442,7 +442,7 @@ public:
    * @brief Sets the background image.
    *
    * @SINCE_1_0.0
-   * @param[in] filename The background image.
+   * @param[in] filename The background image
    */
   void SetBackgroundImage( const std::string& filename ) DALI_DEPRECATED_API;
 
@@ -452,7 +452,7 @@ public:
    * @brief Sets the selected image.
    *
    * @SINCE_1_0.0
-   * @param[in] filename The selected image.
+   * @param[in] filename The selected image
    */
   void SetSelectedImage( const std::string& filename ) DALI_DEPRECATED_API;
 
@@ -463,7 +463,7 @@ public:
    * @brief Sets the selected background image.
    *
    * @SINCE_1_0.0
-   * @param[in] filename The selected background image.
+   * @param[in] filename The selected background image
    */
   void SetSelectedBackgroundImage( const std::string& filename ) DALI_DEPRECATED_API;
 
@@ -474,7 +474,7 @@ public:
    * @brief Sets the disabled background image.
    *
    * @SINCE_1_0.0
-   * @param[in] filename The disabled background image.
+   * @param[in] filename The disabled background image
    */
   void SetDisabledBackgroundImage( const std::string& filename ) DALI_DEPRECATED_API;
 
@@ -484,7 +484,7 @@ public:
    * @brief Sets the disabled button image.
    *
    * @SINCE_1_0.0
-   * @param[in] filename The disabled button image.
+   * @param[in] filename The disabled button image
    */
   void SetDisabledImage( const std::string& filename ) DALI_DEPRECATED_API;
 
@@ -495,17 +495,17 @@ public:
    * @brief Sets the disabled selected button image.
    *
    * @SINCE_1_0.0
-   * @param[in] filename The disabled selected button image.
+   * @param[in] filename The disabled selected button image
    */
   void SetDisabledSelectedImage( const std::string& filename ) DALI_DEPRECATED_API;
 
   /**
-   * @DEPRECATED_1_0.50. Instead, use SetLabelText.
+   * @DEPRECATED_1_0.50. Instead, use SetLabelText
    *
    * @brief Sets the label with an actor.
    *
    * @SINCE_1_0.0
-   * @param[in]  label The actor to use as a label
+   * @param[in] label The actor to use as a label
    */
   void SetLabel( Actor label ) DALI_DEPRECATED_API;
 
@@ -515,7 +515,7 @@ public:
    * @brief Sets the button image.
    *
    * @SINCE_1_0.0
-   * @param[in]  image The button image.
+   * @param[in] image The button image
    */
   void SetButtonImage( Image image ) DALI_DEPRECATED_API;
 
@@ -525,7 +525,7 @@ public:
    * @brief Sets the selected image.
    *
    * @SINCE_1_0.0
-   * @param[in]  image The selected image.
+   * @param[in] image The selected image
    */
   void SetSelectedImage( Image image ) DALI_DEPRECATED_API;
 
@@ -536,7 +536,7 @@ public:
    *
    * @SINCE_1_0.0
    * @remarks Avoid using this method as it's a legacy code.
-   * @return     An actor with the button image.
+   * @return An actor with the button image
    */
   Actor GetButtonImage() const DALI_DEPRECATED_API;
 
@@ -547,14 +547,14 @@ public:
    *
    * @SINCE_1_0.0
    * @remarks Avoid using this method as it's a legacy code.
-   * @return     An actor with the selected image.
+   * @return An actor with the selected image
    */
   Actor GetSelectedImage() const DALI_DEPRECATED_API;
 
 public: //Signals
 
   /**
-   * @brief Button signal type
+   * @brief Button signal type.
    * @SINCE_1_0.0
    */
   typedef Signal< bool ( Button ) > ButtonSignalType;
@@ -567,7 +567,7 @@ public: //Signals
    *   bool YourCallbackName( Button button );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   ButtonSignalType& PressedSignal();
 
@@ -579,7 +579,7 @@ public: //Signals
    *   bool YourCallbackName( Button button );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   ButtonSignalType& ReleasedSignal();
 
@@ -591,7 +591,7 @@ public: //Signals
    *   bool YourCallbackName( Button button );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   ButtonSignalType& ClickedSignal();
 
@@ -605,7 +605,7 @@ public: //Signals
    *   bool YourCallbackName( Button button );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   ButtonSignalType& StateChangedSignal();
 
@@ -616,7 +616,7 @@ public: // Not intended for application developers
    * @brief Creates a handle using the Toolkit::Internal implementation.
    *
    * @SINCE_1_0.0
-   * @param[in]  implementation  The Control implementation.
+   * @param[in] implementation The Control implementation
    */
   DALI_INTERNAL Button( Internal::Button& implementation );
 
@@ -624,7 +624,7 @@ public: // Not intended for application developers
    * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
    *
    * @SINCE_1_0.0
-   * @param[in]  internal  A pointer to the internal CustomActor.
+   * @param[in] internal A pointer to the internal CustomActor
    */
   DALI_INTERNAL Button( Dali::Internal::CustomActor* internal );
   /// @endcond
index 105f784..301a810 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TOOLKIT_CHECK_BOX_BUTTON_H__
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@ class CheckBoxButton;
 /**
  * @brief CheckBoxButton provides a check box button which user can check or uncheck.
  *
- * By default a CheckBoxButton emits a Button::ClickedSignal() signal when the button changes its state to selected or unselected.
+ * By default, a CheckBoxButton emits a Button::ClickedSignal() signal when the button changes its state to selected or unselected.
  *
  * The button's appearance could be modified by Button::SetUnselectedImage, Button::SetBackgroundImage,
  * Button::SetSelectedImage, Button::SetSelectedBackgroundImage, Button::SetDisabledBackgroundImage,
@@ -60,7 +60,7 @@ class CheckBoxButton;
  * {
  *   CheckBoxButton button = CheckBoxButton::New();
  *   button.SetParentOrigin( ParentOrigin::CENTER );
- *   button.SetLabelText( "Check" );
+ *   button.SetProperty( Button::Property::LABEL, "Check" );
  *   button.SetSize( 200, 40 );
  *   button.SetBackgroundColor( Color::WHITE );
  *   Stage::GetCurrent().Add( button );
@@ -83,7 +83,7 @@ class DALI_IMPORT_API CheckBoxButton : public Button
 public:
 
   /**
-   * @brief Create an uninitialized CheckBoxButton; this can be initialized with CheckBoxButton::New().
+   * @brief Creates an uninitialized CheckBoxButton; this can be initialized with CheckBoxButton::New().
    * Calling member functions with an uninitialized Dali::Object is not allowed.
    * @SINCE_1_0.0
    */
@@ -105,7 +105,7 @@ public:
   CheckBoxButton& operator=( const CheckBoxButton& checkBox );
 
   /**
-   * @brief Destructor
+   * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    * @SINCE_1_0.0
@@ -113,20 +113,20 @@ public:
   ~CheckBoxButton();
 
   /**
-   * @brief Create an initialized CheckBoxButton.
+   * @brief Creates an initialized CheckBoxButton.
    * @SINCE_1_0.0
-   * @return A handle to a newly allocated Dali resource.
+   * @return A handle to a newly allocated Dali resource
    */
   static CheckBoxButton New();
 
   /**
-   * @brief Downcast a handle to CheckBoxButton handle.
+   * @brief Downcasts a handle to CheckBoxButton handle.
    *
-   * If handle points to a CheckBoxButton the
-   * downcast produces valid handle. If not the returned handle is left uninitialized.
+   * If handle points to a CheckBoxButton, the downcast produces valid handle.
+   * If not, the returned handle is left uninitialized.
    * @SINCE_1_0.0
    * @param[in] handle Handle to an object
-   * @return handle to a CheckBoxButton or an uninitialized handle
+   * @return Handle to a CheckBoxButton or an uninitialized handle
    */
   static CheckBoxButton DownCast( BaseHandle handle );
 
@@ -136,14 +136,14 @@ public: // Not intended for application developers
   /**
    * @brief Creates a handle using the Toolkit::Internal implementation.
    * @SINCE_1_0.0
-   * @param[in]  implementation  The Control implementation.
+   * @param[in] implementation The Control implementation
    */
   DALI_INTERNAL CheckBoxButton( Internal::CheckBoxButton& implementation );
 
   /**
    * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
    * @SINCE_1_0.0
-   * @param[in]  internal  A pointer to the internal CustomActor.
+   * @param[in] internal A pointer to the internal CustomActor
    */
   DALI_INTERNAL CheckBoxButton( Dali::Internal::CustomActor* internal );
   /// @endcond
index f0d2e29..f3cbea8 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TOOLKIT_PUSH_BUTTON_H__
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -43,7 +43,7 @@ class PushButton;
 /**
  * @brief A PushButton changes its appearance when is pressed and returns to its original when is released.
  *
- * By default a PushButton emits a Button::PressedSignal() signal when the button is pressed, a Button::ClickedSignal() signal when it's clicked
+ * By default, a PushButton emits a Button::PressedSignal() signal when the button is pressed, a Button::ClickedSignal() signal when it's clicked.
  * and a Button::ReleasedSignal() signal when it's released or having pressed it, the touch point leaves the boundary of the button.
  *
  * Usage example: -
@@ -54,7 +54,7 @@ class PushButton;
  * {
  *   PushButton button = PushButton::New();
  *   button.SetParentOrigin( ParentOrigin::CENTER );
- *   button.SetLabelText( "Press" );
+ *   button.SetProperty( Button::Property::LABEL, "Press" );
  *   Stage::GetCurrent().Add( button );
  *
  *   // Connect to button signals emitted by the button
@@ -82,7 +82,7 @@ class PushButton;
  * }
  * @endcode
  *
- * See Button for more detail on signals and modifying appearance via properties.
+ * See Button for more details on signals and modifying appearance via properties.
  * @SINCE_1_0.0
  */
 class DALI_IMPORT_API PushButton : public Button
@@ -90,7 +90,7 @@ class DALI_IMPORT_API PushButton : public Button
 public:
 
   /**
-   * @brief The start and end property ranges for this control.
+   * @brief Enumeration for the start and end property ranges for this control.
    * @SINCE_1_0.0
    */
   enum PropertyRange
@@ -100,13 +100,13 @@ public:
   };
 
   /**
-   * @brief An enumeration of properties belonging to the PushButton class.
+   * @brief Enumeration for the instance of properties belonging to the PushButton class.
    * @SINCE_1_0.0
    */
   struct Property
   {
     /**
-     * @brief An enumeration of properties belonging to the PushButton class.
+     * @brief Enumeration for the instance of properties belonging to the PushButton class.
      * @SINCE_1_0.0
      */
     enum
@@ -122,7 +122,7 @@ public:
 public:
 
   /**
-   * @brief Create an uninitialized PushButton; this can be initialized with PushButton::New().
+   * @brief Creates an uninitialized PushButton; this can be initialized with PushButton::New().
    *
    * Calling member functions with an uninitialized Dali::Object is not allowed.
    * @SINCE_1_0.0
@@ -145,7 +145,7 @@ public:
   PushButton& operator=( const PushButton& pushButton );
 
   /**
-   * @brief Destructor
+   * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    * @SINCE_1_0.0
@@ -153,18 +153,18 @@ public:
   ~PushButton();
 
   /**
-   * @brief Create an initialized PushButton.
+   * @brief Creates an initialized PushButton.
    *
    * @SINCE_1_0.0
-   * @return A handle to a newly allocated Dali resource.
+   * @return A handle to a newly allocated Dali resource
    */
   static PushButton New();
 
   /**
-   * @brief Downcast a handle to PushButton handle.
+   * @brief Downcasts a handle to PushButton handle.
    *
-   * If handle points to a PushButton the downcast produces valid
-   * handle. If not the returned handle is left uninitialized.
+   * If handle points to a PushButton, the downcast produces valid handle.
+   * If not, the returned handle is left uninitialized.
    *
    * @SINCE_1_0.0
    * @param[in] handle Handle to an object
@@ -183,7 +183,7 @@ public:
    * @brief Sets the unselected image with an Actor.
    *
    * @SINCE_1_0.0
-   * @param[in] image The Actor to use.
+   * @param[in] image The Actor to use
    */
   void SetButtonImage( Actor image ) DALI_DEPRECATED_API;
 
@@ -195,7 +195,7 @@ public:
    * @brief Sets the background image with an Actor.
    *
    * @SINCE_1_0.0
-   * @param[in] image The Actor to use.
+   * @param[in] image The Actor to use
    */
   void SetBackgroundImage( Actor image ) DALI_DEPRECATED_API;
 
@@ -207,7 +207,7 @@ public:
    * @brief Sets the selected image with an Actor.
    *
    * @SINCE_1_0.0
-   * @param[in] image The Actor to use.
+   * @param[in] image The Actor to use
    */
   void SetSelectedImage( Actor image ) DALI_DEPRECATED_API;
 
@@ -219,7 +219,7 @@ public:
    * @brief Sets the selected background image with an Actor.
    *
    * @SINCE_1_0.0
-   * @param[in] image The Actor to use.
+   * @param[in] image The Actor to use
    */
   void SetSelectedBackgroundImage( Actor image ) DALI_DEPRECATED_API;
 
@@ -231,7 +231,7 @@ public:
    * @brief Sets the disabled background image with an Actor.
    *
    * @SINCE_1_0.0
-   * @param[in] image The Actor to use.
+   * @param[in] image The Actor to use
    */
   void SetDisabledBackgroundImage( Actor image ) DALI_DEPRECATED_API;
 
@@ -243,7 +243,7 @@ public:
    * @brief Sets the disabled image with an Actor.
    *
    * @SINCE_1_0.0
-   * @param[in] image The Actor to use.
+   * @param[in] image The Actor to use
    */
   void SetDisabledImage( Actor image ) DALI_DEPRECATED_API;
 
@@ -255,7 +255,7 @@ public:
    * @brief Sets the disabled selected image with an Actor.
    *
    * @SINCE_1_0.0
-   * @param[in] image The Actor to use.
+   * @param[in] image The Actor to use
    */
   void SetDisabledSelectedImage( Actor image ) DALI_DEPRECATED_API;
 
@@ -267,7 +267,7 @@ public: // Not intended for application developers
    * @brief Creates a handle using the Toolkit::Internal implementation.
    *
    * @SINCE_1_0.0
-   * @param[in]  implementation  The Control implementation.
+   * @param[in] implementation The Control implementation
    */
   DALI_INTERNAL PushButton( Internal::PushButton& implementation );
 
@@ -275,7 +275,7 @@ public: // Not intended for application developers
    * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
    *
    * @SINCE_1_0.0
-   * @param[in]  internal  A pointer to the internal CustomActor.
+   * @param[in] internal A pointer to the internal CustomActor
    */
   DALI_INTERNAL PushButton( Dali::Internal::CustomActor* internal );
   /// @endcond
index 0802b74..7538723 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -71,7 +71,7 @@ RadioButton RadioButton::New()
 RadioButton RadioButton::New( const std::string& label )
 {
   RadioButton radioButton = Internal::RadioButton::New();
-  radioButton.SetLabelText( label );
+  radioButton.SetProperty( Toolkit::Button::Property::LABEL, label );
   return radioButton;
 }
 
index 0bc276e..58b8604 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TOOLKIT_RADIO_BUTTON_H__
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -45,7 +45,7 @@ class RadioButton;
  *
  * Radio buttons are designed to select one of many option at the same time.
  *
- * Every button have its own \e label and \e state, which can be modified by Button::SetLabelText and Button::SetSelected.
+ * Every button have its own \e label and \e state, which can be modified by Button::Property::LABEL and Button::Property::SELECTED.
  *
  * RadioButton can change its current state using Button::SetSelected.
  *
@@ -60,7 +60,7 @@ class RadioButton;
  * Usage example: -
  *
  * @code
- * // in Creating a DALi Application
+ * // In Creating a DALi Application
  *
  * // Create a group to bind two or more RadioButtons together
  * Actor radioGroup = Actor::New();
@@ -69,14 +69,14 @@ class RadioButton;
  *
  * // Make the first RadioButton and add it to its parent
  * RadioButton button1 = RadioButton::New();
- * button1.SetLabelText( "button1" );
+ * button1.SetProperty( Button::Property::LABEL, "button1" );
  * button1.SetBackgroundColor( Color::WHITE );
  * button1.SetPosition( 0, -40 );
  * radioGroup.Add( button1 );
  *
  * // Make more RadioButtons and add them to their parent
  * RadioButton button2 = RadioButton::New();
- * button2.SetLabelText( "button2" );
+ * button2.SetProperty( Toolkit::Button::Property::LABEL, "button2" );
  * button2.SetBackgroundColor( Color::WHITE );
  * button2.SetPosition( 0, 40 );
  * radioGroup.Add( button2 );
@@ -88,7 +88,7 @@ class DALI_IMPORT_API RadioButton: public Button
 {
  public:
   /**
-   * @brief Create an uninitialized RadioButton; this can be initialized with RadioButton::New().
+   * @brief Creates an uninitialized RadioButton; this can be initialized with RadioButton::New().
    *
    * Calling member functions with an uninitialized Dali::Object is not allowed.
    * @SINCE_1_0.0
@@ -111,7 +111,7 @@ class DALI_IMPORT_API RadioButton: public Button
   RadioButton& operator=( const RadioButton& radioButton );
 
   /**
-   * @brief Destructor
+   * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    * @SINCE_1_0.0
@@ -119,28 +119,27 @@ class DALI_IMPORT_API RadioButton: public Button
   ~RadioButton();
 
   /**
-   * @brief Create an initialized RadioButton.
+   * @brief Creates an initialized RadioButton.
    *
    * @SINCE_1_0.0
-   * @return A handle to a newly allocated Dali resource.
+   * @return A handle to a newly allocated Dali resource
    */
   static RadioButton New();
 
   /**
-   * @brief Create an initialized RadioButton with given label.
+   * @brief Creates an initialized RadioButton with given label.
    *
    * @SINCE_1_0.0
-   * @param[in] label The button label.
-   *
-   * @return A handle to a newly allocated Dali resource.
+   * @param[in] label The button label
+   * @return A handle to a newly allocated Dali resource
    */
   static RadioButton New( const std::string& label );
 
   /**
-   * @brief Downcast a handle to RadioButton handle.
+   * @brief Downcasts a handle to RadioButton handle.
    *
-   * If handle points to a RadioButton the downcast produces valid
-   * handle. If not the returned handle is left uninitialized.
+   * If handle points to a RadioButton, the downcast produces valid handle.
+   * If not, the returned handle is left uninitialized.
    *
    * @SINCE_1_0.0
    * @param[in] handle Handle to an object
@@ -155,7 +154,7 @@ class DALI_IMPORT_API RadioButton: public Button
    * @brief Creates a handle using the Toolkit::Internal implementation.
    *
    * @SINCE_1_0.0
-   * @param[in]  implementation  The Control implementation.
+   * @param[in] implementation The Control implementation
    */
   DALI_INTERNAL RadioButton( Internal::RadioButton& implementation );
 
@@ -163,7 +162,7 @@ class DALI_IMPORT_API RadioButton: public Button
    * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
    *
    * @SINCE_1_0.0
-   * @param[in]  internal  A pointer to the internal CustomActor.
+   * @param[in] internal A pointer to the internal CustomActor
    */
   DALI_INTERNAL RadioButton( Dali::Internal::CustomActor* internal );
   /// @endcond
index c62684f..3f58064 100644 (file)
 #include <dali-toolkit/internal/styling/style-manager-impl.h>
 #include <dali-toolkit/internal/visuals/color/color-visual.h>
 #include <dali-toolkit/internal/visuals/transition-data-impl.h>
+#include <dali-toolkit/internal/visuals/visual-string-constants.h>
 #include <dali-toolkit/devel-api/align-enums.h>
 #include <dali-toolkit/internal/controls/tooltip/tooltip.h>
 
 namespace Dali
 {
+extern bool CaseInsensitiveStringCompare( const std::string& a, const std::string& b );
 
 namespace Toolkit
 {
@@ -78,29 +80,12 @@ struct RegisteredVisual
   Toolkit::Visual::Base visual;
   bool enabled;
 
-  RegisteredVisual( Property::Index aIndex, Toolkit::Visual::Base &aVisual, bool aEnabled) :
-                   index(aIndex), visual(aVisual), enabled(aEnabled) {}
-};
-
-struct HandleIndex
-{
-  Handle handle; ///< a handle to the target object
-  Property::Index index; ///< The index of a property provided by the referenced object
-
-  HandleIndex( )
-  : handle(),
-    index( Property::INVALID_INDEX )
-  {
-  }
-
-  HandleIndex( Handle& handle, Property::Index index )
-  : handle( handle ),
-    index( index )
+  RegisteredVisual( Property::Index aIndex, Toolkit::Visual::Base &aVisual, bool aEnabled)
+  : index(aIndex), visual(aVisual), enabled(aEnabled)
   {
   }
 };
 
-
 typedef Dali::OwnerContainer< RegisteredVisual* > RegisteredVisualContainer;
 
 /**
@@ -118,54 +103,23 @@ bool FindVisual( Property::Index targetIndex, RegisteredVisualContainer& visuals
   return false;
 }
 
-HandleIndex GetVisualProperty(
-  Internal::Control& controlImpl,
+Toolkit::Visual::Base GetVisualByName(
   RegisteredVisualContainer& visuals,
-  const std::string& visualName,
-  Property::Key propertyKey )
+  const std::string& visualName )
 {
-#if defined(DEBUG_ENABLED)
-  std::ostringstream oss;
-  oss << "Control::GetVisualProperty(" << visualName << ", " << propertyKey << ")" << std::endl;
-  DALI_LOG_INFO( gLogFilter, Debug::General, oss.str().c_str() );
-#endif
+  Toolkit::Visual::Base visualHandle;
 
-  // Find visualName in the control
   RegisteredVisualContainer::Iterator iter;
   for ( iter = visuals.Begin(); iter != visuals.End(); iter++ )
   {
     Toolkit::Visual::Base visual = (*iter)->visual;
     if( visual && visual.GetName() == visualName )
     {
-      Internal::Visual::Base& visualImpl = GetImplementation(visual);
-      Renderer renderer = visualImpl.GetRenderer();
-      if( renderer )
-      {
-        Property::Index index = DevelHandle::GetPropertyIndex( renderer, propertyKey );
-        if( index != Property::INVALID_INDEX )
-        {
-          return HandleIndex( renderer, index );
-        }
-      }
+      visualHandle = visual;
+      break;
     }
   }
-
-  std::ostringstream noRenderers;
-  noRenderers << propertyKey;
-  DALI_LOG_WARNING( "Control::GetVisualProperty(%s, %s) No renderers\n", visualName.c_str(), noRenderers.str().c_str() );
-  Handle handle;
-  return HandleIndex( handle, Property::INVALID_INDEX );
-}
-
-void SetDefaultTransform( Property::Map& propertyMap )
-{
-  propertyMap.Clear();
-  propertyMap
-    .Add( Toolkit::DevelVisual::Transform::Property::OFFSET, Vector2(0.0f, 0.0f) )
-    .Add( Toolkit::DevelVisual::Transform::Property::SIZE, Vector2(1.0f, 1.0f) )
-    .Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::CENTER )
-    .Add( Toolkit::DevelVisual::Transform::Property::ANCHOR_POINT, Toolkit::Align::CENTER )
-    .Add( Toolkit::DevelVisual::Transform::Property::OFFSET_SIZE_MODE, Vector4::ZERO );
+  return visualHandle;
 }
 
 /**
@@ -264,6 +218,12 @@ static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tra
   return connected;
 }
 
+const Scripting::StringEnum ControlStateTable[] = {
+  { "NORMAL",   Toolkit::DevelControl::NORMAL   },
+  { "FOCUSED",  Toolkit::DevelControl::FOCUSED  },
+  { "DISABLED", Toolkit::DevelControl::DISABLED },
+}; const unsigned int ControlStateTableCount = sizeof( ControlStateTable ) / sizeof( ControlStateTable[0] );
+
 // Setup signals and actions using the type-registry.
 DALI_TYPE_REGISTRATION_BEGIN( Control, CustomActor, Create );
 
@@ -293,6 +253,8 @@ public:
   // Construction & Destruction
   Impl(Control& controlImpl)
   : mControlImpl( controlImpl ),
+    mState( Toolkit::DevelControl::NORMAL ),
+    mSubState(""),
     mStyleName(""),
     mBackgroundColor(Color::TRANSPARENT),
     mStartingPinchScale( NULL ),
@@ -359,6 +321,27 @@ public:
           break;
         }
 
+        case Toolkit::DevelControl::Property::STATE:
+        {
+          Toolkit::DevelControl::State state( controlImpl.mImpl->mState );
+
+          if( Scripting::GetEnumerationProperty< Toolkit::DevelControl::State >( value, ControlStateTable, ControlStateTableCount, state ) )
+          {
+            controlImpl.mImpl->SetState( state );
+          }
+        }
+        break;
+
+        case Toolkit::DevelControl::Property::SUB_STATE:
+        {
+          std::string subState;
+          if( value.Get( subState ) )
+          {
+            controlImpl.mImpl->SetSubState( subState );
+          }
+        }
+        break;
+
         case Toolkit::Control::Property::BACKGROUND_COLOR:
         {
           DALI_LOG_WARNING( "BACKGROUND_COLOR property is deprecated. Use BACKGROUND property instead\n" );
@@ -458,6 +441,12 @@ public:
           break;
         }
 
+        case Toolkit::DevelControl::Property::STATE:
+        {
+          value = Scripting::GetEnumerationName< Toolkit::DevelControl::State >( controlImpl.mImpl->mState, ControlStateTable, ControlStateTableCount );
+          break;
+        }
+
         case Toolkit::Control::Property::BACKGROUND_COLOR:
         {
           DALI_LOG_WARNING( "BACKGROUND_COLOR property is deprecated. Use BACKGROUND property instead\n" );
@@ -514,9 +503,50 @@ public:
     return value;
   }
 
+  void SetState( DevelControl::State state )
+  {
+    if( mState != state )
+    {
+      // If mState was Disabled, and new state is Focused, should probably
+      // store that fact, e.g. in another property that FocusManager can access.
+      mState = state;
+
+      // Trigger state change and transitions
+      // Apply new style, if stylemanager is available
+      Toolkit::StyleManager styleManager = Toolkit::StyleManager::Get();
+      if( styleManager )
+      {
+        const StylePtr stylePtr = GetImpl( styleManager ).GetRecordedStyle( Toolkit::Control( mControlImpl.GetOwner() ) );
+        if( stylePtr )
+        {
+          for( int i=mVisuals.Count()-1; i >= 0; i-- )
+          {
+            mControlImpl.UnregisterVisual( mVisuals[i]->index );
+          }
+
+          Dali::CustomActor handle( mControlImpl.GetOwner() );
+          stylePtr->ApplyVisualsAndPropertiesRecursively( handle );
+        }
+      }
+    }
+  }
+
+  void SetSubState( const std::string& state )
+  {
+    if( mSubState != state )
+    {
+      mSubState = state;
+      // Trigger transitions
+
+    }
+  }
+
   // Data
 
   Control& mControlImpl;
+  DevelControl::State mState;
+  std::string mSubState;
+
   RegisteredVisualContainer mVisuals; // Stores visuals needed by the control, non trivial type so std::vector used.
   std::string mStyleName;
   Vector4 mBackgroundColor;                       ///< The color of the background visual
@@ -545,6 +575,8 @@ public:
   static const PropertyRegistration PROPERTY_4;
   static const PropertyRegistration PROPERTY_5;
   static const PropertyRegistration PROPERTY_6;
+  static const PropertyRegistration PROPERTY_7;
+  static const PropertyRegistration PROPERTY_8;
 };
 
 // Properties registered without macro to use specific member variables.
@@ -554,6 +586,8 @@ const PropertyRegistration Control::Impl::PROPERTY_3( typeRegistration, "backgro
 const PropertyRegistration Control::Impl::PROPERTY_4( typeRegistration, "keyInputFocus",   Toolkit::Control::Property::KEY_INPUT_FOCUS,  Property::BOOLEAN, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
 const PropertyRegistration Control::Impl::PROPERTY_5( typeRegistration, "background",      Toolkit::Control::Property::BACKGROUND,       Property::MAP,     &Control::Impl::SetProperty, &Control::Impl::GetProperty );
 const PropertyRegistration Control::Impl::PROPERTY_6( typeRegistration, "tooltip",         Toolkit::DevelControl::Property::TOOLTIP,     Property::MAP,     &Control::Impl::SetProperty, &Control::Impl::GetProperty );
+const PropertyRegistration Control::Impl::PROPERTY_7( typeRegistration, "state",           Toolkit::DevelControl::Property::STATE,       Property::STRING,  &Control::Impl::SetProperty, &Control::Impl::GetProperty );
+const PropertyRegistration Control::Impl::PROPERTY_8( typeRegistration, "subState",        Toolkit::DevelControl::Property::SUB_STATE,   Property::STRING,  &Control::Impl::SetProperty, &Control::Impl::GetProperty );
 
 Toolkit::Control Control::New()
 {
@@ -831,8 +865,8 @@ void Control::RegisterVisual( Property::Index index, Toolkit::Visual::Base& visu
   {
     Toolkit::GetImplementation(visual).SetOnStage( self );
   }
-  DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Control::RegisterVisual number of registered visuals(%d)\n",  mImpl->mVisuals.Size() );
 
+  DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Control::RegisterVisual() Registered %s(%d), enabled:%s\n",  visual.GetName().c_str(), index, enabled?"T":"F" );
 }
 
 void Control::UnregisterVisual( Property::Index index )
@@ -865,7 +899,7 @@ void Control::EnableVisual( Property::Index index, bool enable )
   {
     if (  (*iter)->enabled == enable )
     {
-      DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Control::EnableVisual Visual Already enabled set (%s) \n", enable?"enabled":"disabled");
+      DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Control::EnableVisual Visual %s(%d) already %s\n", (*iter)->visual.GetName().c_str(), index, enable?"enabled":"disabled");
       return;
     }
 
@@ -875,12 +909,12 @@ void Control::EnableVisual( Property::Index index, bool enable )
     {
       if ( enable )
       {
-        DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Control::EnableVisual Setting Visual(%d) on stage \n", index );
+        DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Control::EnableVisual Setting %s(%d) on stage \n", (*iter)->visual.GetName().c_str(), index );
         Toolkit::GetImplementation((*iter)->visual).SetOnStage( parentActor );
       }
       else
       {
-        DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Control::EnableVisual Setting Visual(%d) off stage \n", index );
+        DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Control::EnableVisual Setting %s(%d) off stage \n", (*iter)->visual.GetName().c_str(), index );
         Toolkit::GetImplementation((*iter)->visual).SetOffStage( parentActor );  // No need to call if control not staged.
       }
     }
@@ -910,50 +944,49 @@ Dali::Animation Control::CreateTransition( const Toolkit::TransitionData& handle
          iter != end; ++iter )
     {
       TransitionData::Animator* animator = (*iter);
-      HandleIndex handleIndex;
 
-      // Attempt to find the object name as a child actor
-      Actor child = Self().FindChildByName( animator->objectName );
-      if( child )
+      Toolkit::Visual::Base visual = GetVisualByName( mImpl->mVisuals, animator->objectName );
+
+      if( visual )
       {
-        Property::Index propertyIndex = DevelHandle::GetPropertyIndex( child, animator->propertyKey );
-        handleIndex = HandleIndex( child, propertyIndex );
+        Internal::Visual::Base& visualImpl = Toolkit::GetImplementation( visual );
+        visualImpl.AnimateProperty( transition, *animator );
       }
       else
       {
-        handleIndex = GetVisualProperty( *this, mImpl->mVisuals,
-                                            animator->objectName,
-                                            animator->propertyKey );
-      }
-
-      if( handleIndex.handle && handleIndex.index != Property::INVALID_INDEX )
-      {
-        if( animator->animate == false )
-        {
-          if( animator->targetValue.GetType() != Property::NONE )
-          {
-            handleIndex.handle.SetProperty( handleIndex.index, animator->targetValue );
-          }
-        }
-        else
+        // Otherwise, try any actor children of control (Including the control)
+        Actor child = Self().FindChildByName( animator->objectName );
+        if( child )
         {
-          if( animator->initialValue.GetType() != Property::NONE )
+          Property::Index propertyIndex = DevelHandle::GetPropertyIndex( child, animator->propertyKey );
+          if( propertyIndex != Property::INVALID_INDEX )
           {
-            handleIndex.handle.SetProperty( handleIndex.index, animator->initialValue );
-          }
-
-          if( ! transition )
-          {
-            // Create an animation with a default .1 second duration - the animators
-            // will automatically force it to the 'right' duration.
-            transition = Dali::Animation::New( 0.1f );
+            if( animator->animate == false )
+            {
+              if( animator->targetValue.GetType() != Property::NONE )
+              {
+                child.SetProperty( propertyIndex, animator->targetValue );
+              }
+            }
+            else // animate the property
+            {
+              if( animator->initialValue.GetType() != Property::NONE )
+              {
+                child.SetProperty( propertyIndex, animator->initialValue );
+              }
+
+              if( ! transition )
+              {
+                transition = Dali::Animation::New( 0.1f );
+              }
+
+              transition.AnimateTo( Property( child, propertyIndex ),
+                                    animator->targetValue,
+                                    animator->alphaFunction,
+                                    TimePeriod( animator->timePeriodDelay,
+                                                animator->timePeriodDuration ) );
+            }
           }
-
-          transition.AnimateTo( Property( handleIndex.handle, handleIndex.index ),
-                                animator->targetValue,
-                                animator->alphaFunction,
-                                TimePeriod( animator->timePeriodDelay,
-                                            animator->timePeriodDuration ) );
         }
       }
     }
@@ -1249,9 +1282,7 @@ void Control::OnSizeSet(const Vector3& targetSize)
   if( visual )
   {
     Vector2 size( targetSize );
-    Property::Map transformMap;
-    SetDefaultTransform( transformMap );
-    visual.SetTransformAndSize( transformMap, size );
+    visual.SetTransformAndSize( Property::Map(), size ); // Send an empty map as we do not want to modify the visual's set transform
   }
 }
 
@@ -1290,10 +1321,7 @@ void Control::OnRelayout( const Vector2& size, RelayoutContainer& container )
   Toolkit::Visual::Base visual = GetVisual( Toolkit::Control::Property::BACKGROUND );
   if( visual )
   {
-    Vector2 controlSize( size );
-    Property::Map transformMap;
-    SetDefaultTransform( transformMap );
-    visual.SetTransformAndSize( transformMap, controlSize );
+    visual.SetTransformAndSize( Property::Map(), size ); // Send an empty map as we do not want to modify the visual's set transform
   }
 }
 
index d850eb4..45eff9f 100644 (file)
@@ -68,11 +68,11 @@ public:
   // Creation & Destruction
 
   /**
-   * @brief Create a new ControlImpl instance that does not require touch by default.
+   * @brief Creates a new ControlImpl instance that does not require touch by default.
    *
-   * If touch is required then the user can connect to this class' touch signal.
+   * If touch is required, then the user can connect to this class' touch signal.
    * @SINCE_1_0.0
-   * @return A handle to the ControlImpl instance.
+   * @return A handle to the ControlImpl instance
    */
   static Toolkit::Control New();
 
@@ -114,10 +114,10 @@ public:
   void SetBackgroundImage( Image image );
 
   /**
-   * @brief Set the background with a property map.
+   * @brief Sets the background with a property map.
    *
    * @SINCE_1_0.0
-   * @param[in] map The background property map.
+   * @param[in] map The background property map
    */
   void SetBackground(const Property::Map& map);
 
@@ -136,7 +136,7 @@ public:
    * EnableGestureDetection(Gesture::Type(Gesture::Pinch | Gesture::Tap | Gesture::Pan));
    * @endcode
    * @SINCE_1_0.0
-   * @param[in]  type  The gesture type(s) to enable.
+   * @param[in] type The gesture type(s) to enable
    */
   void EnableGestureDetection( Gesture::Type type );
 
@@ -145,18 +145,18 @@ public:
    *
    * Like EnableGestureDetection, this can also be called using bitwise or.
    * @SINCE_1_0.0
-   * @param[in]  type  The gesture type(s) to disable.
+   * @param[in] type The gesture type(s) to disable
    * @see EnableGetureDetection
    */
   void DisableGestureDetection( Gesture::Type type );
 
   /**
    * @brief If deriving classes wish to fine tune pinch gesture
-   * detection then they can access the gesture detector through this
+   * detection, then they can access the gesture detector through this
    * API and modify the detection.
    *
    * @SINCE_1_0.0
-   * @return The pinch gesture detector.
+   * @return The pinch gesture detector
    * @pre Pinch detection should have been enabled via EnableGestureDetection().
    * @see EnableGestureDetection
    */
@@ -164,11 +164,11 @@ public:
 
   /**
    * @brief If deriving classes wish to fine tune pan gesture
-   * detection then they can access the gesture detector through this
+   * detection, then they can access the gesture detector through this
    * API and modify the detection.
    *
    * @SINCE_1_0.0
-   * @return The pan gesture detector.
+   * @return The pan gesture detector
    * @pre Pan detection should have been enabled via EnableGestureDetection().
    * @see EnableGestureDetection
    */
@@ -176,11 +176,11 @@ public:
 
   /**
    * @brief If deriving classes wish to fine tune tap gesture
-   * detection then they can access the gesture detector through this
+   * detection, then they can access the gesture detector through this
    * API and modify the detection.
    *
    * @SINCE_1_0.0
-   * @return The tap gesture detector.
+   * @return The tap gesture detector
    * @pre Tap detection should have been enabled via EnableGestureDetection().
    * @see EnableGestureDetection
    */
@@ -188,11 +188,11 @@ public:
 
   /**
    * @brief If deriving classes wish to fine tune long press gesture
-   * detection then they can access the gesture detector through this
+   * detection, then they can access the gesture detector through this
    * API and modify the detection.
    *
    * @SINCE_1_0.0
-   * @return The long press gesture detector.
+   * @return The long press gesture detector
    * @pre Long press detection should have been enabled via EnableGestureDetection().
    * @see EnableGestureDetection
    */
@@ -207,7 +207,7 @@ public:
    *
    * The control doesn't support it by default.
    * @SINCE_1_0.0
-   * @param[in] isSupported Whether this control supports two dimensional keyboard navigation.
+   * @param[in] isSupported Whether this control supports two dimensional keyboard navigation
    */
   void SetKeyboardNavigationSupport( bool isSupported );
 
@@ -215,7 +215,7 @@ public:
    * @brief Gets whether this control supports two dimensional keyboard navigation.
    *
    * @SINCE_1_0.0
-   * @return true if this control supports two dimensional keyboard navigation.
+   * @return true if this control supports two dimensional keyboard navigation
    */
   bool IsKeyboardNavigationSupported();
 
@@ -242,9 +242,9 @@ public:
    * @brief Sets whether this control is a focus group for keyboard navigation.
    *
    * (i.e. the scope of keyboard focus movement
-   * can be limitied to its child actors). The control is not a focus group by default.
+   * can be limited to its child actors). The control is not a focus group by default.
    * @SINCE_1_0.0
-   * @param[in] isFocusGroup Whether this control is set as a focus group for keyboard navigation.
+   * @param[in] isFocusGroup Whether this control is set as a focus group for keyboard navigation
    */
   void SetAsKeyboardFocusGroup( bool isFocusGroup );
 
@@ -252,7 +252,7 @@ public:
    * @brief Gets whether this control is a focus group for keyboard navigation.
    *
    * @SINCE_1_0.0
-   * @return true if this control is set as a focus group for keyboard navigation.
+   * @return true if this control is set as a focus group for keyboard navigation
    */
   bool IsKeyboardFocusGroup();
 
@@ -292,8 +292,8 @@ public:
    * @brief Called by the KeyInputFocusManager to emit key event signals.
    *
    * @SINCE_1_0.0
-   * @param[in] event The key event.
-   * @return True if the event was consumed.
+   * @param[in] event The key event
+   * @return True if the event was consumed
    */
   DALI_INTERNAL bool EmitKeyEventSignal( const KeyEvent& event );
   /// @endcond
@@ -371,6 +371,11 @@ protected: // For derived classes to call
   /**
    * @brief Create a transition effect on the control.
    *
+   * Only generates an animation if the properties described in the transition
+   * data are staged (e.g. the visual is Enabled and the control is on stage).
+   * Otherwise the target values are stored, and will get set onto the properties
+   * when the visual is next staged.
+   *
    * @SINCE_1_2.12
    *
    * @param[in] transitionData The transition data describing the effect to create
@@ -380,7 +385,7 @@ protected: // For derived classes to call
   Dali::Animation CreateTransition( const Toolkit::TransitionData& transitionData );
 
   /**
-   * @brief Emits KeyInputFocusGained signal if true else emits KeyInputFocusLost signal
+   * @brief Emits KeyInputFocusGained signal if true else emits KeyInputFocusLost signal.
    *
    * Should be called last by the control after it acts on the Input Focus change.
    *
@@ -503,7 +508,7 @@ protected: // Helpers for deriving classes
   // Construction
 
   /**
-   * @brief Flags for the constructor
+   * @brief Flags for the constructor.
    * @SINCE_1_0.0
    */
   enum ControlBehaviour
@@ -520,7 +525,7 @@ protected: // Helpers for deriving classes
   static const int CONTROL_BEHAVIOUR_FLAG_COUNT = Log< LAST_CONTROL_BEHAVIOUR_FLAG - 1 >::value + 1;      ///< Total count of flags
 
   /**
-   * @brief Control constructor
+   * @brief Control constructor.
    *
    * @SINCE_1_0.0
    * @param[in] behaviourFlags Behavioural flags from ControlBehaviour enum
@@ -553,7 +558,7 @@ public: // API for derived classes to override
    * Could be overridden by derived classes.
    *
    * @SINCE_1_0.0
-   * @param[in] child The added actor.
+   * @param[in] child The added actor
    */
   virtual void OnControlChildAdd( Actor& child ) DALI_DEPRECATED_API;
 
@@ -565,7 +570,7 @@ public: // API for derived classes to override
    * Could be overridden by derived classes.
    *
    * @SINCE_1_0.0
-   * @param[in] child The removed actor.
+   * @param[in] child The removed actor
    */
   virtual void OnControlChildRemove( Actor& child ) DALI_DEPRECATED_API;
 
@@ -575,8 +580,8 @@ public: // API for derived classes to override
    * @brief This method should be overridden by deriving classes requiring notifications when the style changes.
    *
    * @SINCE_1_0.0
-   * @param[in] styleManager  The StyleManager object.
-   * @param[in] change  Information denoting what has changed.
+   * @param[in] styleManager The StyleManager object
+   * @param[in] change Information denoting what has changed
    */
   virtual void OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change );
 
@@ -587,7 +592,7 @@ public: // API for derived classes to override
    *
    * Derived classes should override this to perform custom accessibility activation.
    * @SINCE_1_0.0
-   * @return true if this control can perform accessibility activation.
+   * @return true if this control can perform accessibility activation
    */
   virtual bool OnAccessibilityActivated();
 
@@ -596,7 +601,7 @@ public: // API for derived classes to override
    * pan gesture.
    *
    * @SINCE_1_0.0
-   * @param[in] gesture The pan gesture.
+   * @param[in] gesture The pan gesture
    * @return true if the pan gesture has been consumed by this control
    */
   virtual bool OnAccessibilityPan( PanGesture gesture );
@@ -606,7 +611,7 @@ public: // API for derived classes to override
    * touch event.
    *
    * @SINCE_1_0.0
-   * @param[in] touchEvent The touch event.
+   * @param[in] touchEvent The touch event
    * @return true if the touch event has been consumed by this control
    */
   virtual bool OnAccessibilityTouch( const TouchEvent& touchEvent );
@@ -653,21 +658,21 @@ public: // API for derived classes to override
    *
    * A control needs to override this function in order to support two dimensional keyboard navigation.
    * @SINCE_1_0.0
-   * @param[in] currentFocusedActor The current focused actor.
-   * @param[in] direction The direction to move the focus towards.
-   * @param[in] loopEnabled Whether the focus movement should be looped within the control.
-   * @return the next keyboard focusable actor in this control or an empty handle if no actor can be focused.
+   * @param[in] currentFocusedActor The current focused actor
+   * @param[in] direction The direction to move the focus towards
+   * @param[in] loopEnabled Whether the focus movement should be looped within the control
+   * @return The next keyboard focusable actor in this control or an empty handle if no actor can be focused
    */
   virtual Actor GetNextKeyboardFocusableActor( Actor currentFocusedActor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled );
 
   /**
    * @brief Informs this control that its chosen focusable actor will be focused.
    *
-   * This allows the application to preform any actions if wishes
+   * This allows the application to perform any actions if wishes
    * before the focus is actually moved to the chosen actor.
    *
    * @SINCE_1_0.0
-   * @param[in] commitedFocusableActor The commited focusable actor.
+   * @param[in] commitedFocusableActor The commited focusable actor
    */
   virtual void OnKeyboardFocusChangeCommitted( Actor commitedFocusableActor );
 
@@ -676,7 +681,7 @@ public: // API for derived classes to override
    *
    * Derived classes should override this to perform custom actions.
    * @SINCE_1_0.0
-   * @return true if this control supported this action.
+   * @return true if this control supported this action
    */
   virtual bool OnKeyboardEnter();
 
@@ -690,8 +695,8 @@ public: // API for derived classes to override
    * pinch scale.
    *
    * @SINCE_1_0.0
-   * @param[in]  pinch  The pinch gesture.
-   * @note If overridden, then the default behaviour will not occur.
+   * @param[in] pinch The pinch gesture
+   * @note If overridden, then the default behavior will not occur.
    * @note Pinch detection should be enabled via EnableGestureDetection().
    * @see EnableGestureDetection
    */
@@ -704,8 +709,8 @@ public: // API for derived classes to override
    * is enabled.
    *
    * @SINCE_1_0.0
-   * @param[in]  pan  The pan gesture.
-   * @note There is no default behaviour with panning.
+   * @param[in] pan The pan gesture
+   * @note There is no default behavior with panning.
    * @note Pan detection should be enabled via EnableGestureDetection().
    * @see EnableGestureDetection
    */
@@ -718,8 +723,8 @@ public: // API for derived classes to override
    * is enabled.
    *
    * @SINCE_1_0.0
-   * @param[in]  tap  The tap gesture.
-   * @note There is no default behaviour with a tap.
+   * @param[in] tap The tap gesture
+   * @note There is no default behavior with a tap.
    * @note Tap detection should be enabled via EnableGestureDetection().
    * @see EnableGestureDetection
    */
@@ -732,7 +737,7 @@ public: // API for derived classes to override
    * detection is enabled.
    *
    * @SINCE_1_0.0
-   * @param[in]  longPress  The long press gesture.
+   * @param[in] longPress The long press gesture
    * @note There is no default behaviour associated with a long press.
    * @note Long press detection should be enabled via EnableGestureDetection().
    * @see EnableGestureDetection
@@ -752,7 +757,7 @@ public: // API for derived classes to override
   virtual void SignalDisconnected( SlotObserver* slotObserver, CallbackBase* callback );
 
   /**
-   * @brief Retrieve the extension for this control
+   * @brief Retrieves the extension for this control.
    *
    * @SINCE_1_0.0
    * @return The extension if available, NULL otherwise
@@ -776,22 +781,22 @@ private:
 };
 
 /**
- * @brief Get implementation from the handle.
+ * @brief Gets implementation from the handle.
  *
  * @SINCE_1_0.0
  * @param handle
- * @return implementation
+ * @return Implementation
  * @pre handle is initialized and points to a control
  */
 DALI_IMPORT_API Internal::Control& GetImplementation( Dali::Toolkit::Control& handle );
 
 /**
- * @brief Get implementation from the handle.
+ * @brief Gets implementation from the handle.
  *
  * @SINCE_1_0.0
  * @param handle
- * @return implementation
- * @pre handle is initialized and points to a control
+ * @return Implementation
+ * @pre Handle is initialized and points to a control.
  */
 DALI_IMPORT_API const Internal::Control& GetImplementation( const Dali::Toolkit::Control& handle );
 
index c6e3b1d..3f2f169 100644 (file)
@@ -73,7 +73,7 @@ class DALI_IMPORT_API Control : public CustomActor
 public:
 
   /**
-   * @brief The start and end property ranges for control.
+   * @brief Enumeration for the start and end property ranges for control.
    * @SINCE_1_0.0
    */
   enum PropertyRange
@@ -84,44 +84,44 @@ public:
   };
 
   /**
-   * @brief An enumeration of properties belonging to the Control class.
+   * @brief Enumeration for the instance of properties belonging to the Control class.
    * @SINCE_1_0.0
    */
   struct Property
   {
     /**
-     * @brief An enumeration of properties belonging to the Control class.
+     * @brief Enumeration for the instance of properties belonging to the Control class.
      * @SINCE_1_0.0
      */
     enum
     {
       /**
-       * @brief name "styleName", type std::string
+       * @brief name "styleName", type std::string.
        * @SINCE_1_0.0
        * @see SetStyleName
        */
       STYLE_NAME = PROPERTY_START_INDEX,
       /**
        * @DEPRECATED_1_1.3
-       * @brief name "background-color", mutually exclusive with BACKGROUND_IMAGE & BACKGROUND,  type Vector4
+       * @brief name "backgroundColor", mutually exclusive with BACKGROUND_IMAGE & BACKGROUND,  type Vector4.
        * @SINCE_1_0.0
        * @see SetStyleName
        */
       BACKGROUND_COLOR,
       /**
        * @DEPRECATED_1_1.3
-       * @brief name "background-image", mutually exclusive with BACKGROUND_COLOR & BACKGROUND,  type Map
+       * @brief name "backgroundImage", mutually exclusive with BACKGROUND_COLOR & BACKGROUND,  type Map.
        * @SINCE_1_0.0
        */
       BACKGROUND_IMAGE,
       /**
-       * @brief name "keyInputFocus", type bool
+       * @brief name "keyInputFocus", type bool.
        * @SINCE_1_0.0
        * @see SetKeyInputFocus
        */
       KEY_INPUT_FOCUS,
       /**
-       * @brief name "background", mutually exclusive with BACKGROUND_COLOR & BACKGROUND_IMAGE, type Map or std::string for URL
+       * @brief name "background", mutually exclusive with BACKGROUND_COLOR & BACKGROUND_IMAGE, type Map or std::string for URL.
        * @SINCE_1_1.3
        */
       BACKGROUND,
@@ -135,7 +135,7 @@ public:
   struct KeyboardFocus
   {
     /**
-     * @brief Keyboard focus direction
+     * @brief Keyboard focus direction.
      * @SINCE_1_0.0
      */
     enum Direction
@@ -160,15 +160,15 @@ public:
 public: // Creation & Destruction
 
   /**
-   * @brief Create a new instance of a Control.
+   * @brief Creates a new instance of a Control.
    *
    * @SINCE_1_0.0
-   * @return A handle to a new Control.
+   * @return A handle to a new Control
    */
   static Control New();
 
   /**
-   * @brief Create an uninitialized Control handle.
+   * @brief Creates an uninitialized Control handle.
    *
    * Only derived versions can be instantiated.  Calling member
    * functions with an uninitialized Dali::Object is not allowed.
@@ -201,17 +201,17 @@ public: // operators
    * Changes this handle to point to another real object.
    * @SINCE_1_0.0
    * @param[in] handle Object to assign this to
-   * @return reference to this
+   * @return Reference to this
    */
   Control& operator=( const Control& handle );
 
 public:
 
   /**
-   * @brief Downcast a handle to Control handle.
+   * @brief Downcasts a handle to Control handle.
    *
-   * If handle points to a Control the downcast produces valid
-   * handle. If not the returned handle is left uninitialized.
+   * If handle points to a Control, the downcast produces valid handle.
+   * If not, the returned handle is left uninitialized.
    *
    * @SINCE_1_0.0
    * @param[in] handle Handle to an object
@@ -242,7 +242,7 @@ public:
    * As the key input focus mechanism works like a stack, the top most control receives all the key events, and passes on the
    * unhandled events to the controls below in the stack. A control in the stack will regain key input focus when there are no more
    * controls above it in the focus stack.
-   * To query for the conrol which is on top of the focus stack use Dali::Toolkit::KeyInputFocusManager::GetCurrentKeyboardFocusActor().
+   * To query for the control which is on top of the focus stack use Dali::Toolkit::KeyInputFocusManager::GetCurrentKeyboardFocusActor().
    */
   bool HasKeyInputFocus();
 
@@ -261,7 +261,7 @@ public:
    * @brief Retrieves the pinch gesture detector of the control.
    *
    * @SINCE_1_0.0
-   * @return The pinch gesture detector.
+   * @return The pinch gesture detector
    * @note Will return an empty handle if the control does not handle the gesture itself.
    */
   PinchGestureDetector GetPinchGestureDetector() const;
@@ -270,7 +270,7 @@ public:
    * @brief Retrieves the pan gesture detector of the control.
    *
    * @SINCE_1_0.0
-   * @return The pan gesture detector.
+   * @return The pan gesture detector
    * @note Will return an empty handle if the control does not handle the gesture itself.
    */
   PanGestureDetector GetPanGestureDetector() const;
@@ -279,7 +279,7 @@ public:
    * @brief Retrieves the tap gesture detector of the control.
    *
    * @SINCE_1_0.0
-   * @return The tap gesture detector.
+   * @return The tap gesture detector
    * @note Will return an empty handle if the control does not handle the gesture itself.
    */
   TapGestureDetector GetTapGestureDetector() const;
@@ -288,7 +288,7 @@ public:
    * @brief Retrieves the long press gesture detector of the control.
    *
    * @SINCE_1_0.0
-   * @return The long press gesture detector.
+   * @return The long press gesture detector
    * @note Will return an empty handle if the control does not handle the gesture itself.
    */
   LongPressGestureDetector GetLongPressGestureDetector() const;
@@ -299,14 +299,14 @@ public:
    * @brief Sets the name of the style to be applied to the control.
    *
    * @SINCE_1_0.0
-   * @param[in] styleName A string matching a style described in a stylesheet.
+   * @param[in] styleName A string matching a style described in a stylesheet
    */
   void SetStyleName( const std::string& styleName );
 
   /**
    * @brief Retrieves the name of the style to be applied to the control (if any).
    * @SINCE_1_0.0
-   * @return A string matching a style or an empty string.
+   * @return A string matching a style, or an empty string
    */
   const std::string& GetStyleName() const;
 
@@ -318,7 +318,7 @@ public:
    * @SINCE_1_0.0
    * @param[in] color The required background color of the control
    *
-   * @note if SetBackgroundImage is called later, this background color is removed.
+   * @note If SetBackgroundImage is called later, this background color is removed.
    *
    * @note The background color fully blends with the actor color.
    */
@@ -330,7 +330,7 @@ public:
    * @brief Retrieves the background color of the control.
    *
    * @SINCE_1_0.0
-   * @return The background color of the control.
+   * @return The background color of the control
    */
   Vector4 GetBackgroundColor() const DALI_DEPRECATED_API;
 
@@ -340,7 +340,7 @@ public:
    * @brief Sets an image as the background of the control.
    *
    * @SINCE_1_0.0
-   * @param[in] image The image to set as the background.
+   * @param[in] image The image to set as the background
    */
   void SetBackgroundImage( Image image ) DALI_DEPRECATED_API;
 
@@ -362,7 +362,7 @@ public:
    * The return value of True, indicates that the event should be consumed.
    * Otherwise the signal will be emitted on the next parent of the actor.
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    * @pre The Control has been initialized.
    */
   KeyEventSignalType& KeyEventSignal();
@@ -377,7 +377,7 @@ public:
    * The return value of True, indicates that the event should be consumed.
    * Otherwise the signal will be emitted on the next parent of the actor.
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    * @pre The Control has been initialized.
    */
   KeyInputFocusSignalType& KeyInputFocusGainedSignal();
@@ -394,7 +394,7 @@ public:
    * The return value of True, indicates that the event should be consumed.
    * Otherwise the signal will be emitted on the next parent of the actor.
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    * @pre The Control has been initialized.
    */
   KeyInputFocusSignalType& KeyInputFocusLostSignal();
@@ -402,12 +402,11 @@ public:
 public: // Intended for control developers
 
   /**
-   * @brief Create an initialised Control.
+   * @brief Creates an initialized Control.
    *
    * @SINCE_1_0.0
-   * @param[in] implementation The implementation for this control.
-   * @return A handle to a newly allocated Dali resource.
-   *
+   * @param[in] implementation The implementation for this control
+   * @return A handle to a newly allocated Dali resource
    * @note Should NOT be called to create a handle from the implementation. As stated, this allocates a NEW Dali resource.
    */
   explicit Control(Internal::Control& implementation);
@@ -417,7 +416,7 @@ public: // Intended for control developers
    * using an Internal CustomActor pointer.
    *
    * @SINCE_1_0.0
-   * @param [in] internal A pointer to a newly allocated Dali resource
+   * @param[in] internal A pointer to a newly allocated Dali resource
    */
   explicit Control(Dali::Internal::CustomActor* internal);
 
@@ -426,11 +425,11 @@ public: // Templates for Deriving Classes
   /**
    * @brief Template to allow deriving controls to DownCast handles to deriving handle classes.
    *
-   * @tparam     T       The handle class
-   * @tparam     I       The implementation class
+   * @tparam     T      The handle class
+   * @tparam     I      The implementation class
    * @SINCE_1_0.0
-   * @param[in]  handle  Handle to an object
-   * @return Handle to a class T or an uninitialized handle.
+   * @param[in] handle Handle to an object
+   * @return Handle to a class T or an uninitialized handle
    * @see DownCast(BaseHandle)
    */
   template<typename T, typename I>
@@ -458,9 +457,9 @@ public: // Templates for Deriving Classes
    * @brief Template to allow deriving controls to verify whether the Internal::CustomActor* is actually an
    * implementation of their class.
    *
-   * @tparam     I         The implementation class
+   * @tparam     I       The implementation class
    * @SINCE_1_0.0
-   * @param[in]  internal  Pointer to the Internal::CustomActor
+   * @param[in] internal Pointer to the Internal::CustomActor
    */
   template<typename I>
   DALI_INTERNAL void VerifyCustomActorPointer(Dali::Internal::CustomActor* internal)
index ef86a70..0f6f9d9 100644 (file)
@@ -93,9 +93,9 @@ class FlexContainer;
  * "type":"ImageView",
  * "image":"image.png",
  *   "properties": {
- *     "flex":1,                        // property to make the item to receive the specified proportion of the free space in the container.
- *     "alignSelf":"flexStart",         // property to specify how the item will align along the cross axis.
- *     "flexMargin":[10, 10, 10, 10]    // property to specify the space around the item.
+ *     "flex":1,                        // Property to make the item to receive the specified proportion of the free space in the container.
+ *     "alignSelf":"flexStart",         // Property to specify how the item will align along the cross axis.
+ *     "flexMargin":[10, 10, 10, 10]    // Property to specify the space around the item.
  *   }
  * @endcode
  * @SINCE_1_1.35
@@ -106,7 +106,7 @@ class DALI_IMPORT_API FlexContainer : public Control
 public:
 
   /**
-   * @brief The direction of the main axis in the flex container. This determines
+   * @brief Enumeration for the direction of the main axis in the flex container. This determines
    * the direction that flex items are laid out in the flex container.
    * @SINCE_1_1.35
    */
@@ -119,7 +119,7 @@ public:
   };
 
   /**
-   * @brief The primary direction in which content is ordered in the flex container
+   * @brief Enumeration for the primary direction in which content is ordered in the flex container
    * and on which sides the “start” and “end” are.
    * @SINCE_1_1.35
    */
@@ -131,7 +131,7 @@ public:
   };
 
   /**
-   * @brief Alignment of the flex items when the items do not use all available
+   * @brief Enumeration for the alignment of the flex items when the items do not use all available
    * space on the main-axis.
    * @SINCE_1_1.35
    */
@@ -145,8 +145,8 @@ public:
   };
 
   /**
-   * @brief Alignment of the flex items or lines when the items or lines do not
-   * use all available space on the cross-axis.
+   * @brief Enumeration for the alignment of the flex items or lines when the items or lines do not
+   * use all the available space on the cross-axis.
    * @SINCE_1_1.35
    */
   enum Alignment
@@ -159,7 +159,7 @@ public:
   };
 
   /**
-   * @brief The wrap type of the flex container when there is no enough room for
+   * @brief Enumeration for the wrap type of the flex container when there is no enough room for
    * all the items on one flex line.
    * @SINCE_1_1.35
    */
@@ -172,7 +172,7 @@ public:
 public:
 
   /**
-   * @brief The start and end property ranges for this control.
+   * @brief Enumeration for the start and end property ranges for this control.
    * @SINCE_1_1.35
    */
   enum PropertyRange
@@ -185,13 +185,13 @@ public:
   };
 
   /**
-   * @brief An enumeration of properties belonging to the FlexContainer class.
+   * @brief Enumeration for the instance of properties belonging to the FlexContainer class.
    * @SINCE_1_1.35
    */
   struct Property
   {
     /**
-     * @brief An enumeration of properties belonging to the FlexContainer class.
+     * @brief Enumeration for the instance of properties belonging to the FlexContainer class.
      * @SINCE_1_1.35
      */
     enum
@@ -207,13 +207,13 @@ public:
   };
 
   /**
-   * @brief An enumeration of child properties belonging to the FlexContainer class.
+   * @brief Enumeration for the instance of child properties belonging to the FlexContainer class.
    * @SINCE_1_1.35
    */
   struct ChildProperty
   {
     /**
-     * @brief An enumeration of child properties belonging to the FlexContainer class.
+     * @brief Enumeration for the instance of child properties belonging to the FlexContainer class.
      * @SINCE_1_1.35
      */
     enum
@@ -226,14 +226,14 @@ public:
   };
 
   /**
-   * @brief Create a FlexContainer handle; this can be initialised with FlexContainer::New()
-   * Calling member functions with an uninitialised handle is not allowed.
+   * @brief Creates a FlexContainer handle; this can be initialized with FlexContainer::New()
+   * Calling member functions with an uninitialized handle is not allowed.
    * @SINCE_1_1.35
    */
   FlexContainer();
 
   /**
-   * @brief Copy constructor. Creates another handle that points to the same real object
+   * @brief Copy constructor. Creates another handle that points to the same real object.
    * @SINCE_1_1.35
    *
    * @param[in] handle The handle to copy from
@@ -241,7 +241,7 @@ public:
   FlexContainer( const FlexContainer& handle );
 
   /**
-   * @brief Assignment operator. Changes this handle to point to another real object
+   * @brief Assignment operator. Changes this handle to point to another real object.
    * @SINCE_1_1.35
    * @param[in] handle Handle to an object
    * @return A reference to this
@@ -249,7 +249,7 @@ public:
   FlexContainer& operator=( const FlexContainer& handle );
 
   /**
-   * @brief Destructor
+   * @brief Destructor.
    *
    * @details This is non-virtual since derived Handle types must not contain data or virtual methods.
    *
@@ -258,23 +258,23 @@ public:
   ~FlexContainer();
 
   /**
-   * @brief Create the FlexContainer control.
+   * @brief Creates the FlexContainer control.
    * @SINCE_1_1.35
    *
-   * @return A handle to the FlexContainer control.
+   * @return A handle to the FlexContainer control
    */
   static FlexContainer New();
 
   /**
-   * @brief Downcast an Object handle to FlexContainer.
+   * @brief Downcasts an Object handle to FlexContainer.
    *
-   * @details If handle points to a FlexContainer the downcast produces
-   * valid handle. If not the returned handle is left uninitialized.
+   * @details If handle points to a FlexContainer, the downcast produces valid handle.
+   * If not, the returned handle is left uninitialized.
    *
    * @SINCE_1_1.35
    *
    * @param[in] handle Handle to an object
-   * @return handle to a FlexContainer or an uninitialized handle
+   * @return Handle to a FlexContainer or an uninitialized handle
    */
   static FlexContainer DownCast( BaseHandle handle );
 
@@ -286,7 +286,7 @@ public: // Not intended for application developers
    * @brief Creates a handle using the Toolkit::Internal implementation.
    * @SINCE_1_1.35
    *
-   * @param[in] implementation The Control implementation.
+   * @param[in] implementation The Control implementation
    */
   DALI_INTERNAL FlexContainer( Internal::FlexContainer& implementation );
 
@@ -294,7 +294,7 @@ public: // Not intended for application developers
    * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
    * @SINCE_1_1.35
    *
-   * @param[in] internal A pointer to the internal CustomActor.
+   * @param[in] internal A pointer to the internal CustomActor
    */
   explicit DALI_INTERNAL FlexContainer( Dali::Internal::CustomActor* internal );
   /// @endcond
index 7954884..69bcbc3 100644 (file)
@@ -52,7 +52,7 @@ class DALI_IMPORT_API ImageView : public Control
 public:
 
   /**
-   * @brief The start and end property ranges for this control.
+   * @brief Enumeration for the start and end property ranges for this control.
    * @SINCE_1_0.0
    */
   enum PropertyRange
@@ -65,13 +65,13 @@ public:
   };
 
   /**
-   * @brief An enumeration of properties belonging to the ImageView class.
+   * @brief Enumeration for the instance of properties belonging to the ImageView class.
    * @SINCE_1_0.0
    */
   struct Property
   {
     /**
-     * @brief An enumeration of properties belonging to the ImageView class.
+     * @brief Enumeration for the instance of properties belonging to the ImageView class.
      * @SINCE_1_0.0
      */
     enum
@@ -80,19 +80,19 @@ public:
 
       /**
        * @DEPRECATED_1_1.16. Use IMAGE instead.
-       * @brief name "resourceUrl", type string
+       * @brief name "resourceUrl", type string.
        * @SINCE_1_0.0
        */
       RESOURCE_URL = PROPERTY_START_INDEX,
 
       /**
-       * @brief name "image", type string if it is a url, map otherwise
+       * @brief name "image", type string if it is a url, map otherwise.
        * @SINCE_1_0.0
        */
       IMAGE,
 
       /**
-       * @brief name "preMultipliedAlpha", type Boolean
+       * @brief name "preMultipliedAlpha", type Boolean.
        * @SINCE_1_1.18
        * @pre image must be initialized.
        */
@@ -102,7 +102,7 @@ public:
       // Animatable properties
 
       /**
-       * @brief name "pixelArea", type Vector4
+       * @brief name "pixelArea", type Vector4.
        * @details Pixel area is a relative value with the whole image area as [0.0, 0.0, 1.0, 1.0].
        * @SINCE_1_1.18
        */
@@ -113,7 +113,7 @@ public:
 public:
 
   /**
-   * @brief Create an uninitialized ImageView.
+   * @brief Creates an uninitialized ImageView.
    * @SINCE_1_0.0
    */
   ImageView();
@@ -122,7 +122,7 @@ public:
    * @brief Create an initialized ImageView.
    *
    * @SINCE_1_0.0
-   * @return A handle to a newly allocated Dali ImageView.
+   * @return A handle to a newly allocated Dali ImageView
    *
    * @note ImageView will not display anything.
    */
@@ -131,41 +131,40 @@ public:
   /**
    * @DEPRECATED_1_2_8, use New( const std::string& ) instead.
    *
-   * @brief Create an initialized ImageView from an Image instance.
+   * @brief Creates an initialized ImageView from an Image instance.
    *
    * If the handle is empty, ImageView will not display anything.
    *
    * @SINCE_1_0.0
-   * @param[in] image The Image instance to display.
-   * @return A handle to a newly allocated ImageView.
+   * @param[in] image The Image instance to display
+   * @return A handle to a newly allocated ImageView
    */
   static ImageView New( Image image ) DALI_DEPRECATED_API;
 
   /**
-   * @brief Create an initialized ImageView from an URL to an image resource.
+   * @brief Creates an initialized ImageView from an URL to an image resource.
    *
    * If the string is empty, ImageView will not display anything.
    *
    * @SINCE_1_0.0
    * @REMARK_INTERNET
    * @REMARK_STORAGE
-   * @param[in] url The url of the image resource to display.
-   * @return A handle to a newly allocated ImageView.
+   * @param[in] url The url of the image resource to display
+   * @return A handle to a newly allocated ImageView
    */
   static ImageView New( const std::string& url );
 
   /**
-   * @brief Create an initialized ImageView from a URL to an image resource.
+   * @brief Creates an initialized ImageView from a URL to an image resource.
    *
    * If the string is empty, ImageView will not display anything.
    *
    * @SINCE_1_1.10
    * @REMARK_INTERNET
    * @REMARK_STORAGE
-   * @param[in] url The url of the image resource to display.
-   * @param [in] size The width and height to which to fit the loaded image.
-   * @return A handle to a newly allocated ImageView.
-   *
+   * @param[in] url The url of the image resource to display
+   * @param [in] size The width and height to which to fit the loaded image
+   * @return A handle to a newly allocated ImageView
    * @note A valid size is preferable for efficiency.
    *       However, do not set a size that is bigger than the actual image size, as up-scaling is not available.
    *       The content of the area not covered by the actual image is undefined and will not be cleared.
@@ -173,7 +172,7 @@ public:
   static ImageView New( const std::string& url, ImageDimensions size );
 
   /**
-   * @brief Destructor
+   * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    * @SINCE_1_0.0
@@ -192,20 +191,20 @@ public:
    * @brief Assignment operator.
    *
    * @SINCE_1_0.0
-   * @param[in] imageView The ImageView to assign from.
-   * @return The updated ImageView.
+   * @param[in] imageView The ImageView to assign from
+   * @return The updated ImageView
    */
   ImageView& operator=( const ImageView& imageView );
 
   /**
-   * @brief Downcast a handle to ImageView handle.
+   * @brief Downcasts a handle to ImageView handle.
    *
-   * If handle points to a ImageView the downcast produces valid
-   * handle. If not the returned handle is left uninitialized.
+   * If handle points to a ImageView, the downcast produces valid handle.
+   * If not, the returned handle is left uninitialized.
    *
    * @SINCE_1_0.0
    * @param[in] handle Handle to an object
-   * @return handle to a ImageView or an uninitialized handle
+   * @return Handle to a ImageView or an uninitialized handle
    */
   static ImageView DownCast( BaseHandle handle );
 
@@ -228,7 +227,7 @@ public:
    * @SINCE_1_1.4
    * @REMARK_INTERNET
    * @REMARK_STORAGE
-   * @param[in] url The URL to the image resource to display.
+   * @param[in] url The URL to the image resource to display
    */
   void SetImage( const std::string& url );
 
@@ -240,8 +239,8 @@ public:
    * @SINCE_1_1.10
    * @REMARK_INTERNET
    * @REMARK_STORAGE
-   * @param[in] url The URL to the image resource to display.
-   * @param [in] size The width and height to fit the loaded image to.
+   * @param[in] url The URL to the image resource to display
+   * @param [in] size The width and height to fit the loaded image to
    */
   void SetImage( const std::string& url, ImageDimensions size );
 
@@ -252,7 +251,7 @@ public:
    * A valid handle will be returned only if this instance was created with New(Image) or SetImage(Image) was called.
    *
    * @SINCE_1_0.0
-   * @return The Image instance currently used by the ImageView.
+   * @return The Image instance currently used by the ImageView
    */
   Image GetImage() const DALI_DEPRECATED_API;
 
@@ -263,7 +262,7 @@ public: // Not intended for application developers
    * @brief Creates a handle using the Toolkit::Internal implementation.
    *
    * @SINCE_1_0.0
-   * @param[in]  implementation  The ImageView implementation.
+   * @param[in] implementation The ImageView implementation
    */
   DALI_INTERNAL ImageView( Internal::ImageView& implementation );
 
@@ -271,7 +270,7 @@ public: // Not intended for application developers
    * @brief Allows the creation of this ImageView from an Internal::CustomActor pointer.
    *
    * @SINCE_1_0.0
-   * @param[in]  internal  A pointer to the internal CustomActor.
+   * @param[in] internal A pointer to the internal CustomActor
    */
   DALI_INTERNAL ImageView( Dali::Internal::CustomActor* internal );
   /// @endcond
index 160ca96..ac7c1b0 100644 (file)
@@ -35,7 +35,7 @@ class Model3dView;
  * @brief Model3dView is a control for displaying 3d geometry.
  *
  * All the geometry loaded with the control is automatically centered and scaled to fit
- * the size of all the other controls. So the max is (0.5,0.5) and the min is (-0.5,-0.5)
+ * the size of all the other controls. So the max is (0.5,0.5) and the min is (-0.5,-0.5).
  *
  * @SINCE_1_1.4
  */
@@ -44,7 +44,7 @@ class DALI_IMPORT_API Model3dView : public Control
 public:
 
   /**
-   * @brief The start and end property ranges for this control.
+   * @brief Enumeration for the start and end property ranges for this control.
    * @SINCE_1_1.4
    */
   enum PropertyRange
@@ -57,13 +57,13 @@ public:
   };
 
   /**
-   * @brief An enumeration of properties belonging to the TextLabel class.
+   * @brief Enumeration for the instance of properties belonging to the TextLabel class.
    * @SINCE_1_1.4
    */
   struct Property
   {
     /**
-     * @brief An enumeration of properties belonging to the TextLabel class.
+     * @brief Enumeration for the instance of properties belonging to the TextLabel class.
      * @SINCE_1_1.4
      */
     enum
@@ -88,36 +88,36 @@ public:
   };
 
   /**
-   * @brief Create a new instance of a Model3dView control.
+   * @brief Creates a new instance of a Model3dView control.
    *
    * @SINCE_1_1.4
-   * @return A handle to the new Model3dView control.
+   * @return A handle to the new Model3dView control
    */
   static Model3dView New();
 
   /**
-   * @brief Create a new instance of a Model3dView control.
+   * @brief Creates a new instance of a Model3dView control.
    *
    * @SINCE_1_1.4
    * @param[in] objUrl The path to the geometry file
    * @param[in] mtlUrl The path to the material file
    * @param[in] imagesUrl The path to the images directory
-   * @return A handle to the new Model3dView control.
+   * @return A handle to the new Model3dView control
    */
   static Model3dView New( const std::string& objUrl, const std::string& mtlUrl, const std::string& imagesUrl );
 
 
   /**
-   * @brief Create an uninitialized Model3dView
+   * @brief Creates an uninitialized Model3dView.
    *
-   * Only derived versions can be instantiated.  Calling member
+   * Only derived versions can be instantiated. Calling member
    * functions with an uninitialized Dali::Object is not allowed.
    * @SINCE_1_1.4
    */
   Model3dView();
 
   /**
-   * @brief Destructor
+   * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    * @SINCE_1_1.4
@@ -140,14 +140,14 @@ public:
   Model3dView& operator=( const Model3dView& model3dView );
 
   /**
-   * @brief Downcast an Object handle to Model3dView.
+   * @brief Downcasts an Object handle to Model3dView.
    *
-   * If handle points to a Model3dView the downcast produces valid
-   * handle. If not the returned handle is left uninitialized.
+   * If handle points to a Model3dView, the downcast produces valid handle.
+   * If not, the returned handle is left uninitialized.
    *
    * @SINCE_1_1.4
    * @param[in] handle Handle to an object
-   * @return handle to a Model3dView or an uninitialized handle
+   * @return Handle to a Model3dView or an uninitialized handle
    */
   static Model3dView DownCast( BaseHandle handle );
 
@@ -158,7 +158,7 @@ public: // Not intended for application developers
    * @brief Creates a handle using the Toolkit::Internal implementation.
    *
    * @SINCE_1_1.4
-   * @param[in]  implementation  The Control implementation.
+   * @param[in] implementation The Control implementation
    */
   DALI_INTERNAL Model3dView( Internal::Model3dView& implementation );
 
@@ -166,7 +166,7 @@ public: // Not intended for application developers
    * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
    *
    * @SINCE_1_1.4
-   * @param[in]  internal  A pointer to the internal CustomActor.
+   * @param[in] internal A pointer to the internal CustomActor
    */
   DALI_INTERNAL Model3dView( Dali::Internal::CustomActor* internal );
   /// @endcond
index dffb7a4..3bd0adc 100755 (executable)
@@ -56,7 +56,7 @@ public:
   // Properties
 
   /**
-   * @brief The start and end property ranges for this control.
+   * @brief Enumeration for the start and end property ranges for this control.
    * @SINCE_1_0.0
    */
   enum PropertyRange
@@ -66,67 +66,67 @@ public:
   };
 
   /**
-   * @brief An enumeration of properties belonging to the ScrollBar class.
+   * @brief Enumeration for the instance of properties belonging to the ScrollBar class.
    * @SINCE_1_0.0
    */
   struct Property
   {
     /**
-     * @brief An enumeration of properties belonging to the ScrollBar class.
+     * @brief Enumeration for the instance of properties belonging to the ScrollBar class.
      * @SINCE_1_0.0
      */
     enum
     {
       /**
-       * @brief name "scrollDirection", type std::string
-       * @see SetScrollDirection()
+       * @brief name "scrollDirection", type std::string.
        * @SINCE_1_0.0
+       * @see SetScrollDirection()
        */
       SCROLL_DIRECTION = PROPERTY_START_INDEX,
       /**
-       * @brief name "indicatorHeightPolicy", type std::string
-       * @see SetIndicatorHeightPolicy()
+       * @brief name "indicatorHeightPolicy", type std::string.
        * @SINCE_1_0.0
+       * @see SetIndicatorHeightPolicy()
        */
       INDICATOR_HEIGHT_POLICY,
       /**
-       * @brief name "indicatorFixedHeight", type float
-       * @see SetIndicatorFixedHeight()
+       * @brief name "indicatorFixedHeight", type float.
        * @SINCE_1_0.0
+       * @see SetIndicatorFixedHeight()
        */
       INDICATOR_FIXED_HEIGHT,
       /**
-       * @brief name "indicatorShowDuration", type float
-       * @see SetIndicatorShowDuration()
+       * @brief name "indicatorShowDuration", type float.
        * @SINCE_1_0.0
+       * @see SetIndicatorShowDuration()
        */
       INDICATOR_SHOW_DURATION,
       /**
-       * @brief name "indicatorHideDuration", type float
-       * @see SetIndicatorHideDuration()
+       * @brief name "indicatorHideDuration", type float.
        * @SINCE_1_0.0
+       * @see SetIndicatorHideDuration()
        */
       INDICATOR_HIDE_DURATION,
       /**
-       * @brief name "scrollPositionIntervals", type Property::Array
-       * @see SetScrollPositionIntervals()
+       * @brief name "scrollPositionIntervals", type Property::Array.
        * @SINCE_1_0.0
+       * @see SetScrollPositionIntervals()
        */
       SCROLL_POSITION_INTERVALS,
       /**
-       * @brief name "indicatorMinimumHeight", type float
+       * @brief name "indicatorMinimumHeight", type float.
        * The minimum height for a variable size indicator.
        * @SINCE_1_1.36
        */
       INDICATOR_MINIMUM_HEIGHT,
       /**
-       * @brief name "indicatorStartPadding", type float
+       * @brief name "indicatorStartPadding", type float.
        * The padding at the start of the indicator. For example, the top if scrollDirection is Vertical.
        * @SINCE_1_1.36
        */
       INDICATOR_START_PADDING,
       /**
-       * @brief name "indicatorEndPadding", type float
+       * @brief name "indicatorEndPadding", type float.
        * The padding at the end of the indicator. For example, the bottom if scrollDirection is Vertical.
        * @SINCE_1_1.36
        */
@@ -162,7 +162,7 @@ public:
   };
 
   /**
-   * @brief Create an uninitialized ScrollBar; this can be initialized with ScrollBar::New()
+   * @brief Creates an uninitialized ScrollBar; this can be initialized with ScrollBar::New()
    * Calling member functions with an uninitialized Dali::Object is not allowed.
    * @SINCE_1_0.0
    */
@@ -184,7 +184,7 @@ public:
   ScrollBar& operator=( const ScrollBar& scrollBar );
 
   /**
-   * @brief Destructor
+   * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    * @SINCE_1_0.0
@@ -192,35 +192,34 @@ public:
   ~ScrollBar();
 
   /**
-   * @brief Create an initialized ScrollBar
+   * @brief Creates an initialized ScrollBar.
    * @SINCE_1_0.0
-   * @param[in] direction The direction of scroll bar (either vertically or horizontally).
-   * @return A pointer to the created ScrollBar.
+   * @param[in] direction The direction of scroll bar (either vertically or horizontally)
+   * @return A pointer to the created ScrollBar
    */
   static ScrollBar New(Direction direction = Vertical);
 
   /**
-   * @brief Downcast a handle to ScrollBar handle.
+   * @brief Downcasts a handle to ScrollBar handle.
    *
-   * If handle points to a ScrollBar the
-   * downcast produces valid handle. If not the returned handle is left uninitialized.
+   * If handle points to a ScrollBar, the downcast produces valid handle.
+   * If not, the returned handle is left uninitialized.
    * @SINCE_1_0.0
    * @param[in] handle Handle to an object
-   * @return handle to a ScrollBar or an uninitialized handle
+   * @return Handle to a ScrollBar or an uninitialized handle
    */
   static ScrollBar DownCast( BaseHandle handle );
 
   /**
-   * @brief Set the source of the scroll position properties.
-   *
-   * * @pre The handle to the object owing the scroll properties has been initialised and the property index must be vaild.
+   * @brief Sets the source of the scroll position properties.
    *
    * @SINCE_1_0.0
-   * @param[in] handle The handle of the object owing the scroll properties.
-   * @param[in] propertyScrollPosition The index of the scroll position property (The scroll position, type float).
-   * @param[in] propertyMinScrollPosition The index of the minimum scroll position property (The minimum scroll position, type float).
-   * @param[in] propertyMaxScrollPosition The index of the maximum scroll position property (The maximum scroll position, type float).
-   * @param[in] propertyScrollContentSize The index of the scroll content size property (The size of the scrollable content in actor coordinates, type float).
+   * @param[in] handle The handle of the object owing the scroll properties
+   * @param[in] propertyScrollPosition The index of the scroll position property (The scroll position, type float)
+   * @param[in] propertyMinScrollPosition The index of the minimum scroll position property (The minimum scroll position, type float)
+   * @param[in] propertyMaxScrollPosition The index of the maximum scroll position property (The maximum scroll position, type float)
+   * @param[in] propertyScrollContentSize The index of the scroll content size property (The size of the scrollable content in actor coordinates, type float)
+   * @pre The handle to the object owing the scroll properties has been initialised and the property index must be valid.
    */
   void SetScrollPropertySource( Handle handle, Dali::Property::Index propertyScrollPosition, Dali::Property::Index propertyMinScrollPosition, Dali::Property::Index propertyMaxScrollPosition, Dali::Property::Index propertyScrollContentSize );
 
@@ -228,9 +227,8 @@ public:
    * @brief Sets the indicator of scroll bar.
    *
    * @SINCE_1_0.0
-   * @param[in] indicator The indicator that moves to indicate the current scroll position.
-   * @pre The scroll bar actor has been initialised.
-   *
+   * @param[in] indicator The indicator that moves to indicate the current scroll position
+   * @pre The scroll bar actor has been initialized.
    */
   void SetScrollIndicator( Actor indicator );
 
@@ -238,9 +236,8 @@ public:
    * @brief Gets the indicator of scroll bar.
    *
    * @SINCE_1_0.0
-   * @return The indicator indicates the current scroll position of the scrollable content.
-   * @pre The scroll bar actor has been initialised.
-   *
+   * @return The indicator indicates the current scroll position of the scrollable content
+   * @pre The scroll bar actor has been initialized.
    */
   Actor GetScrollIndicator();
 
@@ -250,8 +247,7 @@ public:
    *
    * @SINCE_1_0.0
    * @param[in] positions List of values to receive notifications for when the current scroll position crosses them
-   * @pre The scroll bar actor has been initialised.
-   *
+   * @pre The scroll bar actor has been initialized.
    */
   void SetScrollPositionIntervals( const Dali::Vector<float>& positions );
 
@@ -261,7 +257,7 @@ public:
    *
    * @SINCE_1_0.0
    * @return The list of values to receive notifications for when the current scroll position crosses them
-   * @pre The scroll bar actor has been initialised.
+   * @pre The scroll bar actor has been initialized.
    *
    */
   Dali::Vector<float> GetScrollPositionIntervals() const;
@@ -270,9 +266,8 @@ public:
    * @brief Sets the direction of scroll bar to scroll either vertically or horizontally.
    *
    * @SINCE_1_0.0
-   * @param[in] direction The direction of scroll bar (either vertically or horizontally).
-   * @pre The scroll bar actor has been initialised.
-   *
+   * @param[in] direction The direction of scroll bar (either vertically or horizontally)
+   * @pre The scroll bar actor has been initialized.
    */
   void SetScrollDirection( Direction direction );
 
@@ -280,7 +275,7 @@ public:
    * @brief Gets the direction of scroll bar.
    *
    * @SINCE_1_0.0
-   * @return The direction of scroll bar.
+   * @return The direction of scroll bar
    */
   Direction GetScrollDirection() const;
 
@@ -289,8 +284,7 @@ public:
    *
    * @SINCE_1_0.0
    * @param[in] policy The height policy of scroll indicator
-   * @pre The scroll bar actor has been initialised.
-   *
+   * @pre The scroll bar actor has been initialized.
    */
   void SetIndicatorHeightPolicy( IndicatorHeightPolicy policy );
 
@@ -306,12 +300,12 @@ public:
    * @brief Sets the fixed height of scroll indicator.
    *
    * Normally the height of scroll indicator is changed dynamically according to the length of scroll content.
-   * However, when the height policy of scroll indicator is set to be fixed, the height will keep fixed
+   * However, when the height policy of scroll indicator is set to be fixed, the height will be kept fixed
    * regardless of the length of scroll content.
    *
    * @SINCE_1_0.0
    * @param[in] height The fixed height of the scroll indicator
-   * @pre The scroll bar actor has been initialised.
+   * @pre The scroll bar actor has been initialized.
    *
    */
   void SetIndicatorFixedHeight( float height );
@@ -324,7 +318,7 @@ public:
   float GetIndicatorFixedHeight() const;
 
   /**
-   * @brief Sets the duration in second for the scroll indicator to become fully visible
+   * @brief Sets the duration in seconds for the scroll indicator to become fully visible.
    *
    * @SINCE_1_0.0
    * @param[in] durationSeconds The duration for the scroll indicator to become fully visible
@@ -334,14 +328,14 @@ public:
   void SetIndicatorShowDuration( float durationSeconds );
 
   /**
-   * @brief Gets the duration in second for the scroll indicator to become fully visible
+   * @brief Gets the duration in seconds for the scroll indicator to become fully visible.
    * @SINCE_1_0.0
    * @return The duration for the scroll indicator to become fully visible
    */
   float GetIndicatorShowDuration() const;
 
   /**
-   * @brief Sets the duration in second for the scroll indicator to become fully invisible
+   * @brief Sets the duration in seconds for the scroll indicator to become fully invisible.
    *
    * @SINCE_1_0.0
    * @param[in] durationSeconds The duration for the scroll indicator to become fully invisible
@@ -351,20 +345,20 @@ public:
   void SetIndicatorHideDuration( float durationSeconds );
 
   /**
-   * @brief Gets the duration in second for the scroll indicator to become fully invisible
+   * @brief Gets the duration in seconds for the scroll indicator to become fully invisible.
    * @SINCE_1_0.0
    * @return The duration for the scroll indicator to become fully invisible
    */
   float GetIndicatorHideDuration() const;
 
   /**
-   * @brief Shows the scroll indicator
+   * @brief Shows the scroll indicator.
    * @SINCE_1_0.0
    */
   void ShowIndicator();
 
   /**
-   * @brief Hides the scroll indicator
+   * @brief Hides the scroll indicator.
    * @SINCE_1_0.0
    */
   void HideIndicator();
@@ -381,7 +375,7 @@ public: // Signals
    *   void YourCallbackName();
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    * @pre The Object has been initialized.
    */
   ScrollBar::PanFinishedSignalType& PanFinishedSignal();
@@ -397,7 +391,7 @@ public: // Signals
    *   void YourCallbackName(float currentScrollPosition);
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    * @pre The Object has been initialized.
    */
   ScrollBar::ScrollPositionIntervalReachedSignalType& ScrollPositionIntervalReachedSignal();
@@ -408,14 +402,14 @@ public: // Not intended for application developers
   /**
    * @brief Creates a handle using the Toolkit::Internal implementation.
    * @SINCE_1_0.0
-   * @param[in]  implementation  The Control implementation.
+   * @param[in] implementation The Control implementation
    */
   DALI_INTERNAL ScrollBar( Internal::ScrollBar& implementation );
 
   /**
    * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
    * @SINCE_1_0.0
-   * @param[in]  internal  A pointer to the internal CustomActor.
+   * @param[in] internal A pointer to the internal CustomActor
    */
   explicit DALI_INTERNAL ScrollBar( Dali::Internal::CustomActor* internal );
   /// @endcond
index f90fd39..8a880ac 100644 (file)
@@ -32,14 +32,14 @@ namespace Toolkit
  */
 
 /**
- * @brief Default item layout mode.
+ * @brief Enumeration for default item layout mode.
  * @SINCE_1_0.0
  */
 namespace DefaultItemLayout
 {
 
 /**
- * @brief The type of DefaultItemLayout
+ * @brief Enumeration for the type of DefaultItemLayout
  * @SINCE_1_0.0
  */
 enum Type
@@ -54,9 +54,8 @@ enum Type
  * @brief Creates a built-in default item-layout.
  *
  * @SINCE_1_0.0
- * @param[in]  type  The type of layout required.
- *
- * @return An ItemLayoutPtr to the newly created layout.
+ * @param[in] type The type of layout required
+ * @return An ItemLayoutPtr to the newly created layout
  */
 DALI_IMPORT_API ItemLayoutPtr New( Type type );
 
index e38579a..db4825a 100644 (file)
@@ -50,34 +50,34 @@ public:
   DALI_EXPORT_API virtual ~ItemFactory() {};
 
   /**
-   * @brief Query the number of items available from the factory.
+   * @brief Queries the number of items available from the factory.
    *
    * The maximum available item has an ID of GetNumberOfItems() - 1.
    * @SINCE_1_0.0
-   * @return the number of items
+   * @return The number of items
    */
   virtual unsigned int GetNumberOfItems() = 0;
 
   /**
-   * @brief Create an Actor to represent a visible item.
+   * @brief Creates an Actor to represent a visible item.
    *
    * @SINCE_1_0.0
-   * @param[in] itemId The ID of the newly visible item.
-   * @return An actor, or an uninitialized pointer if the ID is out of range.
+   * @param[in] itemId The ID of the newly visible item
+   * @return An actor, or an uninitialized pointer if the ID is out of range
    */
   virtual Actor NewItem(unsigned int itemId) = 0;
 
   /**
-   * @brief Notify the factory the actor representing the item is removed from ItemView.
+   * @brief Notifies the factory the actor representing the item is removed from ItemView.
    *
    * @SINCE_1_0.0
-   * @param[in] itemId The ID of the released item.
-   * @param[in] actor The actor that represents the released item.
+   * @param[in] itemId The ID of the released item
+   * @param[in] actor The actor that represents the released item
    */
   virtual void ItemReleased(unsigned int itemId, Actor actor) {};
 
   /**
-   * @brief Retrieve the extension for this control.
+   * @brief Retrieves the extension for this control.
    *
    * @SINCE_1_0.0
    * @return The extension if available, NULL otherwise
index a9f2769..017ac53 100755 (executable)
@@ -38,7 +38,6 @@ struct ItemLayout::Impl
   Vector3 mItemSize;                              ///< The size of an item in the layout
   ControlOrientation::Type mOrientation;          ///< the orientation of the layout.
   Property::Map mProperties;
-  bool mHasLayoutChanged;
 };
 
 ItemLayout::ItemLayout()
@@ -156,7 +155,6 @@ void ItemLayout::SetLayoutProperties(const Property::Map& properties)
       }
     }
   }
-  mImpl->mHasLayoutChanged = true;
   mImpl->mProperties = properties;
 }
 
@@ -165,16 +163,6 @@ Property::Map ItemLayout::GetLayoutProperties()
   return mImpl->mProperties;
 }
 
-bool ItemLayout::HasLayoutChanged()
-{
-  return mImpl->mHasLayoutChanged;
-}
-
-void ItemLayout::ResetLayoutChangedFlag()
-{
-  mImpl->mHasLayoutChanged = false;
-}
-
 } // namespace Toolkit
 
 } // namespace Dali
index 97af2df..a0cee00 100755 (executable)
@@ -48,11 +48,11 @@ typedef IntrusivePtr<ItemLayout> ItemLayoutPtr; ///< Pointer to a Dali::Toolkit:
 struct ItemRange
 {
   /**
-   * @brief Create a range of item identifiers.
+   * @brief Creates a range of item identifiers.
    *
    * @SINCE_1_0.0
-   * @param[in] beginItem The first item within the range.
-   * @param[in] endItem The past-the-end item.
+   * @param[in] beginItem The first item within the range
+   * @param[in] endItem The past-the-end item
    */
   ItemRange(unsigned int beginItem, unsigned int endItem)
   : begin(beginItem),
@@ -64,7 +64,7 @@ struct ItemRange
    * @brief Copy Constructor.
    *
    * @SINCE_1_0.0
-   * @param[in] copy ItemRange we should copy from.
+   * @param[in] copy ItemRange we should copy from
    */
   ItemRange(const ItemRange& copy)
   : begin(copy.begin),
@@ -76,8 +76,8 @@ struct ItemRange
    * @brief Assignment operator.
    *
    * @SINCE_1_0.0
-   * @param[in] range The Range to assign from.
-   * @return The updated range.
+   * @param[in] range The Range to assign from
+   * @return The updated range
    */
   ItemRange& operator=(const ItemRange& range)
   {
@@ -90,11 +90,11 @@ struct ItemRange
   }
 
   /**
-   * @brief Test whether an item is within the range.
+   * @brief Tests whether an item is within the range.
    *
    * @SINCE_1_0.0
-   * @param[in] itemId The item identifier.
-   * @return True if the item is within the range.
+   * @param[in] itemId The item identifier
+   * @return true if the item is within the range
    */
   bool Within(unsigned int itemId)
   {
@@ -103,11 +103,11 @@ struct ItemRange
   }
 
   /**
-   * @brief Create the intersection of two ranges.
+   * @brief Creates the intersection of two ranges.
    *
    * @SINCE_1_0.0
-   * @param[in] second The second range.
-   * @return The intersection.
+   * @param[in] second The second range
+   * @return The intersection
    */
   ItemRange Intersection(const ItemRange& second)
   {
@@ -181,19 +181,6 @@ public:
   Property::Map GetLayoutProperties();
 
   /**
-   * @brief Check if the Property has been changed.
-   * @SINCE_1_2.20
-   * @return whether the layout has been changed or not.if changed, return true.
-   */
-  bool HasLayoutChanged();
-
-  /**
-   * @brief Set the layout changed flag to false.
-   * @SINCE_1_2.20
-   */
-  void ResetLayoutChangedFlag();
-
-  /**
    * @brief Retrieve the target size of an item in the layout.
    *
    * This will return the default size for the layout unless overridden by calling SetItemSize().
index d49d32c..9cdf1e7 100755 (executable)
@@ -48,8 +48,8 @@ typedef IntrusivePtr<ItemLayout> ItemLayoutPtr;
 /**
  * @brief ItemView is a scrollable layout container.
  *
- * Multiple ItemLayouts may be provided, to determine the logical position of each item a layout.
- * Actors are provided from an external ItemFactory, to display the currently visible items.
+ * Multiple ItemLayouts may be provided to determine the logical position of each item layout.
+ * Actors are provided from an external ItemFactory to display the currently visible items.
  *
  * Signals
  * | %Signal Name                    | Method                                     |
@@ -69,7 +69,7 @@ class DALI_IMPORT_API ItemView : public Scrollable
 public:
 
   /**
-   * @brief The start and end property ranges for this control.
+   * @brief Enumeration for the start and end property ranges for this control.
    * @SINCE_1_1.18
    */
   enum PropertyRange
@@ -82,13 +82,13 @@ public:
   };
 
   /**
-   * @brief An enumeration of properties belonging to the ScrollView class.
+   * @brief Enumeration for the instance of properties belonging to the ScrollView class.
    * @SINCE_1_0.0
    */
   struct Property
   {
     /**
-     * @brief An enumeration of properties belonging to the ScrollView class.
+     * @brief Enumeration for the instance of properties belonging to the ScrollView class.
      * @SINCE_1_0.0
      */
     enum
@@ -117,7 +117,7 @@ public:
 public:
 
   /**
-   * @brief Create an uninitialized ItemView; this can be initialized with ItemView::New().
+   * @brief Creates an uninitialized ItemView; this can be initialized with ItemView::New().
    *
    * Calling member functions with an uninitialized Dali::Object is not allowed.
    * @SINCE_1_0.0
@@ -140,7 +140,7 @@ public:
   ItemView& operator=( const ItemView& itemView );
 
   /**
-   * @brief Destructor
+   * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    * @SINCE_1_0.0
@@ -148,19 +148,19 @@ public:
   ~ItemView();
 
   /**
-   * @brief Create an initialized ItemView.
+   * @brief Creates an initialized ItemView.
    *
    * @SINCE_1_0.0
-   * @param[in] factory The factory which provides ItemView with items.
-   * @return A handle to a newly allocated Dali resource.
+   * @param[in] factory The factory which provides ItemView with items
+   * @return A handle to a newly allocated Dali resource
    */
   static ItemView New(ItemFactory& factory);
 
   /**
-   * @brief Downcast a handle to ItemView handle.
+   * @brief Downcasts a handle to ItemView handle.
    *
-   * If handle points to a ItemView the downcast produces valid
-   * handle. If not the returned handle is left uninitialized.
+   * If handle points to a ItemView, the downcast produces valid handle.
+   * If not, the returned handle is left uninitialized.
    *
    * @SINCE_1_0.0
    * @param[in] handle Handle to an object
@@ -169,75 +169,75 @@ public:
   static ItemView DownCast( BaseHandle handle );
 
   /**
-   * @brief Query the number of layouts.
+   * @brief Queries the number of layouts.
    *
    * @SINCE_1_0.0
-   * @return The number of layouts.
+   * @return The number of layouts
    */
   unsigned int GetLayoutCount() const;
 
   /**
-   * @brief Add a layout.
+   * @brief Adds a layout.
    *
    * @SINCE_1_0.0
-   * @param[in] layout The layout.
+   * @param[in] layout The layout
    */
   void AddLayout(ItemLayout& layout);
 
   /**
-   * @brief Remove a layout.
+   * @brief Removes a layout.
    *
    * @SINCE_1_0.0
-   * @param[in] layoutIndex The index of one of the ItemView layouts.
+   * @param[in] layoutIndex The index of one of the ItemView layouts
    * @pre layoutIndex is less than GetLayoutCount().
    */
   void RemoveLayout(unsigned int layoutIndex);
 
   /**
-   * @brief Retrieve a layout.
+   * @brief Retrieves a layout.
    *
    * @SINCE_1_0.0
-   * @param[in] layoutIndex The index of the layout to retrieve.
+   * @param[in] layoutIndex The index of the layout to retrieve
    * @return The layout
    * @pre layoutIndex is less than GetLayoutCount().
    */
   ItemLayoutPtr GetLayout(unsigned int layoutIndex) const;
 
   /**
-   * @brief Retrieve the currently active layout, if any.
+   * @brief Retrieves the currently active layout, if any.
    *
    * @SINCE_1_0.0
-   * @return The layout, or an uninitialized pointer if no layout is active.
+   * @return The layout, or an uninitialized pointer if no layout is active
    */
   ItemLayoutPtr GetActiveLayout() const;
 
   /**
-   * @brief Retrieve the current layout-position of an item in the ItemView.
+   * @brief Retrieves the current layout-position of an item in the ItemView.
    *
    * @SINCE_1_0.0
-   * @param[in] itemId The item identifier.
-   * @return The current layout-position.
+   * @param[in] itemId The item identifier
+   * @return The current layout-position
    */
   float GetCurrentLayoutPosition(ItemId itemId) const;
 
   /**
-   * @brief Activate one of the layouts; this will resize the ItemView
+   * @brief Activates one of the layouts; this will resize the ItemView
    * & relayout actors within the ItemView.
    *
    * This is done by applying constraints from the new layout, and
    * removing constraints from the previous layout.
    *
    * @SINCE_1_0.0
-   * @param[in] layoutIndex The index of one of the ItemView layouts.
-   * @param[in] targetSize The target ItemView & layout size.
-   * @param[in] durationSeconds The time taken to relayout in seconds (zero for immediate).
+   * @param[in] layoutIndex The index of one of the ItemView layouts
+   * @param[in] targetSize The target ItemView & layout size
+   * @param[in] durationSeconds The time taken to relayout in seconds (zero for immediate)
    * @pre layoutIndex is less than GetLayoutCount().
    * @pre durationSeconds is greater or equal to zero.
    */
   void ActivateLayout(unsigned int layoutIndex, Vector3 targetSize, float durationSeconds);
 
   /**
-   * @brief Deactivate the current layout, if any.
+   * @brief Deactivates the current layout, if any.
    *
    * The constraints applied by the layout will be removed.
    * @SINCE_1_0.0
@@ -245,8 +245,8 @@ public:
   void DeactivateCurrentLayout();
 
   /**
-   * @brief Set the minimum swipe speed in pixels per second; A pan
-   * gesture must exceed this to trigger a swipe.
+   * @brief Sets the minimum swipe speed in pixels per second;
+   *  A pan gesture must exceed this to trigger a swipe.
    *
    * @SINCE_1_0.0
    * @param[in] speed The minimum swipe speed
@@ -254,7 +254,7 @@ public:
   void SetMinimumSwipeSpeed(float speed);
 
   /**
-   * @brief Get the minimum swipe speed in pixels per second.
+   * @brief Gets the minimum swipe speed in pixels per second.
    *
    * @SINCE_1_0.0
    * @return The minimum swipe speed
@@ -262,16 +262,16 @@ public:
   float GetMinimumSwipeSpeed() const;
 
   /**
-   * @brief Set the minimum swipe distance in actor coordinates; A pan
-   * gesture must exceed this to trigger a swipe.
+   * @brief Sets the minimum swipe distance in actor coordinates;
+   *  A pan gesture must exceed this to trigger a swipe.
    *
    * @SINCE_1_0.0
-   * @param[in] distance The minimum swipe distance.
+   * @param[in] distance The minimum swipe distance
    */
   void SetMinimumSwipeDistance(float distance);
 
   /**
-   * @brief Get the minimum swipe distance in actor coordinates.
+   * @brief Gets the minimum swipe distance in actor coordinates.
    *
    * @SINCE_1_0.0
    * @return The minimum swipe distance
@@ -422,11 +422,12 @@ public:
    *
    * A relayout will occur for the remaining actors; for example if RemoveItem(Item(2, ActorZ), 0) is called,
    * the items with ID 3 or greater will be moved:
-   *   Initial actors:     After remove:
-   *     ID 1 - ActorA       ID 1 - ActorA
-   *     ID 2 - ActorB       ID 2 - ActorC (previously ID 3)
-   *     ID 3 - ActorC       ID 3 - ActorB (previously ID 4)
-   *     ID 4 - ActorD
+   *  | Initial actors:    | After remove:  |
+   *  |:------------------ |:-------------- |
+   *  |  ID 1 - ActorA     |  ID 1 - ActorA |
+   *  |  ID 2 - ActorB     |  ID 2 - ActorC (previously ID 3) |
+   *  |  ID 3 - ActorC     |  ID 3 - ActorB (previously ID 4) |
+   *  |  ID 4 - ActorD     |                |
    * @SINCE_1_0.0
    * @param[in] itemId The Item ID of the item to remove.
    * @param[in] durationSeconds How long the relayout takes in seconds.
index 3116169..2e2c2b2 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_TOOLKIT_SCROLL_VIEW_CONSTRAINTS_H__
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -43,22 +43,20 @@ namespace Toolkit
  */
 
 /**
- * @brief Move Actor constraint.
+ * @brief Moves an Actor in accordance with the scroll position.
  *
- * Moves an Actor in accordance to scroll position.
+ * @SINCE_1_0.0
  * @param[in] current Current position
  * @param[in] inputs The position input that Actor will move
- * @SINCE_1_0.0
  */
 DALI_IMPORT_API void MoveActorConstraint( Vector3& current, const PropertyInputContainer& inputs );
 
 /**
- * @brief Wrap Actor constraint.
+ * @brief Wraps an Actor's position in accordance with the min/max bounds of domain.
  *
- * Wraps an Actors position in accordance to min/max bounds of domain.
+ * @SINCE_1_0.0
  * @param[in] position Position to be wrapped
  * @param[in] inputs The input that Actor's position will be wrapped
- * @SINCE_1_0.0
  */
 DALI_IMPORT_API void WrapActorConstraint( Vector3& position, const PropertyInputContainer& inputs );
 
index d6bcc30..049e2ab 100644 (file)
@@ -50,7 +50,7 @@ class ScrollViewEffect;
  * ScrollView instance.
  *
  * Such effects are purely logical (i.e. physics), and may produce
- * properties that can be used with visual effects.  Such as creating
+ * properties that can be used with visual effects, such as creating
  * constraints that are applied to ShaderEffects or Actors using these
  * properties as inputs.
  * @SINCE_1_0.0
@@ -61,7 +61,7 @@ class DALI_IMPORT_API ScrollViewEffect : public Dali::BaseHandle
 public:
 
   /**
-   * @brief Create an uninitialized ScrollViewEffect; this can only be initialized with derived classes.
+   * @brief Creates an uninitialized ScrollViewEffect; this can only be initialized with derived classes.
    *
    * Calling member functions with an uninitialized Toolkit::BaseObject is not allowed.
    * @SINCE_1_0.0
@@ -75,7 +75,7 @@ public: // Not intended for application developers
    * @brief This constructor is used by Dali New() methods.
    *
    * @SINCE_1_0.0
-   * @param [in] impl A pointer to a newly allocated Dali resource
+   * @param[in] impl A pointer to a newly allocated Dali resource
    */
   explicit DALI_INTERNAL ScrollViewEffect(Internal::ScrollViewEffect *impl);
   /// @endcond
index 951298d..dc23694 100644 (file)
@@ -44,7 +44,7 @@ class ScrollViewPagePathEffect;
  *
  * This effect causes Actors to follow a given path. The opacity of the actor will be 0.0 at
  * the beginning of the path and will go to 1.0 as it is approximating to half of the path to return
- * to 0.0 at the end of the path
+ * to 0.0 at the end of the path.
  *
  *
  * ScrollView
@@ -68,40 +68,40 @@ class DALI_IMPORT_API ScrollViewPagePathEffect : public ScrollViewEffect
 public:
 
   /**
-   * @brief Create an initialized ScrollViewPagePathEffect.
+   * @brief Creates an initialized ScrollViewPagePathEffect.
    * @SINCE_1_0.0
    * @param[in] path The path that will be used by the scroll effect
    * @param[in] forward Vector in page object space which will be aligned with the tangent of the path
-   * @param[in] inputPropertyIndex Index of a property of the scroll-view which will be used as the input for the path.
+   * @param[in] inputPropertyIndex Index of a property of the scroll-view which will be used as the input for the path
    * @param[in] pageSize Size of a page in the scrollview
    * @param[in] pageCount Total number of pages in the scrollview
-   * @return A handle to a newly allocated Dali resource.
+   * @return A handle to a newly allocated Dali resource
    */
   static ScrollViewPagePathEffect New(Path path, const Vector3& forward, Dali::Property::Index inputPropertyIndex, const Vector3& pageSize, unsigned int pageCount);
 
   /**
-   * @brief Create an uninitialized ScrollViewPagePathEffect; this can be initialized with ScrollViewPagePathEffect::New()
+   * @brief Creates an uninitialized ScrollViewPagePathEffect; this can be initialized with ScrollViewPagePathEffect::New().
    * Calling member functions with an uninitialized Toolkit::ScrollViewPagePathEffect is not allowed.
    * @SINCE_1_0.0
    */
   ScrollViewPagePathEffect();
 
   /**
-   * @brief Downcast a handle to ScrollViewPagePathEffect handle.
+   * @brief Downcasts a handle to ScrollViewPagePathEffect handle.
    *
-   * If handle points to a ScrollViewPagePathEffect the
-   * downcast produces valid handle. If not the returned handle is left uninitialized.
+   * If handle points to a ScrollViewPagePathEffect, the downcast produces valid handle.
+   * If not, the returned handle is left uninitialized.
    * @SINCE_1_0.0
    * @param[in] handle Handle to an object
-   * @return handle to a ScrollViewPagePathEffect or an uninitialized handle
+   * @return Handle to a ScrollViewPagePathEffect or an uninitialized handle
    */
   static ScrollViewPagePathEffect DownCast( BaseHandle handle );
 
   /**
    * @brief Manually apply effect to a page in the scroll-view.
    * @SINCE_1_0.0
-   * @param[in] page The page to be affected by this effect.
-   * @param[in] pageOrder The order of the page in the scroll-view
+   * @param[in] page The page to be affected by this effect
+   * @param[in] pageOrder The order of the page in the scroll view
    */
   void ApplyToPage( Actor page, unsigned int pageOrder );
 
@@ -111,7 +111,7 @@ protected:
   /**
    * @brief This constructor is used by Dali New() methods.
    * @SINCE_1_0.0
-   * @param [in] impl A pointer to a newly allocated Dali resource
+   * @param[in] impl A pointer to a newly allocated Dali resource
    */
   explicit DALI_INTERNAL ScrollViewPagePathEffect( Internal::ScrollViewPagePathEffect *impl );
   /// @endcond
index eadaa49..471f371 100644 (file)
@@ -248,7 +248,7 @@ unsigned int FixedRuler::GetPageFromPosition(float position, bool wrap) const
     {
       position = WrapInDomain(position, mDomain.min, mDomain.max);
     }
-    page = std::max(static_cast<double>(0.0f), floor((position - mDomain.min) / mSpacing + 0.5f));
+    page = std::max(static_cast<double>(0.0f), static_cast<double>(floor((position - mDomain.min) / mSpacing + 0.5f)));
 
     if(wrap)
     {
index 0028cd7..1a0e3fb 100644 (file)
@@ -40,7 +40,7 @@ class ScrollView;
  */
 
 /**
- * @brief How axes/rotation or scale are clamped
+ * @brief Enumeration for how axes/rotation or scale are clamped.
  * @SINCE_1_0.0
  */
 enum ClampState
@@ -51,7 +51,7 @@ enum ClampState
 };
 
 /**
- * @brief A 2 dimensional clamp
+ * @brief A 2 dimensional clamp.
  * @SINCE_1_0.0
  */
 struct ClampState2D
@@ -61,7 +61,7 @@ struct ClampState2D
 };
 
 /**
- * @brief The snap type
+ * @brief Enumeration for the snap type.
  * @SINCE_1_0.0
  */
 enum SnapType
@@ -71,7 +71,7 @@ enum SnapType
 };
 
 /**
- * @brief DirectionBias types.
+ * @brief Enumeration for DirectionBias types.
  * @SINCE_1_0.0
  */
 enum DirectionBias
@@ -95,7 +95,7 @@ public:
    * @SINCE_1_0.0
    * @param[in] min Minimum extent (point cannot traverse less than this)
    * @param[in] max Maximum extent (point cannot traverse greater than this)
-   * @param[in] enabled Whether domain has been enabled or not.
+   * @param[in] enabled Whether domain has been enabled or not
    */
   explicit RulerDomain(float min, float max, bool enabled = true);
 
@@ -112,10 +112,10 @@ public:
    * subject is not a point but a line to that should be clamped.
    *
    * @SINCE_1_0.0
-   * @param[in] x X point to be clamped between (min) and (max) extents.
-   * @param[in] length (optional) The Length of the line from (x) to (x + length) to be clamped.
-   * @param[in] scale Scaling parameter which treats domain as scaled in calculations.
-   * @return The clamped value.
+   * @param[in] x X point to be clamped between (min) and (max) extents
+   * @param[in] length (optional) The Length of the line from (x) to (x + length) to be clamped
+   * @param[in] scale Scaling parameter which treats domain as scaled in calculations
+   * @return The clamped value
    */
   float Clamp(float x, float length = 0.0f, float scale = 1.0f) const;
 
@@ -126,11 +126,11 @@ public:
    * subject is not a point but a line to that should be clamped.
    *
    * @SINCE_1_0.0
-   * @param[in] x X point to be clamped between (min) and (max) extents.
-   * @param[in] length (optional) The Length of the line from (x) to (x + length) to be clamped.
-   * @param[in] scale Scaling parameter which treats domain as scaled in calculations.
-   * @param[out] clamped Whether clamping occured and which size (None, Min or Max)
-   * @return The clamped value.
+   * @param[in] x X point to be clamped between (min) and (max) extents
+   * @param[in] length (optional) The Length of the line from (x) to (x + length) to be clamped
+   * @param[in] scale Scaling parameter which treats domain as scaled in calculations
+   * @param[out] clamped Whether clamping occurred and which size (None, Min or Max)
+   * @return The clamped value
    */
   float Clamp(float x, float length, float scale, ClampState &clamped) const;
 
@@ -138,7 +138,7 @@ public:
    * @brief Returns (max-min) size of ruler.
    *
    * @SINCE_1_0.0
-   * @return The size of the ruler from min to max.
+   * @return The size of the ruler from min to max
    */
   float GetSize() const;
 
@@ -148,10 +148,10 @@ public:
 class RulerExtension;
 
 /**
- * @brief Abstract class to define scroll axes.
+ * @brief Abstracts class to define scroll axes.
  *
- * It can specify whether they are traversable, where their snap
- * points are and their domain.
+ * It can specify whether they are traversable,
+ * where their snap points are and their domain.
  * @SINCE_1_0.0
  */
 class DALI_IMPORT_API Ruler : public RefObject
@@ -166,7 +166,7 @@ public:
 public:
 
   /**
-   * @brief Constructs ruler, default enabled, with limitless domain.
+   * @brief Constructs ruler, enabled by default, with limitless domain.
    * @SINCE_1_0.0
    */
   Ruler();
@@ -175,7 +175,7 @@ public:
    * @brief Snaps (x) in accordance to the ruler settings.
    *
    * @SINCE_1_0.0
-   * @param[in] x The input value on the ruler to be snapped.
+   * @param[in] x The input value on the ruler to be snapped
    * @param[in] bias (optional) The biasing employed for snapping
    * 0 floor input (floor x) "Used for Flick Left"
    * 0.5 round input (floor x + 0.5) "Used for Release"
@@ -197,7 +197,7 @@ public:
    * @param[in] page The page index
    * @param[out] volume The overflow volume when the page exceeds the domain (wrap must be enabled)
    * @param[in] wrap Enable wrap mode
-   * @return The position representing this page point.
+   * @return The position representing this page point
    */
   virtual float GetPositionFromPage(unsigned int page, unsigned int &volume, bool wrap) const = 0;
 
@@ -210,7 +210,7 @@ public:
    * @SINCE_1_0.0
    * @param[in] position The position on the domain
    * @param[in] wrap Enable wrap mode
-   * @return The page where this position resides.
+   * @return The page where this position resides
    */
   virtual unsigned int GetPageFromPosition(float position, bool wrap) const = 0;
 
@@ -218,7 +218,7 @@ public:
    * @brief Returns the total number of pages within this Ruler.
    *
    * @SINCE_1_0.0
-   * @return The number of pages in the Ruler.
+   * @return The number of pages in the Ruler
    */
   virtual unsigned int GetTotalPages() const = 0;
 
@@ -236,7 +236,7 @@ public:
    * @brief Gets the ruler type.
    *
    * @SINCE_1_0.0
-   * @return The ruler type.
+   * @return The ruler type
    */
   Ruler::RulerType GetType() const;
 
@@ -261,15 +261,15 @@ public:
   void Disable();
 
   /**
-   * @brief Sets Domain.
+   * @brief Sets the Domain.
    *
    * @SINCE_1_0.0
-   * @param[in] domain Ruler domain object.
+   * @param[in] domain Ruler domain object
    */
   void SetDomain(RulerDomain domain);
 
   /**
-   * @brief Gets Domain.
+   * @brief Gets the Domain.
    *
    * @SINCE_1_0.0
    * @return The domain
@@ -289,10 +289,10 @@ public:
    * subject is not a point but a line that should be clamped.
    *
    * @SINCE_1_0.0
-   * @param[in] x X point to be clamped between (min) and (max) extents.
-   * @param[in] length (optional) The Length of the line from (x) to (x + length) to be clamped.
-   * @param[in] scale Scaling parameter which treats domain as scaled in calculations.
-   * @return The clamped value.
+   * @param[in] x X point to be clamped between (min) and (max) extents
+   * @param[in] length (optional) The Length of the line from (x) to (x + length) to be clamped
+   * @param[in] scale Scaling parameter which treats domain as scaled in calculations
+   * @return The clamped value
    */
   float Clamp(float x, float length = 0.0f, float scale = 1.0f) const;
 
@@ -304,11 +304,11 @@ public:
    * subject is not a point but a line to that should be clamped.
    *
    * @SINCE_1_0.0
-   * @param[in] x X point to be clamped between (min) and (max) extents.
-   * @param[in] length (optional) The Length of the line from (x) to (x + length) to be clamped.
-   * @param[in] scale Scaling parameter which treats domain as scaled in calculations.
-   * @param[out] clamped Whether clamping occured and which size (None, Min or Max)
-   * @return The clamped value.
+   * @param[in] x X point to be clamped between (min) and (max) extents
+   * @param[in] length (optional) The Length of the line from (x) to (x + length) to be clamped
+   * @param[in] scale Scaling parameter which treats domain as scaled in calculations
+   * @param[out] clamped Whether clamping occurred and which size (None, Min or Max)
+   * @return The clamped value
    */
   float Clamp(float x, float length, float scale, ClampState &clamped) const;
 
@@ -316,16 +316,16 @@ public:
    * @brief Snaps and Clamps (x) in accordance to ruler settings.
    *
    * @SINCE_1_0.0
-   * @param[in] x value to be snapped in accordance to ruler snap value,
-   *            and clamped in accordance to the ruler's domain (if set).
+   * @param[in] x value to be snapped in accordance to ruler snap value,
+   *            and clamped in accordance to the ruler's domain (if set)
    * @param[in] bias (optional) The biasing employed for snapping
    *            0 floor input (floor x) "Used for Flick Left"
    *            0.5 round input (floor x + 0.5) "Used for Release"
    *            1 ceil input (floor x + 1.0) "Used for Flick Right"
    * @param[in] length (optional) The Length of the line from (x) to (x + length)
-   *            to be clamped.
-   * @param[in] scale Scaling parameter which treats domain as scaled in calculations.
-   * @return the clamped value after snapping
+   *            to be clamped
+   * @param[in] scale Scaling parameter which treats domain as scaled in calculations
+   * @return The clamped value after snapping
    */
   float SnapAndClamp(float x, float bias = 0.5f, float length = 0.0f, float scale = 1.0f) const;
 
@@ -333,16 +333,16 @@ public:
    * @brief Snaps and Clamps (x) in accordance to ruler settings.
    *
    * @SINCE_1_0.0
-   * @param[in] x value to be snapped in accordance to ruler snap value,
-   *            and clamped in accordance to the ruler's domain (if set).
+   * @param[in] x value to be snapped in accordance to ruler snap value,
+   *            and clamped in accordance to the ruler's domain (if set)
    * @param[in] bias (optional) The biasing employed for snapping
    * 0 floor input (floor x) "Used for Flick Left"
    * 0.5 round input (floor x + 0.5) "Used for Release"
    * 1 ceil input (floor x + 1.0) "Used for Flick Right"
    * @param[in] length (optional) The Length of the line from (x) to (x + length)
-   * to be clamped.
-   * @param[in] scale Scaling parameter which treats domain as scaled in calculations.
-   * @param[out] clamped Whether clamping occured and which size (None, Min or Max)
+   * to be clamped
+   * @param[in] scale Scaling parameter which treats domain as scaled in calculations
+   * @param[out] clamped Whether clamping occurred and which size (None, Min or Max)
    * @return The clamped value after snapping
    */
   float SnapAndClamp(float x, float bias, float length, float scale, ClampState &clamped) const;
@@ -407,10 +407,10 @@ class DALI_IMPORT_API FixedRuler : public Ruler
 {
 public:
   /**
-   * @brief Constructor
+   * @brief Constructor.
    *
    * @SINCE_1_0.0
-   * @param[in] spacing The spacing between each interval on this ruler.
+   * @param[in] spacing The spacing between each interval on this ruler
    */
   FixedRuler(float spacing = 1.0f);
 
@@ -457,7 +457,7 @@ class DALI_IMPORT_API ScrollView : public Scrollable
 public:
 
   /**
-   * @brief Clamp signal event's data
+   * @brief Clamps signal event's data.
    * @SINCE_1_0.0
    */
   struct ClampEvent
@@ -468,7 +468,7 @@ public:
   };
 
   /**
-   * @brief Snap signal event's data.
+   * @brief Snaps signal event's data.
    * @SINCE_1_0.0
    */
   struct SnapEvent
@@ -479,7 +479,7 @@ public:
   };
 
   /**
-   * @brief The start and end property ranges for this control.
+   * @brief Enumeration for the start and end property ranges for this control.
    * @SINCE_1_0.0
    */
   enum PropertyRange
@@ -492,13 +492,13 @@ public:
   };
 
   /**
-   * @brief An enumeration of properties belonging to the ScrollView class.
+   * @brief Enumeration for the instance of properties belonging to the ScrollView class.
    * @SINCE_1_0.0
    */
   struct Property
   {
     /**
-     * @brief An enumeration of properties belonging to the ScrollView class.
+     * @brief Enumeration for the instance of properties belonging to the ScrollView class.
      * @SINCE_1_0.0
      */
     enum
@@ -551,7 +551,7 @@ public:
    * Creates another handle that points to the same real object.
    *
    * @SINCE_1_0.0
-   * @param[in] handle to copy from
+   * @param[in] handle Handle to copy from
    */
   ScrollView( const ScrollView& handle );
 
@@ -566,7 +566,7 @@ public:
   ScrollView& operator=( const ScrollView& handle );
 
   /**
-   * @brief Destructor
+   * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    * @SINCE_1_0.0
@@ -574,18 +574,18 @@ public:
   ~ScrollView();
 
   /**
-   * @brief Create an initialized ScrollView.
+   * @brief Creates an initialized ScrollView.
    *
    * @SINCE_1_0.0
-   * @return A handle to a newly allocated Dali resource.
+   * @return A handle to a newly allocated Dali resource
    */
   static ScrollView New();
 
   /**
-   * @brief Downcast a handle to ScrollView handle.
+   * @brief Downcasts a handle to ScrollView handle.
    *
-   * If handle points to a ScrollView the downcast produces valid
-   * handle. If not the returned handle is left uninitialized.
+   * If handle points to a ScrollView, the downcast produces valid handle.
+   * If not, the returned handle is left uninitialized.
    *
    * @SINCE_1_0.0
    * @param[in] handle Handle to an object
@@ -596,34 +596,34 @@ public:
 public:
 
   /**
-   * @brief Get snap-animation's AlphaFunction.
+   * @brief Gets snap-animation's AlphaFunction.
    *
    * @SINCE_1_0.0
-   * @return Current easing alpha function of the snap animation.
+   * @return Current easing alpha function of the snap animation
    */
   AlphaFunction GetScrollSnapAlphaFunction() const;
 
   /**
-   * @brief Set snap-animation's AlphaFunction.
+   * @brief Sets snap-animation's AlphaFunction.
    *
    * @SINCE_1_0.0
-   * @param[in] alpha Easing alpha function of the snap animation.
+   * @param[in] alpha Easing alpha function of the snap animation
    */
   void SetScrollSnapAlphaFunction(AlphaFunction alpha);
 
   /**
-   * @brief Get flick-animation's AlphaFunction.
+   * @brief Gets flick-animation's AlphaFunction.
    *
    * @SINCE_1_0.0
-   * @return Current easing alpha function of the flick animation.
+   * @return Current easing alpha function of the flick animation
    */
   AlphaFunction GetScrollFlickAlphaFunction() const;
 
   /**
-   * @brief Set flick-animation's AlphaFunction.
+   * @brief Sets flick-animation's AlphaFunction.
    *
    * @SINCE_1_0.0
-   * @param[in] alpha Easing alpha function of the flick animation.
+   * @param[in] alpha Easing alpha function of the flick animation
    */
   void SetScrollFlickAlphaFunction(AlphaFunction alpha);
 
@@ -633,7 +633,7 @@ public:
    * This animation occurs when the user drags, and releases.
    *
    * @SINCE_1_0.0
-   * @return The time in seconds for the animation to take.
+   * @return The time in seconds for the animation to take
    */
   float GetScrollSnapDuration() const;
 
@@ -643,7 +643,7 @@ public:
    * This animation occurs when the user drags, and releases.
    *
    * @SINCE_1_0.0
-   * @param[in] time The time in seconds for the animation to take.
+   * @param[in] time The time in seconds for the animation to take
    */
   void SetScrollSnapDuration(float time);
 
@@ -653,7 +653,7 @@ public:
    * This animation occurs when the user flicks scroll view.
    *
    * @SINCE_1_0.0
-   * @return The time in seconds for the animation to take.
+   * @return The time in seconds for the animation to take
    */
   float GetScrollFlickDuration() const;
 
@@ -663,12 +663,12 @@ public:
    * This animation occurs when the user flicks scroll view.
    *
    * @SINCE_1_0.0
-   * @param[in] time The time in seconds for the animation to take.
+   * @param[in] time The time in seconds for the animation to take
    */
   void SetScrollFlickDuration(float time);
 
   /**
-   * @brief Set X axis ruler.
+   * @brief Sets X axis ruler.
    *
    * Defines how scrolling horizontally is snapped, and
    * the boundary (domain) in which the ScrollView can pan.
@@ -679,7 +679,7 @@ public:
   void SetRulerX(RulerPtr ruler);
 
   /**
-   * @brief Set Y axis ruler.
+   * @brief Sets Y axis ruler.
    *
    * Defines how scrolling vertically is snapped, and the boundary
    * (domain) in which the ScrollView can pan.
@@ -690,18 +690,18 @@ public:
   void SetRulerY(RulerPtr ruler);
 
   /**
-   * @brief Set scroll sensibility of pan gesture.
+   * @brief Sets scroll sensibility of pan gesture.
    *
    * @SINCE_1_0.0
-   * @param[in] sensitive true to enable scroll, false to disable scrolling
+   * @param[in] sensitive @c true to enable scroll, @c false to disable scrolling
    * @note Unlike Actor::SetSensitive(), this determines whether this ScrollView
-   * should react (e.g. pan), without disrupting the sensitivity of it's children.
+   * should react (e.g. pan), without disrupting the sensitivity of its children.
    *
    */
   void SetScrollSensitive(bool sensitive);
 
   /**
-   * @brief Set maximum overshoot amount.
+   * @brief Sets maximum overshoot amount.
    *
    * The final overshoot value is within 0.0f to 1.0f, but the maximum
    * overshoot is in pixels (e.g. if you scroll 75 pixels beyond the
@@ -715,19 +715,19 @@ public:
   void SetMaxOvershoot(float overshootX, float overshootY);
 
   /**
-   * @brief Set Snap Overshoot animation's AlphaFunction.
+   * @brief Sets Snap Overshoot animation's AlphaFunction.
    *
    * @SINCE_1_0.0
-   * @param[in] alpha Easing alpha function of the overshoot snap animation.
+   * @param[in] alpha Easing alpha function of the overshoot snap animation
    */
   void SetSnapOvershootAlphaFunction(AlphaFunction alpha);
 
   /**
-   * @brief Set Snap Overshoot animation's Duration.
+   * @brief Sets Snap Overshoot animation's Duration.
    *
    * @SINCE_1_0.0
-   * @param[in] duration The duration of the overshoot snap animation.
-   * @note Set duration to 0 seconds, to disable Animation.
+   * @param[in] duration The duration of the overshoot snap animation
+   * @note Set duration to 0 seconds to disable Animation.
    *
    */
   void SetSnapOvershootDuration(float duration);
@@ -750,7 +750,7 @@ public:
    * When enabled, the ScrollView contents are wrapped over the X/Y Domain.
    *
    * @SINCE_1_0.0
-   * @param[in] enable Enables (true), or disables (false) Wrap Mode.
+   * @param[in] enable Enables (true), or disables (false) Wrap Mode
    * @note You must apply a position constraint that causes Wrapping
    * to all children.
    *
@@ -780,7 +780,7 @@ public:
    * @brief Returns state of Axis Auto Lock mode.
    *
    * @SINCE_1_0.0
-   * @return Whether Axis Auto Lock mode has been enabled or not.
+   * @return Whether Axis Auto Lock mode has been enabled or not
    */
   bool GetAxisAutoLock() const;
 
@@ -792,7 +792,7 @@ public:
    * only panning, until the pan gesture has completed.
    *
    * @SINCE_1_0.0
-   * @param[in] enable Enables (true), or disables (false) AxisAutoLock mode.
+   * @param[in] enable Enables (true), or disables (false) AxisAutoLock mode
    */
   void SetAxisAutoLock(bool enable);
 
@@ -801,7 +801,7 @@ public:
    * should be locked to the Horizontal or Vertical axis.
    *
    * @SINCE_1_0.0
-   * @return The gradient, a value between 0.0 and 1.0f.
+   * @return The gradient, a value between 0.0 and 1.0f
    */
   float GetAxisAutoLockGradient() const;
 
@@ -809,13 +809,13 @@ public:
    * @brief Sets the gradient threshold at which a panning gesture should be locked to the
    * Horizontal or Vertical axis.
    *
-   * By default this is 0.36 (0.36:1) which means angles less than 20
+   * By default, this is 0.36 (0.36:1) which means angles less than 20
    * degrees to an axis will lock to that axis.
    *
    * @SINCE_1_0.0
    * @param[in] gradient A value between 0.0 and 1.0 (auto-lock for all angles)
    * @note Specifying a value of 1.0 (the maximum value accepted) indicates that
-   * all panning gestures will auto-lock. Either to the horizontal or vertical axis.
+   * all panning gestures will auto-lock either to the horizontal or vertical axis.
    *
    */
   void SetAxisAutoLockGradient(float gradient);
@@ -827,7 +827,7 @@ public:
    * This is a value in stage-diagonals per second^2.
    * stage-diagonal = Length( stage.width, stage.height )
    * @SINCE_1_0.0
-   * @return Friction coefficient is returned.
+   * @return Friction coefficient is returned
    */
   float GetFrictionCoefficient() const;
 
@@ -842,7 +842,7 @@ public:
    * Friction coefficient of 1.0 means the swipe velocity will
    * reduce by 1.0 * 933 pixels/sec^2.
    * @SINCE_1_0.0
-   * @param[in] friction Friction coefficient, must be greater than 0.0 (default = 1.0)
+   * @param[in] friction Friction coefficient must be greater than 0.0 (default = 1.0)
    */
   void SetFrictionCoefficient(float friction);
 
@@ -854,7 +854,7 @@ public:
    * flick velocity to determine the actual velocity at
    * which to move the scrolling area.
    * @SINCE_1_0.0
-   * @return The flick speed coefficient is returned.
+   * @return The flick speed coefficient is returned
    */
   float GetFlickSpeedCoefficient() const;
 
@@ -866,7 +866,7 @@ public:
    * flick velocity to determine the actual velocity at
    * which to move the scrolling area.
    * @SINCE_1_0.0
-   * @param[in] speed The flick speed coefficient (default = 1.0).
+   * @param[in] speed The flick speed coefficient (default = 1.0)
    */
   void SetFlickSpeedCoefficient(float speed);
 
@@ -881,7 +881,7 @@ public:
   /**
    * @brief Sets the minimum pan distance required for a flick in pixels.
    *
-   * Takes a Vector2 containing separate x and y values. As long as the pan distance exceeds one of these axes a flick will be allowed.
+   * Takes a Vector2 containing separate x and y values. As long as the pan distance exceeds one of these axes, a flick will be allowed.
    *
    * @SINCE_1_0.0
    * @param[in] distance The minimum pan distance for a flick
@@ -935,7 +935,7 @@ public:
    * each wheel event received in free panning mode.
    *
    * @SINCE_1_0.0
-   * @return The step of scroll distance(pixel) in X and Y axes.
+   * @return The step of scroll distance(pixel) in X and Y axes
    */
   Vector2 GetWheelScrollDistanceStep() const;
 
@@ -944,7 +944,7 @@ public:
    * each wheel event received in free panning mode.
    *
    * @SINCE_1_0.0
-   * @param[in] step The step of scroll distance(pixel) in X and Y axes.
+   * @param[in] step The step of scroll distance(pixel) in X and Y axes
    *
    * @note If snap points are defined in the rulers, it will always
    * scroll to the next snap point towards the scroll direction while
@@ -956,8 +956,8 @@ public:
   /**
    * @brief Retrieves current scroll position.
    *
-   * @returns The current scroll position.
    * @SINCE_1_0.0
+   * @return The current scroll position
    */
   Vector2 GetCurrentScrollPosition() const;
 
@@ -970,7 +970,7 @@ public:
    * @SINCE_1_0.0
    * @note Pages start from 0 as the first page, not 1.
    *
-   * @returns The Current page.
+   * @return The Current page
    */
   unsigned int GetCurrentPage() const;
 
@@ -982,7 +982,7 @@ public:
    * - If Rulers have been applied to the axes, then the contents will scroll until
    * reaching the domain boundary.
    * @SINCE_1_0.0
-   * @param[in] position The position to scroll to.
+   * @param[in] position The position to scroll to
    * @note Contents will not snap to ruler snap points.
    *
    */
@@ -996,7 +996,7 @@ public:
    * - If Rulers have been applied to the axes, then the contents will scroll until
    * reaching the domain boundary.
    * @SINCE_1_0.0
-   * @param[in] position The position to scroll to.
+   * @param[in] position The position to scroll to
    * @param[in] duration The duration of the animation in seconds
    * @note Contents will not snap to ruler snap points.
    *
@@ -1011,7 +1011,7 @@ public:
    * - If Rulers have been applied to the axes, then the contents will scroll until
    * reaching the domain boundary.
    * @SINCE_1_0.0
-   * @param[in] position The position to scroll to.
+   * @param[in] position The position to scroll to
    * @param[in] duration The duration of the animation in seconds
    * @param[in] alpha The alpha function to use
    * @note Contents will not snap to ruler snap points.
@@ -1027,10 +1027,10 @@ public:
    * - If Rulers have been applied to the axes, then the contents will scroll until
    * reaching the domain boundary.
    * @SINCE_1_0.0
-   * @param[in] position The position to scroll to.
+   * @param[in] position The position to scroll to
    * @param[in] duration The duration of the animation in seconds
-   * @param[in] horizontalBias Whether to bias scrolling to left or right.
-   * @param[in] verticalBias Whether to bias scrolling to top or bottom.
+   * @param[in] horizontalBias Whether to bias scrolling to left or right
+   * @param[in] verticalBias Whether to bias scrolling to top or bottom
    * @note Contents will not snap to ruler snap points.
    * Biasing parameters are provided such that in scenarios with 2 or 2x2 pages in
    * wrap mode, the application developer can decide whether to scroll left or right
@@ -1048,10 +1048,10 @@ public:
    * - If Rulers have been applied to the axes, then the contents will scroll until
    * reaching the domain boundary.
    * @SINCE_1_0.0
-   * @param[in] position The position to scroll to.
+   * @param[in] position The position to scroll to
    * @param[in] duration The duration of the animation in seconds
-   * @param[in] horizontalBias Whether to bias scrolling to left or right.
-   * @param[in] verticalBias Whether to bias scrolling to top or bottom.
+   * @param[in] horizontalBias Whether to bias scrolling to left or right
+   * @param[in] verticalBias Whether to bias scrolling to top or bottom
    * @param[in] alpha Alpha function to use
    * @note Contents will not snap to ruler snap points.
    * Biasing parameters are provided such that in scenarios with 2 or 2x2 pages in
@@ -1067,7 +1067,7 @@ public:
    * "(page) * ScrollViewSize.width, 0".
    *
    * @SINCE_1_0.0
-   * @param[in] page to scroll to
+   * @param[in] page The page to scroll to
    * @note Should probably be upgraded so that page is an abstract class, that can be
    * a function of ScrollViewSize, ruler domain, ruler snap points etc. as pages may be
    * orchestrated in a 2D grid fashion, or variable width.
@@ -1080,7 +1080,7 @@ public:
    * "(page) * ScrollViewSize.width, 0".
    *
    * @SINCE_1_0.0
-   * @param[in] page to scroll to
+   * @param[in] page The page to scroll to
    * @param[in] duration The duration of the animation in seconds
    * @note Should probably be upgraded so that page is an abstract class, that can be
    * a function of ScrollViewSize, ruler domain, ruler snap points etc. as pages may be
@@ -1094,9 +1094,9 @@ public:
    * "(page) * ScrollViewSize.width, 0".
    *
    * @SINCE_1_0.0
-   * @param[in] page to scroll to
+   * @param[in] page The page to scroll to
    * @param[in] duration The duration of the animation in seconds
-   * @param[in] bias Whether to bias scrolling to left or right.
+   * @param[in] bias Whether to bias scrolling to left or right
    * @note Should probably be upgraded so that page is an abstract class, that can be
    * a function of ScrollViewSize, ruler domain, ruler snap points etc. as pages may be
    * orchestrated in a 2D grid fashion, or variable width.
@@ -1111,7 +1111,7 @@ public:
    * @brief Scrolls View such that actor appears in the center of the ScrollView.
    *
    * @SINCE_1_0.0
-   * @param[in] actor The actor to center in on (via Scrolling).
+   * @param[in] actor The actor to center in on (via Scrolling)
    * @note Actor must be a direct child of ScrollView, otherwise will
    * cause an assertion failure.
    */
@@ -1121,7 +1121,7 @@ public:
    * @brief Scrolls View such that actor appears in the center of the ScrollView.
    *
    * @SINCE_1_0.0
-   * @param[in] actor The actor to center in on (via Scrolling).
+   * @param[in] actor The actor to center in on (via Scrolling)
    * @param[in] duration The duration of the animation in seconds
    * @note Actor must be a direct child of ScrollView, otherwise will
    * cause an assertion failure.
@@ -1134,7 +1134,7 @@ public:
    * If already at snap points, then will return false, and not scroll.
    *
    * @SINCE_1_0.0
-   * @return True if Snapping necessary.
+   * @return True if Snapping necessary
    */
   bool ScrollToSnapPoint();
 
@@ -1157,7 +1157,7 @@ public:
   void RemoveConstraintsFromChildren();
 
   /**
-   * @brief Apply Effect to ScrollView.
+   * @brief Applies Effect to ScrollView.
    *
    * @SINCE_1_0.0
    * @param[in] effect The effect to apply to scroll view
@@ -1165,10 +1165,10 @@ public:
   void ApplyEffect(ScrollViewEffect effect);
 
   /**
-   * @brief Remove Effect from ScrollView.
+   * @brief Removes Effect from ScrollView.
    *
    * @SINCE_1_0.0
-   * @param[in] effect The effect to remove.
+   * @param[in] effect The effect to remove
    */
   void RemoveEffect(ScrollViewEffect effect);
 
@@ -1185,16 +1185,16 @@ public:
    * that ScrollView's properties.
    *
    * @SINCE_1_0.0
-   * @param[in] child The actor to add to this ScrollView.
+   * @param[in] child The actor to add to this ScrollView
    */
   void BindActor(Actor child);
 
   /**
-   * @brief Unbind Actor from this ScrollView.
+   * @brief Unbinds Actor from this ScrollView.
    *
    * Once Unbound, this ScrollView will not affect the actor.
    * @SINCE_1_0.0
-   * @param[in] child The actor to be unbound.
+   * @param[in] child The actor to be unbound
    * @note This does not remove the child from the ScrollView container
    *
    */
@@ -1206,13 +1206,13 @@ public:
    * @SINCE_1_0.0
    * @param[in] direction The axis to constrain the scroll-view to.
    *                      Usually set to PanGestureDetector::DIRECTION_VERTICAL or PanGestureDetector::DIRECTION_HORIZONTAL (but can be any other angle if desired).
-   * @param[in] threshold The threshold to apply around the axis.
+   * @param[in] threshold The threshold to apply around the axis
    * @note If no threshold is specified, then the default threshold of PI * 0.25 radians (or 45 degrees) is used.
    */
   void SetScrollingDirection( Radian direction, Radian threshold = PanGestureDetector::DEFAULT_THRESHOLD );
 
   /**
-   * @brief Remove a direction constraint from the scroll view.
+   * @brief Removes a direction constraint from the scroll view.
    *
    * @SINCE_1_0.0
    * @param[in] direction The axis to stop constraining to.
@@ -1231,7 +1231,7 @@ public: // Signals
    *   void YourCallbackName(const SnapEvent& event);
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    * @pre The Object has been initialized.
    */
   SnapStartedSignalType& SnapStartedSignal();
@@ -1243,7 +1243,7 @@ public: // Not intended for application developers
    * @brief Creates a handle using the Toolkit::Internal implementation.
    *
    * @SINCE_1_0.0
-   * @param[in]  implementation  The Control implementation.
+   * @param[in] implementation The Control implementation
    */
   DALI_INTERNAL ScrollView(Internal::ScrollView& implementation);
 
@@ -1251,7 +1251,7 @@ public: // Not intended for application developers
    * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
    *
    * @SINCE_1_0.0
-   * @param[in]  internal  A pointer to the internal CustomActor.
+   * @param[in] internal A pointer to the internal CustomActor
    */
   explicit DALI_INTERNAL ScrollView( Dali::Internal::CustomActor* internal );
   /// @endcond
index df051bd..44f1b26 100644 (file)
@@ -55,7 +55,7 @@ class DALI_IMPORT_API Scrollable : public Control
 public:
 
   /**
-   * @brief The start and end property ranges for this control.
+   * @brief Enumeration for the start and end property ranges for this control.
    * @SINCE_1_0.0
    */
   enum PropertyRange
@@ -68,13 +68,13 @@ public:
   };
 
   /**
-   * @brief An enumeration of properties belonging to the Scrollable class.
+   * @brief Enumeration for the instance of properties belonging to the Scrollable class.
    * @SINCE_1_0.0
    */
   struct Property
   {
     /**
-     * @brief An enumeration of properties belonging to the Scrollable class.
+     * @brief Enumeration for the instance of properties belonging to the Scrollable class.
      * @SINCE_1_0.0
      */
     enum
@@ -128,13 +128,13 @@ public:
    *
    * Changes this handle to point to another real object.
    * @SINCE_1_0.0
-   * @param[in] handle to copy from
+   * @param[in] handle Handle to copy from
    * @return A reference to this
    */
   Scrollable& operator=( const Scrollable& handle );
 
   /**
-   * @brief Destructor
+   * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    * @SINCE_1_0.0
@@ -142,10 +142,10 @@ public:
   ~Scrollable();
 
   /**
-   * @brief Downcast a handle to Scrollable handle.
+   * @brief Downcasts a handle to Scrollable handle.
    *
-   * If handle points to a Scrollable the downcast produces valid
-   * handle. If not the returned handle is left uninitialized.
+   * If handle points to a Scrollable, the downcast produces valid handle.
+   * If not, the returned handle is left uninitialized.
    *
    * @SINCE_1_0.0
    * @param[in] handle Handle to an object
@@ -170,33 +170,33 @@ public:
   void SetOvershootEnabled(bool enable);
 
   /**
-   * @brief Set the color of the overshoot effect.
+   * @brief Sets the color of the overshoot effect.
    *
    * @SINCE_1_0.0
-   * @param[in] color The color of the overshoot effect.
+   * @param[in] color The color of the overshoot effect
    */
   void SetOvershootEffectColor( const Vector4& color );
 
   /**
-   * @brief Get the color of the overshoot effect.
+   * @brief Gets the color of the overshoot effect.
    * @SINCE_1_0.0
-   * @return The color of the overshoot effect.
+   * @return The color of the overshoot effect
    */
   Vector4 GetOvershootEffectColor() const;
 
   /**
-   * @brief Set the speed of overshoot animation in pixels per second.
+   * @brief Sets the speed of overshoot animation in pixels per second.
    *
    * When the speed is not greater than 0, the overshoot is set instantly with no animation.
    * @SINCE_1_0.0
-   * @param[in] pixelsPerSecond The speed of the overshoot animation.
+   * @param[in] pixelsPerSecond The speed of the overshoot animation
    */
   void SetOvershootAnimationSpeed( float pixelsPerSecond );
 
   /**
-   * @brief Get the speed of overshoot animation in pixels per second.
+   * @brief Gets the speed of overshoot animation in pixels per second.
    * @SINCE_1_0.0
-   * @return The speed of the overshoot animation.
+   * @return The speed of the overshoot animation
    */
   float GetOvershootAnimationSpeed() const;
 
@@ -210,7 +210,7 @@ public: // Signals
    *   void YourCallbackName(const Vector2& currentScrollPosition);
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    * @pre The Object has been initialized.
    */
   ScrollStartedSignalType& ScrollStartedSignal();
@@ -223,7 +223,7 @@ public: // Signals
    *   void YourCallbackName(const Vector2& currentScrollPosition);
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    * @pre The Object has been initialized.
    */
   ScrollUpdatedSignalType& ScrollUpdatedSignal();
@@ -236,7 +236,7 @@ public: // Signals
    *   void YourCallbackName(const Vector2& currentScrollPosition);
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    * @pre The Object has been initialized.
    */
   ScrollCompletedSignalType& ScrollCompletedSignal();
@@ -248,7 +248,7 @@ public: // Not intended for application developers
    * @brief Creates a handle using the Toolkit::Internal implementation.
    *
    * @SINCE_1_0.0
-   * @param[in]  implementation  The Control implementation.
+   * @param[in] implementation The Control implementation
    */
   DALI_INTERNAL Scrollable(Internal::Scrollable& implementation);
 
@@ -256,7 +256,7 @@ public: // Not intended for application developers
    * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
    *
    * @SINCE_1_0.0
-   * @param[in]  internal  A pointer to the internal CustomActor.
+   * @param[in] internal A pointer to the internal CustomActor
    */
   explicit DALI_INTERNAL Scrollable( Dali::Internal::CustomActor* internal );
   /// @endcond
index 851efe8..83e2b5c 100644 (file)
@@ -37,7 +37,7 @@ class Slider;
  */
 
 /**
- * @brief Slider is a control to enable sliding an indicator between two values
+ * @brief Slider is a control to enable sliding an indicator between two values.
  *
  * Signals
  * | %Signal Name      | Method                        |
@@ -54,7 +54,7 @@ public:
   // Properties
 
   /**
-   * @brief The start and end property ranges for this control.
+   * @brief Enumeration for the start and end property ranges for this control.
    * @SINCE_1_1.39
    */
   enum PropertyRange
@@ -64,104 +64,104 @@ public:
   };
 
   /**
-   * @brief An enumeration of properties belonging to the Slider class.
+   * @brief Enumeration for the instance of properties belonging to the Slider class.
    * @SINCE_1_1.39
    */
   struct Property
   {
     /**
-     * @brief An enumeration of properties belonging to the Slider class.
+     * @brief Enumeration for the instance of properties belonging to the Slider class.
      * @SINCE_1_1.39
      */
     enum
     {
 
       /**
-       * @brief name "lowerBound", type float
+       * @brief name "lowerBound", type float.
        * @SINCE_1_1.39
        */
       LOWER_BOUND = PROPERTY_START_INDEX,
 
       /**
-       * @brief name "upperBound", type float
+       * @brief name "upperBound", type float.
        * @SINCE_1_1.39
        */
       UPPER_BOUND,
 
       /**
-       * @brief name "value", type float
+       * @brief name "value", type float.
        * @SINCE_1_1.39
        */
       VALUE,
 
       /**
-       * @brief name "trackVisual", type string if it is a url, map otherwise
+       * @brief name "trackVisual", type string if it is a url, map otherwise.
        * @SINCE_1_1.39
        */
       TRACK_VISUAL,
 
       /**
-       * @brief name "handleVisual", type string if it is a url, map otherwise
+       * @brief name "handleVisual", type string if it is a url, map otherwise.
        * @SINCE_1_1.39
        */
       HANDLE_VISUAL,
 
       /**
-       * @brief name "progressVisual", type string if it is a url, map otherwise
+       * @brief name "progressVisual", type string if it is a url, map otherwise.
        * @SINCE_1_1.39
        */
       PROGRESS_VISUAL,
 
       /**
-       * @brief name "popupVisual", type string if it is a url, map otherwise
+       * @brief name "popupVisual", type string if it is a url, map otherwise.
        * @SINCE_1_1.39
        */
       POPUP_VISUAL,
 
       /**
-       * @brief name "popupArrowVisual", type string if it is a url, map otherwise
+       * @brief name "popupArrowVisual", type string if it is a url, map otherwise.
        * @SINCE_1_1.39
        */
       POPUP_ARROW_VISUAL,
 
       /**
-       * @brief name "disabledColor", type Vector4
+       * @brief name "disabledColor", type Vector4.
        * @SINCE_1_1.39
        */
       DISABLED_COLOR,
 
       /**
-       * @brief name "valuePrecision", type int
+       * @brief name "valuePrecision", type int.
        * @SINCE_1_1.39
        */
       VALUE_PRECISION,
 
       /**
-       * @brief name "showPopup", type bool
+       * @brief name "showPopup", type bool.
        * @SINCE_1_1.39
        */
       SHOW_POPUP,
 
       /**
-       * @brief name "showValue", type bool
+       * @brief name "showValue", type bool.
        * @SINCE_1_1.39
        */
       SHOW_VALUE,
 
       /**
-       * @brief name "marks", type Property::Array<float>
+       * @brief name "marks", type Property::Array<float>.
        * @SINCE_1_1.39
        */
       MARKS,
 
       /**
-       * @brief name "snapToMarks", type bool
+       * @brief name "snapToMarks", type bool.
        * @SINCE_1_1.39
        */
       SNAP_TO_MARKS,
 
       /**
-       * @brief name "markTolerance", type float
+       * @brief name "markTolerance", type float.
        * @SINCE_1_1.39
        */
       MARK_TOLERANCE,
@@ -211,10 +211,10 @@ public:
   ~Slider();
 
   /**
-   * @brief Downcast an Object handle to Slider.
+   * @brief Downcasts an Object handle to Slider.
    *
-   * If handle points to a Slider the
-   * downcast produces valid handle. If not the returned handle is left uninitialized.
+   * If handle points to a Slider, the downcast produces valid handle.
+   * If not, the returned handle is left uninitialized.
    * @SINCE_1_1.39
    * @param[in] handle Handle to an object
    * @return handle to a Slider or an uninitialized handle
@@ -278,7 +278,7 @@ public: // Not intended for application developers
    * @brief Creates a handle using the Toolkit::Internal implementation.
    *
    * @SINCE_1_1.39
-   * @param[in]  implementation  The Control implementation
+   * @param[in] implementation The Control implementation
    */
   DALI_INTERNAL Slider(Internal::Slider& implementation);
 
@@ -286,7 +286,7 @@ public: // Not intended for application developers
    * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
    *
    * @SINCE_1_1.39
-   * @param[in]  internal  A pointer to the internal CustomActor
+   * @param[in] internal A pointer to the internal CustomActor
    */
   explicit DALI_INTERNAL Slider( Dali::Internal::CustomActor* internal );
   /// @endcond
index be37f50..9674dc9 100644 (file)
@@ -74,11 +74,11 @@ class TableView;
  *    "url": "{DALI_IMAGE_DIR}gallery-small-1.jpg"
  *  },
  *  "properties": {
- *     "cellIndex":[1,1],  // property to specify the top-left cell this child occupies, if not set, the first available cell is used
- *     "rowSpan":3,        // property to specify how many rows this child occupies, if not set, default value is 1
- *     "columnSpan": 2,    // property to specify how many columns this child occupies, if nor set, default value is 1
- *     "cellHorizontalAlignment": "left", // property to specify how to align horizontally inside the cells, if not set, default value is 'left'
- *     "cellVerticalAlignment": "center"  // property to specify how to align vertically inside the cells, if not set, default value is 'top'
+ *     "cellIndex":[1,1],  // Property to specify the top-left cell this child occupies, if not set, the first available cell is used
+ *     "rowSpan":3,        // Property to specify how many rows this child occupies, if not set, default value is 1
+ *     "columnSpan": 2,    // Property to specify how many columns this child occupies, if nor set, default value is 1
+ *     "cellHorizontalAlignment": "left", // Property to specify how to align horizontally inside the cells, if not set, default value is 'left'
+ *     "cellVerticalAlignment": "center"  // Property to specify how to align vertically inside the cells, if not set, default value is 'top'
  *   }
  * @endcode
  * @SINCE_1_0.0
@@ -88,7 +88,7 @@ class DALI_IMPORT_API TableView : public Control
 public:
 
   /**
-   * @brief The start and end property ranges for this control.
+   * @brief Enumeration for the start and end property ranges for this control.
    * @SINCE_1_0.0
    */
   enum PropertyRange
@@ -101,7 +101,7 @@ public:
   };
 
   /**
-   * @brief An enumeration of properties belonging to the TableView class.
+   * @brief Enumeration for the instance of properties belonging to the TableView class.
    *
    * LayoutRows: set the height of the rows.
    * It has the format as follows in script:
@@ -129,7 +129,7 @@ public:
   struct Property
   {
     /**
-     * @brief An enumeration of properties belonging to the TableView class.
+     * @brief Enumeration for the instance of properties belonging to the TableView class.
      *
      * @SINCE_1_0.0
      */
@@ -144,13 +144,13 @@ public:
   };
 
   /**
-   * @brief An enumeration of child properties belonging to the TableView class.
+   * @brief Enumeration for the instance of child properties belonging to the TableView class.
    * @SINCE_1_1.36
    */
   struct ChildProperty
   {
     /**
-     * @brief An enumeration of child properties belonging to the TableView class.
+     * @brief Enumeration for the instance of child properties belonging to the TableView class.
      * @SINCE_1_1.36
      */
     enum
@@ -164,7 +164,7 @@ public:
   };
 
   /**
-   * @brief Describes how the size of a row / column been set
+   * @brief Enumeration for describing how the size of a row / column has been set.
    * @SINCE_1_0.0
    */
   enum LayoutPolicy
@@ -176,13 +176,13 @@ public:
   };
 
   /**
-   * @brief Structure to specify layout position for child actor
+   * @brief Structure to specify layout position for child actor.
    * @SINCE_1_0.0
    */
   struct CellPosition
   {
     /**
-     * @brief Constructor to initialise values to defaults for convenience
+     * @brief Constructor to initialise values to defaults for convenience.
      * @SINCE_1_0.0
      * @param[in] rowIndex The row index initialized
      * @param[in] columnIndex The column index initialized
@@ -202,21 +202,21 @@ public:
   };
 
   /**
-   * @brief Create a TableView handle; this can be initialised with TableView::New()
-   * Calling member functions with an uninitialised handle is not allowed.
+   * @brief Creates a TableView handle; this can be initialized with TableView::New().
+   * Calling member functions with an uninitialized handle is not allowed.
    * @SINCE_1_0.0
    */
   TableView();
 
   /**
-   * @brief Copy constructor. Creates another handle that points to the same real object
+   * @brief Copy constructor. Creates another handle that points to the same real object.
    * @SINCE_1_0.0
-   * @param[in] handle to copy from
+   * @param[in] handle Handle to copy from
    */
   TableView( const TableView& handle );
 
   /**
-   * @brief Assignment operator. Changes this handle to point to another real object
+   * @brief Assignment operator. Changes this handle to point to another real object.
    * @SINCE_1_0.0
    * @param[in] handle Handle to an object
    * @return A reference to this
@@ -224,7 +224,7 @@ public:
   TableView& operator=( const TableView& handle );
 
   /**
-   * @brief Destructor
+   * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    * @SINCE_1_0.0
@@ -232,150 +232,149 @@ public:
   ~TableView();
 
   /**
-   * @brief Create the TableView control.
+   * @brief Creates the TableView control.
    * @SINCE_1_0.0
    * @param[in] initialRows for the table
    * @param[in] initialColumns for the table
-   * @return A handle to the TableView control.
+   * @return A handle to the TableView control
    */
   static TableView New( unsigned int initialRows, unsigned int initialColumns );
 
   /**
-   * @brief Downcast a handle to TableView handle.
+   * @brief Downcasts a handle to TableView handle.
    *
-   * If handle points to a TableView the
-   * downcast produces valid handle. If not the returned handle is left uninitialized.
+   * If handle points to a TableView, the downcast produces valid handle.
+   * If not, the returned handle is left uninitialized.
    * @SINCE_1_0.0
    * @param[in] handle Handle to an object
-   * @return handle to a TableView or an uninitialized handle
+   * @return Handle to a TableView or an uninitialized handle
    */
   static TableView DownCast( BaseHandle handle );
 
   /**
-   * @brief Adds a child to the table
-   * If the row or column index is outside the table, the table gets resized bigger
+   * @brief Adds a child to the table.
+   * If the row or column index is outside the table, the table gets resized bigger.
    * @SINCE_1_0.0
-   * @param[in] child to add
-   * @param[in] position for the child
-   * @return true if the addition succeeded, false if the cell is already occupied
+   * @param[in] child The child to add
+   * @param[in] position The position for the child
+   * @return @c true if the addition succeeded, @c false if the cell is already occupied
    * @pre The child actor has been initialized.
    */
   bool AddChild( Actor child, CellPosition position );
 
   /**
-   * @brief Returns a child from the given layout position
+   * @brief Returns a child from the given layout position.
    * @SINCE_1_0.0
-   * @param[in] position in the table
-   * @return child that was in the cell or an uninitialized handle
+   * @param[in] position The position in the table
+   * @return Child that was in the cell or an uninitialized handle
    * @note If there is no child in this position this method returns an uninitialized.
    * Actor handle
    */
   Actor GetChildAt( CellPosition position );
 
   /**
-   * @brief Removes a child from the given layout position
+   * @brief Removes a child from the given layout position.
    * @SINCE_1_0.0
-   * @param[in] position for the child to remove
-   * @return child that was removed or an uninitialized handle
-   * @note If there is no child in this position this method does nothing.
+   * @param[in] position The position for the child to remove
+   * @return Child that was removed or an uninitialized handle
+   * @note If there is no child in this position, this method does nothing.
    */
   Actor RemoveChildAt( CellPosition position );
 
   /**
-   * @brief Finds the childs layout position
+   * @brief Finds the child's layout position.
    * @SINCE_1_0.0
-   * @param[in] child to search for
-   * @param[out] position for the child
+   * @param[in] child The child to search for
+   * @param[out] position The position for the child
    * @return true if the child was included in this TableView
    */
   bool FindChildPosition( Actor child, CellPosition& position );
 
   /**
-   * @brief Insert a new row to given index
+   * @brief Inserts a new row to given index.
    * @SINCE_1_0.0
-   * @param [in] rowIndex of the new row
+   * @param[in] rowIndex The rowIndex of the new row
    */
   void InsertRow( unsigned int rowIndex );
 
   /**
-   * @brief Delete a row from given index
-   * Removed elements are deleted
+   * @brief Deletes a row from the given index.
+   * Removed elements are deleted.
    * @SINCE_1_0.0
-   * @param [in] rowIndex of the row to delete
+   * @param[in] rowIndex The rowIndex of the row to delete
    */
   void DeleteRow( unsigned int rowIndex );
 
   /**
-   * @brief Delete a row from given index
+   * @brief Deletes a row from the given index.
    * @SINCE_1_0.0
-   * @param [in] rowIndex of the row to delete
-   * @param [out] removed elements
+   * @param[in] rowIndex The rowIndex of the row to delete
+   * @param[out] removed The removed elements
    */
   void DeleteRow( unsigned int rowIndex, std::vector<Actor>& removed );
 
   /**
-   * @brief Insert a new column to given index
+   * @brief Inserts a new column to the given index.
    * @SINCE_1_0.0
-   * @param [in] columnIndex of the new column
+   * @param[in] columnIndex The columnIndex of the new column
    */
   void InsertColumn( unsigned int columnIndex );
 
   /**
-   * @brief Delete a column from given index.
-   * Removed elements are deleted
+   * @brief Deletes a column from the given index.
+   * Removed elements are deleted.
    * @SINCE_1_0.0
-   * @param [in] columnIndex of the column to delete
+   * @param[in] columnIndex The columnIndex of the column to delete
    */
   void DeleteColumn( unsigned int columnIndex );
 
   /**
-   * @brief Delete a column from given index
+   * @brief Deletes a column from the given index.
    * @SINCE_1_0.0
-   * @param [in] columnIndex of the column to delete
-   * @param [out] removed elements
+   * @param[in] columnIndex The columnIndex of the column to delete
+   * @param[out] removed The removed elements
    */
   void DeleteColumn( unsigned int columnIndex, std::vector<Actor>& removed );
 
   /**
-   * @brief Resize the TableView.
+   * @brief Resizes the TableView.
    * @SINCE_1_0.0
-   * @param[in] rows for the table
-   * @param[in] columns for the table
+   * @param[in] rows The rows for the table
+   * @param[in] columns The columns for the table
    * @note If the new size is smaller than old,
    * superfluous actors get removed. If you want to relayout removed children,
    * use the variant that returns the removed Actors and reinsert them into the table.
-   * If an actor spans to a removed row or column it gets removed from the table.
+   * If an actor spans to a removed row or column, it gets removed from the table.
    */
   void Resize( unsigned int rows, unsigned int columns );
 
   /**
-   * @brief Resize the TableView.
+   * @brief Resizes the TableView.
    * @SINCE_1_0.0
-   * @param[in] rows for the table
-   * @param[in] columns for the table
-   * @param[out] removed actor handles
-   * @note If the new size is smaller than old,
-   * superfluous actors get removed.
+   * @param[in] rows The rows for the table
+   * @param[in] columns The columns for the table
+   * @param[out] removed The removed actor handles
+   * @note If the new size is smaller than old, superfluous actors get removed.
    * If an actor spans to a removed row or column it gets removed from the table.
    */
   void Resize( unsigned int rows, unsigned int columns, std::vector<Actor>& removed );
 
   /**
-   * @brief Set horizontal and vertical padding between cells
+   * @brief Sets horizontal and vertical padding between cells.
    * @SINCE_1_0.0
-   * @param[in] padding width and height
+   * @param[in] padding Width and height
    */
   void SetCellPadding( Size padding );
 
   /**
-   * @brief Get the current padding as width and height.
+   * @brief Gets the current padding as width and height.
    * @SINCE_1_0.0
-   * @return the current padding as width and height
+   * @return The current padding as width and height
    */
   Size GetCellPadding();
 
   /**
-   * @brief Specify this row as fitting its height to its children
+   * @brief Specifies this row as fitting its height to its children.
    *
    * @SINCE_1_0.0
    * @param[in] rowIndex The row to set
@@ -383,7 +382,7 @@ public:
   void SetFitHeight( unsigned int rowIndex );
 
   /**
-   * @brief Is the row a fit row
+   * @brief Checks if the row is a fit row.
    *
    * @SINCE_1_0.0
    * @param[in] rowIndex The row to check
@@ -392,7 +391,7 @@ public:
   bool IsFitHeight( unsigned int rowIndex ) const;
 
   /**
-   * @brief Specify this column as fitting its width to its children
+   * @brief Specifies this column as fitting its width to its children.
    *
    * @SINCE_1_0.0
    * @param[in] columnIndex The column to set
@@ -400,7 +399,7 @@ public:
   void SetFitWidth( unsigned int columnIndex );
 
   /**
-   * @brief Is the column a fit column
+   * @brief Checks if the column is a fit column.
    *
    * @SINCE_1_0.0
    * @param[in] columnIndex The column to check
@@ -409,11 +408,11 @@ public:
   bool IsFitWidth( unsigned int columnIndex ) const;
 
   /**
-   * @brief Sets a row to have fixed height
-   * Setting a fixed height of 0 has no effect
+   * @brief Sets a row to have fixed height.
+   * Setting a fixed height of 0 has no effect.
    * @SINCE_1_0.0
-   * @param rowIndex for row with fixed height
-   * @param height in world coordinate units
+   * @param rowIndex The rowIndex for row with fixed height
+   * @param height The height in world coordinate units
    * @pre The row rowIndex must exist.
    */
   void SetFixedHeight( unsigned int rowIndex, float height );
@@ -422,7 +421,7 @@ public:
    * @brief Gets a row's fixed height.
    * @SINCE_1_0.0
    * @param[in] rowIndex The row index with fixed height
-   * @return height in world coordinate units.
+   * @return height The height in world coordinate units
    * @pre The row rowIndex must exist.
    * @note The returned value is valid if it has been set before.
    */
@@ -430,10 +429,10 @@ public:
 
   /**
    * @brief Sets a row to have relative height. Relative height means percentage of
-   * the remainder of the table height after subtracting Padding and Fixed height rows
-   * Setting a relative height of 0 has no effect
+   * the remainder of the table height after subtracting Padding and Fixed height rows.
+   * Setting a relative height of 0 has no effect.
    * @SINCE_1_0.0
-   * @param rowIndex for row with relative height
+   * @param rowIndex The rowIndex for row with relative height
    * @param heightPercentage between 0.0f and 1.0f
    * @pre The row rowIndex must exist.
    */
@@ -443,18 +442,18 @@ public:
    * @brief Gets a row's relative height.
    * @SINCE_1_0.0
    * @param[in] rowIndex The row index with relative height
-   * @return height in percentage units, between 0.0f and 1.0f.
+   * @return Height in percentage units, between 0.0f and 1.0f
    * @pre The row rowIndex must exist.
    * @note The returned value is valid if it has been set before.
    */
   float GetRelativeHeight( unsigned int rowIndex ) const;
 
   /**
-   * @brief Sets a column to have fixed width
-   * Setting a fixed width of 0 has no effect
+   * @brief Sets a column to have fixed width.
+   * Setting a fixed width of 0 has no effect.
    * @SINCE_1_0.0
-   * @param columnIndex for column with fixed width
-   * @param width in world coordinate units
+   * @param columnIndex The columnIndex for column with fixed width
+   * @param width The width in world coordinate units
    * @pre The column columnIndex must exist.
    */
   void SetFixedWidth( unsigned int columnIndex, float width );
@@ -463,7 +462,7 @@ public:
    * @brief Gets a column's fixed width.
    * @SINCE_1_0.0
    * @param[in] columnIndex The column index with fixed width
-   * @return width in world coordinate units.
+   * @return Width in world coordinate units
    * @pre The column columnIndex must exist.
    * @note The returned value is valid if it has been set before.
    */
@@ -471,11 +470,11 @@ public:
 
   /**
    * @brief Sets a column to have relative width. Relative width means percentage of
-   * the remainder of table width after subtracting Padding and Fixed width columns
-   * Setting a relative width of 0 has no effect
+   * the remainder of table width after subtracting Padding and Fixed width columns.
+   * Setting a relative width of 0 has no effect.
    * @SINCE_1_0.0
-   * @param columnIndex for column with fixed width
-   * @param widthPercentage between 0.0f and 1.0f
+   * @param columnIndex The columnIndex for column with fixed width
+   * @param widthPercentage The widthPercentage between 0.0f and 1.0f
    * @pre The column columnIndex must exist.
    */
   void SetRelativeWidth( unsigned int columnIndex, float widthPercentage );
@@ -484,7 +483,7 @@ public:
    * @brief Gets a column's relative width.
    * @SINCE_1_0.0
    * @param[in] columnIndex The column index with relative width
-   * @return width in percentage units, between 0.0f and 1.0f.
+   * @return Width in percentage units, between 0.0f and 1.0f
    * @pre The column columnIndex must exist.
    * @note The returned value is valid if it has been set before.
    */
@@ -493,26 +492,26 @@ public:
   /**
    * @brief Gets the amount of rows in the table.
    * @SINCE_1_0.0
-   * @return the amount of rows in the table
+   * @return The amount of rows in the table
    */
   unsigned int GetRows();
 
   /**
    * @brief Gets the amount of columns in the table.
    * @SINCE_1_0.0
-   * @return the amount of columns in the table
+   * @return The amount of columns in the table
    */
   unsigned int GetColumns();
 
   /**
-   * @brief Set the alignment on a cell.
+   * @brief Sets the alignment on a cell.
    *
    * Cells without calling this function have the default values of LEFT and TOP respectively.
    *
    * @SINCE_1_0.0
-   * @param[in] position The cell to set alignment on.
-   * @param[in] horizontal The horizontal alignment.
-   * @param[in] vertical The vertical alignment.
+   * @param[in] position The cell to set alignment on
+   * @param[in] horizontal The horizontal alignment
+   * @param[in] vertical The vertical alignment
    */
   void SetCellAlignment( CellPosition position, HorizontalAlignment::Type horizontal, VerticalAlignment::Type vertical );
 
@@ -522,14 +521,14 @@ public: // Not intended for application developers
   /**
    * @brief Creates a handle using the Toolkit::Internal implementation.
    * @SINCE_1_0.0
-   * @param[in]  implementation  The Control implementation.
+   * @param[in] implementation The Control implementation
    */
   DALI_INTERNAL TableView(Internal::TableView& implementation);
 
   /**
    * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
    * @SINCE_1_0.0
-   * @param[in]  internal  A pointer to the internal CustomActor.
+   * @param[in] internal A pointer to the internal CustomActor
    */
   explicit DALI_INTERNAL TableView( Dali::Internal::CustomActor* internal );
   /// @endcond
index 8108e58..19b58d6 100644 (file)
@@ -39,7 +39,7 @@ class TextEditor;
 /**
  * @brief A control which provides a multi-line editable text editor.
  *
- *  * Signals
+ * Signals
  * | %Signal Name         | Method                         |                    |
  * |----------------------|--------------------------------|--------------------|
  * | textChanged          | @ref TextChangedSignal()       | @SINCE_1_1.37      |
@@ -51,7 +51,7 @@ class DALI_IMPORT_API TextEditor : public Control
 public:
 
   /**
-   * @brief The start and end property ranges for this control.
+   * @brief Enumeration for the start and end property ranges for this control.
    * @SINCE_1_1.37
    */
   enum PropertyRange
@@ -61,13 +61,13 @@ public:
   };
 
   /**
-   * @brief An enumeration of properties belonging to the TextEditor class.
+   * @brief Enumeration for the instance of properties belonging to the TextEditor class.
    * @SINCE_1_1.37
    */
   struct Property
   {
     /**
-     * @brief An enumeration of properties belonging to the TextEditor class.
+     * @brief Enumeration for the instance of properties belonging to the TextEditor class.
      * @SINCE_1_1.37
      */
     enum
@@ -123,8 +123,7 @@ public:
   struct InputStyle
   {
   /**
-   * @brief Mask used by the signal InputStyleChangedSignal().
-   *
+   * @brief Enumeration for mask used by the signal InputStyleChangedSignal().
    * @SINCE_1_2_2
    */
     enum Mask
@@ -157,10 +156,10 @@ public:
   typedef Signal<void ( TextEditor, InputStyle::Mask ) > InputStyleChangedSignalType;
 
   /**
-   * @brief Create the TextEditor control.
+   * @brief Creates the TextEditor control.
    *
    * @SINCE_1_1.37
-   * @return A handle to the TextEditor control.
+   * @return A handle to the TextEditor control
    */
   static TextEditor New();
 
@@ -175,7 +174,7 @@ public:
    * @brief Copy constructor.
    *
    * @SINCE_1_1.37
-   * @param[in] handle The handle to copy from.
+   * @param[in] handle The handle to copy from
    */
   TextEditor( const TextEditor& handle );
 
@@ -183,8 +182,8 @@ public:
    * @brief Assignment operator.
    *
    * @SINCE_1_1.37
-   * @param[in] handle The handle to copy from.
-   * @return A reference to this.
+   * @param[in] handle The handle to copy from
+   * @return A reference to this
    */
   TextEditor& operator=( const TextEditor& handle );
 
@@ -197,14 +196,14 @@ public:
   ~TextEditor();
 
   /**
-   * @brief Downcast a handle to TextEditor.
+   * @brief Downcasts a handle to TextEditor.
    *
-   * If the BaseHandle points is a TextEditor the downcast returns a valid handle.
-   * If not the returned handle is left empty.
+   * If the BaseHandle points is a TextEditor, the downcast returns a valid handle.
+   * If not, the returned handle is left empty.
    *
    * @SINCE_1_1.37
-   * @param[in] handle Handle to an object.
-   * @return handle to a TextEditor or an empty handle.
+   * @param[in] handle Handle to an object
+   * @return Handle to a TextEditor or an empty handle
    */
   static TextEditor DownCast( BaseHandle handle );
 
@@ -219,7 +218,7 @@ public:
    * @endcode
    *
    * @SINCE_1_1.37
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   TextChangedSignalType& TextChangedSignal();
 
@@ -233,7 +232,7 @@ public:
    * @endcode
    *
    * @SINCE_1_2_2
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   InputStyleChangedSignalType& InputStyleChangedSignal();
 
@@ -244,7 +243,7 @@ public: // Not intended for application developers
    * @brief Creates a handle using the Toolkit::Internal implementation.
    *
    * @SINCE_1_1.37
-   * @param[in] implementation The Control implementation.
+   * @param[in] implementation The Control implementation
    */
   DALI_INTERNAL TextEditor( Internal::TextEditor& implementation );
 
@@ -252,7 +251,7 @@ public: // Not intended for application developers
    * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
    *
    * @SINCE_1_1.37
-   * @param[in]  internal  A pointer to the internal CustomActor.
+   * @param[in] internal A pointer to the internal CustomActor
    */
   explicit DALI_INTERNAL TextEditor( Dali::Internal::CustomActor* internal );
   /// @endcond
index 57828f2..1dd97cf 100644 (file)
@@ -39,7 +39,7 @@ class TextField;
 /**
  * @brief A control which provides a single-line editable text field.
  *
- *  * Signals
+ * Signals
  * | %Signal Name         | Method                         |                    |
  * |----------------------|--------------------------------|--------------------|
  * | textChanged          | @ref TextChangedSignal()       | @SINCE_1_0.0       |
@@ -61,13 +61,13 @@ public:
   };
 
   /**
-   * @brief An enumeration of properties belonging to the TextField class.
+   * @brief Enumeration for the instance of properties belonging to the TextField class.
    * @SINCE_1_0.0
    */
   struct Property
   {
     /**
-     * @brief An enumeration of properties belonging to the TextField class.
+     * @brief Enumeration for the instance of properties belonging to the TextField class.
      * @SINCE_1_0.0
      */
     enum
@@ -123,7 +123,7 @@ public:
   };
 
   /**
-   * @brief Specifies how the text is truncated when it does not fit
+   * @brief Enumeration for specifying how the text is truncated when it does not fit.
    *
    * The default value is \e EXCEED_POLICY_CLIP.
    * @SINCE_1_0.0
@@ -181,9 +181,9 @@ public:
   typedef Signal<void ( TextField, InputStyle::Mask ) > InputStyleChangedSignalType;
 
   /**
-   * @brief Create the TextField control.
+   * @brief Creates the TextField control.
    * @SINCE_1_0.0
-   * @return A handle to the TextField control.
+   * @return A handle to the TextField control
    */
   static TextField New();
 
@@ -197,7 +197,7 @@ public:
    * @brief Copy constructor.
    *
    * @SINCE_1_0.0
-   * @param[in] handle The handle to copy from.
+   * @param[in] handle The handle to copy from
    */
   TextField( const TextField& handle );
 
@@ -205,8 +205,8 @@ public:
    * @brief Assignment operator.
    *
    * @SINCE_1_0.0
-   * @param[in] handle The handle to copy from.
-   * @return A reference to this.
+   * @param[in] handle The handle to copy from
+   * @return A reference to this
    */
   TextField& operator=( const TextField& handle );
 
@@ -219,14 +219,14 @@ public:
   ~TextField();
 
   /**
-   * @brief Downcast a handle to TextField.
+   * @brief Downcasts a handle to TextField.
    *
-   * If the BaseHandle points is a TextField the downcast returns a valid handle.
-   * If not the returned handle is left empty.
+   * If the BaseHandle points is a TextField, the downcast returns a valid handle.
+   * If not, the returned handle is left empty.
    *
    * @SINCE_1_0.0
-   * @param[in] handle Handle to an object.
-   * @return handle to a TextField or an empty handle.
+   * @param[in] handle Handle to an object
+   * @return Handle to a TextField or an empty handle
    */
   static TextField DownCast( BaseHandle handle );
 
@@ -252,7 +252,7 @@ public:
    *   void YourCallbackName( TextField textField );
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   MaxLengthReachedSignalType& MaxLengthReachedSignal();
 
@@ -266,7 +266,7 @@ public:
    * @endcode
    *
    * @SINCE_1_2_2
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   InputStyleChangedSignalType& InputStyleChangedSignal();
 
@@ -276,7 +276,7 @@ public: // Not intended for application developers
    * @brief Creates a handle using the Toolkit::Internal implementation.
    *
    * @SINCE_1_0.0
-   * @param[in] implementation The Control implementation.
+   * @param[in] implementation The Control implementation
    */
   DALI_INTERNAL TextField( Internal::TextField& implementation );
 
@@ -284,7 +284,7 @@ public: // Not intended for application developers
    * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
    *
    * @SINCE_1_0.0
-   * @param[in]  internal  A pointer to the internal CustomActor.
+   * @param[in] internal A pointer to the internal CustomActor
    */
   explicit DALI_INTERNAL TextField( Dali::Internal::CustomActor* internal );
 };
index 2ac2e4f..bd28fce 100644 (file)
@@ -68,7 +68,7 @@ class DALI_IMPORT_API TextLabel : public Control
 public:
 
   /**
-   * @brief The start and end property ranges for this control.
+   * @brief Enumeration for the start and end property ranges for this control.
    * @SINCE_1_0.0
    */
   enum PropertyRange
@@ -78,146 +78,146 @@ public:
   };
 
   /**
-   * @brief An enumeration of properties belonging to the TextLabel class.
+   * @brief Enumeration for the instance of properties belonging to the TextLabel class.
    * @SINCE_1_0.0
    */
   struct Property
   {
     /**
-     * @brief An enumeration of properties belonging to the TextLabel class.
+     * @brief Enumeration for the instance of properties belonging to the TextLabel class.
      * @SINCE_1_0.0
      */
     enum
     {
       /**
-       * @brief The type of rendering e.g. bitmap-based
-       * @details name "renderingBackend", type INT, default RENDERING_SHARED_ATLAS
+       * @brief The type of rendering e.g. bitmap-based.
+       * @details name "renderingBackend", type INT, default RENDERING_SHARED_ATLAS.
        * @SINCE_1_0.0
        */
       RENDERING_BACKEND = PROPERTY_START_INDEX,
 
       /**
-       * @brief The text to display in UTF-8 format,
-       * @details name "text", type STRING
+       * @brief The text to display in UTF-8 format.
+       * @details name "text", type STRING.
        * @SINCE_1_0.0
        */
       TEXT,
 
       /**
-       * @brief The requested font family to use,
-       * @details name "fontFamily", type STRING
+       * @brief The requested font family to use.
+       * @details name "fontFamily", type STRING.
        * @SINCE_1_0.0
        */
       FONT_FAMILY,
 
       /**
-       * @brief The requested font style to use,
-       * @details name "fontStyle", type STRING or MAP
+       * @brief The requested font style to use.
+       * @details name "fontStyle", type STRING or MAP.
        * @SINCE_1_2.13
        */
       FONT_STYLE,
 
       /**
-       * @brief The size of font in points
-       * @details name "pointSize", type FLOAT
+       * @brief The size of font in points.
+       * @details name "pointSize", type FLOAT.
        * @SINCE_1_0.0
        */
       POINT_SIZE,
 
       /**
-       * @brief The single-line or multi-line layout option
-       * @details name "multiLine", type BOOLEAN, default false
+       * @brief The single-line or multi-line layout option.
+       * @details name "multiLine", type BOOLEAN, default false.
        * @SINCE_1_0.0
        */
       MULTI_LINE,
 
       /**
-       * @brief The line horizontal alignment
-       * @details name "horizontalAlignment", type STRING,  values "BEGIN", "CENTER", "END", default BEGIN
+       * @brief The line horizontal alignment.
+       * @details name "horizontalAlignment", type STRING, values "BEGIN", "CENTER", "END", default BEGIN.
        * @SINCE_1_0.0
        */
       HORIZONTAL_ALIGNMENT,
 
       /**
-       * @brief The line vertical alignment
-       * @details name "verticalAlignment", type STRING,  values "TOP",   "CENTER", "BOTTOM" @SINCE_1_0.0, default TOP
+       * @brief The line vertical alignment.
+       * @details name "verticalAlignment", type STRING,  values "TOP",   "CENTER", "BOTTOM" @SINCE_1_0.0, default TOP.
        * @SINCE_1_0.0
        */
       VERTICAL_ALIGNMENT,
 
       /**
-       * @brief The color of the text
-       * @details name "textColor", type VECTOR4
+       * @brief The color of the text.
+       * @details name "textColor", type VECTOR4.
        * @SINCE_1_0.0
        */
       TEXT_COLOR,
 
       /**
-       * @brief The drop shadow offset 0 indicates no shadow
-       * @details name "shadowOffset", type VECTOR2
        * @DEPRECATED_1_1.37 Use SHADOW instead
+       * @brief The drop shadow offset 0 indicates no shadow.
+       * @details name "shadowOffset", type VECTOR2.
        */
       SHADOW_OFFSET,
 
       /**
-       * @brief The color of a drop shadow
-       * @details name "shadowColor", type VECTOR4
        * @DEPRECATED_1_1.37 Use SHADOW instead
+       * @brief The color of a drop shadow.
+       * @details name "shadowColor", type VECTOR4
        */
       SHADOW_COLOR,
 
       /**
-       * @brief The underline enabled flag
-       * @details name "underlineEnabled", type BOOLEAN
        * @DEPRECATED_1_1.37 Use UNDERLINE instead
+       * @brief The underline enabled flag.
+       * @details name "underlineEnabled", type BOOLEAN.
        */
       UNDERLINE_ENABLED,
 
       /**
-       * @brief The color of the underline
-       * @details name "underlineColor", type VECTOR4
        * @DEPRECATED_1_1.37 Use UNDERLINE instead
+       * @brief The color of the underline.
+       * @details name "underlineColor", type VECTOR4.
        */
       UNDERLINE_COLOR,
 
       /**
-       * @brief Overrides the underline height from font metrics
-       * @details name "underlineHeight", type FLOAT
        * @DEPRECATED_1_1.37 Use UNDERLINE instead
+       * @brief Overrides the underline height from font metrics.
+       * @details name "underlineHeight", type FLOAT.
        */
       UNDERLINE_HEIGHT,
 
       /**
-       * @brief  Whether the mark-up processing is enabled
-       * @details name "enableMarkup", type BOOLEAN
+       * @brief Whether the mark-up processing is enabled.
+       * @details name "enableMarkup", type BOOLEAN.
        * @SINCE_1_0.0
        */
       ENABLE_MARKUP,
 
       /**
-       * @brief  Start or stop auto scrolling,
-       * @details name "enableAutoScroll", type BOOLEAN, default is false
+       * @brief Starts or stops auto scrolling.
+       * @details name "enableAutoScroll", type BOOLEAN, default is false.
        * @SINCE_1_1.35
        */
       ENABLE_AUTO_SCROLL,
 
       /**
-       * @brief Sets the speed of scrolling in pixels per second,
-       * @details name "autoScrollSpeed", type INT, default in style sheet
+       * @brief Sets the speed of scrolling in pixels per second.
+       * @details name "autoScrollSpeed", type INT, default in style sheet.
        * @SINCE_1_1.35
        */
       AUTO_SCROLL_SPEED,
 
       /**
-       * @brief  Number of complete loops when scrolling enabled
-       * @details name "autoScrollLoopCount", type INT, default in style sheet
+       * @brief Number of complete loops when scrolling enabled.
+       * @details name "autoScrollLoopCount", type INT, default in style sheet.
        * @SINCE_1_1.35
        */
       AUTO_SCROLL_LOOP_COUNT,
 
       /**
-       * @brief  Gap before before scrolling wraps
-       * @details name "autoScrollGap", type INT, default in style sheet but can be overridden to prevent same text being show at start and end.
+       * @brief Gap before scrolling wraps.
+       * @details name "autoScrollGap", type INT, default in style sheet but can be overridden to prevent same text being shown at start and end.
        * @SINCE_1_1.35
        */
       AUTO_SCROLL_GAP,
@@ -260,19 +260,19 @@ public:
   };
 
   /**
-   * @brief Create the TextLabel control.
+   * @brief Creates the TextLabel control.
    *
    * @SINCE_1_0.0
-   * @return A handle to the TextLabel control.
+   * @return A handle to the TextLabel control
    */
   static TextLabel New();
 
   /**
-   * @brief Create the TextLabel control.
+   * @brief Creates the TextLabel control.
    *
    * @SINCE_1_0.0
-   * @param[in] text The text to display.
-   * @return A handle to the TextLabel control.
+   * @param[in] text The text to display
+   * @return A handle to the TextLabel control
    */
   static TextLabel New( const std::string& text );
 
@@ -286,7 +286,7 @@ public:
    * @brief Copy constructor.
    *
    * @SINCE_1_0.0
-   * @param[in] handle The handle to copy from.
+   * @param[in] handle The handle to copy from
    */
   TextLabel( const TextLabel& handle );
 
@@ -294,13 +294,13 @@ public:
    * @brief Assignment operator.
    *
    * @SINCE_1_0.0
-   * @param[in] handle The handle to copy from.
-   * @return A reference to this.
+   * @param[in] handle The handle to copy from
+   * @return A reference to this
    */
   TextLabel& operator=( const TextLabel& handle );
 
   /**
-   * @brief Destructor
+   * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    * @SINCE_1_0.0
@@ -308,14 +308,14 @@ public:
   ~TextLabel();
 
   /**
-   * @brief Downcast a handle to TextLabel.
+   * @brief Downcasts a handle to TextLabel.
    *
-   * If the BaseHandle points is a TextLabel the downcast returns a valid handle.
-   * If not the returned handle is left empty.
+   * If the BaseHandle points is a TextLabel, the downcast returns a valid handle.
+   * If not, the returned handle is left empty.
    *
    * @SINCE_1_0.0
    * @param[in] handle Handle to an object
-   * @return handle to a TextLabel or an empty handle
+   * @return Handle to a TextLabel or an empty handle
    */
   static TextLabel DownCast( BaseHandle handle );
 
@@ -326,7 +326,7 @@ public: // Not intended for application developers
    * @brief Creates a handle using the Toolkit::Internal implementation.
    *
    * @SINCE_1_0.0
-   * @param[in] implementation The Control implementation.
+   * @param[in] implementation The Control implementation
    */
   DALI_INTERNAL TextLabel( Internal::TextLabel& implementation );
 
@@ -334,7 +334,7 @@ public: // Not intended for application developers
    * @brief Allows the creation of this Control from an Internal::CustomActor pointer.
    *
    * @SINCE_1_0.0
-   * @param[in]  internal  A pointer to the internal CustomActor.
+   * @param[in] internal A pointer to the internal CustomActor
    */
   explicit DALI_INTERNAL TextLabel( Dali::Internal::CustomActor* internal );
   /// @endcond
index 8fa6fcc..d6a9bdf 100644 (file)
@@ -67,7 +67,7 @@ public:
   typedef Signal< void (VideoView&) > VideoViewSignalType; ///< Video playback finished signal type @ SINCE_1_1.38
 
   /**
-   * @brief The start and end property ranges for this control.
+   * @brief Enumeration for the start and end property ranges for this control.
    * @SINCE_1_0.0
    */
   enum PropertyRange
@@ -80,25 +80,25 @@ public:
     enum
     {
       /**
-       * @brief name "video", video file url as string type or Property::Map
+       * @brief name "video", video file url as string type or Property::Map.
        * @SINCE_1_1.38
        */
       VIDEO = PROPERTY_START_INDEX,
 
      /**
-       * @brief name "looping", looping status, true or false
+       * @brief name "looping", looping status, true or false.
        * @SINCE_1_1.38
        */
       LOOPING,
 
      /**
-       * @brief name "muted", mute status, true or false
+       * @brief name "muted", mute status, true or false.
        * @SINCE_1_1.38
        */
       MUTED,
 
      /**
-       * @brief name "volume", left and right volume scalar as float type, Property::Map with two values ( "left" and "right" )
+       * @brief name "volume", left and right volume scalar as float type, Property::Map with two values ( "left" and "right" ).
        * @SINCE_1_1.38
        */
       VOLUME
@@ -118,7 +118,7 @@ public:
 
   /**
    * @brief Creates an initialized VideoView.
-   * If the string is empty, VideoView will not display anything
+   * If the string is empty, VideoView will not display anything.
    *
    * @SINCE_1_1.38
    * @REMARK_INTERNET
@@ -129,21 +129,21 @@ public:
   static VideoView New( const std::string& url );
 
   /**
-   * @brief Create an uninitialized VideoView
+   * @brief Creates an uninitialized VideoView.
    * @SINCE_1_1.38
    */
   VideoView();
 
   /**
-   * @brief Destructor
+   * @brief Destructor.
    *
-   * This is non-virtual since derived Handel types must not contain data or virtual methods
+   * This is non-virtual since derived Handel types must not contain data or virtual methods.
    * @SINCE_1_1.38
    */
   ~VideoView();
 
   /*
-   * @brief Copy constructor
+   * @brief Copy constructor.
    *
    * @SINCE_1_1.38
    * @param[in] videoView VideoView to copy. The copied VideoView will point at the same implementation
@@ -154,20 +154,20 @@ public:
    * @brief Assignment operator.
    *
    * @SINCE_1_1.38
-   * @param[in] videoView The VideoView to assign from.
-   * @return The updated VideoView.
+   * @param[in] videoView The VideoView to assign from
+   * @return The updated VideoView
    */
   VideoView& operator=( const VideoView& videoView );
 
   /**
-   * @brief Downcast a handle to VideoView handle.
+   * @brief Downcasts a handle to VideoView handle.
    *
-   * If handle points to a VideoView the downcast produces valid
-   * handle. If not the returned handle is left uninitialized.
+   * If handle points to a VideoView, the downcast produces valid handle.
+   * If not, the returned handle is left uninitialized.
    *
    * @SINCE_1_1.38
    * @param[in] handle Handle to an object
-   * @return handle to a VideoView or an uninitialized handle
+   * @return Handle to a VideoView or an uninitialized handle
    */
   static VideoView DownCast( BaseHandle handle );
 
@@ -206,10 +206,10 @@ public:
   void Backward( int millisecond );
 
   /**
-   * @brief Connect to this signal to be notified when a video playback have finished.
+   * @brief Connects to this signal to be notified when a video playback is finished.
    *
    * @SINCE_1_1.38
-   * @return A signal object to connect with.
+   * @return A signal object to connect with
    */
   VideoViewSignalType& FinishedSignal();
 
@@ -220,7 +220,7 @@ public: // Not intended for application developers
    * @brief Creates a handle using the Toolkit::Internal implementation.
    *
    * @SINCE_1_1.38
-   * @param[in] implementation The VideoView implementation.
+   * @param[in] implementation The VideoView implementation
    */
   DALI_INTERNAL VideoView( Internal::VideoView& implementation );
 
@@ -228,7 +228,7 @@ public: // Not intended for application developers
    * @brief Allows the creation of this VideoView from an Internal::CustomActor pointer.
    *
    * @SINCE_1_1.38
-   * @param[in] internal A pointer to the internal CustomActor.
+   * @param[in] internal A pointer to the internal CustomActor
    */
   DALI_INTERNAL VideoView( Dali::Internal::CustomActor* internal );
   /// @endcond
index 4d7751b..6ff9c12 100644 (file)
@@ -31,7 +31,7 @@ namespace Toolkit
 
 const unsigned int TOOLKIT_MAJOR_VERSION = 1;
 const unsigned int TOOLKIT_MINOR_VERSION = 2;
-const unsigned int TOOLKIT_MICRO_VERSION = 21;
+const unsigned int TOOLKIT_MICRO_VERSION = 26;
 const char * const TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 70bddb0..84b1176 100644 (file)
@@ -42,7 +42,7 @@ namespace ControlOrientation
 {
 
 /**
- * @brief The internal orientation of a control.
+ * @brief Enumeration for the internal orientation of a control.
  * @SINCE_1_0.0
  */
 enum Type
@@ -56,19 +56,19 @@ enum Type
 } // namespace ControlOrientation
 
 /**
- * @brief Query whether an orientation is vertical.
+ * @brief Queries whether an orientation is vertical.
  *
- * @param[in] orientation The orientation.
- * @return True if the orientation is vertical.
+ * @param[in] orientation The orientation
+ * @return true if the orientation is vertical
  */
 DALI_IMPORT_API bool IsVertical(ControlOrientation::Type orientation);
 
 /**
- * @brief Query whether an orientation is horizontal.
+ * @brief Queries whether an orientation is horizontal.
  *
  * @SINCE_1_0.0
- * @param[in] orientation The orientation.
- * @return True if the orientation is horizontal.
+ * @param[in] orientation The orientation
+ * @return true if the orientation is horizontal
  */
 DALI_IMPORT_API bool IsHorizontal(ControlOrientation::Type orientation);
 
index 0ec2cad..e5a6409 100644 (file)
@@ -72,15 +72,15 @@ public:
   typedef Signal< void ( Actor ) > FocusedActorEnterKeySignalType;
 
   /**
-   * @brief Create a KeyboardFocusManager handle; this can be initialised with KeyboardFocusManager::New().
+   * @brief Creates a KeyboardFocusManager handle; this can be initialized with KeyboardFocusManager::New().
    *
-   * Calling member functions with an uninitialised handle is not allowed.
+   * Calling member functions with an uninitialized handle is not allowed.
    * @SINCE_1_0.0
    */
   KeyboardFocusManager();
 
   /**
-   * @brief Destructor
+   * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    * @SINCE_1_0.0
@@ -88,15 +88,15 @@ public:
   ~KeyboardFocusManager();
 
   /**
-   * @brief Get the singleton of KeyboardFocusManager object.
+   * @brief Gets the singleton of KeyboardFocusManager object.
    *
    * @SINCE_1_0.0
-   * @return A handle to the KeyboardFocusManager control.
+   * @return A handle to the KeyboardFocusManager control
    */
   static KeyboardFocusManager Get();
 
   /**
-   * @brief Move the keyboard focus to the given actor.
+   * @brief Moves the keyboard focus to the given actor.
    *
    * Only one actor can be focused at the same time.  The actor must
    * be in the stage already and keyboard focusable.
@@ -110,16 +110,16 @@ public:
   bool SetCurrentFocusActor(Actor actor);
 
   /**
-   * @brief Get the current focused actor.
+   * @brief Gets the current focused actor.
    *
    * @SINCE_1_0.0
-   * @return A handle to the current focused actor or an empty handle if no actor is focused.
+   * @return A handle to the current focused actor or an empty handle if no actor is focused
    * @pre The KeyboardFocusManager has been initialized.
    */
   Actor GetCurrentFocusActor();
 
   /**
-   * @brief Move the focus to the next focusable actor in the focus
+   * @brief Moves the focus to the next focusable actor in the focus
    * chain in the given direction (according to the focus traversal
    * order).
    *
@@ -131,7 +131,7 @@ public:
   bool MoveFocus(Control::KeyboardFocus::Direction direction);
 
   /**
-   * @brief Clear the focus from the current focused actor if any, so
+   * @brief Clears the focus from the current focused actor if any, so
    * that no actor is focused in the focus chain.
    *
    * It will emit focus changed signal without current focused actor.
@@ -141,7 +141,7 @@ public:
   void ClearFocus();
 
   /**
-   * @brief Set whether the focus movement should be looped within the same focus group.
+   * @brief Sets whether the focus movement should be looped within the same focus group.
    *
    * The focus movement is not looped by default.
    * @SINCE_1_0.0
@@ -151,7 +151,7 @@ public:
   void SetFocusGroupLoop(bool enabled);
 
   /**
-   * @brief Get whether the focus movement should be looped within the same focus group.
+   * @brief Gets whether the focus movement should be looped within the same focus group.
    *
    * @SINCE_1_0.0
    * @return Whether the focus movement should be looped
@@ -160,25 +160,25 @@ public:
   bool GetFocusGroupLoop() const;
 
   /**
-   * @brief Set whether an actor is a focus group that can limit the
+   * @brief Sets whether an actor is a focus group that can limit the
    * scope of focus movement to its child actors in the focus chain.
    *
    * Layout controls set themselves as focus groups by default.
    *
    * @SINCE_1_0.0
-   * @param actor The actor to be set as a focus group.
-   * @param isFocusGroup Whether to set the actor as a focus group or not.
+   * @param actor The actor to be set as a focus group
+   * @param isFocusGroup Whether to set the actor as a focus group or not
    * @pre The KeyboardFocusManager has been initialized.
    * @pre The Actor has been initialized.
    */
   void SetAsFocusGroup(Actor actor, bool isFocusGroup);
 
   /**
-   * @brief Check whether the actor is set as a focus group or not.
+   * @brief Checks whether the actor is set as a focus group or not.
    *
    * @SINCE_1_0.0
-   * @param actor The actor to be checked.
-   * @return Whether the actor is set as a focus group.
+   * @param actor The actor to be checked
+   * @return Whether the actor is set as a focus group
    * @pre The KeyboardFocusManager has been initialized.
    * @pre The Actor has been initialized.
    */
@@ -195,7 +195,7 @@ public:
   Actor GetFocusGroup(Actor actor);
 
   /**
-   * @brief Set the focus indicator actor.
+   * @brief Sets the focus indicator actor.
    *
    * This will replace the default focus indicator actor in
    * KeyboardFocusManager and will be added to the focused actor as a
@@ -209,7 +209,7 @@ public:
   void SetFocusIndicatorActor(Actor indicator);
 
   /**
-   * @brief Get the focus indicator actor.
+   * @brief Gets the focus indicator actor.
    *
    * @SINCE_1_0.0
    * @return A handle to the focus indicator actor
@@ -220,7 +220,7 @@ public:
   /**
    * @brief Move the focus to prev focused actor
    *
-   * @SINCE_1_2.17
+   * @SINCE_1_2.19
    */
   void MoveFocusBackward();
 
@@ -233,7 +233,7 @@ public: // Signals
    * focus towards the given direction, but applications might want to
    * change that. By connecting with this signal, they can check the
    * proposed actor to focus and return a different actor if they
-   * wish.  This signal is only emitted when the navigation key is
+   * wish. This signal is only emitted when the navigation key is
    * pressed and KeyboardFocusManager tries to move the focus
    * automatically. It won't be emitted for focus movement by calling
    * SetCurrentFocusActor directly.
@@ -243,7 +243,7 @@ public: // Signals
    *   Actor YourCallbackName(Actor currentFocusedActor, Actor proposedActorToFocus, Control::KeyboardFocus::Direction direction);
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    * @pre The Object has been initialized.
    */
   PreFocusChangeSignalType& PreFocusChangeSignal();
@@ -256,7 +256,7 @@ public: // Signals
    *   void YourCallbackName(Actor originalFocusedActor, Actor currentFocusedActor);
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    * @pre The Object has been initialized.
    */
   FocusChangedSignalType& FocusChangedSignal();
@@ -274,7 +274,7 @@ public: // Signals
    *   void YourCallbackName(Actor currentFocusedActor, bool forward);
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    * @pre The Object has been initialized.
    */
   FocusGroupChangedSignalType& FocusGroupChangedSignal();
@@ -287,7 +287,7 @@ public: // Signals
    *   void YourCallbackName(Actor enterPressedActor);
    * @endcode
    * @SINCE_1_0.0
-   * @return The signal to connect to.
+   * @return The signal to connect to
    * @pre The Object has been initialized.
    */
   FocusedActorEnterKeySignalType& FocusedActorEnterKeySignal();
@@ -299,7 +299,7 @@ public: // Signals
    * @brief Creates a new handle from the implementation.
    *
    * @SINCE_1_0.0
-   * @param[in] impl A pointer to the object.
+   * @param[in] impl A pointer to the object
    */
   explicit DALI_INTERNAL KeyboardFocusManager(Internal::KeyboardFocusManager *impl);
   /// @endcond
index 3472fc0..9c021b5 100644 (file)
@@ -104,7 +104,7 @@ public:
   AsyncImageLoader();
 
   /**
-   * @brief Destructor
+   * @brief Destructor.
    * @SINCE_1_2_14
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
@@ -129,18 +129,18 @@ public:
   AsyncImageLoader& operator=( const AsyncImageLoader& handle );
 
   /**
-   * @brief Create a new loader to load the image asynchronously in a worker thread.
+   * @brief Creates a new loader to load the image asynchronously in a worker thread.
    * @SINCE_1_2_14
    *
-   * @return The image loader.
+   * @return The image loader
    */
   static AsyncImageLoader New();
 
   /**
-   * @brief Downcast a handle to AsyncImageLoader handle.
+   * @brief Downcasts a handle to AsyncImageLoader handle.
    *
-   * If the handle points to an AsyncImageLoader object the downcast produces
-   * a valid handle. If not, the returned handle is left uninitialized.
+   * If the handle points to an AsyncImageLoader object, the downcast produces a valid handle.
+   * If not, the returned handle is left uninitialized.
    *
    * @SINCE_1_2_14
    * @param[in] handle A handle to an object
@@ -149,7 +149,7 @@ public:
   static AsyncImageLoader DownCast( BaseHandle handle );
 
   /**
-   * @brief Start an image loading task.
+   * @brief Starts an image loading task.
    * Note: When using this method, the following defaults will be used:
    * fittingMode = FittingMode::DEFAULT
    * samplingMode = SamplingMode::BOX_THEN_LINEAR
@@ -158,14 +158,13 @@ public:
    * @SINCE_1_2_14
    * @REMARK_INTERNET
    * @REMARK_STORAGE
-   *
-   * @param[in] url The URL of the image file to load.
-   * @return The loading task id.
+   * @param[in] url The URL of the image file to load
+   * @return The loading task id
    */
   uint32_t Load( const std::string& url );
 
   /**
-   * @brief Start an image loading task.
+   * @brief Starts an image loading task.
    * Note: When using this method, the following defaults will be used:
    * fittingMode = FittingMode::DEFAULT
    * samplingMode = SamplingMode::BOX_THEN_LINEAR
@@ -174,25 +173,23 @@ public:
    * @SINCE_1_2_14
    * @REMARK_INTERNET
    * @REMARK_STORAGE
-   *
-   * @param[in] url The URL of the image file to load.
-   * @param[in] dimensions The width and height to fit the loaded image to.
-   * @return The loading task id.
+   * @param[in] url The URL of the image file to load
+   * @param[in] dimensions The width and height to fit the loaded image to
+   * @return The loading task id
    */
   uint32_t Load( const std::string& url, ImageDimensions dimensions );
 
   /**
-   * @brief Start an image loading task.
+   * @brief Starts an image loading task.
    * @SINCE_1_2_14
    * @REMARK_INTERNET
    * @REMARK_STORAGE
-   *
-   * @param[in] url The URL of the image file to load.
-   * @param[in] dimensions The width and height to fit the loaded image to.
-   * @param[in] fittingMode The method used to fit the shape of the image before loading to the shape defined by the size parameter.
-   * @param[in] samplingMode The filtering method used when sampling pixels from the input image while fitting it to desired size.
-   * @param[in] orientationCorrection Reorient the image to respect any orientation metadata in its header.
-   * @return The loading task id.
+   * @param[in] url The URL of the image file to load
+   * @param[in] dimensions The width and height to fit the loaded image to
+   * @param[in] fittingMode The method used to fit the shape of the image before loading to the shape defined by the size parameter
+   * @param[in] samplingMode The filtering method used when sampling pixels from the input image while fitting it to desired size
+   * @param[in] orientationCorrection Reorient the image to respect any orientation metadata in its header
+   * @return The loading task id
    */
   uint32_t Load( const std::string& url,
                  ImageDimensions dimensions,
@@ -201,7 +198,7 @@ public:
                  bool orientationCorrection );
 
   /**
-   * @brief Cancel a image loading task if it is still queueing in the work thread.
+   * @brief Cancels an image loading task if it is still queueing in the work thread.
    * @SINCE_1_2_14
    *
    * @param[in] loadingTaskId The task id returned when invoking the load call.
@@ -210,21 +207,20 @@ public:
   bool Cancel( uint32_t loadingTaskId );
 
   /**
-   * @brief Cancel all the loading tasks in the queue
+   * @brief Cancels all the loading tasks in the queue.
    * @SINCE_1_2_14
    */
   void CancelAll();
 
   /**
-   * @brief Signal emit for connected callback functions to get access to the loaded pixel data.
+   * @brief Signal emitted for connected callback functions to get access to the loaded pixel data.
    *
    * A callback of the following type may be connected:
    * @code
    *   void YourCallbackName( uint32_t id, PixelData pixelData );
    * @endcode
    * @SINCE_1_2_14
-   *
-   * @return A reference to a signal object to Connect() with.
+   * @return A reference to a signal object to Connect() with
    */
   ImageLoadedSignalType& ImageLoadedSignal();
 
@@ -236,8 +232,7 @@ public: // Not intended for developer use
    *
    * @note Not intended for application developers
    * @SINCE_1_2_14
-   *
-   * @param[in] impl A pointer to the object.
+   * @param[in] impl A pointer to the object
    */
   explicit DALI_INTERNAL AsyncImageLoader( Internal::AsyncImageLoader* impl );
   /// @endcond
index c065664..9d0a820 100644 (file)
@@ -49,7 +49,7 @@ namespace SyncImageLoader
  */
 
 /**
- * @brief Load an image synchronously.
+ * @brief Loads an image synchronously.
  * Note: When using this method, the following defaults will be used:
  * fittingMode = FittingMode::DEFAULT
  * samplingMode = SamplingMode::BOX_THEN_LINEAR
@@ -58,14 +58,13 @@ namespace SyncImageLoader
  * @SINCE_1_2_14
  * @REMARK_INTERNET
  * @REMARK_STORAGE
- *
- * @param[in] url The URL of the image file to load.
- * @return A PixelData object containing the image, or an invalid object on failure.
+ * @param[in] url The URL of the image file to load
+ * @return A PixelData object containing the image, or an invalid object on failure
  */
 DALI_IMPORT_API PixelData Load( const std::string& url );
 
 /**
- * @brief Load an image synchronously by specifying the target dimensions.
+ * @brief Loads an image synchronously by specifying the target dimensions.
  * Note: When using this method, the following defaults will be used:
  * fittingMode = FittingMode::DEFAULT
  * samplingMode = SamplingMode::BOX_THEN_LINEAR
@@ -74,25 +73,23 @@ DALI_IMPORT_API PixelData Load( const std::string& url );
  * @SINCE_1_2_14
  * @REMARK_INTERNET
  * @REMARK_STORAGE
- *
- * @param[in] url The URL of the image file to load.
- * @param[in] dimensions The width and height to fit the loaded image to.
- * @return A PixelData object containing the image, or an invalid object on failure.
+ * @param[in] url The URL of the image file to load
+ * @param[in] dimensions The width and height to fit the loaded image to
+ * @return A PixelData object containing the image, or an invalid object on failure
  */
 DALI_IMPORT_API PixelData Load( const std::string& url, ImageDimensions dimensions );
 
 /**
- * @brief Load an image synchronously by specifying the target dimensions and options.
+ * @brief Loads an image synchronously by specifying the target dimensions and options.
  * @SINCE_1_2_14
  * @REMARK_INTERNET
  * @REMARK_STORAGE
- *
- * @param[in] url The URL of the image file to load.
- * @param[in] dimensions The width and height to fit the loaded image to.
- * @param[in] fittingMode The method used to fit the shape of the image before loading to the shape defined by the size parameter.
- * @param[in] samplingMode The filtering method used when sampling pixels from the input image while fitting it to desired size.
- * @param[in] orientationCorrection Reorient the image to respect any orientation metadata in its header.
- * @return A PixelData object containing the image, or an invalid object on failure.
+ * @param[in] url The URL of the image file to load
+ * @param[in] dimensions The width and height to fit the loaded image to
+ * @param[in] fittingMode The method used to fit the shape of the image before loading to the shape defined by the size parameter
+ * @param[in] samplingMode The filtering method used when sampling pixels from the input image while fitting it to desired size
+ * @param[in] orientationCorrection Reorient the image to respect any orientation metadata in its header
+ * @return A PixelData object containing the image, or an invalid object on failure
  */
 DALI_IMPORT_API PixelData Load( const std::string& url,
                 ImageDimensions dimensions,
index bb84ea5..7f52d85 100644 (file)
@@ -69,19 +69,19 @@ class DALI_IMPORT_API StyleManager : public BaseHandle
 {
 public:
 
-  /// @brief Style Changed signal. Emitted after controls have been updated
+  /// @brief Style Changed signal. Emitted after controls have been updated.
   typedef Signal< void ( StyleManager, StyleChange::Type ) >  StyleChangedSignalType;
 
   /**
-   * @brief Create a StyleManager handle; this can be initialised with StyleManager::Get()
+   * @brief Creates a StyleManager handle; this can be initialized with StyleManager::Get().
    *
-   * Calling member functions with an uninitialised handle is not allowed.
+   * Calling member functions with an uninitialized handle is not allowed.
    * @SINCE_1_1.32
    */
   StyleManager();
 
   /**
-   * @brief Destructor
+   * @brief Destructor.
    *
    * This is non-virtual since derived Handle types must not contain data or virtual methods.
    * @SINCE_1_1.32
@@ -89,15 +89,15 @@ public:
   ~StyleManager();
 
   /**
-   * @brief Get the singleton of StyleManager object.
+   * @brief Gets the singleton of StyleManager object.
    *
    * @SINCE_1_1.32
-   * @return A handle to the StyleManager control.
+   * @return A handle to the StyleManager control
    */
   static StyleManager Get();
 
   /**
-   * @brief Apply a new theme to the application. This will be merged
+   * @brief Applies a new theme to the application. This will be merged
    * on top of the default Toolkit theme.
    *
    * If the application theme file doesn't style all controls that the
@@ -107,16 +107,16 @@ public:
    * On application startup, it is suggested that the theme file name is
    * passed to Application::New instead of using this API to prevent
    * controls being styled more than once.
-   * @sa Application::New()
+   * @sa Application::New().
    *
    * @SINCE_1_1.32
    * @param[in] themeFile If a relative path is specified, then this is relative
-   * to the directory returned by Application::GetResourcePath().
+   * to the directory returned by Application::GetResourcePath()
    */
   void ApplyTheme( const std::string& themeFile );
 
   /**
-   * @brief Apply the default Toolkit theme.
+   * @brief Applies the default Toolkit theme.
    *
    * Request that any application specific styling is removed
    * and that the default Toolkit theme is re-applied.
@@ -126,7 +126,7 @@ public:
   void ApplyDefaultTheme();
 
   /**
-   * @brief Set a constant for use when building styles
+   * @brief Sets a constant for use when building styles.
    *
    * A constant is used in JSON files e.g. "myImage":"{RELATIVE_PATH}/image.jpg"
    * where the string "{RELATIVE_PATH}" is substituted with the value.
@@ -138,25 +138,25 @@ public:
   void SetStyleConstant( const std::string& key, const Property::Value& value );
 
   /**
-   * @brief Return the style constant set for a specific key
+   * @brief Returns the style constant set for a specific key.
    *
    * @SINCE_1_1.32
    * @param[in] key The key of the constant
    * @param[out] valueOut The value of the constant if it exists
    *
-   * @return If the constant for key exists then return the constant in valueOut and return true
+   * @return If the constant for key exists, then return the constant in valueOut and return true
    */
   bool GetStyleConstant( const std::string& key, Property::Value& valueOut );
 
   /**
-   * @brief Apply the specified style to the control.
+   * @brief Applies the specified style to the control.
    *
    * @SINCE_1_1.32
-   * @param[in] control The control to which to apply the style.
+   * @param[in] control The control to which to apply the style
    * @param[in] jsonFileName The name of the JSON style file to apply. If a
    * relative path is specified, then this is relative to the directory
-   * returned by Application::GetResourcePath().
-   * @param[in] styleName The name of the style within the JSON file to apply.
+   * returned by Application::GetResourcePath()
+   * @param[in] styleName The name of the style within the JSON file to apply
    */
   void ApplyStyle( Toolkit::Control control, const std::string& jsonFileName, const std::string& styleName );
 
@@ -171,7 +171,7 @@ public: // Signals
    * @code
    *   void YourCallbackName( StyleManager styleManager, StyleChange change );
    * @endcode
-   * @return The signal to connect to.
+   * @return The signal to connect to
    */
   StyleChangedSignalType& StyleChangedSignal();
 
@@ -183,7 +183,7 @@ public:
    *
    * @note Not intended for application developers
    * @SINCE_1_1.32
-   * @param[in] impl A pointer to the object.
+   * @param[in] impl A pointer to the object
    */
   explicit DALI_INTERNAL StyleManager( Internal::StyleManager *impl );
   /// @endcond
index 30ba495..f77d859 100644 (file)
@@ -28,7 +28,7 @@ namespace Toolkit
 {
 
 /**
- * @brief The start and end property ranges.
+ * @brief Enumeration for the start and end property ranges.
  * @SINCE_1_1.45
  */
 enum PropertyRanges
index 9b98812..edd94cc 100644 (file)
@@ -117,15 +117,6 @@ enum
   BORDER_ONLY,
 
   /**
-   * @brief This enables Image visuals to automatically be converted to Batch-Image visuals.
-   * @details Name "batchingEnabled", type Property::BOOLEAN.
-   * @SINCE_1_2.0
-   * @note Optional. If not specified, the default is false.
-   * @note For Image visuals only. Not to be used with NPatch or SVG images.
-   */
-  BATCHING_ENABLED,
-
-  /**
    * @brief The image area to be displayed.
    * @details Name "pixelArea", type Property::VECTOR4.
    *          It is a rectangular area.
index e708050..ee24889 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_VISUAL_PROPERTIES_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -111,7 +111,8 @@ enum
 {
   /**
    * @brief The vertex shader.
-   * @details Name "vertexShader", type Property::STRING.
+   * @details Name "vertexShader", type Property::STRING or Property::ARRAY of Property::STRING.
+   *          A Property::ARRAY of Property::STRING values can be used to split the shader string over multiple lines.
    * @SINCE_1_1.45
    * @note Optional
    * @note If not supplied, the visual's already set vertex shader is used.
@@ -120,7 +121,8 @@ enum
 
   /**
    * @brief The fragment shader.
-   * @details Name "fragmentShader", type Property::STRING.
+   * @details Name "fragmentShader", type Property::STRING or Property::ARRAY of Property::STRING.
+   *          A Property::ARRAY of Property::STRING values can be used to split the shader string over multiple lines.
    * @SINCE_1_1.45
    * @note Optional
    * @note If not supplied, the visual's already set fragment shader is used.
index 1809436..6aeaded 100644 (file)
     "TextSelectionToolbar":
     {
       "enableOvershoot":true,
+      "enableScrollBar":true,
       "scrollView":
       {
         "overshootAnimationSpeed":360.0,
       "overshootAnimationSpeed":960.0,
       "overshootSize":[1920.0,130.0]
     },
+    "ScrollBar":
+    {
+      "indicatorShowDuration":0.25,
+      "indicatorHideDuration":0.25,
+      "color":[0.0,0.72,0.9,0.7]
+    },
     "TextEditor":
     {
       "pointSize":120,
     },
     "ProgressBar":
     {
-      "progressValue": 0,
       "trackVisual":{
-        "url":"{DALI_IMAGE_DIR}progress-skin.9.png",
-        "size":[24,24]
+        "visualType":"IMAGE",
+        "url":"{DALI_IMAGE_DIR}progress-bar-skin-track.9.png"
       },
       "progressVisual":{
-        "url":"{DALI_IMAGE_DIR}progress-skin-progress.9.png",
-        "size":[24,24]
-      }
-    },
-    "ProgressBarValueTextLabel":
-    {
-      "textColor":[0.8,0.8,1,1]
+        "visualType":"IMAGE",
+        "url":"{DALI_IMAGE_DIR}progress-bar-skin-progress.9.png"
+      },
+      "secondaryProgressVisual":{
+        "visualType":"IMAGE",
+        "url":"{DALI_IMAGE_DIR}progress-bar-skin-secondary-progress.9.png"
+      },
+      "indeterminateVisual":{
+        "visualType":"IMAGE",
+        "pixelArea":[0.0, 0.0, 10.0, 1.0],
+        "wrapModeU":"REPEAT",
+        "url":"{DALI_IMAGE_DIR}progress-bar-skin-indeterminate.png"
+      },
+      "indeterminateVisualAnimation":
+      [
+        {
+          "target":"indeterminateVisual",
+          "property":"pixelArea",
+          "initialValue":[0.0, 0.0, 10.0, 1.0],
+          "targetValue":[-1.0, 0.0, 10.0, 1.0],
+          "animator":
+          {
+            "alphaFunction":"DEFAULT",
+            "timePeriod":
+            {
+              "duration":0.8,
+              "delay":0
+            }
+          }
+        }
+      ],
+      "labelVisual":{
+        "visualType": "TEXT",
+        "textColor": [ 1.0, 1.0, 1.0, 1.0 ],
+        "pointSize" : 12.0, // Point size must always be provided to Text Visual
+        "horizontalAlignment": "CENTER",
+        "verticalAlignment": "CENTER"
+      },
+      "progressValue": 0.0,
+      "secondaryProgressValue":0.0,
+      "indeterminate": false
     },
     "Button":
     {
          "url": "{DALI_IMAGE_DIR}button-disabled.9.png"
        }
     },
+    "ToggleButton":
+    {
+      "styles":["Button"]
+    },
     "CheckBoxButton":
     {
       "styles":["Button"],
index 0684889..23af0f7 100644 (file)
     "TextSelectionToolbar":
     {
       "enableOvershoot":true,
+      "enableScrollBar":true,
       "scrollView":
       {
         "overshootAnimationSpeed":120.0,
         "overshootSize":[480.0,42.0]
       }
     },
+    "TextSelectionScrollBar":
+    {
+      "indicatorShowDuration":0.25,
+      "indicatorHideDuration":0.25
+    },
+    "TextSelectionScrollIndicator":
+    {
+      "image":
+      {
+        "visualType":"IMAGE",
+        "url":"{DALI_IMAGE_DIR}text_selection_scroll_indicator.9.png"
+      },
+      "color":[0.0,0.72,0.9,0.7]
+    },
     "ScrollView":
     {
       "overshootEffectColor":"B018",
       "overshootAnimationSpeed":120.0,
       "overshootSize":[480.0,42.0]
     },
+    "ScrollBar":
+    {
+      "indicatorShowDuration":0.25,
+      "indicatorHideDuration":0.25
+    },
+    "ScrollBarIndicator":
+    {
+      "image":
+      {
+        "visualType":"IMAGE",
+        "url":"{DALI_IMAGE_DIR}popup_scroll.9.png"
+      }
+    },
     "TextEditor":
     {
       "pointSize":18,
     },
     "ProgressBar":
     {
-      "progressValue": 0,
       "trackVisual":{
-        "url":"{DALI_IMAGE_DIR}progress-skin.9.png",
-        "size":[24,24]
+        "visualType":"IMAGE",
+        "url":"{DALI_IMAGE_DIR}progress-bar-skin-track.9.png"
       },
       "progressVisual":{
-        "url":"{DALI_IMAGE_DIR}progress-skin-progress.9.png",
-        "size":[24,24]
-      }
-    },
-    "ProgressBarValueTextLabel":
-    {
-      "textColor":[0.8,0.8,1,1]
+        "visualType":"IMAGE",
+        "url":"{DALI_IMAGE_DIR}progress-bar-skin-progress.9.png"
+      },
+      "secondaryProgressVisual":{
+        "visualType":"IMAGE",
+        "url":"{DALI_IMAGE_DIR}progress-bar-skin-secondary-progress.9.png"
+      },
+      "indeterminateVisual":{
+        "visualType":"IMAGE",
+        "pixelArea":[0.0, 0.0, 10.0, 1.0],
+        "wrapModeU":"REPEAT",
+        "url":"{DALI_IMAGE_DIR}progress-bar-skin-indeterminate.png"
+      },
+      "indeterminateVisualAnimation":
+      [
+        {
+          "target":"indeterminateVisual",
+          "property":"pixelArea",
+          "initialValue":[0.0, 0.0, 10.0, 1.0],
+          "targetValue":[-1.0, 0.0, 10.0, 1.0],
+          "animator":
+          {
+            "alphaFunction":"DEFAULT",
+            "timePeriod":
+            {
+              "duration":0.8,
+              "delay":0
+            }
+          }
+        }
+      ],
+      "labelVisual":{
+        "visualType": "TEXT",
+        "textColor": [ 1.0, 1.0, 1.0, 1.0 ],
+        "pointSize" : 12.0, // Point size must always be provided to Text Visual
+        "horizontalAlignment": "CENTER",
+        "verticalAlignment": "CENTER"
+      },
+      "progressValue": 0.0,
+      "secondaryProgressValue":0.0,
+      "indeterminate": false
     },
     "Button":
     {
          "url": "{DALI_IMAGE_DIR}button-disabled.9.png"
        }
     },
+    "ToggleButton":
+    {
+      "styles":["Button"]
+    },
     "CheckBoxButton":
     {
       "styles":["Button"],
index 85d168f..d846c0f 100644 (file)
     "TextSelectionToolbar":
     {
       "enableOvershoot":true,
+      "enableScrollBar":true,
       "scrollView":
       {
         "overshootAnimationSpeed":360.0,
       "overshootAnimationSpeed":360.0,
       "overshootSize":[720.0,130.0]
     },
+    "ScrollBar":
+    {
+      "indicatorShowDuration":0.25,
+      "indicatorHideDuration":0.25,
+      "color":[0.0,0.72,0.9,0.7]
+    },
     "TextEditor":
     {
       "pointSize":18,
     },
     "ProgressBar":
     {
-      "progressValue": 0,
       "trackVisual":{
-        "url":"{DALI_IMAGE_DIR}progress-skin.9.png",
-        "size":[24,24]
+        "visualType":"IMAGE",
+        "url":"{DALI_IMAGE_DIR}progress-bar-skin-track.9.png"
       },
       "progressVisual":{
-        "url":"{DALI_IMAGE_DIR}progress-skin-progress.9.png",
-        "size":[24,24]
-      }
-    },
-    "ProgressBarValueTextLabel":
-    {
-      "textColor":[0.8,0.8,1,1]
+        "visualType":"IMAGE",
+        "url":"{DALI_IMAGE_DIR}progress-bar-skin-progress.9.png"
+      },
+      "secondaryProgressVisual":{
+        "visualType":"IMAGE",
+        "url":"{DALI_IMAGE_DIR}progress-bar-skin-secondary-progress.9.png"
+      },
+      "indeterminateVisual":{
+        "visualType":"IMAGE",
+        "pixelArea":[0.0, 0.0, 10.0, 1.0],
+        "wrapModeU":"REPEAT",
+        "url":"{DALI_IMAGE_DIR}progress-bar-skin-indeterminate.png"
+      },
+      "indeterminateVisualAnimation":
+      [
+        {
+          "target":"indeterminateVisual",
+          "property":"pixelArea",
+          "initialValue":[0.0, 0.0, 10.0, 1.0],
+          "targetValue":[-1.0, 0.0, 10.0, 1.0],
+          "animator":
+          {
+            "alphaFunction":"DEFAULT",
+            "timePeriod":
+            {
+              "duration":0.8,
+              "delay":0
+            }
+          }
+        }
+      ],
+      "labelVisual":{
+        "visualType": "TEXT",
+        "textColor": [ 1.0, 1.0, 1.0, 1.0 ],
+        "pointSize" : 12.0, // Point size must always be provided to Text Visual
+        "horizontalAlignment": "CENTER",
+        "verticalAlignment": "CENTER"
+      },
+      "progressValue": 0.0,
+      "secondaryProgressValue":0.0,
+      "indeterminate": false
     },
     "Button":
     {
diff --git a/dali-toolkit/styles/images-common/progress-bar-skin-indeterminate.png b/dali-toolkit/styles/images-common/progress-bar-skin-indeterminate.png
new file mode 100644 (file)
index 0000000..df99c15
Binary files /dev/null and b/dali-toolkit/styles/images-common/progress-bar-skin-indeterminate.png differ
diff --git a/dali-toolkit/styles/images-common/progress-bar-skin-progress.9.png b/dali-toolkit/styles/images-common/progress-bar-skin-progress.9.png
new file mode 100644 (file)
index 0000000..b77b29d
Binary files /dev/null and b/dali-toolkit/styles/images-common/progress-bar-skin-progress.9.png differ
diff --git a/dali-toolkit/styles/images-common/progress-bar-skin-secondary-progress.9.png b/dali-toolkit/styles/images-common/progress-bar-skin-secondary-progress.9.png
new file mode 100644 (file)
index 0000000..54184e5
Binary files /dev/null and b/dali-toolkit/styles/images-common/progress-bar-skin-secondary-progress.9.png differ
diff --git a/dali-toolkit/styles/images-common/progress-bar-skin-track.9.png b/dali-toolkit/styles/images-common/progress-bar-skin-track.9.png
new file mode 100644 (file)
index 0000000..92a1dee
Binary files /dev/null and b/dali-toolkit/styles/images-common/progress-bar-skin-track.9.png differ
diff --git a/dali-toolkit/styles/images-common/progress-skin-progress.9.png b/dali-toolkit/styles/images-common/progress-skin-progress.9.png
deleted file mode 100644 (file)
index f02cd0d..0000000
Binary files a/dali-toolkit/styles/images-common/progress-skin-progress.9.png and /dev/null differ
diff --git a/dali-toolkit/styles/images-common/progress-skin.9.png b/dali-toolkit/styles/images-common/progress-skin.9.png
deleted file mode 100644 (file)
index e1c2ca0..0000000
Binary files a/dali-toolkit/styles/images-common/progress-skin.9.png and /dev/null differ
diff --git a/dali-toolkit/styles/images-common/text_selection_scroll_indicator.9.png b/dali-toolkit/styles/images-common/text_selection_scroll_indicator.9.png
new file mode 100644 (file)
index 0000000..5bf5b3f
Binary files /dev/null and b/dali-toolkit/styles/images-common/text_selection_scroll_indicator.9.png differ
diff --git a/docs/content/images/visuals/HelloWorld.png b/docs/content/images/visuals/HelloWorld.png
new file mode 100644 (file)
index 0000000..aa40f20
Binary files /dev/null and b/docs/content/images/visuals/HelloWorld.png differ
index 54a0220..c5d3a7c 100644 (file)
@@ -17,8 +17,8 @@ Namespaces are important
 + The handle & body classes should have the same name but in different namespaces
 + TypeRegistry relies on this convention
 + Here our custom control requires
-  + MyControl
-  + Internal::MyControl
+  + MyUIControl
+  + Internal::MyUIControl
  
 ### General Guidelines:
 + Try to avoid adding C++ APIs as they become difficult to maintain.
@@ -46,7 +46,34 @@ Currently, this is devel-api though, so is subject to change.
  
 ![ ](../assets/img/creating-custom-controls/rendering.png)
 ![ ](creating-custom-controls/rendering.png)
+
+To add a visual to a control, first create a Property for the visual of type MAP, and ensure the name has a suffix of "_VISUAL". Then the visual is normally defined in the stylesheet, and the definition sent via SetProperty(), where you would then create the visual:
+
+~~~{.cpp}
+// C++
+void Internal::MyUIControl::SetProperty( BaseObject* object, Property::Index index, const Property::Value& value )
+{
+  MyUIControl control = MyUIControl::DownCast( Dali::BaseHandle( object ) );
+  switch( index )
+  {
+    case MyUIControl::Property::MY_VISUAL:
+    {
+      Toolkit::VisualFactory visualFactory = Toolkit::VisualFactory::Get();
+      const Property::Map *map = value.GetMap();
+      if( map && !map->Empty() )
+      {
+        Toolkit::Visual::Base visual = visualFactory.CreateVisual( *map );
+        GetImplementation( control ).RegisterVisual( index, visual );
+      }
+      break;
+    }
+    //...
+  }
+}
+~~~
+
+The [Visuals](@ref visuals) section describes the property maps that can be used for each visual type.
+
 ___________________________________________________________________________________________________
 
 ## Ensuring Control is Stylable {#creating-controls-stylable}
@@ -118,10 +145,10 @@ It is recommended to do provide a New() method in the custom control implementat
 
 ~~~{.cpp}
 // C++
-MyUIControl MyUIControlImpl::New()
+MyUIControl Internal::MyUIControl::New()
 {
   // Create the implementation, temporarily owned on stack
-  IntrusivePtr< MyUIControlImpl > controlImpl = new MyUIControlImpl;
+  IntrusivePtr< Internal::MyUIControl > controlImpl = new Internal::MyUIControl;
 
   // Pass ownership to handle
   MyUIControl handle( *controlImpl );
@@ -138,7 +165,7 @@ This will trigger the Dali::Toolkit::Internal::Control Initialize() method which
 This should be overridden by the custom ui control.
 ~~~{.cpp}
 // C++
-void MyUIControlImpl::OnInitialize()
+void Internal::MyUIControl::OnInitialize()
 {
   // Create visuals using the VisualFactory, register events etc.
   // Register any created visuals with Control base class
@@ -169,7 +196,7 @@ ________________________________________________________________________________
 If the control needs to utilize hover and wheel events, then the correct behaviour flag should be used when constructing the control and then the appropriate method should be overridden.
 ~~~{.cpp}
 // C++
-bool MyUIControlImpl::OnHoverEvent( const HoverEvent& event )
+bool Internal::MyUIControl::OnHoverEvent( const HoverEvent& event )
 {
   bool consumed = false;
 
@@ -181,7 +208,7 @@ bool MyUIControlImpl::OnHoverEvent( const HoverEvent& event )
 ~~~
 ~~~{.cpp}
 // C++
-bool MyUIControlImpl::OnWheelEvent( const WheelEvent& event )
+bool Internal::MyUIControl::OnWheelEvent( const WheelEvent& event )
 {
   bool consumed = false;
 
@@ -210,7 +237,7 @@ If any of these detectors are required then this can be specified in the OnIniti
  
 ~~~{.cpp}
 // C++
-void MyUIControlImpl::OnInitialize()
+void Internal::MyUIControl::OnInitialize()
 {
   // Only enable pan gesture detection
   EnableGestureDetection( Gesture::Pan );
@@ -232,28 +259,28 @@ panGestureDetector.AddDirection( PanGestureDetector::DIRECTION_VERTICAL );
 Finally, the appropriate method should be overridden:
 ~~~{.cpp}
 // C++
-void MyUIControlImpl::OnPan( const PanGesture& pan )
+void Internal::MyUIControl::OnPan( const PanGesture& pan )
 {
   // Handle pan-gesture
 }
 ~~~
 ~~~{.cpp}
 // C++
-void MyUIControlImpl::OnPinch( const PinchGesture& pinch )
+void Internal::MyUIControl::OnPinch( const PinchGesture& pinch )
 {
   // Handle pinch-event
 }
 ~~~
 ~~~{.cpp}
 // C++
-void MyUIControlImpl::OnTap( const TapGesture& tap )
+void Internal::MyUIControl::OnTap( const TapGesture& tap )
 {
   // Handle tap-gesture
 }
 ~~~
 ~~~{.cpp}
 // C++
-void MyUIControlImpl::OnLongPress( const LongPressGesture& longPress )
+void Internal::MyUIControl::OnLongPress( const LongPressGesture& longPress )
 {
   // Handle long-press-gesture
 }
@@ -339,7 +366,7 @@ An up call to the Control class is necessary if these methods are overridden.
  
 ~~~{.cpp}
 // C++
-void MyUIControlImpl::OnChildAdd( Actor& child );
+void Internal::MyUIControl::OnChildAdd( Actor& child );
 {
   // Do any other operations required upon child addition
 
@@ -349,7 +376,7 @@ void MyUIControlImpl::OnChildAdd( Actor& child );
 ~~~
 ~~~{.cpp}
 // C++
-void MyUIControlImpl::OnChildRemove( Actor& child );
+void Internal::MyUIControl::OnChildRemove( Actor& child );
 {
   // Do any other operations required upon child removal
 
@@ -369,7 +396,7 @@ An up call to the Control class is necessary if these methods are overridden.
  
 ~~~{.cpp}
 // C++
-void MyUIControlImpl::OnStageConnection( int depth )
+void Internal::MyUIControl::OnStageConnection( int depth )
 {
   // Do any other operations required upon stage connection
 
@@ -379,7 +406,7 @@ void MyUIControlImpl::OnStageConnection( int depth )
 ~~~
 ~~~{.cpp}
 // C++
-void MyUIControlImpl::OnStageDisconnection()
+void Internal::MyUIControl::OnStageDisconnection()
 {
   // Do any other operations required upon stage disconnection
 
@@ -396,7 +423,7 @@ The following methods must be overridden for size negotiation to work correctly
  
 ~~~{.cpp}
 // C++
-Vector3 MyUIControlImpl::GetNaturalSize()
+Vector3 Internal::MyUIControl::GetNaturalSize()
 {
   // Return the natural size of the control
   // This depends on our layout
@@ -411,7 +438,7 @@ Vector3 MyUIControlImpl::GetNaturalSize()
 ~~~
 ~~~{.cpp}
 // C++
-float MyUIControlImpl::GetHeightForWidth( float width )
+float Internal::MyUIControl::GetHeightForWidth( float width )
 {
   // Called by the size negotiation algorithm if we have a fixed width
   // We should calculate the height we would like our control to be for that width
@@ -423,7 +450,7 @@ float MyUIControlImpl::GetHeightForWidth( float width )
 ~~~
 ~~~{.cpp}
 // C++
-float MyUIControlImpl::GetWidthForHeight( float height )
+float Internal::MyUIControl::GetWidthForHeight( float height )
 {
   // Called by the size negotiation algorithm if we have a fixed height
   // We should calculate the width we would like our control to be for that height
@@ -434,7 +461,7 @@ float MyUIControlImpl::GetWidthForHeight( float height )
 ~~~
 ~~~{.cpp}
 // C++
-void MyUIControlImpl::OnRelayout( const Vector2& size, RelayoutContainer& container )
+void Internal::MyUIControl::OnRelayout( const Vector2& size, RelayoutContainer& container )
 {
   // The size is what we have been given and what our control needs to fit into
   // Here, we need to set the position and the size of our visuals
@@ -452,9 +479,10 @@ ________________________________________________________________________________
 ### Clipping Support {#creating-controls-clipping}
 
 When an Actor is set to clip its children, the renderers have to be added manually in order to specify what its children need to clip to.
-The Control base class automates the creation of the renderers/visuals when it is set to clip its children.
+The Control base class automates the creation of the visuals when it is set to clip its children.
  
-This is only done if the application or custom control writer has not added any renderers to the Control or registered any visuals
+This is only done if the application or custom control writer has not
+added any Renderers to the Control or registered any visuals
 (regardless of whether these visuals are enabled or not).
  
 If custom control writers want to define the clipping visuals themselves, then they should register all required visuals before the control is staged.
index d2bda2d..f7855fe 100644 (file)
@@ -54,7 +54,9 @@ Alternatively a font may be requested using either or all of FONT_FAMILY, FONT_S
 // C++
 
 label.SetProperty( TextLabel::Property::FONT_FAMILY, "FreeSerif" );
-label.SetProperty( TextLabel::Property::FONT_STYLE,  "{\"weight\":\"bold\",\"slant\":\"italic\"}" );
+label.SetProperty( TextLabel::Property::FONT_STYLE,
+                   Property::Map().Add( "weight", "bold" )
+                                  .Add( "slant", "italic" ) );
 label.SetProperty( TextLabel::Property::POINT_SIZE,  12.0f );
 ~~~
 
@@ -62,7 +64,10 @@ label.SetProperty( TextLabel::Property::POINT_SIZE,  12.0f );
 // JavaScript
 
 label.fontFamily = "FreeSerif";
-label.fontStyle = "{\"weight\":\"bold\",\"slant\":\"italic\"}";
+label.fontStyle = {
+                    "weight" : "bold",
+                    "slant"  : "italic"
+                  };
 label.pointSize = 12;
 ~~~
 
@@ -92,7 +97,11 @@ To change the font for standard text controls, this JSON syntax can be used:
     "textlabel":
     {
       "fontFamily":"FreeSerif",
-      "fontStyle":"{\"weight\":\"bold\",\"slant\":\"italic\"}",
+      "fontStyle":
+      {
+        "weight":"bold",
+        "slant":"italic"
+      },
       "pointSize":8
     }
   }
@@ -126,7 +135,11 @@ in the style sheet are applied after the base section ("textlabel"), so take pre
     "textlabel":
     {
       "fontFamily":"FreeSerif",
-      "fontStyle":"{\"weight\":\"bold\",\"slant\":\"italic\"}",
+      "fontStyle":
+      {
+        "weight":"bold",
+        "slant":"italic"
+      },
     },
 
     "textlabelFontSize0":
@@ -153,7 +166,11 @@ in the style sheet are applied after the base section ("textlabel"), so take pre
     "customLabel":
     {
       "fontFamily":"TimesNewRoman",
-      "fontStyle":"{\"weight\":\"regular\",\"slant\":\"regular\"}",
+      "fontStyle":
+      {
+        "weight":"regular",
+        "slant":"regular"
+      },
     },
     "customLabelFontSize0":
     {
index eaaaed5..71c45ef 100644 (file)
@@ -16,6 +16,7 @@ DALi provides the following visuals:
  + [Border](@ref border-visual)
  + [Mesh](@ref mesh-visual)
  + [Primitive](@ref primitive-visual)
+ + [Text](@ref text-visual)
  + [Wireframe](@ref wireframe-visual)
  
 Controls can provide properties that allow users to specify the visual type ( visualType ).
@@ -59,13 +60,13 @@ For example, an offsetSizeMode of [0, 0, 1, 1], an offset of (0, 0.25) and a siz
 Visuals also have a custom **shader** property. Whilst it's possible to change the shader, please note that some visuals rely on the vertex shader to perform certain functions. For example, the NPatch visual uses the vertex shader to perform the stretching. The **shader** property is a Property::Map with the following keys:
 
 
-| Property                                        | String   | Type    | Required | Description               |
-|-------------------------------------------------|----------|:-------:|:--------:|---------------------------|
-| Dali::Toolkit::Visual::Shader::Property::VERTEX_SHADER | vertexShader | STRING | No      | The vertex shader code. |
-| Dali::Toolkit::Visual::Shader::Property::FRAGMENT_SHADER | fragmentShader | STRING | No      | The fragment shader code. |
-| Dali::Toolkit::Visual::Shader::Property::SUBDIVIDE_GRID_X | subdivideGridX | INTEGER | No      | How to subdivide the grid along the X-Axis. Defaults to 1 |
-| Dali::Toolkit::Visual::Shader::Property::SUBDIVIDE_GRID_Y | subdivideGridY | INTEGER | No      | How to subdivide the grid along the Y-Axis. Defaults to 1 |
-| Dali::Toolkit::Visual::Shader::Property::HINTS | hints | INTEGER or ARRAY of STRING | No      | Shader hints bitmask [More info](@ref shader-hints) |
+| Property                                                  | String         | Type                       | Required | Description                                                                                |
+|-----------------------------------------------------------|----------------|:--------------------------:|:--------:|--------------------------------------------------------------------------------------------|
+| Dali::Toolkit::Visual::Shader::Property::VERTEX_SHADER    | vertexShader   | STRING or ARRAY of STRING  | No       | The vertex shader code. Can use an array of strings to split shader over multiple lines.   |
+| Dali::Toolkit::Visual::Shader::Property::FRAGMENT_SHADER  | fragmentShader | STRING or ARRAY of STRING  | No       | The fragment shader code. Can use an array of strings to split shader over multiple lines. |
+| Dali::Toolkit::Visual::Shader::Property::SUBDIVIDE_GRID_X | subdivideGridX | INTEGER                    | No       | How to subdivide the grid along the X-Axis. Defaults to 1.                                 |
+| Dali::Toolkit::Visual::Shader::Property::SUBDIVIDE_GRID_Y | subdivideGridY | INTEGER                    | No       | How to subdivide the grid along the Y-Axis. Defaults to 1.                                 |
+| Dali::Toolkit::Visual::Shader::Property::HINTS            | hints          | INTEGER or ARRAY of STRING | No       | Shader hints bitmask [More info](@ref shader-hints)                                        |
 
 ## Shader hints {#shader-hints}
 
@@ -304,6 +305,9 @@ Renders a raster image ( jpg, png etc.) into the visual's quad geometry.
 | Dali::Toolkit::ImageVisual::Property::SAMPLING_MODE  | samplingMode  | INTEGER or STRING | No       | Filtering options, used when resizing images to sample original pixels. [More info](@ref resourceimagescaling-scaling)   |
 | Dali::Toolkit::ImageVisual::Property::DESIRED_WIDTH  | desiredWidth  | INT               | No       | The desired image width. Will use actual image width if not specified.                                                   |
 | Dali::Toolkit::ImageVisual::Property::DESIRED_HEIGHT | desiredHeight | INT               | No       | The desired image height. Will use actual image height if not specified.                                                 |
+| Dali::Toolkit::ImageVisual::Property::PIXEL_AREA     | pixelArea     | VECTOR4           | No       | The image area to be displayed, default value is [0.0, 0.0, 1.0, 1.0]                                                    |
+| Dali::Toolkit::ImageVisual::Property::WRAP_MODE_U    | wrapModeU     | INTEGER or STRING | No       | Wrap mode for u coordinate, valid values are CLAMP_TO_EDGE(default), REPEAT, MIRRORED_REPEAT                               |
+| Dali::Toolkit::ImageVisual::Property::WRAP_MODE_V    | wrapModeV     | INTEGER or STRING | No       | Wrap mode for v coordinate, valid values are CLAMP_TO_EDGE(default), REPEAT, MIRRORED_REPEAT                               |
 
 #### Usage
 
@@ -455,9 +459,12 @@ Renders an animated image into the visual's quad geometry. Currently, only the G
 
 **VisualType:** Dali::Toolkit::Visual::IMAGE, "IMAGE"
 
-| Property                                  | String | Type    | Required | Description                      |
-|-------------------------------------------|--------|:-------:|:--------:|----------------------------------|
-| Dali::Toolkit::ImageVisual::Property::URL | url    | STRING  | Yes      | The URL of the animated image.    |
+| Property                                          | String     | Type              | Required | Description                                                                                  |
+|---------------------------------------------------|------------|:-----------------:|:--------:|----------------------------------------------------------------------------------------------|
+| Dali::Toolkit::ImageVisual::Property::URL         | url        | STRING            | Yes      | The URL of the animated image.                                                               |
+| Dali::Toolkit::ImageVisual::Property::PIXEL_AREA  | pixelArea  | VECTOR4           | No       | The image area to be displayed, default value is [0.0, 0.0, 1.0, 1.0]                        |
+| Dali::Toolkit::ImageVisual::Property::WRAP_MODE_U | wrapModeU  | INTEGER or STRING | No       | Wrap mode for u coordinate, valid values are CLAMP_TO_EDGE(default), REPEAT, MIRRORED_REPEAT |
+| Dali::Toolkit::ImageVisual::Property::WRAP_MODE_V | wrapModeV  | INTEGER or STRING | No       | Wrap mode for v coordinate, valid values are CLAMP_TO_EDGE(default), REPEAT, MIRRORED_REPEAT |
 
 #### Usage
 
@@ -709,6 +716,53 @@ control.SetProperty( Control::Property::BACKGROUND, map );
 ~~~
 ___________________________________________________________________________________________________
 
+## Text Visual {#text-visual}
+
+Renders text within a control.
+
+![ ](../assets/img/visuals/HelloWorld.png)
+![ ](visuals/HelloWorld.png)
+
+### Properties
+
+**VisualType:** Dali::Toolkit::Visual::TEXT, "TEXT"
+
+| Property                                                    | String              | Type          | Required | Description                                                                   | Default                |
+|-------------------------------------------------------------|---------------------|:-------------:|:--------:|-------------------------------------------------------------------------------|------------------------|
+| Dali::Toolkit::TextVisual::Property::TEXT                   | text                | STRING        | Yes      | The text to display in UTF-8 format                                           |                        |
+| Dali::Toolkit::TextVisual::Property::FONT_FAMILY            | fontFamily          | STRING        | No       | The requested font family to use                                              |                        |
+| Dali::Toolkit::TextVisual::Property::FONT_STYLE             | fontStyle           | MAP           | No       | The requested font style to use                                               |                        |
+| Dali::Toolkit::TextVisual::Property::POINT_SIZE             | pointSize           | FLOAT         | Yes      | The size of font in points                                                    |                        |
+| Dali::Toolkit::TextVisual::Property::MULTI_LINE             | multiLine           | BOOLEAN       | No       | The single-line or multi-line layout option                                   | false                  |
+| Dali::Toolkit::TextVisual::Property::HORIZONTAL_ALIGNMENT   | horizontalAlignment | STRING        | No       | The line horizontal alignment: "BEGIN", "CENTER", "END"                       | "BEGIN"                |
+| Dali::Toolkit::TextVisual::Property::VERTICAL_ALIGNMENT     | verticalAlignment   | STRING        | No       | The line vertical alignment: "TOP",   "CENTER", "BOTTOM"                      | "TOP"                  |
+| Dali::Toolkit::TextVisual::Property::TEXT_COLOR             | textColor           | VECTOR4       | No       | The color of the text                                                         | Color::BLACK           |
+| Dali::Toolkit::TextVisual::Property::ENABLE_MARKUP         | enableMarkup           | BOOL       | No       | If mark up should be enabled |                                                        |
+
+### Usage
+
+~~~{.cpp}
+    // C++
+    Dali::Stage stage = Dali::Stage::GetCurrent();
+    stage.SetBackgroundColor( Dali::Color::WHITE );
+
+    Dali::Toolkit::Control control = Dali::Toolkit::Control::New();
+    control.SetParentOrigin( ParentOrigin::CENTER );
+
+    Dali::Property::Map map;
+    map[ Dali::Toolkit::Visual::Property::TYPE ] = Dali::Toolkit::Visual::TEXT;
+    map[ Dali::Toolkit::TextVisual::Property::TEXT ] = "Hello world";
+    map[ Dali::Toolkit::TextVisual::Property::TEXT_COLOR ] = Dali::Color::BLACK;
+    map[ Dali::Toolkit::TextVisual::Property::FONT_FAMILY ] = "Sans";
+    map[ Dali::Toolkit::TextVisual::Property::POINT_SIZE ] = 30.f;
+    map[ Dali::Toolkit::TextVisual::Property::HORIZONTAL_ALIGNMENT ] = "CENTER";
+    map[ Dali::Toolkit::TextVisual::Property::VERTICAL_ALIGNMENT ] = "CENTER";
+
+    control.SetProperty( Dali::Toolkit::Control::Property::BACKGROUND, map );
+
+    stage.Add( control );
+~~~
+
 ## Wireframe Visual {#wireframe-visual}
 
 Renders a wireframe around a quad geometry.
index 66af4d1..d8137c7 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali-addon
 Summary:    DALi module for Node.JS
-Version:    1.2.21
+Version:    1.2.26
 Release:    1
 Group:      Development/Libraries
 License:    Apache License, Version 2.0
index 35d0ed9..f301af8 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali-toolkit
 Summary:    The OpenGLES Canvas Core Library Toolkit
-Version:    1.2.21
+Version:    1.2.26
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-2-Clause and MIT
index 43660d7..2263391 100644 (file)
@@ -4,6 +4,5 @@ autom4te.cache/
 aclocal.m4
 config/
 config.*
-cpp/dali_wrap.cpp
-cpp/dali_wrap.h
+automatic/*
 configure
index 991c0ee..2f81c64 100755 (executable)
@@ -23,8 +23,8 @@ if BUILD_MCS
 
 all-local: libNDalic.so NDali.dll
 
-libNDalic.so: automatic/cpp/dali_wrap.o manual/cpp/keyboard_focus_manager_wrap.o manual/cpp/view-wrapper-impl-wrap.o manual/cpp/callbackbase_wrap.o
-       g++ -shared automatic/cpp/dali_wrap.o manual/cpp/keyboard_focus_manager_wrap.o manual/cpp/view-wrapper-impl-wrap.o manual/cpp/callbackbase_wrap.o -o libNDalic.so $(DALICORE_LIBS) $(DALIADAPTOR_LIBS) $(DALITOOLKIT_LIBS)
+libNDalic.so: automatic/cpp/dali_wrap.o manual/cpp/keyboard_focus_manager_wrap.o manual/cpp/view-wrapper-impl-wrap.o manual/cpp/callbackbase_wrap.o manual/cpp/devel-property-wrap.o
+       g++ -shared automatic/cpp/dali_wrap.o manual/cpp/keyboard_focus_manager_wrap.o manual/cpp/view-wrapper-impl-wrap.o manual/cpp/callbackbase_wrap.o manual/cpp/devel-property-wrap.o -o libNDalic.so $(DALICORE_LIBS) $(DALIADAPTOR_LIBS) $(DALITOOLKIT_LIBS)
 
 automatic/cpp/dali_wrap.o: $(BUILT_SOURCES)
        g++ -c -fpic $(CXXFLAGS) $(DALICORE_CFLAGS) $(DALIADAPTOR_CFLAGS) $(DALITOOLKIT_CFLAGS) automatic/cpp/dali_wrap.cpp -o automatic/cpp/dali_wrap.o
@@ -38,15 +38,20 @@ manual/cpp/view-wrapper-impl-wrap.o: $(BUILT_SOURCES)
 manual/cpp/callbackbase_wrap.o: $(BUILT_SOURCES)
        g++ -c -fpic $(CXXFLAGS) $(DALICORE_CFLAGS) $(DALIADAPTOR_CFLAGS) $(DALITOOLKIT_CFLAGS) manual/cpp/callbackbase_wrap.cpp -o manual/cpp/callbackbase_wrap.o
 
+manual/cpp/devel-property-wrap.o: $(BUILT_SOURCES)
+       g++ -c -fpic $(CXXFLAGS) $(DALICORE_CFLAGS) $(DALIADAPTOR_CFLAGS) $(DALITOOLKIT_CFLAGS) manual/cpp/devel-property-wrap.cpp -o manual/cpp/devel-property-wrap.o
+
 NDali.dll: $(BUILT_SOURCES)
-       $(MCS) -nologo -target:library -out:NDali.dll automatic/csharp/*.cs manual/csharp/*.cs
+       $(MCS) -nologo -target:library -out:NDali.dll automatic/csharp/*.cs manual/csharp/*.cs views/*.cs
 
 check-local: examples/dali-test.exe \
              examples/hello-world.exe \
              examples/scroll-view.exe \
              examples/custom-control.exe \
-             examples/spin-control.exe \
+             examples/date-picker.exe \
              examples/control-dashboard.exe \
+             examples/date-picker-using-json.exe \
+             examples/json-loader.exe \
              examples/user-alphafunction.exe \
              examples/image-view.exe \
              examples/libNDalic.so examples/NDali.dll
index 5535ee9..b59ff97 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -84,6 +84,8 @@
 %ignore *::AnchorPoint::DEFAULT;
 %ignore *::SetPositionInheritanceMode(PositionInheritanceMode);
 %ignore *::GetKeyValue(SizeType) const;
+%ignore *::TypeInfo::GetCreator() const;
+%ignore Dali::Stage::TouchedSignal;
 
 %rename(ParentOriginTop) Dali::ParentOrigin::TOP;
 %rename(ParentOriginBottom) Dali::ParentOrigin::BOTTOM;
@@ -186,6 +188,7 @@ typedef std::pair< Dali::Radian, Dali::Radian > AngleThresholdPair;
 %include <dali/public-api/math/random.h>
 %include <dali/public-api/math/angle-axis.h>
 %include <dali/public-api/math/viewport.h>
+%include <dali/public-api/math/math-utils.h>
 
 %include <dali/public-api/object/property-index-ranges.h>
 %include <dali/public-api/object/property.h>
@@ -209,6 +212,8 @@ typedef std::pair< Dali::Radian, Dali::Radian > AngleThresholdPair;
 %include <dali/public-api/object/handle.h>
 %include <dali/public-api/object/type-info.h>
 %include <dali/public-api/object/type-registry.h>
+%include <dali/devel-api/object/csharp-type-info.h>
+%include <dali/devel-api/object/csharp-type-registry.h>
 
 %include <dali/public-api/common/constants.h>
 %include <dali/public-api/actors/actor-enumerations.h>
@@ -257,7 +262,6 @@ typedef std::pair< Dali::Radian, Dali::Radian > AngleThresholdPair;
 %include <dali/public-api/events/pinch-gesture.h>
 %include <dali/public-api/events/tap-gesture-detector.h>
 %include <dali/public-api/events/tap-gesture.h>
-%include <dali/public-api/events/touch-event.h>
 
 %include <dali/public-api/animation/alpha-function.h>
 %include <dali/public-api/animation/key-frames.h>
@@ -281,10 +285,8 @@ typedef std::pair< Dali::Radian, Dali::Radian > AngleThresholdPair;
 
 %template(StringValuePair) std::pair<std::string, Dali::Property::Value>;
 %template(TouchPointContainer) std::vector<Dali::TouchPoint>;
-%template(RectDouble) Dali::Rect<double>;
-%template(RectInteger)  Dali::Rect<int>;
-%template(RectUnsignedInteger)  Dali::Rect<unsigned int>;
-%template(RectFloat)  Dali::Rect<float>;
+%template(Rectangle)  Dali::Rect<int>;
+%template(PaddingType)  Dali::Rect<float>;
 %template(VectorInteger) Dali::Vector<int>;
 %template(VectorFloat) Dali::Vector<float>;
 %template(VectorUnsignedChar) Dali::Vector<unsigned char>;
@@ -300,13 +302,13 @@ typedef std::pair< Dali::Radian, Dali::Radian > AngleThresholdPair;
 %template(LongPressGestureDetectedSignal) Dali::Signal<void (Dali::Actor, const Dali::LongPressGesture&)>;
 //%template(ActorTouchEventSignal) Dali::Signal<bool (Dali::Actor, const Dali::TouchEvent&)>;
 %template(ActorTouchDataSignal) Dali::Signal<bool (Dali::Actor, const Dali::TouchData&)>;
-%template(ActorHoverEventSignal) Dali::Signal<bool (Dali::Actor, const Dali::HoverEvent&)>;
-%template(ActorWheelEventSignal) Dali::Signal<bool (Dali::Actor, const Dali::WheelEvent&)>;
+%template(ActorHoverSignal) Dali::Signal<bool (Dali::Actor, const Dali::HoverEvent&)>;
+%template(ActorWheelSignal) Dali::Signal<bool (Dali::Actor, const Dali::WheelEvent&)>;
 %template(ActorSignal) Dali::Signal<void (Dali::Actor)>;
 %template(KeyEventSignal) Dali::Signal<void (const Dali::KeyEvent&)>;
 //%template(TouchEventSignal) Dali::Signal<void (const Dali::TouchEvent&)>;
 %template(TouchSignal) Dali::Signal<void (const Dali::TouchData&)>;
-%template(StageWheelEventSignal) Dali::Signal<void (const Dali::WheelEvent&)>;
+%template(StageWheelSignal) Dali::Signal<void (const Dali::WheelEvent&)>;
 %template(AngleThresholdPair) std::pair<Dali::Radian, Dali::Radian>;
 %template(PanGestureDetectedSignal) Dali::Signal<void (Dali::Actor, const Dali::PanGesture&)>;
 %template(PinchGestureDetectedSignal) Dali::Signal<void (Dali::Actor, const Dali::PinchGesture&)>;
index a9566c8..808cd07 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 %}
 %enddef
 
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_VIDEOVIEWSIGNAL( NameSpace, ClassName )
+%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( NameSpace, ClassName, NewClassName )
 %typemap(csfinalize) NameSpace::ClassName %{
-  ~VideoViewSignal() {
+  ~NewClassName() {
     DisposeQueue.Instance.Add(this);
   }
 %}
 %enddef
 
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_VIDEOVIEWSIGNAL( NameSpace, ClassName )
+%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( NameSpace, ClassName, NewClassName )
 %typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
     if (!Stage.IsInstalled()) {
       DisposeQueue.Instance.Add(this);
@@ -85,7 +85,7 @@
       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
         if (swigCMemOwn) {
           swigCMemOwn = false;
-          NDalicPINVOKE.delete_VideoViewSignal(swigCPtr);
+          NDalicPINVOKE.delete_##NewClassName(swigCPtr);
         }
         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
       }
 %}
 %enddef
 
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_APPLICATIONSIGNAL( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~ApplicationSignal() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_APPLICATIONSIGNAL( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_ApplicationSignal(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_APPLICATIONCONTROLSIGNAL( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~ApplicationControlSignal() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_APPLICATIONCONTROLSIGNAL( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_ApplicationControlSignal(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_IMAGESIGNAL( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~ImageSignal() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_IMAGESIGNAL( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_ImageSignal(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RESOURCESIMAGESIGNAL( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~ResourceImageSignal() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RESOURCESIMAGESIGNAL( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_ResourceImageSignal(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RECTINT( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~RectInteger() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RECTINT( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_RectInteger(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RECTDOUBLE( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~RectDouble() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RECTDOUBLE( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_RectDouble(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RECTFLOAT( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~RectFloat() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RECTFLOAT( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_RectFloat(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RECTUNSIGNEDINT( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~RectUnsignedInteger() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RECTUNSIGNEDINT( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_RectUnsignedInteger(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_STRINGVALUEPAIR( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~StringValuePair() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_STRINGVALUEPAIR( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_StringValuePair(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_TOUCHCONTAINER( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~TouchPointContainer() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_TOUCHCONTAINER( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_TouchPointContainer(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_BOOLSIGNAL( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~BoolSignal() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_BOOLSIGNAL( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_BoolSignal(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_ACCESSIBILITYACTIONSIGNAL( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~AccessibilityActionSignal() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ACCESSIBILITYACTIONSIGNAL( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_AccessibilityActionSignal(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_ACCESSIBILITYACTIONSCROLLSIGNAL( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~AccessibilityActionScrollSignal() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ACCESSIBILITYACTIONSCROLLSIGNAL( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_AccessibilityActionScrollSignal(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_ACCESSIBILITYFOCUSSIGNAL( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~AccessibilityFocusOvershotSignal() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ACCESSIBILITYFOCUSSIGNAL( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_AccessibilityFocusOvershotSignal(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_VECTORINT( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~VectorInteger() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_VECTORINT( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_VectorInteger(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_VECTORFLOAT( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~VectorFloat() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_VECTORFLOAT( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_VectorFloat(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_VECTORUNSIGNEDCHAR( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~VectorUnsignedChar() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_VECTORUNSIGNEDCHAR( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_VectorUnsignedChar(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_VECTORUINT16PAIR( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~VectorUint16Pair() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_VECTORUINT16PAIR( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_VectorUint16Pair(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_TIMERSIGNALTYPE( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~TimerSignalType() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_TIMERSIGNALTYPE( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_TimerSignalType(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_ACTOR( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~ActorSignal() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ACTOR( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_ActorSignal(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_ANIMATIONSIGNAL( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~AnimationSignal() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ANIMATIONSIGNAL( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_AnimationSignal(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_BUTTON( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~ButtonSignal() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_BUTTON( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_ButtonSignal(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_PAGETURNSIGNAL( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~PageTurnSignal() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_PAGETURNSIGNAL( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_PageTurnSignal(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_PAGEVIEWSIGNAL( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~PagePanSignal() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_PAGEVIEWSIGNAL( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_PagePanSignal(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_PANGESTURESIGNAL( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~PanGestureDetectedSignal() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_PANGESTURESIGNAL( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_PanGestureDetectedSignal(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_PINCHGESTURESIGNAL( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~PinchGestureDetectedSignal() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_PINCHGESTURESIGNAL( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_PinchGestureDetectedSignal(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENDERTASKSIGNAL( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~RenderTaskSignal() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENDERTASKSIGNAL( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_RenderTaskSignal(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_SCROLLABLESIGNAL( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~ScrollableSignal() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_SCROLLABLESIGNAL( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_ScrollableSignal(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_SCROLLVIEWSIGNAL( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~ScrollViewSnapStartedSignal() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_SCROLLVIEWSIGNAL( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_ScrollViewSnapStartedSignal(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_SLIDERVALUECHANGEDSIGNAL( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~SliderValueChangedSignal() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_SLIDERVALUECHANGEDSIGNAL( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_SliderValueChangedSignal(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_SLIDERMARKCHANGEDSIGNAL( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~SliderMarkReachedSignal() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_SLIDERMARKCHANGEDSIGNAL( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_SliderMarkReachedSignal(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_STAGESIGNAL( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~StageWheelEventSignal() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_STAGESIGNAL( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
-    if (!Stage.IsInstalled()) {
-      DisposeQueue.Instance.Add(this);
-      return;
-    }
-
-    lock(this) {
-      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
-        if (swigCMemOwn) {
-          swigCMemOwn = false;
-          NDalicPINVOKE.delete_StageWheelEventSignal(swigCPtr);
-        }
-        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-      }
-      global::System.GC.SuppressFinalize(this);
-    }
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_STYLECHANGEDSIGNAL( NameSpace, ClassName )
-%typemap(csfinalize) NameSpace::ClassName %{
-  ~StyleChangedSignal() {
-    DisposeQueue.Instance.Add(this);
-  }
-%}
-%enddef
-
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_STYLECHANGEDSIGNAL( NameSpace, ClassName )
-%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
+%define DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION_RENAME( NameSpace, ClassName, NewClassName )
+%typemap(csdestruct_derived, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
     if (!Stage.IsInstalled()) {
       DisposeQueue.Instance.Add(this);
       return;
       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
         if (swigCMemOwn) {
           swigCMemOwn = false;
-          NDalicPINVOKE.delete_StyleChangedSignal(swigCPtr);
+          NDalicPINVOKE.delete_##NewClassName(swigCPtr);
         }
         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
       }
       global::System.GC.SuppressFinalize(this);
+      base.Dispose();
     }
   }
 %}
 %enddef
 
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_TAPGESTURESIGNAL( NameSpace, ClassName )
+%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_STRINGVALUEPAIR( NameSpace, ClassName )
 %typemap(csfinalize) NameSpace::ClassName %{
-  ~TapGestureDetectedSignal() {
+  ~StringValuePair() {
     DisposeQueue.Instance.Add(this);
   }
 %}
 %enddef
 
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_TAPGESTURESIGNAL( NameSpace, ClassName )
+%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_STRINGVALUEPAIR( NameSpace, ClassName )
 %typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
     if (!Stage.IsInstalled()) {
       DisposeQueue.Instance.Add(this);
       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
         if (swigCMemOwn) {
           swigCMemOwn = false;
-          NDalicPINVOKE.delete_TapGestureDetectedSignal(swigCPtr);
+          NDalicPINVOKE.delete_StringValuePair(swigCPtr);
         }
         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
       }
 %}
 %enddef
 
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_TEXTFIELDSIGNAL( NameSpace, ClassName )
+%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_BOOLSIGNAL( NameSpace, ClassName )
 %typemap(csfinalize) NameSpace::ClassName %{
-  ~TextFieldSignal() {
+  ~BoolSignal() {
     DisposeQueue.Instance.Add(this);
   }
 %}
 %enddef
 
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_TEXTFIELDSIGNAL( NameSpace, ClassName )
+%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_BOOLSIGNAL( NameSpace, ClassName )
 %typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
     if (!Stage.IsInstalled()) {
       DisposeQueue.Instance.Add(this);
       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
         if (swigCMemOwn) {
           swigCMemOwn = false;
-          NDalicPINVOKE.delete_TextFieldSignal(swigCPtr);
+          NDalicPINVOKE.delete_BoolSignal(swigCPtr);
         }
         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
       }
 %}
 %enddef
 
-%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_TEXTEDITORSIGNAL( NameSpace, ClassName )
+%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_TIMERSIGNALTYPE( NameSpace, ClassName )
 %typemap(csfinalize) NameSpace::ClassName %{
-  ~TextEditorSignal() {
+  ~TimerSignalType() {
     DisposeQueue.Instance.Add(this);
   }
 %}
 %enddef
 
-%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_TEXTEDITORSIGNAL( NameSpace, ClassName )
+%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_TIMERSIGNALTYPE( NameSpace, ClassName )
 %typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{
     if (!Stage.IsInstalled()) {
       DisposeQueue.Instance.Add(this);
       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
         if (swigCMemOwn) {
           swigCMemOwn = false;
-          NDalicPINVOKE.delete_TextEditorSignal(swigCPtr);
+          NDalicPINVOKE.delete_TimerSignalType(swigCPtr);
         }
         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
       }
@@ -1205,14 +270,14 @@ DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, LongPressGesture );
 DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, LongPressGestureDetector );
 DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, LongPressGestureDetector );
 
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, KeyEvent );
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, KeyEvent );
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, HoverEvent );
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, HoverEvent );
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, KeyEvent, Key );
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, KeyEvent, Key );
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, HoverEvent, Hover );
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, HoverEvent, Hover );
 DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, TouchEvent );
 DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, TouchEvent );
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, WheelEvent );
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, WheelEvent );
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, WheelEvent, Wheel );
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, WheelEvent, Wheel );
 
 DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Renderer );
 DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, Renderer );
@@ -1297,8 +362,8 @@ DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, PathConstrainer );
 
 DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, TouchPoint );
 DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, TouchPoint );
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, TouchData );
-DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, TouchData );
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, TouchData, Touch );
+DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION_RENAME( Dali, TouchData, Touch );
 
 DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Application );
 DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, Application );
@@ -1393,45 +458,41 @@ DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, VideoView );
 DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, VisualFactory );
 DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, VisualFactory );
 
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_APPLICATIONSIGNAL( Dali, Signal<void(Dali::Application&)>);
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_APPLICATIONSIGNAL( Dali, Signal<void(Dali::Application&)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_APPLICATIONCONTROLSIGNAL( Dali, Signal<void(Dali::Application&, void*)>);
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_APPLICATIONCONTROLSIGNAL( Dali, Signal<void(Dali::Application&, void*)>);
-
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_VIDEOVIEWSIGNAL( Dali, Signal<void(Dali::Toolkit::VideoView&)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_VIDEOVIEWSIGNAL( Dali, Signal<void(Dali::Toolkit::VideoView&)>);
-
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_IMAGESIGNAL( Dali, Signal<void(Dali::Image)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_IMAGESIGNAL( Dali, Signal<void(Dali::Image)>);
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RESOURCESIMAGESIGNAL( Dali, Signal<void(Dali::ResourceImage)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RESOURCESIMAGESIGNAL( Dali, Signal<void(Dali::ResourceImage)>);
-
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RECTINT( Dali, Rect<int>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RECTINT( Dali, Rect<int>);
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RECTDOUBLE( Dali, Rect<double>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RECTDOUBLE( Dali, Rect<double>);
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RECTFLOAT( Dali, Rect<float>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RECTFLOAT( Dali, Rect<float>);
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RECTUNSIGNEDINT( Dali, Rect<unsigned int>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RECTUNSIGNEDINT( Dali, Rect<unsigned int>);
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_TOUCHCONTAINER( std, vector<Dali::TouchPoint>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_TOUCHCONTAINER( std, vector<Dali::TouchPoint>);
-
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_VECTORINT( Dali, Vector<int>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_VECTORINT( Dali, Vector<int>);
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_VECTORFLOAT( Dali, Vector<float>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_VECTORFLOAT( Dali, Vector<float>);
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_VECTORUNSIGNEDCHAR( Dali, Vector<unsigned char>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_VECTORUNSIGNEDCHAR( Dali, Vector<unsigned char>);
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_VECTORUINT16PAIR( Dali, Vector<Dali::Uint16Pair>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_VECTORUINT16PAIR( Dali, Vector<Dali::Uint16Pair>);
-
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_ACCESSIBILITYACTIONSIGNAL( Dali, Signal<bool(Dali::Toolkit::AccessibilityManager&)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ACCESSIBILITYACTIONSIGNAL( Dali, Signal<bool(Dali::Toolkit::AccessibilityManager&)>);
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_ACCESSIBILITYACTIONSCROLLSIGNAL( Dali, Signal<bool(Dali::Toolkit::AccessibilityManager&, const Dali::TouchEvent&)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ACCESSIBILITYACTIONSCROLLSIGNAL( Dali, Signal<bool(Dali::Toolkit::AccessibilityManager&, const Dali::TouchEvent&)>);
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_ACCESSIBILITYFOCUSSIGNAL( Dali, Signal<void(Dali::Actor, Dali::Toolkit::AccessibilityManager::FocusOvershotDirection)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ACCESSIBILITYFOCUSSIGNAL( Dali, Signal<void(Dali::Actor, Dali::Toolkit::AccessibilityManager::FocusOvershotDirection)>);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void(Dali::Application&)>, ApplicationSignal);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void(Dali::Application&)>, ApplicationSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void(Dali::Application&, void*)>, ApplicationControlSignal);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void(Dali::Application&, void*)>, ApplicationControlSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void(Dali::Toolkit::VideoView&)>, VideoViewSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void(Dali::Toolkit::VideoView&)>, VideoViewSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void(Dali::Image)>, ImageSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void(Dali::Image)>, ImageSignal);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void(Dali::ResourceImage)>, ResourceImageSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void(Dali::ResourceImage)>, ResourceImageSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Rect<int>, Rectangle);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Rect<int>, Rectangle);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Rect<float>, PaddingType);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Rect<float>, PaddingType);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( std, vector<Dali::TouchPoint>, TouchPointContainer);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( std, vector<Dali::TouchPoint>, TouchPointContainer);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Vector<int>, VectorInteger);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Vector<int>, VectorInteger);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Vector<float>, VectorFloat);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Vector<float>, VectorFloat);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Vector<unsigned char>, VectorUnsignedChar);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Vector<unsigned char>, VectorUnsignedChar);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Vector<Dali::Uint16Pair>, VectorUint16Pair);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Vector<Dali::Uint16Pair>, VectorUint16Pair);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<bool(Dali::Toolkit::AccessibilityManager&)>, AccessibilityActionSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<bool(Dali::Toolkit::AccessibilityManager&)>, AccessibilityActionSignal);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<bool(Dali::Toolkit::AccessibilityManager&, const Dali::TouchEvent&)>, AccessibilityActionScrollSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<bool(Dali::Toolkit::AccessibilityManager&, const Dali::TouchEvent&)>, AccessibilityActionScrollSignal);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void(Dali::Actor, Dali::Toolkit::AccessibilityManager::FocusOvershotDirection)>, AccessibilityFocusOvershotSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void(Dali::Actor, Dali::Toolkit::AccessibilityManager::FocusOvershotDirection)>, AccessibilityFocusOvershotSignal);
 //DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_STRINGVALUEPAIR( Dali, pair<std::string, Dali::Property::Value>);
 //DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_STRINGVALUEPAIR( Dali, pair<std::string, Dali::Property::Value>);
 //DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_BOOLSIGNAL( Dali, Signal<bool()>);
@@ -1439,51 +500,144 @@ DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ACCESSIBILITYFOCUSSIGNAL( Dali, Signal<void(
 //DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_TIMERSIGNALTYPE( Dali, Signal<bool()>);
 //DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_TIMERSIGNALTYPE( Dali, Signal<bool()>);
 
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_ACTOR( Dali, Signal<void (Dali::Actor)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ACTOR( Dali, Signal<void (Dali::Actor)>);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void (Dali::Actor)>, ActorSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void (Dali::Actor)>, ActorSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void(Dali::Animation&)>, AnimationSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void(Dali::Animation&)>, AnimationSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<bool(Dali::Toolkit::Button)>, ButtonSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<bool(Dali::Toolkit::Button)>, ButtonSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void(Dali::Toolkit::PageTurnView, unsigned int, bool)>, PageTurnSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void(Dali::Toolkit::PageTurnView, unsigned int, bool)>, PageTurnSignal);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void(Dali::Toolkit::PageTurnView)>, PagePanSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void(Dali::Toolkit::PageTurnView)>, PagePanSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void (Dali::Actor, const Dali::PanGesture&)>, PanGestureDetectedSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void (Dali::Actor, const Dali::PanGesture&)>, PanGestureDetectedSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void (Dali::Actor, const Dali::PinchGesture&)>, PinchGestureDetectedSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void (Dali::Actor, const Dali::PinchGesture&)>, PinchGestureDetectedSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void(Dali::RenderTask&)>, RenderTaskSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void(Dali::RenderTask&)>, RenderTaskSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal< void(const Dali::Vector2&)>, ScrollableSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal< void(const Dali::Vector2&)>, ScrollableSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal< void(const Dali::Toolkit::ScrollView::SnapEvent&)>, ScrollViewSnapStartedSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal< void(const Dali::Toolkit::ScrollView::SnapEvent&)>, ScrollViewSnapStartedSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<bool(Dali::Toolkit::Slider, float)>, SliderValueChangedSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<bool(Dali::Toolkit::Slider, float)>, SliderValueChangedSignal);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<bool(Dali::Toolkit::Slider, int)>, SliderMarkReachedSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<bool(Dali::Toolkit::Slider, int)>, SliderMarkReachedSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void (const Dali::WheelEvent&)>, StageWheelSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void (const Dali::WheelEvent&)>, StageWheelSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void(Dali::Toolkit::StyleManager, Dali::StyleChange::Type)>, StyleChangedSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void(Dali::Toolkit::StyleManager, Dali::StyleChange::Type)>,StyleChangedSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void (Dali::Actor, const Dali::TapGesture&)>, TapGestureDetectedSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void (Dali::Actor, const Dali::TapGesture&)>, TapGestureDetectedSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void(Dali::Toolkit::TextEditor)>, TextEditorSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void(Dali::Toolkit::TextEditor)>, TextEditorSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void(Dali::Toolkit::TextField)>, TextFieldSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void(Dali::Toolkit::TextField)>, TextFieldSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( std, vector<Dali::Actor>, ActorContainer);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( std, vector<Dali::Actor>, ActorContainer);
+
+//DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_ITEM( std, pair<unsigned int, Dali::Actor));
+//DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ITEM( std, pair<unsigned int, Dali::Actor>);
+
+//DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_ITEMCONTAINER( std, vector<std::pair<unsigned int, Dali::Actor>>);
+//DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ITEMCONTAINER( std, vector<std::pair<unsigned int, Dali::Actor>>);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( std, vector<unsigned int>, ItemIdContainer);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( std, vector<unsigned int>, ItemIdContainer);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void(Dali::Actor, Dali::Actor)>, FocusChangedSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void(Dali::Actor, Dali::Actor)>, FocusChangedSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void(Dali::Actor, bool)>, FocusGroupChangedSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void(Dali::Actor, bool)>, FocusGroupChangedSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void (Dali::Toolkit::GaussianBlurView)>, GaussianBlurViewSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void (Dali::Toolkit::GaussianBlurView)>, GaussianBlurViewSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<bool(Dali::Toolkit::Control, const Dali::KeyEvent&)>, ControlKeySignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<bool(Dali::Toolkit::Control, const Dali::KeyEvent&)>, ControlKeySignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void (const Dali::KeyEvent&)>, KeyEventSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void (const Dali::KeyEvent&)>, KeyEventSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void(Dali::Toolkit::Control)>, KeyInputFocusSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void(Dali::Toolkit::Control)>, KeyInputFocusSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, IntrusivePtr<Dali::Toolkit::Ruler>, RulerPtr);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, IntrusivePtr<Dali::Toolkit::Ruler>, RulerPtr);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void()>, VoidSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void()>, VoidSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void(float)>, FloatSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void(float)>, FloatSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void(const Dali::RefObject*)>, ObjectDestroyedSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void(const Dali::RefObject*)>, ObjectDestroyedSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void(Dali::BaseHandle)>, ObjectCreatedSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void(Dali::BaseHandle)>, ObjectCreatedSignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void(Dali::PropertyNotification&)>, PropertyNotifySignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void(Dali::PropertyNotification&)>, PropertyNotifySignal);
+
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void (Dali::Actor, const Dali::LongPressGesture&)>, LongPressGestureDetectedSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void (Dali::Actor, const Dali::LongPressGesture&)>, LongPressGestureDetectedSignal);
 
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_ANIMATIONSIGNAL( Dali, Signal<void(Dali::Animation&)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ANIMATIONSIGNAL( Dali, Signal<void(Dali::Animation&)>);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<bool (Dali::Actor, const Dali::HoverEvent&)>, ActorHoverSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<bool (Dali::Actor, const Dali::HoverEvent&)>, ActorHoverSignal);
 
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_BUTTON( Dali, Signal<bool(Dali::Toolkit::Button)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_BUTTON( Dali, Signal<bool(Dali::Toolkit::Button)>);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<bool (Dali::Actor, const Dali::TouchData&)>, ActorTouchDataSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<bool (Dali::Actor, const Dali::TouchData&)>, ActorTouchDataSignal);
 
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_PAGETURNSIGNAL( Dali, Signal<void(Dali::Toolkit::PageTurnView, unsigned int, bool)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_PAGETURNSIGNAL( Dali, Signal<void(Dali::Toolkit::PageTurnView, unsigned int, bool)>);
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_PAGEVIEWSIGNAL( Dali, Signal<void(Dali::Toolkit::PageTurnView)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_PAGEVIEWSIGNAL( Dali, Signal<void(Dali::Toolkit::PageTurnView)>);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<bool (Dali::Actor, const Dali::WheelEvent&)>, ActorWheelSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<bool (Dali::Actor, const Dali::WheelEvent&)>, ActorWheelSignal);
 
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_PANGESTURESIGNAL( Dali, Signal<void (Dali::Actor, const Dali::PanGesture&)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_PANGESTURESIGNAL( Dali, Signal<void (Dali::Actor, const Dali::PanGesture&)>);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, Signal<void (const Dali::TouchData&)>, TouchSignal);
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, Signal<void (const Dali::TouchData&)>, TouchSignal);
 
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_PINCHGESTURESIGNAL( Dali, Signal<void (Dali::Actor, const Dali::PinchGesture&)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_PINCHGESTURESIGNAL( Dali, Signal<void (Dali::Actor, const Dali::PinchGesture&)>);
+//DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENAME( Dali, (std::pair< Dali::Radian, Dali::Radian >), AngleThresholdPair);
+//DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENAME( Dali, (std::pair< Dali::Radian, Dali::Radian >), AngleThresholdPair);
 
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENDERTASKSIGNAL( Dali, Signal<void(Dali::RenderTask&)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENDERTASKSIGNAL( Dali, Signal<void(Dali::RenderTask&)>);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, ApplicationExtensions );
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, ApplicationExtensions );
 
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_SCROLLABLESIGNAL( Dali, Signal< void(const Dali::Vector2&)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_SCROLLABLESIGNAL( Dali, Signal< void(const Dali::Vector2&)>);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, SlotObserver );
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, SlotObserver );
 
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_SCROLLVIEWSIGNAL( Dali, Signal< void(const Dali::Toolkit::ScrollView::SnapEvent&)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_SCROLLVIEWSIGNAL( Dali, Signal< void(const Dali::Toolkit::ScrollView::SnapEvent&)>);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, SignalObserver );
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, SignalObserver );
 
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_SLIDERVALUECHANGEDSIGNAL( Dali, Signal<bool(Dali::Toolkit::Slider, float)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_SLIDERVALUECHANGEDSIGNAL( Dali, Signal<bool(Dali::Toolkit::Slider, float)>);
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_SLIDERMARKCHANGEDSIGNAL( Dali, Signal<bool(Dali::Toolkit::Slider, int)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_SLIDERMARKCHANGEDSIGNAL( Dali, Signal<bool(Dali::Toolkit::Slider, int)>);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, AnimatablePropertyComponentRegistration );
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, AnimatablePropertyComponentRegistration );
 
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_STAGESIGNAL( Dali, Signal<void (const Dali::WheelEvent&)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_STAGESIGNAL( Dali, Signal<void (const Dali::WheelEvent&)>);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, AnimatablePropertyRegistration );
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, AnimatablePropertyRegistration );
 
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_STYLECHANGEDSIGNAL( Dali, Signal<void(Dali::Toolkit::StyleManager, Dali::StyleChange::Type)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_STYLECHANGEDSIGNAL( Dali, Signal<void(Dali::Toolkit::StyleManager, Dali::StyleChange::Type)>);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, AsyncImageLoader );
+DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, AsyncImageLoader );
 
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_TAPGESTURESIGNAL( Dali, Signal<void (Dali::Actor, const Dali::TapGesture&)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_TAPGESTURESIGNAL( Dali, Signal<void (Dali::Actor, const Dali::TapGesture&)>);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, ChildPropertyRegistration );
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, ChildPropertyRegistration );
 
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_TEXTEDITORSIGNAL( Dali, Signal<void(Dali::Toolkit::TextEditor)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_TEXTEDITORSIGNAL( Dali, Signal<void(Dali::Toolkit::TextEditor)>);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, ClampState2D );
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali::Toolkit, ClampState2D );
 
-DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_TEXTFIELDSIGNAL( Dali, Signal<void(Dali::Toolkit::TextField)>);
-DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_TEXTFIELDSIGNAL( Dali, Signal<void(Dali::Toolkit::TextField)>);
+DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, DaliException );
+DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, DaliException );
index 61376cc..946a250 100755 (executable)
@@ -15,6 +15,7 @@
  *
  */
 %apply unsigned int& OUTPUT { unsigned int& volume };
+%feature("director") Dali::Toolkit::ItemFactory;
 
 %ignore *::AccessibilityManager(Internal::AccessibilityManager*);
 %ignore *::Alignment(Internal::Alignment&);
@@ -74,6 +75,8 @@
 %ignore *::Base(Dali::Internal::Visual::Base*);
 %ignore *::GetExtension();
 %ignore *::GetControlExtension();
+%ignore *::ToggleButton(Internal::ToggleButton&);
+%ignore *::ToggleButton(Dali::Internal::CustomActor*);
 
 %ignore *::Button::SetAnimationTime(float animationTime);
 %ignore *::Button::SetAutoRepeating(bool);
@@ -93,6 +96,9 @@
 %ignore *::Button::SetSelectedImage(Dali::Image);
 %ignore *::Button::SetTogglableButton(bool);
 %ignore *::Button::SetUnselectedImage(const std::string &);
+%ignore Dali::Toolkit::DevelVisual::Type;
+%ignore Dali::Toolkit::DevelVisual::Property::Type;
+%ignore Dali::Toolkit::AccessibilityManager::AccessibilityActionScrollSignalType;
 
 %rename(View) Dali::Toolkit::Control;
 %rename(ViewImpl) Dali::Toolkit::Internal::Control;
 %rename(IndicatorHeightPolicyType) Dali::Toolkit::ScrollBar::IndicatorHeightPolicy;
 %rename(ExceedPolicyType) Dali::Toolkit::TextField::ExceedPolicy;
 %rename(ToolkitPropertyRange) Dali::Toolkit::PropertyRanges;
+%rename(TooltipPositionType) Dali::Toolkit::Tooltip::Position::Type;
 %rename(VisualType) Dali::Toolkit::Visual::Type;
-%rename(VisualShaderType) Dali::Toolkit::Visual::Shader::Property;
+%rename(VisualTransformPropertyType) Dali::Toolkit::DevelVisual::Transform::Property::Type;
+%rename(VISUAL_SHADER_VERTEX) Dali::Toolkit::Visual::Shader::Property::VERTEX_SHADER;
+%rename(VISUAL_SHADER_FRAGMENT) Dali::Toolkit::Visual::Shader::Property::FRAGMENT_SHADER;
+%rename(VISUAL_SHADER_SUBDIVIDE_GRID_X) Dali::Toolkit::Visual::Shader::Property::SUBDIVIDE_GRID_X;
+%rename(VISUAL_SHADER_SUBDIVIDE_GRID_Y) Dali::Toolkit::Visual::Shader::Property::SUBDIVIDE_GRID_Y;
+%rename(VISUAL_SHADER_HINTS) Dali::Toolkit::Visual::Shader::Property::HINTS;
+%rename(BORDER_VISUAL_COLOR) Dali::Toolkit::BorderVisual::Property::COLOR;
+%rename(BORDER_VISUAL_SIZE) Dali::Toolkit::BorderVisual::Property::SIZE;
+%rename(BORDER_VISUAL_ANTI_ALIASING) Dali::Toolkit::BorderVisual::Property::ANTI_ALIASING;
+%rename(COLOR_VISUAL_MIX_COLOR) Dali::Toolkit::ColorVisual::Property::MIX_COLOR;
 %rename(GradientVisualUnitsType) Dali::Toolkit::GradientVisual::Units::Type;
 %rename(GradientVisualSpreadMethodType) Dali::Toolkit::GradientVisual::SpreadMethod::Type;
+%rename(GRADIENT_VISUAL_START_POSITION) Dali::Toolkit::GradientVisual::Property::START_POSITION;
+%rename(GRADIENT_VISUAL_END_POSITION) Dali::Toolkit::GradientVisual::Property::END_POSITION;
+%rename(GRADIENT_VISUAL_CENTER) Dali::Toolkit::GradientVisual::Property::CENTER;
+%rename(GRADIENT_VISUAL_RADIUS) Dali::Toolkit::GradientVisual::Property::RADIUS;
+%rename(GRADIENT_VISUAL_STOP_OFFSET) Dali::Toolkit::GradientVisual::Property::STOP_OFFSET;
+%rename(GRADIENT_VISUAL_STOP_COLOR) Dali::Toolkit::GradientVisual::Property::STOP_COLOR;
+%rename(GRADIENT_VISUAL_UNITS) Dali::Toolkit::GradientVisual::Property::UNITS;
+%rename(GRADIENT_VISUAL_SPREAD_METHOD) Dali::Toolkit::GradientVisual::Property::SPREAD_METHOD;
 %rename(MeshVisualShadingModeValue) Dali::Toolkit::MeshVisual::ShadingMode::Value;
+%rename(MESH_VISUAL_OBJECT_URL) Dali::Toolkit::MeshVisual::Property::OBJECT_URL;
+%rename(MESH_VISUAL_MATERIAL_URL) Dali::Toolkit::MeshVisual::Property::MATERIAL_URL;
+%rename(MESH_VISUAL_TEXTURES_PATH) Dali::Toolkit::MeshVisual::Property::TEXTURES_PATH;
+%rename(MESH_VISUAL_SHADING_MODE) Dali::Toolkit::MeshVisual::Property::SHADING_MODE;
+%rename(MESH_VISUAL_USE_MIPMAPPING) Dali::Toolkit::MeshVisual::Property::USE_MIPMAPPING;
+%rename(MESH_VISUAL_USE_SOFT_NORMALS) Dali::Toolkit::MeshVisual::Property::USE_SOFT_NORMALS;
+%rename(MESH_VISUAL_LIGHT_POSITION) Dali::Toolkit::MeshVisual::Property::LIGHT_POSITION;
 %rename(PrimitiveVisualShapeType) Dali::Toolkit::PrimitiveVisual::Shape::Type;
-%rename(PRIMITIVE_VISUAL_COLOR) Dali::Toolkit::PrimitiveVisual::Property::COLOR;
+%rename(PRIMITIVE_VISUAL_SHAPE) Dali::Toolkit::PrimitiveVisual::Property::SHAPE;
 %rename(PRIMITIVE_VISUAL_MIX_COLOR) Dali::Toolkit::PrimitiveVisual::Property::MIX_COLOR;
+%rename(PRIMITIVE_VISUAL_SLICES) Dali::Toolkit::PrimitiveVisual::Property::SLICES;
+%rename(PRIMITIVE_VISUAL_STACKS) Dali::Toolkit::PrimitiveVisual::Property::STACKS;
+%rename(PRIMITIVE_VISUAL_SCALE_TOP_RADIUS) Dali::Toolkit::PrimitiveVisual::Property::SCALE_TOP_RADIUS;
+%rename(PRIMITIVE_VISUAL_SCALE_BOTTOM_RADIUS) Dali::Toolkit::PrimitiveVisual::Property::SCALE_BOTTOM_RADIUS;
+%rename(PRIMITIVE_VISUAL_SCALE_HEIGHT) Dali::Toolkit::PrimitiveVisual::Property::SCALE_HEIGHT;
+%rename(PRIMITIVE_VISUAL_SCALE_RADIUS) Dali::Toolkit::PrimitiveVisual::Property::SCALE_RADIUS;
+%rename(PRIMITIVE_VISUAL_SCALE_DIMENSIONS) Dali::Toolkit::PrimitiveVisual::Property::SCALE_DIMENSIONS;
+%rename(PRIMITIVE_VISUAL_BEVEL_PERCENTAGE) Dali::Toolkit::PrimitiveVisual::Property::BEVEL_PERCENTAGE;
+%rename(PRIMITIVE_VISUAL_BEVEL_SMOOTHNESS) Dali::Toolkit::PrimitiveVisual::Property::BEVEL_SMOOTHNESS;
 %rename(PRIMITIVE_VISUAL_LIGHT_POSITION) Dali::Toolkit::PrimitiveVisual::Property::LIGHT_POSITION;
 %rename(VISUAL_PROPERTY_TYPE) Dali::Toolkit::Visual::Property::TYPE;
 %rename(VISUAL_PROPERTY_SHADER) Dali::Toolkit::Visual::Property::SHADER;
 %rename(IMAGE_VISUAL_WRAP_MODE_U) Dali::Toolkit::ImageVisual::Property::WRAP_MODE_U;
 %rename(IMAGE_VISUAL_WRAP_MODE_V) Dali::Toolkit::ImageVisual::Property::WRAP_MODE_V;
 %rename(COLOR_VISUAL_MIX_COLOR) Dali::Toolkit::Color::Visual::Property::MIX_COLOR;
-%rename(TEXT_VISUAL_RENDERING_BACKEND) Dali::Toolkit::Text::Visual::Property::RENDERING_BACKEND;
-%rename(TEXT_VISUAL_TEXT) Dali::Toolkit::Text::Visual::Property::TEXT;
-%rename(TEXT_VISUAL_FONT_FAMILY) Dali::Toolkit::Text::Visual::Property::FONT_FAMILY;
-%rename(TEXT_VISUAL_FONT_STYLE) Dali::Toolkit::Text::Visual::Property::FONT_STYLE;
-%rename(TEXT_VISUAL_POINT_SIZE) Dali::Toolkit::Text::Visual::Property::POINT_SIZE;
-%rename(TEXT_VISUAL_MULTI_LINE) Dali::Toolkit::Text::Visual::Property::MULTI_LINE;
-%rename(TEXT_VISUAL_HORIZONTAL_ALIGNMENT) Dali::Toolkit::Text::Visual::Property::HORIZONTAL_ALIGNMENT;
-%rename(TEXT_VISUAL_VERTICAL_ALIGNMENT) Dali::Toolkit::Text::Visual::Property::VERTICAL_ALIGNMENT;
-%rename(TEXT_VISUAL_TEXT_COLOR) Dali::Toolkit::Text::Visual::Property::TEXT_COLOR;
-%rename(TEXT_VISUAL_ENABLE_MARKUP) Dali::Toolkit::Text::Visual::Property::ENABLE_MARKUP;
-%rename(TEXT_VISUAL_ENABLE_AUTO_SCROLL) Dali::Toolkit::Text::Visual::Property::ENABLE_AUTO_SCROLL;
-%rename(TEXT_VISUAL_AUTO_SCROLL_SPEED) Dali::Toolkit::Text::Visual::Property::AUTO_SCROLL_SPEED;
-%rename(TEXT_VISUAL_AUTO_SCROLL_LOOP_COUNT) Dali::Toolkit::Text::Visual::Property::AUTO_SCROLL_LOOP_COUNT;
-%rename(TEXT_VISUAL_AUTO_SCROLL_GAP) Dali::Toolkit::Text::Visual::Property::AUTO_SCROLL_GAP;
-%rename(TEXT_VISUAL_LINE_SPACING) Dali::Toolkit::Text::Visual::Property::LINE_SPACING;
-%rename(TEXT_VISUAL_UNDERLINE) Dali::Toolkit::Text::Visual::Property::UNDERLINE;
-%rename(TEXT_VISUAL_SHADOW) Dali::Toolkit::Text::Visual::Property::SHADOW;
-%rename(TEXT_VISUAL_EMBOSS) Dali::Toolkit::Text::Visual::Property::EMBOSS;
-%rename(TEXT_VISUAL_OUTLINE) Dali::Toolkit::Text::Visual::Property::OUTLINE;
-%rename(TEXT_VISUAL_BATCHING_ENABLED) Dali::Toolkit::Text::Visual::Property::BATCHING_ENABLED;
+%rename(TEXT_VISUAL_TEXT) Dali::Toolkit::TextVisual::Property::TEXT;
+%rename(TEXT_VISUAL_FONT_FAMILY) Dali::Toolkit::TextVisual::Property::FONT_FAMILY;
+%rename(TEXT_VISUAL_FONT_STYLE) Dali::Toolkit::TextVisual::Property::FONT_STYLE;
+%rename(TEXT_VISUAL_POINT_SIZE) Dali::Toolkit::TextVisual::Property::POINT_SIZE;
+%rename(TEXT_VISUAL_MULTI_LINE) Dali::Toolkit::TextVisual::Property::MULTI_LINE;
+%rename(TEXT_VISUAL_HORIZONTAL_ALIGNMENT) Dali::Toolkit::TextVisual::Property::HORIZONTAL_ALIGNMENT;
+%rename(TEXT_VISUAL_VERTICAL_ALIGNMENT) Dali::Toolkit::TextVisual::Property::VERTICAL_ALIGNMENT;
+%rename(TEXT_VISUAL_TEXT_COLOR) Dali::Toolkit::TextVisual::Property::TEXT_COLOR;
+%rename(TEXT_VISUAL_ENABLE_MARKUP) Dali::Toolkit::TextVisual::Property::ENABLE_MARKUP;
+%rename(TOOLTIP_CONTENT) Dali::Toolkit::Tooltip::Property::CONTENT;
+%rename(TOOLTIP_LAYOUT) Dali::Toolkit::Tooltip::Property::LAYOUT;
+%rename(TOOLTIP_WAIT_TIME) Dali::Toolkit::Tooltip::Property::WAIT_TIME;
+%rename(TOOLTIP_BACKGROUND) Dali::Toolkit::Tooltip::Property::BACKGROUND;
+%rename(TOOLTIP_TAIL) Dali::Toolkit::Tooltip::Property::TAIL;
+%rename(TOOLTIP_POSITION) Dali::Toolkit::Tooltip::Property::POSITION;
+%rename(TOOLTIP_HOVER_POINT_OFFSET) Dali::Toolkit::Tooltip::Property::HOVER_POINT_OFFSET;
+%rename(TOOLTIP_MOVEMENT_THRESHOLD) Dali::Toolkit::Tooltip::Property::MOVEMENT_THRESHOLD;
+%rename(TOOLTIP_DISAPPEAR_ON_MOVEMENT) Dali::Toolkit::Tooltip::Property::DISAPPEAR_ON_MOVEMENT;
+%rename(TOOLTIP_CONTENT) Dali::Toolkit::Tooltip::Property::CONTENT;
+%rename(TOOLTIP_BACKGROUND_VISUAL) Dali::Toolkit::Tooltip::Background::Property::VISUAL;
+%rename(TOOLTIP_BACKGROUND_BORDER) Dali::Toolkit::Tooltip::Background::Property::BORDER;
+%rename(TOOLTIP_TAIL_VISIBILITY) Dali::Toolkit::Tooltip::Tail::Property::VISIBILITY;
+%rename(TOOLTIP_TAIL_ABOVE_VISUAL) Dali::Toolkit::Tooltip::Tail::Property::ABOVE_VISUAL;
+%rename(TOOLTIP_TAIL_BELOW_VISUAL) Dali::Toolkit::Tooltip::Tail::Property::BELOW_VISUAL;
 
 %csconstvalue("PropertyRanges.PROPERTY_REGISTRATION_START_INDEX") PROPERTY_START_INDEX;
 %csconstvalue("View.PropertyRange.PROPERTY_START_INDEX+1000") PROPERTY_END_INDEX;
@@ -181,6 +225,7 @@ typedef Dali::IntrusivePtr<Dali::Toolkit::Ruler> RulerPtr;
 %include <dali-toolkit/public-api/toolkit-property-index-ranges.h>
 
 %include <dali-toolkit/public-api/visuals/visual-properties.h>
+%include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 %include <dali-toolkit/public-api/visuals/border-visual-properties.h>
 %include <dali-toolkit/public-api/visuals/color-visual-properties.h>
 %include <dali-toolkit/public-api/visuals/gradient-visual-properties.h>
@@ -193,6 +238,8 @@ typedef Dali::IntrusivePtr<Dali::Toolkit::Ruler> RulerPtr;
 
 %include <dali-toolkit/devel-api/visual-factory/transition-data.h>
 
+%include <dali-toolkit/devel-api/controls/tooltip/tooltip-properties.h>
+
 %include <dali-toolkit/public-api/controls/control-impl.h>
 %include <dali-toolkit/public-api/controls/control.h>
 
@@ -236,6 +283,7 @@ typedef Dali::IntrusivePtr<Dali::Toolkit::Ruler> RulerPtr;
 %include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-view.h>
 %include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-landscape-view.h>
 %include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-portrait-view.h>
+%include <dali-toolkit/devel-api/controls/buttons/toggle-button.h>
 
 %include <dali-toolkit/devel-api/visual-factory/visual-base.h>
 %include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
@@ -249,7 +297,6 @@ typedef Dali::IntrusivePtr<Dali::Toolkit::Ruler> RulerPtr;
 %template(ItemContainer) std::vector<std::pair<unsigned int, Dali::Actor>>;
 %template(ActorContainer) std::vector<Dali::Actor>;
 %template(AccessibilityActionSignal) Dali::Signal<bool(Dali::Toolkit::AccessibilityManager&)>;
-%template(AccessibilityActionScrollSignal) Dali::Signal<bool(Dali::Toolkit::AccessibilityManager&, const Dali::TouchEvent&)>;
 %template(AccessibilityFocusOvershotSignal) Dali::Signal<void(Dali::Actor, Dali::Toolkit::AccessibilityManager::FocusOvershotDirection)>;
 %template(FocusChangedSignal) Dali::Signal<void(Dali::Actor, Dali::Actor)>;
 %template(FocusGroupChangedSignal) Dali::Signal<void(Dali::Actor, bool)>;
@@ -262,7 +309,7 @@ typedef Dali::IntrusivePtr<Dali::Toolkit::Ruler> RulerPtr;
 %template(ScrollableSignal) Dali::Signal< void(const Dali::Vector2&)>;
 %template(TextEditorSignal) Dali::Signal<void(Dali::Toolkit::TextEditor)>;
 %template(TextFieldSignal) Dali::Signal<void(Dali::Toolkit::TextField)>;
-%template(ControlKeyEventSignal) Dali::Signal<bool(Dali::Toolkit::Control, const Dali::KeyEvent&)>;
+%template(ControlKeySignal) Dali::Signal<bool(Dali::Toolkit::Control, const Dali::KeyEvent&)>;
 %template(KeyInputFocusSignal) Dali::Signal<void(Dali::Toolkit::Control)>;
 %template(VideoViewSignal) Dali::Signal<void(Dali::Toolkit::VideoView&)>;
 %template(SliderValueChangedSignal) Dali::Signal<bool(Dali::Toolkit::Slider, float)>;
index 1f5149b..aeb8558 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -53,6 +53,8 @@
 #include <dali/public-api/math/matrix3.h>
 #include <dali/public-api/math/viewport.h>
 #include <dali/public-api/object/property-key.h>
+#include <dali/devel-api/object/csharp-type-info.h>
+#include <dali/devel-api/object/csharp-type-registry.h>
 
 #include <dali/public-api/adaptor-framework/timer.h>
 #include <dali/public-api/adaptor-framework/window.h>
@@ -73,6 +75,7 @@
 #include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-view.h>
 #include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-landscape-view.h>
 #include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-portrait-view.h>
+#include <dali-toolkit/devel-api/controls/buttons/toggle-button.h>
 
 #include <dali-toolkit/devel-api/visual-factory/visual-base.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
@@ -80,6 +83,8 @@
 
 #include <dali-toolkit/devel-api/visuals/text-visual-properties.h>
 
+#include <dali-toolkit/devel-api/controls/tooltip/tooltip-properties.h>
+
 #include <dali-toolkit/public-api/controls/scrollable/item-view/item-view-declarations.h>
 
 // add here SWIG version check
   return $null;
 %}
 
+
+
+
+// Type registry type maps
+%typemap(cstype) Dali::TypeInfo::CreateFunction "System.Delegate"
+%typemap(csin, pre ="System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate($csinput); ")
+  Dali::TypeInfo::CreateFunction "new System.Runtime.InteropServices.HandleRef(null, ip)" // null was this
+
+%typemap(cstype) Dali::CSharpTypeInfo::CreateFunction "System.Delegate"
+%typemap(csin, pre ="System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate($csinput); ")
+   Dali::CSharpTypeInfo::CreateFunction "new System.Runtime.InteropServices.HandleRef(null, ip)" // null was this
+
+
+
+%typemap(cstype) Dali::CSharpTypeInfo::SetPropertyFunction "System.Delegate"
+%typemap(csin, pre ="System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate($csinput); ")
+   Dali::CSharpTypeInfo::SetPropertyFunction "new System.Runtime.InteropServices.HandleRef(null, ip)" // null was this
+
+
+
+%typemap(cstype) Dali::CSharpTypeInfo::GetPropertyFunction "System.Delegate"
+%typemap(csin, pre ="System.IntPtr ip2 = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate($csinput); ")
+   Dali::CSharpTypeInfo::GetPropertyFunction "new System.Runtime.InteropServices.HandleRef(null, ip2)" // null was this
+
+
+
+
+
+
+
 #endif
 
+
+
+/**
+ * Extend the type registry to allow for registering of C# controls and custom properties
+ */
+%extend Dali::TypeRegistration {
+
+
+   static void RegisterControl( const std::string& controlName, Dali::CSharpTypeInfo::CreateFunction createFunc )
+   {
+     Dali::CSharpTypeRegistry::RegisterType( controlName, typeid( Dali::Toolkit::Control), createFunc );
+   };
+
+
+   static void RegisterProperty( const std::string& controlName,
+                    const std::string& propertyName,
+                    int index,
+                    Property::Type type,
+                    Dali::CSharpTypeInfo::SetPropertyFunction setFunc,
+                    Dali::CSharpTypeInfo::GetPropertyFunction getFunc )
+   {
+     Dali::CSharpTypeRegistry::RegisterProperty( controlName, propertyName, index, type, setFunc, getFunc );
+   };
+
+};
+
+
 %ignore operator<<;
 %ignore *::GetImplementation();
 %ignore *::GetImplementation(Dali::BaseHandle&);
@@ -186,6 +248,8 @@ using namespace Dali::Toolkit;
 %include signal-parameters.i
 %include signals.i
 
+%include doxygen.i
+
 %include events/actor-event.i
 %include events/accessibilitymanager-event.i
 %include events/application-event.i
@@ -203,7 +267,8 @@ using namespace Dali::Toolkit;
 %include events/pangesture-event.i
 %include events/propertynotification-event.i
 %include events/longpressgesture-event.i
-%include events/rectinteger.i
+%include events/rectangle.i
+%include events/padding.i
 %include events/resourceimage-event.i
 %include events/scrollable-event.i
 %include events/scrollbar-event.i
@@ -219,8 +284,20 @@ using namespace Dali::Toolkit;
 
 %include alphafunction.i
 %include name-changed.i
-
+%include property-value.i
 %include dali-operator.i
+%include devel-properties.i
+
+%include gestures/hover.i
+%include gestures/gesture.i
+%include gestures/long-press-gesture.i
+%include gestures/pan-gesture.i
+%include gestures/tap-gesture.i
+%include gestures/pinch-gesture.i
+%include gestures/wheel.i
+%include gestures/touch.i
+%include gestures/key.i
+
 %include dali-core.i
 %include dali-adaptor.i
 %include dali-toolkit.i
diff --git a/plugins/dali-swig/SWIG/devel-properties.i b/plugins/dali-swig/SWIG/devel-properties.i
new file mode 100755 (executable)
index 0000000..4d277de
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+%pragma(csharp) modulecode=%{
+  public static readonly int VISUAL_PROPERTY_TRANSFORM = NDalicManualPINVOKE.Visual_Property_TRANSFORM_get();
+  public static readonly int VISUAL_PROPERTY_PREMULTIPLIED_ALPHA = NDalicManualPINVOKE.Visual_Property_PREMULTIPLIED_ALPHA_get();
+  public static readonly int VISUAL_PROPERTY_MIX_COLOR = NDalicManualPINVOKE.Visual_Property_MIX_COLOR_get();
+%}
+
+%typemap(cscode) Dali::Toolkit::Visual::Type %{
+  ,
+  TEXT
+%}
+
+%typemap(cscode) Dali::Actor::Property %{
+  public static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get();
+%}
+
+%typemap(cscode) Dali::Toolkit::Control::Property %{
+  public static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
+  public static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
+  public static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
+%}
+
+%typemap(cscode) Dali::Toolkit::ItemView::Property %{
+  public static readonly int LAYOUT = NDalicManualPINVOKE.ItemView_Property_LAYOUT_get();
+%}
+
+%typemap(cscode) Dali::Toolkit::ItemView %{
+  public Dali.Property.Array Layout
+  {
+    get
+    {
+      Dali.Property.Array temp = new Dali.Property.Array();
+      GetProperty( ItemView.Property.LAYOUT).Get( temp );
+      return temp;
+    }
+    set
+    {
+      SetProperty( ItemView.Property.LAYOUT, new Dali.Property.Value( value ) );
+    }
+  }
+%}
+
+%typemap(cscode) Dali::Toolkit::Button::Property %{
+  public static readonly int UNSELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_UNSELECTED_VISUAL_get();
+  public static readonly int SELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_SELECTED_VISUAL_get();
+  public static readonly int DISABLED_SELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_SELECTED_VISUAL_get();
+  public static readonly int DISABLED_UNSELECTED_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_UNSELECTED_VISUAL_get();
+  public static readonly int UNSELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_UNSELECTED_BACKGROUND_VISUAL_get();
+  public static readonly int SELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_SELECTED_BACKGROUND_VISUAL_get();
+  public static readonly int DISABLED_UNSELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_UNSELECTED_BACKGROUND_VISUAL_get();
+  public static readonly int DISABLED_SELECTED_BACKGROUND_VISUAL = NDalicManualPINVOKE.Button_Property_DISABLED_SELECTED_BACKGROUND_VISUAL_get();
+  public static readonly int LABEL_RELATIVE_ALIGNMENT = NDalicManualPINVOKE.Button_Property_LABEL_RELATIVE_ALIGNMENT_get();
+  public static readonly int LABEL_PADDING = NDalicManualPINVOKE.Button_Property_LABEL_PADDING_get();
+  public static readonly int VISUAL_PADDING = NDalicManualPINVOKE.Button_Property_VISUAL_PADDING_get();
+%}
+
diff --git a/plugins/dali-swig/SWIG/doxygen.i b/plugins/dali-swig/SWIG/doxygen.i
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/plugins/dali-swig/SWIG/doxygen/scripts/Doxyfile b/plugins/dali-swig/SWIG/doxygen/scripts/Doxyfile
new file mode 100755 (executable)
index 0000000..b40d577
--- /dev/null
@@ -0,0 +1,2485 @@
+# Doxyfile 1.8.6
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME           = "My Project"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER         =
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF          =
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
+# the documentation. The maximum height of the logo should not exceed 55 pixels
+# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
+# to the output directory.
+
+PROJECT_LOGO           =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       =
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
+# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
+# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
+# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
+# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
+# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
+# Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF       =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES        = YES
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH        =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH    =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
+# new page for each member. If set to NO, the documentation of a member will be
+# part of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE               = 4
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines.
+
+ALIASES                =
+
+# Clip alias inserts the specified file between two text markers.
+# EG: @clip{"button.h",public,private}
+# Shows all lines between public and private *inclusive*.
+ALIASES += clip{3}="\dontinclude \1 \n \skip \2 \n \until \3"
+
+# <DALi Doxygen Tagging Rule>
+#
+# Use @SINCE_1_0, @SINCE_1_1, ... instead of @since,
+# and use @DEPRECATED_1_0, @DEPRECATED_1_1, ... instead of @deprecated.
+# It enables integrated management of version tagging between
+# the open source DALi API reference and Tizen API reference.
+# Using those tags with different ALIASES settings in each doxygen config file allows us
+# to generate two versions of "Since" and "Deprecated" generated output
+# from one set of public header files.
+#
+# If you need a newer version number like @SINCE_1_5 or @SINCE_2_0, just add new ALIASES for it.
+#
+# ##################################################3
+# # Guide for Open Source DALi API Reference
+#
+# ### @SINCE example:
+#   [some-public-header.h]
+#   /**
+#    * ...
+#    * @SINCE_1_0.1
+#    */
+#   void SomeFunction();
+#
+#   [generated html file]
+#   void SomeFunction()
+#   ...
+#   Since:
+#       1.0.1
+#
+# ### @DEPRECATED example 1:
+#   [some-public-header.h]
+#   /**
+#    * @DEPRECATED_1_0.3
+#    * ...
+#    */
+#   void SomeFunction();
+#
+#   [generated html file]
+#   void SomeFunction()
+#   Deprecated:
+#       Deprecated since 1.0.3
+#   ...
+#
+# ### @DEPRECATED example 2:
+#   [some-public-header.h]
+#   ...
+#   /**
+#    * @DEPRECATED_1_0.3. Use SomeFunction2() instead.
+#    * ...
+#    */
+#   void SomeFunction();
+#
+#   [generated html file]
+#   void SomeFunction()
+#   Deprecated:
+#       Deprecated since 1.0.3. Use SomeFunction2() instead.
+#   ...
+#
+# ##################################################3
+# # Guide for Tizen Native API Reference
+#
+# ### @SINCE example:
+#   [some-public-header.h]
+#   /**
+#    * ...
+#    * @SINCE_1_0.1
+#    */
+#   void SomeFunction();
+#
+#   [generated html file]
+#   void SomeFunction()
+#   ...
+#   Since:
+#       2.4, DALi Version 1.0.1
+#
+# ### @DEPRECATED example 1:
+#   [some-public-header.h]
+#   /**
+#    * @DEPRECATED_1_0.3
+#    * ...
+#    */
+#   void SomeFunction();
+#
+#   [generated html file]
+#   void SomeFunction()
+#   Deprecated:
+#       Deprecated since 3.0, DALi version 1.0.3
+#   ...
+#
+# ### @DEPRECATED example 2:
+#   [some-public-header.h]
+#   ...
+#   /**
+#    * @DEPRECATED_1_0.3. Use SomeFunction2() instead.
+#    * ...
+#    */
+#   void SomeFunction();
+#
+#   [generated html file]
+#   void SomeFunction()
+#   Deprecated:
+#       Deprecated since 3.0, DALi version 1.0.3. Use SomeFunction2() instead.
+#   ...
+
+###########################################
+# For Open Source DALi API Reference
+ALIASES += SINCE_1_0="@since 1.0"
+ALIASES += SINCE_1_1="@since 1.1"
+ALIASES += SINCE_1_2="@since 1.2"
+
+# Extra tags for Tizen 3.0
+ALIASES += SINCE_1_2_2="@since 1.2.2"
+ALIASES += SINCE_1_2_4="@since 1.2.4"
+ALIASES += SINCE_1_2_5="@since 1.2.5"
+
+ALIASES += DEPRECATED_1_0="@deprecated Deprecated since 1.0"
+ALIASES += DEPRECATED_1_1="@deprecated Deprecated since 1.1"
+ALIASES += DEPRECATED_1_2="@deprecated Deprecated since 1.2"
+
+ALIASES += PLATFORM=""
+ALIASES += PRIVLEVEL_PLATFORM=""
+ALIASES += PRIVLEVEL_PUBLIC=""
+ALIASES += PRIVILEGE_KEYGRAB=""
+ALIASES += PRIVILEGE_DISPLAY=""
+ALIASES += REMARK_INTERNET=""
+
+############################################
+## For Tizen Native API Reference
+#ALIASES += SINCE_1_0="\par Since:\n 2.4, DALi version 1.0"
+#ALIASES += SINCE_1_1="\par Since:\n 3.0, DALi version 1.1"
+#ALIASES += SINCE_1_2="\par Since:\n 4.0, DALi version 1.2"
+
+## Extra tags for Tizen 3.0
+#ALIASES += SINCE_1_2_2="\par Since:\n 3.0, DALi version 1.2.2"
+#ALIASES += SINCE_1_2_4="\par Since:\n 3.0, DALi version 1.2.4"
+#ALIASES += SINCE_1_2_5="\par Since:\n 3.0, DALi version 1.2.5"
+
+## DALi has no deprecated API in Tizen 2.4 because it's DALi's first release.
+## Thus deprecated APIs in DALi 1.0.xx will be deprecated in Tizen 3.0.
+#ALIASES += DEPRECATED_1_0="@deprecated Deprecated since 3.0, DALi version 1.0"
+#ALIASES += DEPRECATED_1_1="@deprecated Deprecated since 3.0, DALi version 1.1"
+#ALIASES += DEPRECATED_1_2="@deprecated Deprecated since 4.0, DALi version 1.2"
+
+#ALIASES += PLATFORM="@platform"
+#ALIASES += PRIVLEVEL_PLATFORM="\par Privilege Level:\n platform"
+#ALIASES += PRIVLEVEL_PUBLIC="\par Privilege Level:\n public"
+#ALIASES += PRIVILEGE_KEYGRAB="\par Privilege:\n http://tizen.org/privilege/keygrab"
+#ALIASES += PRIVILEGE_DISPLAY="\par Privilege:\n http://tizen.org/privilege/display"
+#ALIASES += REMARK_INTERNET="@remarks %http://tizen.org/privilege/internet is needed if @a url is a http or https address."
+
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST              =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C.
+#
+# Note For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
+
+EXTENSION_MAPPING      =
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT       = YES
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by by putting a % sign in front of the word
+# or globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT       = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING            = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS  = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL            = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO these classes will be included in the various overviews. This option has
+# no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO these declarations will be
+# included in the documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+# The default value is: system dependent.
+
+CASE_SENSE_NAMES       = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC  = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING  = NO
+
+# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
+# todo list. This list is created by putting \todo commands in the
+# documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
+# test list. This list is created by putting \test commands in the
+# documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
+ENABLED_SECTIONS       =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES the list
+# will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES        = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER    =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE            =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. Do not use file names with spaces, bibtex cannot handle them. See
+# also \cite for info how to create references.
+
+CITE_BIB_FILES         =
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS               = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO doxygen will only warn about wrong or incomplete parameter
+# documentation, but not about the absence of documentation.
+# The default value is: NO.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
+
+WARN_LOGFILE           =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces.
+# Note: If this tag is empty the current directory is searched.
+
+INPUT                  =
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# possible encodings.
+# The default value is: UTF-8.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank the
+# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
+# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
+# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
+# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
+# *.qsf, *.as and *.js.
+
+#FILE_PATTERNS          = *.c
+#FILE_PATTERNS          = *.py
+FILE_PATTERNS          = *.c
+FILE_PATTERNS          = *.h
+#FILE_PATTERNS          = *.cs
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE              = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE                =
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS        =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH           =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS       =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH             =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+
+INPUT_FILTER           =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+
+FILTER_PATTERNS        =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER ) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES    = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS    = NO
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# function all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS        = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see http://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX     = YES
+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX          =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
+# The default value is: YES.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER            =
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER            =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET        =
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user-
+# defined cascading style sheet that is included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefor more robust against future updates.
+# Doxygen will copy the style sheet file to the output directory. For an example
+# see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET  =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES       =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the stylesheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE    = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT    = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA  = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP         = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET        = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME  = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP      = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE               =
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler ( hhc.exe). If non-empty
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION           =
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated (
+# YES) or that it should be included in the master .chm file ( NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI           = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING     =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated (
+# YES) or a normal table of contents ( NO) in the .chm file.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE               =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME   =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS  =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS  =
+
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION           =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+DISABLE_INDEX          = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW      = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+TREEVIEW_WIDTH         = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_TRANSPARENT    = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://www.mathjax.org) which uses client side Javascript for the rendering
+# instead of using prerendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX            = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT         = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS     =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE       =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE           = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using Javascript. There
+# are two flavours of web server based searching depending on the
+# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
+# searching and an index file used by the script. When EXTERNAL_SEARCH is
+# enabled the indexing and searching needs to be provided by external tools. See
+# the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH    = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH        = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Searching" for details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL       =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE        = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID     =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS  =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
+# The default value is: YES.
+
+GENERATE_LATEX         = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE             = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. To get the times font for
+# instance you can specify
+# EXTRA_PACKAGES=times
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES         =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+# generated LaTeX document. The header should contain everything until the first
+# chapter. If it is left blank doxygen will generate a standard header. See
+# section "Doxygen usage" for information on how to let doxygen write the
+# default header to a separate file.
+#
+# Note: Only use a user-defined header if you know what you are doing! The
+# following commands have a special meaning inside the header: $title,
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will
+# replace them by respectively the title of the page, the current date and time,
+# only the current date, the version number of doxygen, the project name (see
+# PROJECT_NAME), or the project number (see PROJECT_NUMBER).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER           =
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+# generated LaTeX document. The footer should contain everything after the last
+# chapter. If it is left blank doxygen will generate a standard footer.
+#
+# Note: Only use a user-defined footer if you know what you are doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER           =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES      =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS         = YES
+
+# If the LATEX_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES to get a
+# higher quality PDF documentation.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help. This option is also used
+# when generating formulas in HTML.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BATCHMODE        = NO
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HIDE_INDICES     = NO
+
+# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+# code with syntax highlighting in the LaTeX output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_SOURCE_CODE      = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE        = plain
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's config
+# file, i.e. a series of assignments. You only have to provide replacements,
+# missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE    =
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's config file. A template extensions file can be generated
+# using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE    =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
+GENERATE_XML           = YES
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_OUTPUT             = xml
+XML_FILE_EXTENSION    = .xml
+
+# The XML_SCHEMA tag can be used to specify a XML schema, which can be used by a
+# validating XML parser to check the syntax of the XML files.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_SCHEMA             =
+
+# The XML_DTD tag can be used to specify a XML DTD, which can be used by a
+# validating XML parser to check the syntax of the XML files.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_DTD                =
+
+# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK       = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT         = docbook
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
+# Definitions (see http://autogen.sf.net) file that captures the structure of
+# the code including all documentation. Note that this feature is still
+# experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
+# in the source code. If set to NO only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES the includes files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+INCLUDE_PATH           =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+INCLUDE_FILE_PATTERNS  =
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+PREDEFINED             =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_AS_DEFINED      =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all refrences to function-like macros that are alone on a line, have an
+# all uppercase name, and do not end with a semicolon. Such function macros are
+# typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have an unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
+TAGFILES               =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
+GENERATE_TAGFILE       =
+
+# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
+# class index. If set to NO only the inherited external classes will be listed.
+# The default value is: NO.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
+# the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
+EXTERNAL_GROUPS        = YES
+
+# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES         = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of 'which perl').
+# The default file (with absolute path) is: /usr/bin/perl.
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
+# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+# NO turns the diagrams off. Note that this option also works with HAVE_DOT
+# disabled, but it is recommended to install and use dot, since it yields more
+# powerful graphs.
+# The default value is: YES.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see:
+# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH            =
+
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH               =
+
+# If set to YES, the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: NO.
+
+HAVE_DOT               = NO
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS        = 0
+
+# When you want a differently looking font n the dot files that doxygen
+# generates you can specify the font name using DOT_FONTNAME. You need to make
+# sure dot is able to find the font, which can be done by putting it in a
+# standard location or by setting the DOTFONTPATH environment variable or by
+# setting DOT_FONTPATH to the directory containing the font.
+# The default value is: Helvetica.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTNAME           = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+# dot graphs.
+# Minimum value: 4, maximum value: 24, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the default font as specified with
+# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+# the path where dot can find it using this tag.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH           =
+
+# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+# each documented class showing the direct and indirect inheritance relations.
+# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LOOK               = NO
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS   = 10
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDE_GRAPH          = YES
+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot.
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, jpg, gif and svg.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_IMAGE_FORMAT       = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG        = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_PATH               =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOTFILE_DIRS           =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS           =
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS           =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not seem
+# to support this out of the box.
+#
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_MULTI_TARGETS      = YES
+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_CLEANUP            = YES
+
+# For Open Source DALi API Reference
+ALIASES += SINCE_1_0="@since 1.0"
+ALIASES += SINCE_1_1="@since 1.1"
+ALIASES += SINCE_1_2="@since 1.2"
+
+# Extra tags for Tizen 3.0
+ALIASES += SINCE_1_2_2="@since 1.2.2"
+ALIASES += SINCE_1_2_4="@since 1.2.4"
+ALIASES += SINCE_1_2_5="@since 1.2.5"
+
+ALIASES += DEPRECATED_1_0="@deprecated Deprecated since 1.0"
+ALIASES += DEPRECATED_1_1="@deprecated Deprecated since 1.1"
+ALIASES += DEPRECATED_1_2="@deprecated Deprecated since 1.2"
+
+ALIASES += PLATFORM=""
+ALIASES += PRIVLEVEL_PLATFORM=""
+ALIASES += PRIVLEVEL_PUBLIC=""
+ALIASES += PRIVILEGE_KEYGRAB=""
+ALIASES += PRIVILEGE_DISPLAY=""
+ALIASES += REMARK_INTERNET=""
diff --git a/plugins/dali-swig/SWIG/doxygen/scripts/GenerateIntermediate.sh b/plugins/dali-swig/SWIG/doxygen/scripts/GenerateIntermediate.sh
new file mode 100755 (executable)
index 0000000..20dd5d3
--- /dev/null
@@ -0,0 +1,143 @@
+########################################################################
+#                                                                      #
+# This script takes all the class*.xml, struct*.xml and namespace*.xml #
+# generated & use them to generate .i files which can be added to      #
+# dali.i for generation of doxygen comments for corresponding C# files #
+#                                                                      #
+########################################################################
+
+#PATH="../../"
+# DoxyComments for class*.xml files in the folder
+
+cd ..
+PATH_TO_I_FILES=$(pwd)
+cd -
+
+cd ../..
+PATH_TO_DALII=$(pwd)
+cd -
+
+PATH_TO_SCRIPT=$(pwd)
+PATH_TO_CORE_PUBLIC_APIS="/dali-core/dali/public-api/"
+PATH_TO_TOOLKIT_PUBLIC_APIS="/dali-toolkit/dali-toolkit/public-api/"
+PATH_TO_ADAPTOR_PUBLIC_APIS="/dali-adaptor/adaptors/public-api/adaptor-framework/"
+
+cd ../../../../../../
+ROOT_PATH=$(pwd)
+cd -
+
+CORE_PATH=$ROOT_PATH$PATH_TO_CORE_PUBLIC_APIS
+TOOLKIT_PATH=$ROOT_PATH$PATH_TO_TOOLKIT_PUBLIC_APIS
+ADAPTOR_PATH=$ROOT_PATH$PATH_TO_ADAPTOR_PUBLIC_APIS
+
+echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
+echo "Generating Doxygen for DALi-Core module"
+echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
+
+for directory in `ls $CORE_PATH`;
+do
+  cp $PATH_TO_SCRIPT"/Doxyfile" $CORE_PATH$directory                               #copy doxy file to ../public/../ folder
+  cd $CORE_PATH$directory
+  doxygen                                                                          #run doxygen command to generate .i files
+  cp $PATH_TO_SCRIPT"/doxy2swig_class.py" $CORE_PATH$directory"/xml"               #copy doxy file to ../public/../ folder
+  cp $PATH_TO_SCRIPT"/doxy2swig_namespace.py" $CORE_PATH$directory"/xml"           #copy doxy file to ../public/../ folder
+  cp $PATH_TO_SCRIPT"/doxy2swig_struct.py" $CORE_PATH$directory"/xml"              #copy doxy file to ../public/../ folder
+  cp $PATH_TO_SCRIPT"/genDoxy.sh" $CORE_PATH$directory"/xml"                       #copy doxy file to ../public/../ folder
+  cd $CORE_PATH$directory"/xml"
+  chmod 777 genDoxy.sh
+  ./genDoxy.sh
+  cp *.i $PATH_TO_I_FILES"/"
+  rm $CORE_PATH$directory"/Doxyfile"
+  rm -rf $CORE_PATH$directory"/xml"
+  rm -rf $CORE_PATH$directory"/html"
+  rm -rf $CORE_PATH$directory"/latex"
+done
+
+echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
+echo "Generating Doxygen for DALi-Adaptor module"
+echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
+
+  cd $ADAPTOR_PATH
+  cp $PATH_TO_SCRIPT"/Doxyfile" $ADAPTOR_PATH                                                 #copy doxy file to ../public/../ folder
+  doxygen
+  cp $PATH_TO_SCRIPT"/doxy2swig_class.py" $ADAPTOR_PATH"/xml"                                 #copy doxy file to ../public/../ folder
+  cp $PATH_TO_SCRIPT"/doxy2swig_namespace.py" $ADAPTOR_PATH"/xml"                             #copy doxy file to ../public/../ folder
+  cp $PATH_TO_SCRIPT"/doxy2swig_struct.py" $ADAPTOR_PATH"/xml"                                #copy doxy file to ../public/../ folder
+  cp $PATH_TO_SCRIPT"/genDoxy.sh" $ADAPTOR_PATH"/xml"                                         #copy doxy file to ../public/../ folder
+  cd $ADAPTOR_PATH"/xml"
+  chmod 777 genDoxy.sh
+  ./genDoxy.sh
+  cp *.i $PATH_TO_I_FILES"/"
+
+  rm $ADAPTOR_PATH"/Doxyfile"
+  rm -rf $ADAPTOR_PATH"/xml"
+  rm -rf $ADAPTOR_PATH"/html"
+  rm -rf $ADAPTOR_PATH"/latex"
+
+echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
+echo "Generating Doxygen for DALi-Toolkit module"
+echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
+
+for directory in `ls $TOOLKIT_PATH`;
+do
+  cd $TOOLKIT_PATH$directory
+  cp $PATH_TO_SCRIPT"/Doxyfile" $TOOLKIT_PATH$directory"/"                         #copy doxy file to ../public/../ folder
+  doxygen
+  cp $PATH_TO_SCRIPT"/doxy2swig_class.py" $TOOLKIT_PATH$directory"/xml"            #copy doxy file to ../public/../ folder
+  cp $PATH_TO_SCRIPT"/doxy2swig_namespace.py" $TOOLKIT_PATH$directory"/xml"        #copy doxy file to ../public/../ folder
+  cp $PATH_TO_SCRIPT"/doxy2swig_struct.py" $TOOLKIT_PATH$directory"/xml"           #copy doxy file to ../public/../ folder
+  cp $PATH_TO_SCRIPT"/genDoxy.sh" $TOOLKIT_PATH$directory"/xml"                    #copy doxy file to ../public/../ folder
+  cd $TOOLKIT_PATH$directory"/xml"
+  chmod 777 genDoxy.sh
+  ./genDoxy.sh
+  cp *.i $PATH_TO_I_FILES"/"
+
+  rm $TOOLKIT_PATH$directory"/Doxyfile"
+  rm -rf $TOOLKIT_PATH$directory"/xml"
+  rm -rf $TOOLKIT_PATH$directory"/html"
+  rm -rf $TOOLKIT_PATH$directory"/latex"
+  for subdirectory in `ls $TOOLKIT_PATH$directory`;
+  do
+    cp $PATH_TO_SCRIPT"/Doxyfile" $TOOLKIT_PATH$directory"/"$subdirectory"/"                     #copy doxy file to ../public/../ folder
+    cd $TOOLKIT_PATH$directory"/"$subdirectory                                                   #copy doxy file to ../public/../ folder
+    doxygen                                                                                      #run doxygen command to generate .i files
+    cp $PATH_TO_SCRIPT"/doxy2swig_class.py" $TOOLKIT_PATH$directory"/"$subdirectory"/xml"        #copy doxy file to ../public/../ folder
+    cp $PATH_TO_SCRIPT"/doxy2swig_namespace.py" $TOOLKIT_PATH$directory"/"$subdirectory"/xml"    #copy doxy file to ../public/../ folder
+    cp $PATH_TO_SCRIPT"/doxy2swig_struct.py" $TOOLKIT_PATH$directory"/"$subdirectory"/xml"       #copy doxy file to ../public/../ folder
+    cp $PATH_TO_SCRIPT"/genDoxy.sh" $TOOLKIT_PATH$directory"/"$subdirectory"/xml"                #copy doxy file to ../public/../ folder
+    cd $TOOLKIT_PATH$directory"/"$subdirectory"/xml"
+    chmod 777 genDoxy.sh
+    ./genDoxy.sh
+    cp *.i $PATH_TO_I_FILES"/"
+
+    rm $TOOLKIT_PATH$directory"/"$subdirectory"/Doxyfile"
+    rm -rf $TOOLKIT_PATH$directory"/"$subdirectory"/xml"
+    rm -rf $TOOLKIT_PATH$directory"/"$subdirectory"/html"
+    rm -rf $TOOLKIT_PATH$directory"/"$subdirectory"/latex"
+    for sd in `ls $TOOLKIT_PATH$directory"/"$subdirectory`;
+    do
+      cp $PATH_TO_SCRIPT"/Doxyfile" $TOOLKIT_PATH$directory"/"$subdirectory"/"$sd"/"                     #copy doxy file to ../public/../ folder
+      cd $TOOLKIT_PATH$directory"/"$subdirectory"/"$sd                                                   #copy doxy file to ../public/../ folder
+      doxygen                                                                                            #run doxygen command to generate .i files
+      cp $PATH_TO_SCRIPT"/doxy2swig_class.py" $TOOLKIT_PATH$directory"/"$subdirectory"/"$sd"/xml"        #copy doxy file to ../public/../ folder
+      cp $PATH_TO_SCRIPT"/doxy2swig_namespace.py" $TOOLKIT_PATH$directory"/"$subdirectory"/"$sd"/xml"    #copy doxy file to ../public/../ folder
+      cp $PATH_TO_SCRIPT"/doxy2swig_struct.py" $TOOLKIT_PATH$directory"/"$subdirectory"/"$sd"/xml"       #copy doxy file to ../public/../ folder
+      cp $PATH_TO_SCRIPT"/genDoxy.sh" $TOOLKIT_PATH$directory"/"$subdirectory"/"$sd"/xml"                #copy doxy file to ../public/../ folder
+      cd $TOOLKIT_PATH$directory"/"$subdirectory"/"$sd"/xml"
+      chmod 777 genDoxy.sh
+      ./genDoxy.sh
+      cp *.i $PATH_TO_I_FILES"/"
+
+      rm $TOOLKIT_PATH$directory"/"$subdirectory"/"$sd"/Doxyfile"
+      rm -rf $TOOLKIT_PATH$directory"/"$subdirectory"/"$sd"/xml"
+      rm -rf $TOOLKIT_PATH$directory"/"$subdirectory"/"$sd"/html"
+      rm -rf $TOOLKIT_PATH$directory"/"$subdirectory"/"$sd"/latex"
+    done #sd
+  done #subdirectory
+done   #directory
+
+cd $PATH_TO_I_FILES
+ls *.i >> File_List.txt
+awk '{print "%include doxygen/" $0}' File_List.txt  2>&1 | tee > $PATH_TO_DALII"/"doxygen.i
+rm File_List.txt
+cd -
diff --git a/plugins/dali-swig/SWIG/doxygen/scripts/README_C#_DOXY.txt b/plugins/dali-swig/SWIG/doxygen/scripts/README_C#_DOXY.txt
new file mode 100755 (executable)
index 0000000..594780b
--- /dev/null
@@ -0,0 +1,16 @@
+README
+=============================
+
+To run the script and get Doxygen Documentation for a .cs file , do the following:
+
+1.  Run GenerateIntermediate script and generate .i files.
+
+      $user@user:~/../../dali-toolkit/plugins/dali-swig/SWIG/doxygen/scripts$ chmod 777 GenerateIntermediate.sh
+      $user@user:~/../../dali-toolkit/plugins/dali-swig/SWIG/doxygen/scripts$ ./GenerateIntermediate.sh
+
+2.  Intermediate .i files are copied to ~/../../dali-toolkit/plugins/dali-swig/SWIG/doxygen/
+
+3.  Run make to generate the .cs file with documentation.
+
+      $user@user:~/../../dali-toolkit/plugins/dali-swig/ ./autogen.sh && ./configure &&  make clean && make && make check
+
diff --git a/plugins/dali-swig/SWIG/doxygen/scripts/doxy2swig_class.py b/plugins/dali-swig/SWIG/doxygen/scripts/doxy2swig_class.py
new file mode 100755 (executable)
index 0000000..87521a5
--- /dev/null
@@ -0,0 +1,639 @@
+#!/usr/bin/env python
+"""Doxygen XML to SWIG docstring converter.
+
+Usage:
+
+  doxy2swig.py [options] input.xml output.i
+
+Converts Doxygen generated XML files into a file containing docstrings
+that can be used by SWIG-1.3.x.  Note that you need to get SWIG
+version > 1.3.23 or use Robin Dunn's docstring patch to be able to use
+the resulting output.
+
+input.xml is your doxygen generated XML file and output.i is where the
+output will be written (the file will be clobbered).
+
+"""
+######################################################################
+#
+# This code is implemented using Mark Pilgrim's code as a guideline:
+#   http://www.faqs.org/docs/diveintopython/kgp_divein.html
+#
+# Author: Prabhu Ramachandran
+# License: BSD style
+#
+# Thanks:
+#   Johan Hake:  the include_function_definition feature
+#   Bill Spotz:  bug reports and testing.
+#   Sebastian Henschel:   Misc. enhancements.
+#
+######################################################################
+
+#_*_ coding:utf-8 _*_
+from xml.dom import minidom
+import re
+import textwrap
+import sys
+import types
+import os.path
+import optparse
+import os
+
+def my_open_read(source):
+    if hasattr(source, "read"):
+        return source
+    else:
+        return open(source)
+
+def my_open_write(dest):
+    if hasattr(dest, "write"):
+        return dest
+    else:
+        return open(dest, 'w')
+
+
+class Doxy2SWIG:
+    """Converts Doxygen generated XML files into a file containing
+    docstrings that can be used by SWIG-1.3.x that have support for
+    feature("docstring").  Once the data is parsed it is stored in
+    self.pieces.
+
+    """
+
+    def __init__(self, src, include_function_definition=True, quiet=False):
+        """Initialize the instance given a source object.  `src` can
+        be a file or filename.  If you do not want to include function
+        definitions from doxygen then set
+        `include_function_definition` to `False`.  This is handy since
+        this allows you to use the swig generated function definition
+        using %feature("autodoc", [0,1]).
+
+        """
+        f = my_open_read(src)
+        self.my_dir = os.path.dirname(f.name)
+        self.xmldoc = minidom.parse(f).documentElement
+        f.close()
+
+        self.pieces = []
+        self.pieces.append('\n// File: %s\n'%\
+                           os.path.basename(f.name))
+
+        self.space_re = re.compile(r'\s+')
+        self.lead_spc = re.compile(r'^(%feature\S+\s+\S+\s*?)"\s+(\S)')
+        self.multi = 0
+        self.ignores = ['inheritancegraph', 'param', 'listofallmembers',
+                        'innerclass', 'name', 'declname', 'incdepgraph',
+                        'invincdepgraph', 'type',
+                        'references', 'referencedby', 'location',
+                        'collaborationgraph', 'reimplements',
+                        'reimplementedby', 'derivedcompoundref',
+                        'basecompoundref']
+        #self.generics = []
+        self.include_function_definition = include_function_definition
+        if not include_function_definition:
+            self.ignores.append('argsstring')
+
+        self.quiet = quiet
+        self.list_ctr = 1  #counts the number of spaces to be displayed before displaying a list item
+        self.simplesect_kind = ''
+        self.para_kind = ''
+
+    def generate(self):
+        """Parses the file set in the initialization.  The resulting
+        data is stored in `self.pieces`.
+
+        """
+        self.parse(self.xmldoc)
+
+    def parse(self, node):
+        """Parse a given node.  This function in turn calls the
+        `parse_<nodeType>` functions which handle the respective
+        nodes.
+
+        """
+        pm = getattr(self, "parse_%s"%node.__class__.__name__)
+        pm(node)
+
+    def parse_Document(self, node):
+        #print("himanshu ::::::: parse Document... ")
+        self.parse(node.documentElement)
+
+    def parse_Text(self, node):
+        #print("himanshu ::::::: parse Text... ")
+        txt = node.data
+        #txt = txt.replace('\\', r'\\\\')
+        txt = txt.replace('"', r'\"')
+        #print '--------------------------------------'
+        #print '--------------------------------------'
+        #print txt
+        # ignore pure whitespace
+        m = self.space_re.match(txt)
+        if m and len(m.group()) == len(txt):
+            pass
+        else:
+            #self.add_text(txt)
+            t = textwrap.fill(txt, 100, break_long_words=False)
+            #print 'HIMANSHU ---------- >>>>>>>>>>>>>>>>>>>>> '
+            #print t
+            t = t.replace('\n','\n* '+' '*(self.list_ctr+2))
+            #t = t.replace('1234',' '*self.list_ctr)
+            if t:
+                self.add_line = 1
+            self.add_text(t)
+
+    def parse_Element(self, node):
+        """Parse an `ELEMENT_NODE`.  This calls specific
+        `do_<tagName>` handers for different elements.  If no handler
+        is available the `generic_parse` method is called.  All
+        tagNames specified in `self.ignores` are simply ignored.
+
+        """
+        #print("himanshu ::::::: parse Element... ")
+        name = node.tagName
+        ignores = self.ignores
+        if name in ignores:
+            return
+        attr = "do_%s" % name
+        if hasattr(self, attr):
+            handlerMethod = getattr(self, attr)
+            handlerMethod(node)
+        else:
+            self.generic_parse(node)
+            #if name not in self.generics: self.generics.append(name)
+
+    def parse_Comment(self, node):
+        """Parse a `COMMENT_NODE`.  This does nothing for now."""
+        return
+
+    def add_text(self, value):
+        """Adds text corresponding to `value` into `self.pieces`."""
+        #print value
+        if type(value) in (types.ListType, types.TupleType):
+            self.pieces.extend(value)
+        else:
+            self.pieces.append(value)
+
+    def get_specific_nodes(self, node, names):
+        """Given a node and a sequence of strings in `names`, return a
+        dictionary containing the names as keys and child
+        `ELEMENT_NODEs`, that have a `tagName` equal to the name.
+
+        """
+        nodes = [(x.tagName, x) for x in node.childNodes \
+                 if x.nodeType == x.ELEMENT_NODE and \
+                 x.tagName in names]
+        return dict(nodes)
+
+    def generic_parse(self, node, pad=0):
+        """A Generic parser for arbitrary tags in a node.
+
+        Parameters:
+
+         - node:  A node in the DOM.
+         - pad: `int` (default: 0)
+
+           If 0 the node data is not padded with newlines.  If 1 it
+           appends a newline after parsing the childNodes.  If 2 it
+           pads before and after the nodes are processed.  Defaults to
+           0.
+
+        """
+        npiece = 0
+        if pad:
+            npiece = len(self.pieces)
+        if pad == 2:
+            self.add_text('\n* ')
+        for n in node.childNodes:
+            self.parse(n)
+        if pad:
+            #if len(self.pieces) > npiece:
+            self.add_text('\n* ')
+
+    def space_parse(self, node):
+        self.add_text(' ')
+        self.generic_parse(node)
+
+    def do_compoundname(self, node):
+        self.add_text('\n\n')
+        data = node.firstChild.data
+        #self.add_text('%feature("docstring") %s "\n'%data)
+        self.add_text('%typemap(csclassmodifiers) ')
+        self.add_text('%s\n"\n/**\n'%data)
+
+    def do_compounddef(self, node):
+        kind = node.attributes['kind'].value
+        if kind in ('class', 'struct'):
+            prot = node.attributes['prot'].value
+            if prot <> 'public':
+                return
+            names = ('compoundname', 'briefdescription',
+                     'detaileddescription', 'includes')
+            first = self.get_specific_nodes(node, names)
+            for n in names:
+                if first.has_key(n):
+                    self.parse(first[n])
+            #self.add_text(['";','\n'])
+            self.add_text(['*/','\n','%s %s ";'%(prot,'class'),'\n'])
+            for n in node.childNodes:
+                if n not in first.values():
+                    self.parse(n)
+        elif kind in ('file', 'namespace'):
+            nodes = node.getElementsByTagName('sectiondef')
+            for n in nodes:
+                self.parse(n)
+
+    def do_includes(self, node):
+        self.add_text('\n* @include ')
+        self.generic_parse(node, pad=1)
+
+    def do_parameterlist(self, node):
+
+        #print("himanshu ::::::::::  do_parameterlist")
+        text='unknown'
+        for key, val in node.attributes.items():
+            """if key == 'kind':
+                if val == 'param': text = 'Parameters'
+                elif val == 'exception': text = 'Exceptions'
+                else: text = val
+                break"""
+            if key == 'kind':
+                if val == 'param': text = '@param'
+                elif val == 'exception': text = '@exception'
+                else: text = val
+                break
+        #self.add_text(['\n', '\n', text, ':', '\n'])
+        #self.add_text(['\n', '* ', text])
+        self.para_kind = text
+        self.generic_parse(node, pad=0)
+
+    def do_para(self, node):
+        #print("himanshu :::::::: do_para ")
+        #self.add_text(['\n'])
+        self.generic_parse(node, pad=0)
+
+    def do_parametername(self, node):
+        #print("himanshu :::::::: do_parametername")
+        self.add_text(['\n', '* ', self.para_kind])
+
+        try:
+            data=node.firstChild.data
+        except AttributeError: # perhaps a <ref> tag in it
+            data=node.firstChild.firstChild.data
+        if data.find('Exception') != -1:
+            #print("himanshu :::::::: Pronting DAta1")
+            #print data
+            self.add_text(data)
+        else:
+            #print("himanshu :::::::: Pronting DAta2")
+            #print data
+            for key, val in node.attributes.items():
+                if key == 'direction':
+                    self.add_text('[%s] '%val)
+            self.add_text("%s "%data)
+
+    def do_parameterdefinition(self, node):
+        self.generic_parse(node, pad=1)
+
+    def do_detaileddescription(self, node):
+        #self.add_text('')
+        self.generic_parse(node, pad=0)
+
+    def do_briefdescription(self, node):
+        self.add_text("* @brief ")
+        self.generic_parse(node, pad=1)
+
+    def do_memberdef(self, node):
+        prot = node.attributes['prot'].value
+        id = node.attributes['id'].value
+        kind = node.attributes['kind'].value
+        tmp = node.parentNode.parentNode.parentNode
+        compdef = tmp.getElementsByTagName('compounddef')[0]
+        cdef_kind = compdef.attributes['kind'].value
+        #print('Himanshu :: ...... Memberdef........')
+        #print('prot= %s ....., id= %s ....., kind= %s..... ,cdef_kind= %s'%(prot,id,kind,cdef_kind))
+
+        if prot == 'public':
+            #print('Entering here')
+            first = self.get_specific_nodes(node, ('definition', 'name'))
+            #print first
+            name = first['name'].firstChild.data
+            #print name
+            if name[:8] == 'operator': # Don't handle operators yet.
+                return
+            #print('Entering here2')
+
+            # For ENUMS
+            """if kind == 'enum':
+                #print('himanshu is in enum now')
+                self.add_text('\n\n')
+                self.add_text('%typemap(csclassmodifiers) ')
+                self.add_text('%s\n"\n/**\n'%data)
+                self.generic_parse(node, pad=0)
+            """
+            ##################################################
+            # For Classes & Functions
+            if not first.has_key('definition') or \
+                   kind in ['variable', 'typedef']:
+                return
+            #print('Entering here3')
+
+            if self.include_function_definition:
+                defn = first['definition'].firstChild.data
+            else:
+                defn = ""
+            self.add_text('\n')
+            briefd = node.getElementsByTagName('briefdescription');
+            if kind == 'function' and briefd[0].firstChild.nodeValue == '\n':  # first node value if briefdescription exists will be always \n
+                #print('Entering here4')
+                #self.add_text('%csmethodmodifiers ')
+
+                anc = node.parentNode.parentNode
+                if cdef_kind in ('file', 'namespace'):
+                    ns_node = anc.getElementsByTagName('innernamespace')
+                    if not ns_node and cdef_kind == 'namespace':
+                        ns_node = anc.getElementsByTagName('compoundname')
+                    if ns_node:
+                        ns = ns_node[0].firstChild.data
+                        #print("himanshu ::::::   do_memberdef....ns_node")
+                        self.add_text(' %s::%s "\n%s'%(ns, name, defn))
+                    else:
+                        #print("himanshu ::::::   do_memberdef....else")
+                        #print name
+                        #print("++++++++++++++++++++++++++++")
+                        #print defn
+                        self.add_text(name)
+                        self.add_text(' \"')
+                        self.add_text('\n')
+                        self.add_text('/**\n')
+                elif cdef_kind in ('class', 'struct'):
+                    # Get the full function name.
+                    anc_node = anc.getElementsByTagName('compoundname')
+                    cname = anc_node[0].firstChild.data
+                    #print("himanshu ::::::   do_memberdef...class/struct")
+
+                    s = "Dali::Toolkit::"
+                    s += name
+                    b = "Dali::"
+                    b += name
+                    #print "himanshu ::::::   do_memberdef...class/struct %s" %b
+                    if cname == s or cname == b:
+                         #print("Inside %s "%s)
+                         return
+                    else:
+                         self.add_text('%csmethodmodifiers ')
+                         self.add_text([' %s::%s'%(cname, name)])
+                         self.add_text(['\n','"\n/**\n'])
+
+                for n in node.childNodes:
+                    if n not in first.values():
+                        self.parse(n)
+                self.add_text(['\n','*/','\n','%s ";'%prot,'\n'])
+
+    def do_definition(self, node):
+        #print("himanshu ::::::   do_definition")
+        data = node.firstChild.data
+        self.add_text('%s "\n%s'%(data, data))
+
+    def do_sectiondef(self, node):
+        #print('Himanshu : ........SectionDef ........')
+        kind = node.attributes['kind'].value
+        #print('kind = %s'%kind)
+        if kind in ('public-func', 'func', 'user-defined', 'public-type', ''):
+            self.generic_parse(node)
+
+    def do_header(self, node):
+        """For a user defined section def a header field is present
+        which should not be printed as such, so we comment it in the
+        output."""
+        data = node.firstChild.data
+        self.add_text('\n/*\n %s \n*/\n'%data)
+        # If our immediate sibling is a 'description' node then we
+        # should comment that out also and remove it from the parent
+        # node's children.
+        parent = node.parentNode
+        idx = parent.childNodes.index(node)
+        if len(parent.childNodes) >= idx + 2:
+            nd = parent.childNodes[idx+2]
+            if nd.nodeName == 'description':
+                nd = parent.removeChild(nd)
+                self.add_text('\n/*')
+                self.generic_parse(nd)
+                self.add_text('\n*/\n')
+
+    def do_parse_sect(self, node, kind):
+        if kind in ('date', 'rcs', 'version'):
+            pass
+        elif kind == 'warning':
+            self.add_text(['\n', '* @warning '])
+            self.generic_parse(node,pad=0)
+        elif kind == 'see':
+            self.add_text('\n')
+            self.add_text('* @see ')
+            self.generic_parse(node,pad=0)
+        elif kind == 'return':
+            self.add_text('\n')
+            self.add_text('* @return ')
+            self.generic_parse(node,pad=0)
+        elif kind == 'pre':
+            self.add_text('\n')
+            self.add_text('* @pre ')
+            self.generic_parse(node,pad=0)
+        elif kind == 'note':
+            self.add_text('\n')
+            self.add_text('* @note ')
+            self.generic_parse(node,pad=0)
+        elif kind == 'post':
+            self.add_text('\n')
+            self.add_text('* @post ')
+            self.generic_parse(node,pad=0)
+        elif kind == 'since':
+            self.add_text('\n')
+            self.add_text('* @SINCE_')
+            self.generic_parse(node,pad=0)
+        else:
+            self.add_text('\n')
+            self.generic_parse(node,pad=0)
+
+    def do_simplesect(self, node):
+        kind = node.attributes['kind'].value
+        self.simplesect_kind = kind
+        self.do_parse_sect(node, kind)
+        self.simplesect_kind = ''
+
+    def do_simplesectsep(self, node):
+        #tmp = node.parentnode
+        self.do_parse_sect(node, self.simplesect_kind)
+
+    def do_argsstring(self, node):
+        #self.generic_parse(node, pad=1)
+        x = 0
+
+    def do_member(self, node):
+        kind = node.attributes['kind'].value
+        refid = node.attributes['refid'].value
+        if kind == 'function' and refid[:9] == 'namespace':
+            self.generic_parse(node)
+
+    def do_doxygenindex(self, node):
+        self.multi = 1
+        comps = node.getElementsByTagName('compound')
+        for c in comps:
+            refid = c.attributes['refid'].value
+            fname = refid + '.xml'
+            if not os.path.exists(fname):
+                fname = os.path.join(self.my_dir,  fname)
+            #if not self.quiet:
+                #print "parsing file: %s"%fname
+            p = Doxy2SWIG(fname, self.include_function_definition, self.quiet)
+            p.generate()
+            self.pieces.extend(self.clean_pieces(p.pieces))
+
+    def do_emphasis(self,node):
+        self.add_text('\n* <i> ')
+        self.generic_parse(node,pad=0)
+        self.add_text(' </i>')
+
+    def do_heading(self,node):
+        level = node.attributes['level'].value
+        self.add_text('\n* <h%s> '%level)
+        self.generic_parse(node,pad=0)
+        self.add_text(' </h%s>\n* '%level)
+
+    def do_itemizedlist(self, node):
+        self.add_text(['\n* '])
+        self.list_ctr = self.list_ctr + 2
+        #self.firstListItem = self.firstListItem + 1
+        self.generic_parse(node, pad=0)
+        self.list_ctr = self.list_ctr - 2
+
+    def do_listitem(self, node):
+        #self.add_text('\n'* (self.firstListItem-1))
+        #self.firstlistItem = self.firstListItem - 1
+        self.add_text(' ' * self.list_ctr)
+        self.add_text('- ')
+        self.generic_parse(node, pad=0)
+
+    def do_programlisting(self, node):
+        self.add_text(['\n* '])
+        self.add_text(' ' * (self.list_ctr+2))
+        self.add_text('@code\n*')
+        self.generic_parse(node, pad=0)
+        self.add_text(' ' * (self.list_ctr+2))
+        self.add_text('@endcode\n*')
+
+    def do_codeline(self, node):
+        self.add_text(' ' * (self.list_ctr+2))
+        self.generic_parse(node, pad=1)
+
+    def do_highlight(self, node):
+        cl = node.attributes['class'].value
+        self.add_text(' ')
+        #if cl == 'normal':
+        self.generic_parse(node, pad=0)
+
+    def do_sp(self, node):
+        self.add_text(' ')
+
+    """def do_table(self, node);
+        rows = node.attributes['rows'].value
+        cols = node.attributes['cols'].value"""
+
+    def do_enumvalue(self, node):
+        self.generic_parse(node, pad=0)
+
+    def write(self, fname):
+        o = my_open_write(fname)
+        if self.multi or 1:
+            o.write(u"".join(self.pieces).encode('utf-8'))
+        else:
+            o.write("".join(self.clean_pieces(self.pieces)))
+        o.close()
+
+    def remove_trailing_spaces(self, fname):
+        clean_lines = []
+        with open(fname) as o:
+            line = o.readlines()
+            clean_lines = [l.strip() for l in line if l.strip()]
+
+        with open('temp','w+') as f:
+            f.writelines('\n'.join(clean_lines))
+
+        f.close()
+        """with open('temp','r+') as f:
+            text = f.read()
+        f.close()
+        t = textwrap.fill(text, 100, break_long_words=False)
+        t = t.replace('\n','\n* '+' '*(self.list_ctr+2))
+        #t = t.replace('1234',' '*self.list_ctr)
+        with open('temp','w+') as f:
+            f.write(t)
+        """
+        os.rename('temp',fname)
+        f.close()
+
+    def clean_pieces(self, pieces):
+        """Cleans the list of strings given as `pieces`.  It replaces
+        multiple newlines by a maximum of 2 and returns a new list.
+        It also wraps the paragraphs nicely.
+        """
+        ret = []
+        count = 0
+        for i in pieces:
+            if i == '\n':
+                count = count + 1
+            else:
+                if i == '";':
+                    if count:
+                        ret.append('\n')
+                elif count > 2:
+                    ret.append('\n\n')
+                elif count:
+                    ret.append('\n'*count)
+                count = 0
+                ret.append(i)
+
+        _data = "".join(ret)
+        ret = []
+        for i in _data.split('\n\n'):
+            if i == 'Parameters:' or i == 'Exceptions:':
+                ret.extend([i, '\n-----------', '\n\n'])
+            elif i.find('// File:') > -1: # leave comments alone.
+                ret.extend([i, '\n'])
+            else:
+                _tmp = textwrap.fill(i.strip(), break_long_words=False)
+                _tmp = self.lead_spc.sub(r'\1"\2', _tmp)
+                ret.extend([_tmp, '\n\n'])
+        return ret
+
+
+def convert(input, output, include_function_definition=True, quiet=False):
+    p = Doxy2SWIG(input, include_function_definition, quiet)
+    p.generate()
+    #p.pieces=[str(i) for i in p.pieces]
+    #print p.pieces
+    p.write(output)
+    p.remove_trailing_spaces(output)
+
+def main():
+    usage = __doc__
+    parser = optparse.OptionParser(usage)
+    parser.add_option("-n", '--no-function-definition',
+                      action='store_true',
+                      default=False,
+                      dest='func_def',
+                      help='do not include doxygen function definitions')
+    parser.add_option("-q", '--quiet',
+                      action='store_true',
+                      default=False,
+                      dest='quiet',
+                      help='be quiet and minimize output')
+
+    options, args = parser.parse_args()
+    if len(args) != 2:
+        parser.error("error: no input and output specified")
+
+    convert(args[0], args[1], not options.func_def, options.quiet)
+
+
+if __name__ == '__main__':
+    main()
diff --git a/plugins/dali-swig/SWIG/doxygen/scripts/doxy2swig_namespace.py_ b/plugins/dali-swig/SWIG/doxygen/scripts/doxy2swig_namespace.py_
new file mode 100755 (executable)
index 0000000..3e9e6eb
--- /dev/null
@@ -0,0 +1,624 @@
+#!/usr/bin/env python
+"""Doxygen XML to SWIG docstring converter.
+
+Usage:
+
+  doxy2swig.py [options] input.xml output.i
+
+Converts Doxygen generated XML files into a file containing docstrings
+that can be used by SWIG-1.3.x.  Note that you need to get SWIG
+version > 1.3.23 or use Robin Dunn's docstring patch to be able to use
+the resulting output.
+
+input.xml is your doxygen generated XML file and output.i is where the
+output will be written (the file will be clobbered).
+
+"""
+######################################################################
+#
+# This code is implemented using Mark Pilgrim's code as a guideline:
+#   http://www.faqs.org/docs/diveintopython/kgp_divein.html
+#
+# Author: Prabhu Ramachandran
+# License: BSD style
+#
+# Thanks:
+#   Johan Hake:  the include_function_definition feature
+#   Bill Spotz:  bug reports and testing.
+#   Sebastian Henschel:   Misc. enhancements.
+#
+######################################################################
+
+#_*_ coding:utf-8 _*_
+from xml.dom import minidom
+import re
+import textwrap
+import sys
+import types
+import os.path
+import optparse
+import os
+
+def my_open_read(source):
+    if hasattr(source, "read"):
+        return source
+    else:
+        return open(source)
+
+def my_open_write(dest):
+    if hasattr(dest, "write"):
+        return dest
+    else:
+        return open(dest, 'w')
+
+
+class Doxy2SWIG:
+    """Converts Doxygen generated XML files into a file containing
+    docstrings that can be used by SWIG-1.3.x that have support for
+    feature("docstring").  Once the data is parsed it is stored in
+    self.pieces.
+
+    """
+
+    def __init__(self, src, include_function_definition=True, quiet=False):
+        """Initialize the instance given a source object.  `src` can
+        be a file or filename.  If you do not want to include function
+        definitions from doxygen then set
+        `include_function_definition` to `False`.  This is handy since
+        this allows you to use the swig generated function definition
+        using %feature("autodoc", [0,1]).
+
+        """
+        f = my_open_read(src)
+        self.my_dir = os.path.dirname(f.name)
+        self.xmldoc = minidom.parse(f).documentElement
+        f.close()
+
+        self.pieces = []
+        self.pieces.append('\n// File: %s\n'%\
+                           os.path.basename(f.name))
+
+        self.space_re = re.compile(r'\s+')
+        self.lead_spc = re.compile(r'^(%feature\S+\s+\S+\s*?)"\s+(\S)')
+        self.multi = 0
+        self.ignores = ['inheritancegraph', 'param', 'listofallmembers',
+                        'innerclass', 'name', 'declname', 'incdepgraph',
+                        'invincdepgraph', 'type',
+                        'references', 'referencedby', 'location',
+                        'collaborationgraph', 'reimplements',
+                        'reimplementedby', 'derivedcompoundref',
+                        'basecompoundref']
+        #self.generics = []
+        self.include_function_definition = include_function_definition
+        if not include_function_definition:
+            self.ignores.append('argsstring')
+
+        self.quiet = quiet
+        self.list_ctr = 1  #counts the number of spaces to be displayed before displaying a list item
+        self.simplesect_kind = ''
+        self.para_kind = ''
+
+    def generate(self):
+        """Parses the file set in the initialization.  The resulting
+        data is stored in `self.pieces`.
+
+        """
+        self.parse(self.xmldoc)
+
+    def parse(self, node):
+        """Parse a given node.  This function in turn calls the
+        `parse_<nodeType>` functions which handle the respective
+        nodes.
+
+        """
+        pm = getattr(self, "parse_%s"%node.__class__.__name__)
+        pm(node)
+
+    def parse_Document(self, node):
+        #print("himanshu ::::::: parse Document... ")
+        self.parse(node.documentElement)
+
+    def parse_Text(self, node):
+        #print("himanshu ::::::: parse Text... ")
+        txt = node.data
+        #txt = txt.replace('\\', r'\\\\')
+        txt = txt.replace('"', r'\"')
+        #print '--------------------------------------'
+        #print '--------------------------------------'
+        #print txt
+        # ignore pure whitespace
+        m = self.space_re.match(txt)
+        if m and len(m.group()) == len(txt):
+            pass
+        else:
+            #self.add_text(txt)
+            t = textwrap.fill(txt, 100, break_long_words=False)
+            #print 'HIMANSHU ---------- >>>>>>>>>>>>>>>>>>>>> '
+            #print t
+            t = t.replace('\n','\n* '+' '*(self.list_ctr+2))
+            #t = t.replace('1234',' '*self.list_ctr)
+            if t:
+                self.add_line = 1
+            self.add_text(t)
+
+    def parse_Element(self, node):
+        """Parse an `ELEMENT_NODE`.  This calls specific
+        `do_<tagName>` handers for different elements.  If no handler
+        is available the `generic_parse` method is called.  All
+        tagNames specified in `self.ignores` are simply ignored.
+
+        """
+        #print("himanshu ::::::: parse Element... ")
+        name = node.tagName
+        ignores = self.ignores
+        if name in ignores:
+            return
+        attr = "do_%s" % name
+        if hasattr(self, attr):
+            handlerMethod = getattr(self, attr)
+            handlerMethod(node)
+        else:
+            self.generic_parse(node)
+            #if name not in self.generics: self.generics.append(name)
+
+    def parse_Comment(self, node):
+        """Parse a `COMMENT_NODE`.  This does nothing for now."""
+        return
+
+    def add_text(self, value):
+        """Adds text corresponding to `value` into `self.pieces`."""
+        #print value
+        if type(value) in (types.ListType, types.TupleType):
+            self.pieces.extend(value)
+        else:
+            self.pieces.append(value)
+
+    def get_specific_nodes(self, node, names):
+        """Given a node and a sequence of strings in `names`, return a
+        dictionary containing the names as keys and child
+        `ELEMENT_NODEs`, that have a `tagName` equal to the name.
+
+        """
+        nodes = [(x.tagName, x) for x in node.childNodes \
+                 if x.nodeType == x.ELEMENT_NODE and \
+                 x.tagName in names]
+        return dict(nodes)
+
+    def generic_parse(self, node, pad=0):
+        """A Generic parser for arbitrary tags in a node.
+
+        Parameters:
+
+         - node:  A node in the DOM.
+         - pad: `int` (default: 0)
+
+           If 0 the node data is not padded with newlines.  If 1 it
+           appends a newline after parsing the childNodes.  If 2 it
+           pads before and after the nodes are processed.  Defaults to
+           0.
+
+        """
+        npiece = 0
+        if pad:
+            npiece = len(self.pieces)
+        if pad == 2:
+            self.add_text('\n* ')
+        for n in node.childNodes:
+            self.parse(n)
+        if pad:
+            #if len(self.pieces) > npiece:
+            self.add_text('\n* ')
+
+    def space_parse(self, node):
+        self.add_text(' ')
+        self.generic_parse(node)
+
+    def do_compoundname(self, node):
+        self.add_text('\n\n')
+        data = node.firstChild.data
+        #self.add_text('%feature("docstring") %s "\n'%data)
+        self.add_text('%typemap(csclassmodifiers) ')
+        self.add_text('%s\n"\n/**\n'%data)
+
+    def do_compounddef(self, node):
+        kind = node.attributes['kind'].value
+        if kind in ('class', 'struct'):
+            prot = node.attributes['prot'].value
+            if prot <> 'public':
+                return
+            names = ('compoundname', 'briefdescription',
+                     'detaileddescription', 'includes')
+            first = self.get_specific_nodes(node, names)
+            for n in names:
+                if first.has_key(n):
+                    self.parse(first[n])
+            #self.add_text(['";','\n'])
+            self.add_text(['*/','\n','%s %s ";'%(prot,'class'),'\n'])
+            for n in node.childNodes:
+                if n not in first.values():
+                    self.parse(n)
+        elif kind in ('file', 'namespace'):
+            nodes = node.getElementsByTagName('sectiondef')
+            for n in nodes:
+                self.parse(n)
+
+    def do_includes(self, node):
+        self.add_text('\n* @include ')
+        self.generic_parse(node, pad=1)
+
+    def do_parameterlist(self, node):
+
+        #print("himanshu ::::::::::  do_parameterlist")
+        text='unknown'
+        for key, val in node.attributes.items():
+            """if key == 'kind':
+                if val == 'param': text = 'Parameters'
+                elif val == 'exception': text = 'Exceptions'
+                else: text = val
+                break"""
+            if key == 'kind':
+                if val == 'param': text = '@param'
+                elif val == 'exception': text = '@exception'
+                else: text = val
+                break
+        #self.add_text(['\n', '\n', text, ':', '\n'])
+        #self.add_text(['\n', '* ', text])
+        self.para_kind = text
+        self.generic_parse(node, pad=0)
+
+    def do_para(self, node):
+        #print("himanshu :::::::: do_para ")
+        #self.add_text(['\n'])
+        self.generic_parse(node, pad=0)
+
+    def do_parametername(self, node):
+        #print("himanshu :::::::: do_parametername")
+        self.add_text(['\n', '* ', self.para_kind])
+
+        try:
+            data=node.firstChild.data
+        except AttributeError: # perhaps a <ref> tag in it
+            data=node.firstChild.firstChild.data
+        if data.find('Exception') != -1:
+            #print("himanshu :::::::: Pronting DAta1")
+            #print data
+            self.add_text(data)
+        else:
+            #print("himanshu :::::::: Pronting DAta2")
+            #print data
+            for key, val in node.attributes.items():
+                if key == 'direction':
+                    self.add_text('[%s] '%val)
+            self.add_text("%s "%data)
+
+    def do_parameterdefinition(self, node):
+        self.generic_parse(node, pad=1)
+
+    def do_detaileddescription(self, node):
+        #self.add_text('')
+        self.generic_parse(node, pad=0)
+
+    def do_briefdescription(self, node):
+        self.add_text("* @brief ")
+        self.generic_parse(node, pad=1)
+
+    def do_memberdef(self, node):
+        prot = node.attributes['prot'].value
+        id = node.attributes['id'].value
+        kind = node.attributes['kind'].value
+        tmp = node.parentNode.parentNode.parentNode
+        compdef = tmp.getElementsByTagName('compounddef')[0]
+        cdef_kind = compdef.attributes['kind'].value
+        #print('Himanshu :: ...... Memberdef........')
+        #print('prot= %s ....., id= %s ....., kind= %s..... ,cdef_kind= %s'%(prot,id,kind,cdef_kind))
+
+        if prot == 'public':
+            #print('Entering here')
+            first = self.get_specific_nodes(node, ('definition', 'name'))
+            #print first
+            name = first['name'].firstChild.data
+            #print name
+            if name[:8] == 'operator': # Don't handle operators yet.
+                return
+            #print('Entering here2')
+
+            # For ENUMS
+            """if kind == 'enum':
+                #print('himanshu is in enum now')
+                self.add_text('\n\n')
+                self.add_text('%typemap(csclassmodifiers) ')
+                self.add_text('%s\n"\n/**\n'%data)
+                self.generic_parse(node, pad=0)
+            """
+            ##################################################
+            # For Classes & Functions
+            if not first.has_key('definition') or \
+                   kind in ['variable', 'typedef']:
+                return
+            #print('Entering here3')
+
+            if self.include_function_definition:
+                defn = first['definition'].firstChild.data
+            else:
+                defn = ""
+            self.add_text('\n')
+            briefd = node.getElementsByTagName('briefdescription');
+            if kind == 'function' and briefd[0].firstChild.nodeValue == '\n':  # first node value if briefdescription exists will be always \n
+                #print('Entering here4')
+                self.add_text('%csmethodmodifiers ')
+
+                anc = node.parentNode.parentNode
+                if cdef_kind in ('file', 'namespace'):
+                    ns_node = anc.getElementsByTagName('innernamespace')
+                    if not ns_node and cdef_kind == 'namespace':
+                        ns_node = anc.getElementsByTagName('compoundname')
+                    if ns_node:
+                        ns = ns_node[0].firstChild.data
+                        #print("himanshu ::::::   do_memberdef....ns_node")
+                        self.add_text(' %s::%s "\n%s'%(ns, name, defn))
+                    else:
+                        #print("himanshu ::::::   do_memberdef....else")
+                        #print name
+                        #print("++++++++++++++++++++++++++++")
+                        #print defn
+                        self.add_text(name)
+                        self.add_text(' \"')
+                        self.add_text('\n')
+                        self.add_text('/**\n')
+                elif cdef_kind in ('class', 'struct'):
+                    # Get the full function name.
+                    anc_node = anc.getElementsByTagName('compoundname')
+                    cname = anc_node[0].firstChild.data
+                    #print("himanshu ::::::   do_memberdef...class/struct")
+                    self.add_text([' %s::%s'%(cname, name)])
+                    self.add_text(['\n','"\n/**\n'])
+
+                for n in node.childNodes:
+                    if n not in first.values():
+                        self.parse(n)
+                self.add_text(['\n','*/','\n','%s ";'%prot,'\n'])
+
+    def do_definition(self, node):
+        #print("himanshu ::::::   do_definition")
+        data = node.firstChild.data
+        self.add_text('%s "\n%s'%(data, data))
+
+    def do_sectiondef(self, node):
+        #print('Himanshu : ........SectionDef ........')
+        kind = node.attributes['kind'].value
+        #print('kind = %s'%kind)
+        if kind in ('public-func', 'func', 'user-defined', 'public-type', ''):
+            self.generic_parse(node)
+
+    def do_header(self, node):
+        """For a user defined section def a header field is present
+        which should not be printed as such, so we comment it in the
+        output."""
+        data = node.firstChild.data
+        self.add_text('\n/*\n %s \n*/\n'%data)
+        # If our immediate sibling is a 'description' node then we
+        # should comment that out also and remove it from the parent
+        # node's children.
+        parent = node.parentNode
+        idx = parent.childNodes.index(node)
+        if len(parent.childNodes) >= idx + 2:
+            nd = parent.childNodes[idx+2]
+            if nd.nodeName == 'description':
+                nd = parent.removeChild(nd)
+                self.add_text('\n/*')
+                self.generic_parse(nd)
+                self.add_text('\n*/\n')
+
+    def do_parse_sect(self, node, kind):
+        if kind in ('date', 'rcs', 'version'):
+            pass
+        elif kind == 'warning':
+            self.add_text(['\n', '* @warning '])
+            self.generic_parse(node,pad=0)
+        elif kind == 'see':
+            self.add_text('\n')
+            self.add_text('* @see ')
+            self.generic_parse(node,pad=0)
+        elif kind == 'return':
+            self.add_text('\n')
+            self.add_text('* @return ')
+            self.generic_parse(node,pad=0)
+        elif kind == 'pre':
+            self.add_text('\n')
+            self.add_text('* @pre ')
+            self.generic_parse(node,pad=0)
+        elif kind == 'note':
+            self.add_text('\n')
+            self.add_text('* @note ')
+            self.generic_parse(node,pad=0)
+        elif kind == 'post':
+            self.add_text('\n')
+            self.add_text('* @post ')
+            self.generic_parse(node,pad=0)
+        else:
+            self.add_text('\n')
+            self.generic_parse(node,pad=0)
+
+    def do_simplesect(self, node):
+        kind = node.attributes['kind'].value
+        self.simplesect_kind = kind
+        self.do_parse_sect(node, kind)
+        self.simplesect_kind = ''
+
+    def do_simplesectsep(self, node):
+        #tmp = node.parentnode
+        self.do_parse_sect(node, self.simplesect_kind)
+
+    def do_argsstring(self, node):
+        #self.generic_parse(node, pad=1)
+        x = 0
+
+    def do_member(self, node):
+        kind = node.attributes['kind'].value
+        refid = node.attributes['refid'].value
+        if kind == 'function' and refid[:9] == 'namespace':
+            self.generic_parse(node)
+
+    def do_doxygenindex(self, node):
+        self.multi = 1
+        comps = node.getElementsByTagName('compound')
+        for c in comps:
+            refid = c.attributes['refid'].value
+            fname = refid + '.xml'
+            if not os.path.exists(fname):
+                fname = os.path.join(self.my_dir,  fname)
+            #if not self.quiet:
+                #print "parsing file: %s"%fname
+            p = Doxy2SWIG(fname, self.include_function_definition, self.quiet)
+            p.generate()
+            self.pieces.extend(self.clean_pieces(p.pieces))
+
+    def do_emphasis(self,node):
+        self.add_text('\n* <i> ')
+        self.generic_parse(node,pad=0)
+        self.add_text(' </i>')
+
+    def do_heading(self,node):
+        level = node.attributes['level'].value
+        self.add_text('\n* <h%s> '%level)
+        self.generic_parse(node,pad=0)
+        self.add_text(' </h%s>\n* '%level)
+
+    def do_itemizedlist(self, node):
+        self.add_text(['\n* '])
+        self.list_ctr = self.list_ctr + 2
+        #self.firstListItem = self.firstListItem + 1
+        self.generic_parse(node, pad=0)
+        self.list_ctr = self.list_ctr - 2
+
+    def do_listitem(self, node):
+        #self.add_text('\n'* (self.firstListItem-1))
+        #self.firstlistItem = self.firstListItem - 1
+        self.add_text(' ' * self.list_ctr)
+        self.add_text('- ')
+        self.generic_parse(node, pad=0)
+
+    def do_programlisting(self, node):
+        self.add_text(['\n* '])
+        self.add_text(' ' * (self.list_ctr+2))
+        self.add_text('@code\n*')
+        self.generic_parse(node, pad=0)
+        self.add_text(' ' * (self.list_ctr+2))
+        self.add_text('@endcode\n*')
+
+    def do_codeline(self, node):
+        self.add_text(' ' * (self.list_ctr+2))
+        self.generic_parse(node, pad=1)
+
+    def do_highlight(self, node):
+        cl = node.attributes['class'].value
+        self.add_text(' ')
+        #if cl == 'normal':
+        self.generic_parse(node, pad=0)
+
+    def do_sp(self, node):
+        self.add_text(' ')
+
+    """def do_table(self, node);
+        rows = node.attributes['rows'].value
+        cols = node.attributes['cols'].value"""
+
+    def do_enumvalue(self, node):
+        self.generic_parse(node, pad=0)
+
+    def write(self, fname):
+        o = my_open_write(fname)
+        if self.multi or 1:
+            o.write(u"".join(self.pieces).encode('utf-8'))
+        else:
+            o.write("".join(self.clean_pieces(self.pieces)))
+        o.close()
+
+    def remove_trailing_spaces(self, fname):
+        clean_lines = []
+        with open(fname) as o:
+            line = o.readlines()
+            clean_lines = [l.strip() for l in line if l.strip()]
+
+        with open('temp','w+') as f:
+            f.writelines('\n'.join(clean_lines))
+
+        f.close()
+        """with open('temp','r+') as f:
+            text = f.read()
+        f.close()
+        t = textwrap.fill(text, 100, break_long_words=False)
+        t = t.replace('\n','\n* '+' '*(self.list_ctr+2))
+        #t = t.replace('1234',' '*self.list_ctr)
+        with open('temp','w+') as f:
+            f.write(t)
+        """
+        os.rename('temp',fname)
+        f.close()
+
+    def clean_pieces(self, pieces):
+        """Cleans the list of strings given as `pieces`.  It replaces
+        multiple newlines by a maximum of 2 and returns a new list.
+        It also wraps the paragraphs nicely.
+        """
+        ret = []
+        count = 0
+        for i in pieces:
+            if i == '\n':
+                count = count + 1
+            else:
+                if i == '";':
+                    if count:
+                        ret.append('\n')
+                elif count > 2:
+                    ret.append('\n\n')
+                elif count:
+                    ret.append('\n'*count)
+                count = 0
+                ret.append(i)
+
+        _data = "".join(ret)
+        ret = []
+        for i in _data.split('\n\n'):
+            if i == 'Parameters:' or i == 'Exceptions:':
+                ret.extend([i, '\n-----------', '\n\n'])
+            elif i.find('// File:') > -1: # leave comments alone.
+                ret.extend([i, '\n'])
+            else:
+                _tmp = textwrap.fill(i.strip(), break_long_words=False)
+                _tmp = self.lead_spc.sub(r'\1"\2', _tmp)
+                ret.extend([_tmp, '\n\n'])
+        return ret
+
+
+def convert(input, output, include_function_definition=True, quiet=False):
+    p = Doxy2SWIG(input, include_function_definition, quiet)
+    p.generate()
+    #p.pieces=[str(i) for i in p.pieces]
+    #print p.pieces
+    p.write(output)
+    p.remove_trailing_spaces(output)
+
+def main():
+    usage = __doc__
+    parser = optparse.OptionParser(usage)
+    parser.add_option("-n", '--no-function-definition',
+                      action='store_true',
+                      default=False,
+                      dest='func_def',
+                      help='do not include doxygen function definitions')
+    parser.add_option("-q", '--quiet',
+                      action='store_true',
+                      default=False,
+                      dest='quiet',
+                      help='be quiet and minimize output')
+
+    options, args = parser.parse_args()
+    if len(args) != 2:
+        parser.error("error: no input and output specified")
+
+    convert(args[0], args[1], not options.func_def, options.quiet)
+
+
+if __name__ == '__main__':
+    main()
diff --git a/plugins/dali-swig/SWIG/doxygen/scripts/doxy2swig_struct.py_ b/plugins/dali-swig/SWIG/doxygen/scripts/doxy2swig_struct.py_
new file mode 100755 (executable)
index 0000000..4e5580b
--- /dev/null
@@ -0,0 +1,635 @@
+#!/usr/bin/env python
+"""Doxygen XML to SWIG docstring converter.
+
+Usage:
+
+  doxy2swig.py [options] input.xml output.i
+
+Converts Doxygen generated XML files into a file containing docstrings
+that can be used by SWIG-1.3.x.  Note that you need to get SWIG
+version > 1.3.23 or use Robin Dunn's docstring patch to be able to use
+the resulting output.
+
+input.xml is your doxygen generated XML file and output.i is where the
+output will be written (the file will be clobbered).
+
+"""
+######################################################################
+#
+# This code is implemented using Mark Pilgrim's code as a guideline:
+#   http://www.faqs.org/docs/diveintopython/kgp_divein.html
+#
+# Author: Prabhu Ramachandran
+# License: BSD style
+#
+# Thanks:
+#   Johan Hake:  the include_function_definition feature
+#   Bill Spotz:  bug reports and testing.
+#   Sebastian Henschel:   Misc. enhancements.
+#
+######################################################################
+
+from xml.dom import minidom
+import re
+import textwrap
+import sys
+import types
+import os.path
+import optparse
+import os
+
+def my_open_read(source):
+    if hasattr(source, "read"):
+        return source
+    else:
+        return open(source)
+
+def my_open_write(dest):
+    if hasattr(dest, "write"):
+        return dest
+    else:
+        return open(dest, 'w')
+
+
+class Doxy2SWIG:
+    """Converts Doxygen generated XML files into a file containing
+    docstrings that can be used by SWIG-1.3.x that have support for
+    feature("docstring").  Once the data is parsed it is stored in
+    self.pieces.
+
+    """
+
+    def __init__(self, src, include_function_definition=True, quiet=False):
+        """Initialize the instance given a source object.  `src` can
+        be a file or filename.  If you do not want to include function
+        definitions from doxygen then set
+        `include_function_definition` to `False`.  This is handy since
+        this allows you to use the swig generated function definition
+        using %feature("autodoc", [0,1]).
+
+        """
+        f = my_open_read(src)
+        self.my_dir = os.path.dirname(f.name)
+        self.xmldoc = minidom.parse(f).documentElement
+        f.close()
+
+        self.pieces = []
+        self.pieces.append('\n// File: %s\n'%\
+                           os.path.basename(f.name))
+
+        self.space_re = re.compile(r'\s+')
+        self.lead_spc = re.compile(r'^(%feature\S+\s+\S+\s*?)"\s+(\S)')
+        self.multi = 0
+        self.ignores = ['inheritancegraph', 'param', 'listofallmembers',
+                        'innerclass', 'name', 'declname', 'incdepgraph',
+                        'invincdepgraph', 'type',
+                        'references', 'referencedby', 'location',
+                        'collaborationgraph', 'reimplements',
+                        'reimplementedby', 'derivedcompoundref',
+                        'basecompoundref', 'initializer']
+        #self.generics = []
+        self.include_function_definition = include_function_definition
+        if not include_function_definition:
+            self.ignores.append('argsstring')
+
+        self.quiet = quiet
+        self.list_ctr = 1  #counts the number of spaces to be displayed before displaying a list item
+        self.simplesect_kind = ''
+        self.para_kind = ''
+        self.cdef_data = ''
+
+    def generate(self):
+        """Parses the file set in the initialization.  The resulting
+        data is stored in `self.pieces`.
+
+        """
+        self.parse(self.xmldoc)
+
+    def parse(self, node):
+        """Parse a given node.  This function in turn calls the
+        `parse_<nodeType>` functions which handle the respective
+        nodes.
+
+        """
+        pm = getattr(self, "parse_%s"%node.__class__.__name__)
+        pm(node)
+
+    def parse_Document(self, node):
+        #print("himanshu ::::::: parse Document... ")
+        self.parse(node.documentElement)
+
+    def parse_Text(self, node):
+        #print("himanshu ::::::: parse Text... ")
+        txt = node.data
+        #txt = txt.replace('\\', r'\\\\')
+        txt = txt.replace('"', r'\"')
+        print '--------------------------------------'
+        print '--------------------------------------'
+        print txt
+        # ignore pure whitespace
+        m = self.space_re.match(txt)
+        if m and len(m.group()) == len(txt):
+            pass
+        else:
+            #self.add_text(txt)
+            t = textwrap.fill(txt, 100, break_long_words=False)
+            print 'HIMANSHU ---------- >>>>>>>>>>>>>>>>>>>>> '
+            print t
+            t = t.replace('\n','\n* '+' '*(self.list_ctr+2))
+            #t = t.replace('1234',' '*self.list_ctr)
+            if t:
+                self.add_line = 1
+            self.add_text(t)
+
+    def parse_Element(self, node):
+        """Parse an `ELEMENT_NODE`.  This calls specific
+        `do_<tagName>` handers for different elements.  If no handler
+        is available the `generic_parse` method is called.  All
+        tagNames specified in `self.ignores` are simply ignored.
+
+        """
+        #print("himanshu ::::::: parse Element... ")
+        name = node.tagName
+        ignores = self.ignores
+        if name in ignores:
+            return
+        attr = "do_%s" % name
+        if hasattr(self, attr):
+            handlerMethod = getattr(self, attr)
+            handlerMethod(node)
+        else:
+            self.generic_parse(node)
+            #if name not in self.generics: self.generics.append(name)
+
+    def parse_Comment(self, node):
+        """Parse a `COMMENT_NODE`.  This does nothing for now."""
+        return
+
+    def add_text(self, value):
+        """Adds text corresponding to `value` into `self.pieces`."""
+        print value
+        if type(value) in (types.ListType, types.TupleType):
+            self.pieces.extend(value)
+        else:
+            self.pieces.append(value)
+
+    def get_specific_nodes(self, node, names):
+        """Given a node and a sequence of strings in `names`, return a
+        dictionary containing the names as keys and child
+        `ELEMENT_NODEs`, that have a `tagName` equal to the name.
+
+        """
+        nodes = [(x.tagName, x) for x in node.childNodes \
+                 if x.nodeType == x.ELEMENT_NODE and \
+                 x.tagName in names]
+        return dict(nodes)
+
+    def generic_parse(self, node, pad=0):
+        """A Generic parser for arbitrary tags in a node.
+
+        Parameters:
+
+         - node:  A node in the DOM.
+         - pad: `int` (default: 0)
+
+           If 0 the node data is not padded with newlines.  If 1 it
+           appends a newline after parsing the childNodes.  If 2 it
+           pads before and after the nodes are processed.  Defaults to
+           0.
+
+        """
+        npiece = 0
+        if pad:
+            npiece = len(self.pieces)
+        if pad == 2:
+            self.add_text('\n* ')
+        for n in node.childNodes:
+            self.parse(n)
+        if pad:
+            #if len(self.pieces) > npiece:
+            self.add_text('\n* ')
+
+    def space_parse(self, node):
+        self.add_text(' ')
+        self.generic_parse(node)
+
+    def do_compoundname(self, node):
+        self.add_text('\n\n')
+        data = node.firstChild.data
+        #self.add_text('%feature("docstring") %s "\n'%data)
+        self.add_text('%typemap(csclassmodifiers) ')
+        self.add_text('%s\n"\n/**\n'%data)
+        self.cdef_data = data
+
+    def do_compounddef(self, node):
+        kind = node.attributes['kind'].value
+        if kind in ('class', 'struct'):
+            prot = node.attributes['prot'].value
+            if prot <> 'public':
+                return
+            names = ('compoundname', 'briefdescription',
+                     'detaileddescription', 'includes')
+            first = self.get_specific_nodes(node, names)
+            for n in names:
+                if first.has_key(n):
+                    self.parse(first[n])
+            #self.add_text(['";','\n'])
+            self.add_text(['*/','\n','%s %s ";'%(prot,'class'),'\n'])
+            for n in node.childNodes:
+                if n not in first.values():
+                    self.parse(n)
+        elif kind in ('file', 'namespace'):
+            nodes = node.getElementsByTagName('sectiondef')
+            for n in nodes:
+                self.parse(n)
+
+    def do_includes(self, node):
+        self.add_text('\n* @include ')
+        self.generic_parse(node, pad=1)
+
+    def do_parameterlist(self, node):
+
+        print("himanshu ::::::::::  do_parameterlist")
+        text='unknown'
+        for key, val in node.attributes.items():
+            """if key == 'kind':
+                if val == 'param': text = 'Parameters'
+                elif val == 'exception': text = 'Exceptions'
+                else: text = val
+                break"""
+            if key == 'kind':
+                if val == 'param': text = '@param'
+                elif val == 'exception': text = '@exception'
+                else: text = val
+                break
+        #self.add_text(['\n', '\n', text, ':', '\n'])
+        #self.add_text(['\n', '* ', text])
+        self.para_kind = text
+        self.generic_parse(node, pad=0)
+
+    def do_para(self, node):
+        print("himanshu :::::::: do_para ")
+        #self.add_text(['\n'])
+        self.generic_parse(node, pad=0)
+
+    def do_parametername(self, node):
+        print("himanshu :::::::: do_parametername")
+        self.add_text(['\n', '* ', self.para_kind])
+
+        try:
+            data=node.firstChild.data
+        except AttributeError: # perhaps a <ref> tag in it
+            data=node.firstChild.firstChild.data
+        if data.find('Exception') != -1:
+            print("himanshu :::::::: Pronting DAta1")
+            print data
+            self.add_text(data)
+        else:
+            print("himanshu :::::::: Pronting DAta2")
+            print data
+            for key, val in node.attributes.items():
+                if key == 'direction':
+                    self.add_text('[%s] '%val)
+            self.add_text("%s "%data)
+
+    def do_parameterdefinition(self, node):
+        self.generic_parse(node, pad=1)
+
+    def do_detaileddescription(self, node):
+        #self.add_text('')
+        self.generic_parse(node, pad=0)
+
+    def do_briefdescription(self, node):
+        #self.add_text("* @brief ")
+        self.generic_parse(node, pad=0)
+
+    def do_memberdef(self, node):
+        prot = node.attributes['prot'].value
+        id = node.attributes['id'].value
+        kind = node.attributes['kind'].value
+        tmp = node.parentNode.parentNode.parentNode
+        compdef = tmp.getElementsByTagName('compounddef')[0]
+        cdef_kind = compdef.attributes['kind'].value
+        print('Himanshu :: ...... Memberdef........')
+        print('prot= %s ....., id= %s ....., kind= %s..... ,cdef_kind= %s'%(prot,id,kind,cdef_kind))
+
+        if prot == 'public':
+            print('Entering here')
+            first = self.get_specific_nodes(node, ('definition', 'name'))
+            print first
+            name = first['name'].firstChild.data
+            print name
+            if name[:8] == 'operator': # Don't handle operators yet.
+                return
+            print('Entering here2')
+
+            # For ENUMS
+            if kind == 'enum':
+                #print('himanshu is in enum now')
+                """self.add_text('\n\n')
+                data = node.firstChild.data
+                self.add_text('%csattributes ')
+                self.add_text('%s\n"\n/**\n'%data)"""
+                self.generic_parse(node, pad=0)
+
+            ##################################################
+            # For Classes & Functions
+            if not first.has_key('definition') or \
+                   kind in ['variable', 'typedef']:
+                return
+            print('Entering here3')
+
+            if self.include_function_definition:
+                defn = first['definition'].firstChild.data
+            else:
+                defn = ""
+            self.add_text('\n')
+            briefd = node.getElementsByTagName('briefdescription');
+            if kind == 'function' and briefd[0].firstChild.nodeValue == '\n':  # first node value if briefdescription exists will be always \n
+                print('Entering here4')
+                self.add_text('%csmethodmodifiers ')
+
+                anc = node.parentNode.parentNode
+                if cdef_kind in ('file', 'namespace'):
+                    ns_node = anc.getElementsByTagName('innernamespace')
+                    if not ns_node and cdef_kind == 'namespace':
+                        ns_node = anc.getElementsByTagName('compoundname')
+                    if ns_node:
+                        ns = ns_node[0].firstChild.data
+                        print("himanshu ::::::   do_memberdef....ns_node")
+                        self.add_text(' %s::%s "\n%s'%(ns, name, defn))
+                    else:
+                        print("himanshu ::::::   do_memberdef....else")
+                        print name
+                        print("++++++++++++++++++++++++++++")
+                        print defn
+                        self.add_text(name)
+                        self.add_text(' \"')
+                        self.add_text('\n')
+                        self.add_text('/**\n')
+                elif cdef_kind in ('class', 'struct'):
+                    # Get the full function name.
+                    anc_node = anc.getElementsByTagName('compoundname')
+                    cname = anc_node[0].firstChild.data
+                    print("himanshu ::::::   do_memberdef...class/struct")
+                    self.add_text([' %s::%s'%(cname, name)])
+                    self.add_text(['\n','"\n/**\n'])
+
+                for n in node.childNodes:
+                    if n not in first.values():
+                        self.parse(n)
+                self.add_text(['\n','*/','\n','%s ";'%prot,'\n'])
+
+    def do_definition(self, node):
+        print("himanshu ::::::   do_definition")
+        data = node.firstChild.data
+        self.add_text('%s "\n%s'%(data, data))
+
+    def do_sectiondef(self, node):
+        print('Himanshu : ........SectionDef ........')
+        kind = node.attributes['kind'].value
+        print('kind = %s'%kind)
+        if kind in ('public-func', 'func', 'user-defined', 'public-type', ''):
+            self.generic_parse(node)
+
+    def do_header(self, node):
+        """For a user defined section def a header field is present
+        which should not be printed as such, so we comment it in the
+        output."""
+        data = node.firstChild.data
+        self.add_text('\n/*\n %s \n*/\n'%data)
+        # If our immediate sibling is a 'description' node then we
+        # should comment that out also and remove it from the parent
+        # node's children.
+        parent = node.parentNode
+        idx = parent.childNodes.index(node)
+        if len(parent.childNodes) >= idx + 2:
+            nd = parent.childNodes[idx+2]
+            if nd.nodeName == 'description':
+                nd = parent.removeChild(nd)
+                self.add_text('\n/*')
+                self.generic_parse(nd)
+                self.add_text('\n*/\n')
+
+    def do_parse_sect(self, node, kind):
+        if kind in ('date', 'rcs', 'version'):
+            pass
+        elif kind == 'warning':
+            self.add_text(['\n', '* @warning '])
+            self.generic_parse(node,pad=0)
+        elif kind == 'see':
+            self.add_text('\n')
+            self.add_text('* @see ')
+            self.generic_parse(node,pad=0)
+        elif kind == 'return':
+            self.add_text('\n')
+            self.add_text('* @return ')
+            self.generic_parse(node,pad=0)
+        elif kind == 'pre':
+            self.add_text('\n')
+            self.add_text('* @pre ')
+            self.generic_parse(node,pad=0)
+        elif kind == 'note':
+            self.add_text('\n')
+            self.add_text('* @note ')
+            self.generic_parse(node,pad=0)
+        elif kind == 'post':
+            self.add_text('\n')
+            self.add_text('* @post ')
+            self.generic_parse(node,pad=0)
+        else:
+            self.add_text('\n')
+            self.generic_parse(node,pad=0)
+
+    def do_simplesect(self, node):
+        kind = node.attributes['kind'].value
+        self.simplesect_kind = kind
+        self.do_parse_sect(node, kind)
+        self.simplesect_kind = ''
+
+    def do_simplesectsep(self, node):
+        #tmp = node.parentnode
+        self.do_parse_sect(node, self.simplesect_kind)
+
+    def do_argsstring(self, node):
+        #self.generic_parse(node, pad=1)
+        x = 0
+
+    def do_member(self, node):
+        kind = node.attributes['kind'].value
+        refid = node.attributes['refid'].value
+        if kind == 'function' and refid[:9] == 'namespace':
+            self.generic_parse(node)
+
+    def do_doxygenindex(self, node):
+        self.multi = 1
+        comps = node.getElementsByTagName('compound')
+        for c in comps:
+            refid = c.attributes['refid'].value
+            fname = refid + '.xml'
+            if not os.path.exists(fname):
+                fname = os.path.join(self.my_dir,  fname)
+            if not self.quiet:
+                print "parsing file: %s"%fname
+            p = Doxy2SWIG(fname, self.include_function_definition, self.quiet)
+            p.generate()
+            self.pieces.extend(self.clean_pieces(p.pieces))
+
+    def do_emphasis(self,node):
+        self.add_text('\n* <i> ')
+        self.generic_parse(node,pad=0)
+        self.add_text(' </i>')
+
+    def do_heading(self,node):
+        level = node.attributes['level'].value
+        self.add_text('\n* <h%s> '%level)
+        self.generic_parse(node,pad=0)
+        self.add_text(' </h%s>\n* '%level)
+
+    def do_itemizedlist(self, node):
+        self.add_text(['\n* '])
+        self.list_ctr = self.list_ctr + 2
+        #self.firstListItem = self.firstListItem + 1
+        self.generic_parse(node, pad=0)
+        self.list_ctr = self.list_ctr - 2
+
+    def do_listitem(self, node):
+        #self.add_text('\n'* (self.firstListItem-1))
+        #self.firstlistItem = self.firstListItem - 1
+        self.add_text(' ' * self.list_ctr)
+        self.add_text('- ')
+        self.generic_parse(node, pad=0)
+
+    def do_programlisting(self, node):
+        self.add_text(['\n* '])
+        self.add_text(' ' * (self.list_ctr+2))
+        self.add_text('@code\n*')
+        self.generic_parse(node, pad=0)
+        self.add_text(' ' * (self.list_ctr+2))
+        self.add_text('@endcode\n*')
+
+    def do_codeline(self, node):
+        self.add_text(' ' * (self.list_ctr+2))
+        self.generic_parse(node, pad=1)
+
+    def do_highlight(self, node):
+        cl = node.attributes['class'].value
+        self.add_text(' ')
+        #if cl == 'normal':
+        self.generic_parse(node, pad=0)
+
+    def do_sp(self, node):
+        self.add_text(' ')
+
+    """def do_table(self, node);
+        rows = node.attributes['rows'].value
+        cols = node.attributes['cols'].value"""
+
+    def do_enumvalue(self, node):
+        self.add_text('\n\n')
+        #data = node.firstChild.nodeValue
+        name = node.getElementsByTagName('name')
+        data = name[0].firstChild.data
+        print('Entering ENUM VALUE')
+        print(data)
+        self.add_text('%csattributes ')
+        self.add_text('%s::%s\n"\n///< '%(self.cdef_data,data))
+        self.generic_parse(node, pad=0)
+        self.add_text('\n"')
+
+    def write(self, fname):
+        o = my_open_write(fname)
+        if self.multi or 1:
+            o.write("".join(self.pieces))
+        else:
+            o.write("".join(self.clean_pieces(self.pieces)))
+        o.close()
+
+    def remove_trailing_spaces(self, fname):
+        clean_lines = []
+        with open(fname) as o:
+            line = o.readlines()
+            clean_lines = [l.strip() for l in line if l.strip()]
+
+        with open('temp','w+') as f:
+            f.writelines('\n'.join(clean_lines))
+
+        f.close()
+        """with open('temp','r+') as f:
+            text = f.read()
+        f.close()
+        t = textwrap.fill(text, 100, break_long_words=False)
+        t = t.replace('\n','\n* '+' '*(self.list_ctr+2))
+        #t = t.replace('1234',' '*self.list_ctr)
+        with open('temp','w+') as f:
+            f.write(t)
+        """
+        os.rename('temp',fname)
+        f.close()
+
+    def clean_pieces(self, pieces):
+        """Cleans the list of strings given as `pieces`.  It replaces
+        multiple newlines by a maximum of 2 and returns a new list.
+        It also wraps the paragraphs nicely.
+        """
+        ret = []
+        count = 0
+        for i in pieces:
+            if i == '\n':
+                count = count + 1
+            else:
+                if i == '";':
+                    if count:
+                        ret.append('\n')
+                elif count > 2:
+                    ret.append('\n\n')
+                elif count:
+                    ret.append('\n'*count)
+                count = 0
+                ret.append(i)
+
+        _data = "".join(ret)
+        ret = []
+        for i in _data.split('\n\n'):
+            if i == 'Parameters:' or i == 'Exceptions:':
+                ret.extend([i, '\n-----------', '\n\n'])
+            elif i.find('// File:') > -1: # leave comments alone.
+                ret.extend([i, '\n'])
+            else:
+                _tmp = textwrap.fill(i.strip(), break_long_words=False)
+                _tmp = self.lead_spc.sub(r'\1"\2', _tmp)
+                ret.extend([_tmp, '\n\n'])
+        return ret
+
+
+def convert(input, output, include_function_definition=True, quiet=False):
+    p = Doxy2SWIG(input, include_function_definition, quiet)
+    p.generate()
+    p.pieces=[str(i) for i in p.pieces]
+    print p.pieces
+    p.write(output)
+    p.remove_trailing_spaces(output)
+
+def main():
+    usage = __doc__
+    parser = optparse.OptionParser(usage)
+    parser.add_option("-n", '--no-function-definition',
+                      action='store_true',
+                      default=False,
+                      dest='func_def',
+                      help='do not include doxygen function definitions')
+    parser.add_option("-q", '--quiet',
+                      action='store_true',
+                      default=False,
+                      dest='quiet',
+                      help='be quiet and minimize output')
+
+    options, args = parser.parse_args()
+    if len(args) != 2:
+        parser.error("error: no input and output specified")
+
+    convert(args[0], args[1], not options.func_def, options.quiet)
+
+
+if __name__ == '__main__':
+    main()
diff --git a/plugins/dali-swig/SWIG/doxygen/scripts/genDoxy.sh b/plugins/dali-swig/SWIG/doxygen/scripts/genDoxy.sh
new file mode 100755 (executable)
index 0000000..5d9105b
--- /dev/null
@@ -0,0 +1,28 @@
+########################################################################
+#                                                                      #
+# This script takes all the class*.xml, struct*.xml and namespace*.xml #
+# generated & use them to generate .i files which can be added to      #
+# dali.i for generation of doxygen comments for corresponding C# files #
+#                                                                      #
+########################################################################
+
+#PATH="../../"
+# DoxyComments for class*.xml files in the folder
+for file in class*.xml; do
+  suffix=".xml"
+  python doxy2swig_class.py "$file" "${file%$suffix}.i" > temp_version;
+done
+
+
+# DoxyComments for struct*.xml files in the folder
+for file in struct*.xml; do
+  suffix=".xml"
+  python doxy2swig_struct.py "$file" "${file%$suffix}.i" > temp_version;
+done
+
+
+# DoxyComments for namespace*.xml files in the folder
+for file in namespace*.xml; do
+  suffix=".xml"
+  python doxy2swig_namespace.py "$file" "${file%$suffix}.i" > temp_version;
+done
index 64e070d..34a6a51 100644 (file)
       * @brief Event arguments that passed via ActionScroll signal
       *
       */
+/*
+    // To be replaced by a new event that takes Touch
     public class ActionScrollEventArgs : EventArgs
     {
       private AccessibilityManager _accessibilityManager;
         }
       }
     }
+*/
 
     /**
       * @brief Event arguments that passed via ActionPageUp signal
     private DaliEventHandlerWithReturnType<object,ActionStartStopEventArgs,bool> _accessibilityManagerActionStartStopEventHandler;
     private ActionStartStopEventCallbackDelegate _accessibilityManagerActionStartStopEventCallbackDelegate;
 
+/*
+    // To be replaced by a new event that takes Touch
     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
     private delegate bool ActionScrollEventCallbackDelegate(IntPtr accessibilityManager, IntPtr touchEvent);
     private DaliEventHandlerWithReturnType<object,ActionScrollEventArgs,bool> _accessibilityManagerActionScrollEventHandler;
     private ActionScrollEventCallbackDelegate _accessibilityManagerActionScrollEventCallbackDelegate;
+*/
 
     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
     private delegate void FocusChangedEventCallbackDelegate(IntPtr actor1, IntPtr actor2);
       return false;
     }
 
+/*
+    // To be replaced by a new event that takes Touch
     public event DaliEventHandlerWithReturnType<object,ActionScrollEventArgs,bool> ActionScroll
     {
       add
       }
       return false;
     }
+*/
 
     public event DaliEventHandler<object,FocusChangedEventArgs> FocusChanged
     {
index f65e658..138120a 100755 (executable)
       }
     }
 
+    public int SiblingOrder
+    {
+      get
+      {
+        int temp = 0;
+        GetProperty( Actor.Property.SIBLING_ORDER).Get( ref temp );
+        return temp;
+      }
+      set
+      {
+        SetProperty( Actor.Property.SIBLING_ORDER, new Dali.Property.Value( value ) );
+      }
+    }
+
     public void Show()
     {
       SetVisible(true);
     {
       SetVisible(false);
     }
-
 %}
 
 %enddef
index bc81dec..3db23f4 100644 (file)
 
     public static Application NewApplication(string stylesheet, Application.WINDOW_MODE windowMode) {
 
+      // register all Views with the type registry, so that can be created / styled via JSON
+      ViewRegistryHelper.Initialize();
+
       Application ret = New(1, stylesheet, windowMode);
       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
index db58063..268b7d7 100644 (file)
       }
     }
 
+    ///
+  public void LoadFromFile( string fileName )
+  {
+    try
+    {
+      string json = System.IO.File.ReadAllText( fileName );
+      if( json.Length > 0 )
+      {
+        LoadFromString( json );
+      }
+      else
+      {
+        throw new global::System.InvalidOperationException("Failed to load file " +fileName);
+
+      }
+    }
+    catch ( System.Exception e)
+    {
+      throw new global::System.InvalidOperationException("Failed to parse " +fileName);
+    }
+  }
+
+
     %}
     %enddef
 
index bfef5ad..7dbf6af 100644 (file)
@@ -312,6 +312,159 @@ public class StateChangedEventArgs : EventArgs
     return ret;
   }
 
+  public Dali.Property.Map UnselectedVisual
+  {
+    get
+    {
+      Dali.Property.Map temp = new Dali.Property.Map();
+      GetProperty( Button.Property.UNSELECTED_VISUAL).Get(  temp );
+      return temp;
+    }
+    set
+    {
+      SetProperty( Button.Property.UNSELECTED_VISUAL, new Dali.Property.Value( value ) );
+    }
+  }
+
+  public Dali.Property.Map SelectedVisual
+  {
+    get
+    {
+      Dali.Property.Map temp = new Dali.Property.Map();
+      GetProperty( Button.Property.SELECTED_VISUAL).Get(  temp );
+      return temp;
+    }
+    set
+    {
+      SetProperty( Button.Property.SELECTED_VISUAL, new Dali.Property.Value( value ) );
+    }
+  }
+
+  public Dali.Property.Map DisabledSelectedVisual
+  {
+    get
+    {
+      Dali.Property.Map temp = new Dali.Property.Map();
+      GetProperty( Button.Property.DISABLED_SELECTED_VISUAL).Get(  temp );
+      return temp;
+    }
+    set
+    {
+      SetProperty( Button.Property.DISABLED_SELECTED_VISUAL, new Dali.Property.Value( value ) );
+    }
+  }
+
+  public Dali.Property.Map DisabledUnselectedVisual
+  {
+    get
+    {
+      Dali.Property.Map temp = new Dali.Property.Map();
+      GetProperty( Button.Property.DISABLED_UNSELECTED_VISUAL).Get(  temp );
+      return temp;
+    }
+    set
+    {
+      SetProperty( Button.Property.DISABLED_UNSELECTED_VISUAL, new Dali.Property.Value( value ) );
+    }
+  }
+
+  public Dali.Property.Map UnselectedBackgroundVisual
+  {
+    get
+    {
+      Dali.Property.Map temp = new Dali.Property.Map();
+      GetProperty( Button.Property.UNSELECTED_BACKGROUND_VISUAL).Get(  temp );
+      return temp;
+    }
+    set
+    {
+      SetProperty( Button.Property.UNSELECTED_BACKGROUND_VISUAL, new Dali.Property.Value( value ) );
+    }
+  }
+
+  public Dali.Property.Map SelectedBackgroundVisual
+  {
+    get
+    {
+      Dali.Property.Map temp = new Dali.Property.Map();
+      GetProperty( Button.Property.SELECTED_BACKGROUND_VISUAL).Get(  temp );
+      return temp;
+    }
+    set
+    {
+      SetProperty( Button.Property.SELECTED_BACKGROUND_VISUAL, new Dali.Property.Value( value ) );
+    }
+  }
+
+  public Dali.Property.Map DisabledUnselectedBackgroundVisual
+  {
+    get
+    {
+      Dali.Property.Map temp = new Dali.Property.Map();
+      GetProperty( Button.Property.DISABLED_UNSELECTED_BACKGROUND_VISUAL).Get(  temp );
+      return temp;
+    }
+    set
+    {
+      SetProperty( Button.Property.DISABLED_UNSELECTED_BACKGROUND_VISUAL, new Dali.Property.Value( value ) );
+    }
+  }
+
+  public Dali.Property.Map DisabledSelectedBackgroundVisual
+  {
+    get
+    {
+      Dali.Property.Map temp = new Dali.Property.Map();
+      GetProperty( Button.Property.DISABLED_SELECTED_BACKGROUND_VISUAL).Get(  temp );
+      return temp;
+    }
+    set
+    {
+      SetProperty( Button.Property.DISABLED_SELECTED_BACKGROUND_VISUAL, new Dali.Property.Value( value ) );
+    }
+  }
+
+  public string LabelRelativeAlignment
+  {
+    get
+    {
+      string temp;
+      GetProperty( Button.Property.LABEL_RELATIVE_ALIGNMENT).Get( out temp );
+      return temp;
+    }
+    set
+    {
+      SetProperty( Button.Property.LABEL_RELATIVE_ALIGNMENT, new Dali.Property.Value( value ) );
+    }
+  }
+
+  public Vector4 LabelPadding
+  {
+    get
+    {
+      Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
+      GetProperty( Button.Property.LABEL_PADDING).Get(  temp );
+      return temp;
+    }
+    set
+    {
+      SetProperty( Button.Property.LABEL_PADDING, new Dali.Property.Value( value ) );
+    }
+  }
+
+  public Vector4 VisualPadding
+  {
+    get
+    {
+      Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
+      GetProperty( Button.Property.VISUAL_PADDING).Get(  temp );
+      return temp;
+    }
+    set
+    {
+      SetProperty( Button.Property.VISUAL_PADDING, new Dali.Property.Value( value ) );
+    }
+  }
 %}
 %enddef
 
index 9d32da5..8e13349 100755 (executable)
@@ -27,7 +27,6 @@
 %define CONTROL_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
   %typemap(cscode) NameSpace::ClassName %{
 
-
     /**
      * @brief Event arguments that passed via KeyInputFocusGained signal
      *
     }
 
     /**
-     * @brief Event arguments that passed via KeyEvent signal
+     * @brief Event arguments that passed via Key signal
      *
      */
     public class KeyEventArgs : EventArgs
     {
       private View _view;
-      private KeyEvent _keyEvent;
+      private Key _key;
 
       /**
-       * @brief View - is the view that recieves the keyevent.
+       * @brief View - is the view that recieves the key.
        *
        */
       public View View
       }
 
       /**
-       * @brief KeyEvent - is the keyevent sent to the View.
+       * @brief Key - is the key sent to the View.
        *
        */
-      public KeyEvent KeyEvent
+      public Key Key
       {
         get
         {
-          return _keyEvent;
+          return _key;
         }
         set
         {
-          _keyEvent = value;
+          _key = value;
         }
       }
     }
     public class TouchEventArgs : EventArgs
     {
        private View _view;
-       private TouchData _touchData;
+       private Touch _touch;
 
       /**
         * @brief View - is the view that is being touched
       }
 
       /**
-        * @brief TouchData - contains the information of touch points
+        * @brief Touch - contains the information of touch points
         *
         */
-      public TouchData TouchData
+      public Touch Touch
       {
         get
         {
-          return _touchData;
+          return _touch;
         }
         set
         {
-          _touchData = value;
+          _touch = value;
         }
       }
     }
       */
     public class HoverEventArgs : EventArgs
     {
-    private View _view;
-    private HoverEvent _hoverEvent;
+       private View _view;
+       private Hover _hover;
 
       /**
         * @brief View - is the view that is being hovered
       }
 
       /**
-        * @brief HoverEvent - contains touch points that represent the points
+        * @brief Hover - contains touch points that represent the points
         * that are currently being hovered or the points where a hover has stopped
         *
         */
-      public HoverEvent HoverEvent
+      public Hover Hover
       {
         get
         {
-          return _hoverEvent;
+          return _hover;
         }
         set
         {
-          _hoverEvent = value;
+          _hover = value;
         }
       }
     }
       */
     public class WheelEventArgs : EventArgs
     {
-    private View _view;
-    private WheelEvent _wheelEvent;
+      private View _view;
+      private Wheel _wheel;
 
       /**
         * @brief View - is the view that is being wheeled
       }
 
       /**
-        * @brief WheelEvent - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
+        * @brief Wheel - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
         *
         */
-      public WheelEvent WheelEvent
+      public Wheel Wheel
       {
         get
         {
-          return _wheelEvent;
+          return _wheel;
         }
         set
         {
-          _wheelEvent = value;
+          _wheel = value;
         }
       }
     }
     private KeyInputFocusLostCallbackDelegate _KeyInputFocusLostCallbackDelegate;
 
     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-    private delegate bool KeyCallbackDelegate(IntPtr control, IntPtr keyEvent);
-    private DaliEventHandlerWithReturnType<object,KeyEventArgs,bool> _KeyEventHandler;
+    private delegate bool KeyCallbackDelegate(IntPtr control, IntPtr key);
+    private DaliEventHandlerWithReturnType<object,KeyEventArgs,bool> _KeyHandler;
     private KeyCallbackDelegate _KeyCallbackDelegate;
 
     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
     private OnRelayoutEventCallbackDelegate _viewOnRelayoutEventCallbackDelegate;
 
     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-    private delegate bool TouchCallbackDelegate(IntPtr view, IntPtr touchData);
-    private DaliEventHandlerWithReturnType<object,TouchEventArgs,bool> _viewTouchDataEventHandler;
-    private TouchCallbackDelegate _viewTouchDataCallbackDelegate;
+    private delegate bool TouchCallbackDelegate(IntPtr view, IntPtr touch);
+    private DaliEventHandlerWithReturnType<object,TouchEventArgs,bool> _viewTouchHandler;
+    private TouchCallbackDelegate _viewTouchCallbackDelegate;
 
     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-    private delegate bool HoverEventCallbackDelegate(IntPtr view, IntPtr hoverEvent);
-    private DaliEventHandlerWithReturnType<object,HoverEventArgs,bool> _viewHoverEventHandler;
-    private HoverEventCallbackDelegate _viewHoverEventCallbackDelegate;
+    private delegate bool HoverCallbackDelegate(IntPtr view, IntPtr hover);
+    private DaliEventHandlerWithReturnType<object,HoverEventArgs,bool> _viewHoverHandler;
+    private HoverCallbackDelegate _viewHoverCallbackDelegate;
 
     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-    private delegate bool WheelEventCallbackDelegate(IntPtr view, IntPtr wheelEvent);
-    private DaliEventHandlerWithReturnType<object,WheelEventArgs,bool> _viewWheelEventHandler;
-    private WheelEventCallbackDelegate _viewWheelEventCallbackDelegate;
+    private delegate bool WheelCallbackDelegate(IntPtr view, IntPtr wheel);
+    private DaliEventHandlerWithReturnType<object,WheelEventArgs,bool> _viewWheelHandler;
+    private WheelCallbackDelegate _viewWheelCallbackDelegate;
 
     [UnmanagedFunctionPointer(CallingConvention.StdCall)]
     private delegate void OnStageEventCallbackDelegate(IntPtr control);
 
     /**
      * @brief Event for KeyInputFocusGained signal which can be used to subscribe/unsubscribe the event handler
-     * (in the type of KeyInputFocusGainedEventHandler-DaliEventHandler<object,KeyInputFocusGainedEventArgs>) 
+     * (in the type of KeyInputFocusGainedEventHandler-DaliEventHandler<object,KeyInputFocusGainedEventArgs>)
      * provided by the user. KeyInputFocusGained signal is emitted when the control gets Key Input Focus.
      */
     public event DaliEventHandler<object,KeyInputFocusGainedEventArgs> KeyInputFocusGained
           if (_KeyInputFocusGainedEventHandler == null)
           {
             _KeyInputFocusGainedEventHandler += value;
-            Console.WriteLine("View Keyevent EVENT Locked....");
+            Console.WriteLine("View Key EVENT Locked....");
             _KeyInputFocusGainedCallbackDelegate = new KeyInputFocusGainedCallbackDelegate(OnKeyInputFocusGained);
             this.KeyInputFocusGainedSignal().Connect(_KeyInputFocusGainedCallbackDelegate);
           }
     private void OnKeyInputFocusGained(IntPtr view)
     {
       KeyInputFocusGainedEventArgs e = new KeyInputFocusGainedEventArgs();
-      Console.WriteLine("View Keyevent ....");
+      Console.WriteLine("View Key ....");
       // Populate all members of "e" (KeyInputFocusGainedEventArgs) with real data
       e.View = Dali.View.GetViewFromPtr(view);
 
 
     /**
      * @brief Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler
-     * (in the type of KeyEventEventHandler-DaliEventHandlerWithReturnType<object,KeyEventArgs,bool>) 
+     * (in the type of KeyHandler-DaliEventHandlerWithReturnType<object,KeyEventArgs,bool>)
      * provided by the user. KeyPressed signal is emitted when key event is received.
      */
     public event DaliEventHandlerWithReturnType<object,KeyEventArgs,bool> KeyPressed
         lock(this)
         {
           // Restricted to only one listener
-          if (_KeyEventHandler == null)
+          if (_KeyHandler == null)
           {
-            _KeyEventHandler += value;
+            _KeyHandler += value;
 
-            _KeyCallbackDelegate = new KeyCallbackDelegate(OnKeyEvent);
+            _KeyCallbackDelegate = new KeyCallbackDelegate(OnKey);
             this.KeyEventSignal().Connect(_KeyCallbackDelegate);
           }
         }
       {
         lock(this)
         {
-          if (_KeyEventHandler != null)
+          if (_KeyHandler != null)
           {
             this.KeyEventSignal().Disconnect(_KeyCallbackDelegate);
           }
 
-          _KeyEventHandler -= value;
+          _KeyHandler -= value;
         }
       }
     }
 
-    private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
+    private bool OnKey(IntPtr view, IntPtr key)
     {
       KeyEventArgs e = new KeyEventArgs();
 
       // Populate all members of "e" (KeyEventArgs) with real data
       e.View = Dali.View.GetViewFromPtr(view);
-      e.KeyEvent = Dali.KeyEvent.GetKeyEventFromPtr(keyEvent);
+      e.Key = Dali.Key.GetKeyFromPtr(key);
 
-      if (_KeyEventHandler != null)
+      if (_KeyHandler != null)
       {
         //here we send all data to user event handlers
-        return _KeyEventHandler(this, e);
+        return _KeyHandler(this, e);
       }
       return false;
 
 
     /**
       * @brief Event for Touched signal which can be used to subscribe/unsubscribe the event handler
-      * (in the type of TouchEventHandler-DaliEventHandlerWithReturnType<object,TouchEventArgs,bool>)
+      * (in the type of TouchHandler-DaliEventHandlerWithReturnType<object,TouchEventArgs,bool>)
       * provided by the user. Touched signal is emitted when touch input is received.
       */
     public event DaliEventHandlerWithReturnType<object,TouchEventArgs,bool> Touched
         lock(this)
         {
           // Restricted to only one listener
-          if (_viewTouchDataEventHandler == null)
+          if (_viewTouchHandler == null)
           {
-            _viewTouchDataEventHandler += value;
+            _viewTouchHandler += value;
             Console.WriteLine("View Touch EVENT LOCKED....");
-            _viewTouchDataCallbackDelegate = new TouchCallbackDelegate(OnTouch);
-            this.TouchSignal().Connect(_viewTouchDataCallbackDelegate);
+            _viewTouchCallbackDelegate = new TouchCallbackDelegate(OnTouch);
+            this.TouchSignal().Connect(_viewTouchCallbackDelegate);
           }
         }
       }
       {
         lock(this)
         {
-          if (_viewTouchDataEventHandler != null)
+          if (_viewTouchHandler != null)
           {
-            this.TouchSignal().Disconnect(_viewTouchDataCallbackDelegate);
+            this.TouchSignal().Disconnect(_viewTouchCallbackDelegate);
           }
 
-          _viewTouchDataEventHandler -= value;
+          _viewTouchHandler -= value;
         }
       }
     }
 
     // Callback for View TouchSignal
-    private bool OnTouch(IntPtr view, IntPtr touchData)
+    private bool OnTouch(IntPtr view, IntPtr touch)
     {
       TouchEventArgs e = new TouchEventArgs();
       Console.WriteLine("View Touch EVENT....");
       // Populate all members of "e" (TouchEventArgs) with real data
       e.View = View.GetViewFromPtr(view);
-      e.TouchData = Dali.TouchData.GetTouchDataFromPtr(touchData);
+      e.Touch = Dali.Touch.GetTouchFromPtr(touch);
 
-      if (_viewTouchDataEventHandler != null)
+      if (_viewTouchHandler != null)
       {
         //here we send all data to user event handlers
-        return _viewTouchDataEventHandler(this, e);
+        return _viewTouchHandler(this, e);
       }
 
       return false;
 
     /**
       * @brief Event for Hovered signal which can be used to subscribe/unsubscribe the event handler
-      * (in the type of HoverEventHandler-DaliEventHandlerWithReturnType<object,HoverEventArgs,bool>)
+      * (in the type of HoverHandler-DaliEventHandlerWithReturnType<object,HoverEventArgs,bool>)
       * provided by the user. Hovered signal is emitted when hover input is received.
       */
     public event DaliEventHandlerWithReturnType<object,HoverEventArgs,bool> Hovered
         lock(this)
         {
           // Restricted to only one listener
-          if (_viewHoverEventHandler == null)
+          if (_viewHoverHandler == null)
           {
-            _viewHoverEventHandler += value;
+            _viewHoverHandler += value;
 
-            _viewHoverEventCallbackDelegate = new HoverEventCallbackDelegate(OnHoverEvent);
-            this.HoveredSignal().Connect(_viewHoverEventCallbackDelegate);
+            _viewHoverCallbackDelegate = new HoverCallbackDelegate(OnHover);
+            this.HoveredSignal().Connect(_viewHoverCallbackDelegate);
           }
         }
       }
       {
         lock(this)
         {
-          if (_viewHoverEventHandler != null)
+          if (_viewHoverHandler != null)
           {
-            this.HoveredSignal().Disconnect(_viewHoverEventCallbackDelegate);
+            this.HoveredSignal().Disconnect(_viewHoverCallbackDelegate);
           }
 
-          _viewHoverEventHandler -= value;
+          _viewHoverHandler -= value;
         }
       }
     }
 
     // Callback for View Hover signal
-    private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
+    private bool OnHover(IntPtr view, IntPtr hover)
     {
       HoverEventArgs e = new HoverEventArgs();
 
       // Populate all members of "e" (HoverEventArgs) with real data
       e.View = View.GetViewFromPtr(view);
-      e.HoverEvent = Dali.HoverEvent.GetHoverEventFromPtr(hoverEvent);
+      e.Hover = Dali.Hover.GetHoverFromPtr(hover);
 
-      if (_viewHoverEventHandler != null)
+      if (_viewHoverHandler != null)
       {
         //here we send all data to user event handlers
-        return _viewHoverEventHandler(this, e);
+        return _viewHoverHandler(this, e);
       }
 
       return false;
 
     /**
       * @brief Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler
-      * (in the type of WheelEventHandler-DaliEventHandlerWithReturnType<object,WheelEventArgs,bool>)
+      * (in the type of WheelHandler-DaliEventHandlerWithReturnType<object,WheelEventArgs,bool>)
       * provided by the user. WheelMoved signal is emitted when wheel event is received.
       */
     public event DaliEventHandlerWithReturnType<object,WheelEventArgs,bool> WheelMoved
         lock(this)
         {
           // Restricted to only one listener
-          if (_viewWheelEventHandler == null)
+          if (_viewWheelHandler == null)
           {
-            _viewWheelEventHandler += value;
+            _viewWheelHandler += value;
             Console.WriteLine("View Wheel EVENT LOCKED....");
-            _viewWheelEventCallbackDelegate = new WheelEventCallbackDelegate(OnWheelEvent);
-            this.WheelEventSignal().Connect(_viewWheelEventCallbackDelegate);
+            _viewWheelCallbackDelegate = new WheelCallbackDelegate(OnWheel);
+            this.WheelEventSignal().Connect(_viewWheelCallbackDelegate);
           }
         }
       }
       {
         lock(this)
         {
-          if (_viewWheelEventHandler != null)
+          if (_viewWheelHandler != null)
           {
-            this.WheelEventSignal().Disconnect(_viewWheelEventCallbackDelegate);
+            this.WheelEventSignal().Disconnect(_viewWheelCallbackDelegate);
           }
 
-          _viewWheelEventHandler -= value;
+          _viewWheelHandler -= value;
         }
       }
     }
 
     // Callback for View Wheel signal
-    private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
+    private bool OnWheel(IntPtr view, IntPtr wheel)
     {
       WheelEventArgs e = new WheelEventArgs();
       Console.WriteLine("View Wheel EVENT ....");
       // Populate all members of "e" (WheelEventArgs) with real data
       e.View = View.GetViewFromPtr(view);
-      e.WheelEvent = Dali.WheelEvent.GetWheelEventFromPtr(wheelEvent);
+      e.Wheel = Dali.Wheel.GetWheelFromPtr(wheel);
 
-      if (_viewWheelEventHandler != null)
+      if (_viewWheelHandler != null)
       {
         //here we send all data to user event handlers
-        return _viewWheelEventHandler(this, e);
+        return _viewWheelHandler(this, e);
       }
 
       return false;
       return ret;
     }
 
-    %}
+    public Dali.Property.Map Tooltip
+    {
+      get
+      {
+        Dali.Property.Map temp = new Dali.Property.Map();
+        GetProperty( View.Property.TOOLTIP).Get(  temp );
+        return temp;
+      }
+      set
+      {
+        SetProperty( View.Property.TOOLTIP, new Dali.Property.Value( value ) );
+      }
+    }
 
-    %enddef
+    public string TooltipText
+    {
+      set
+      {
+        SetProperty( View.Property.TOOLTIP, new Dali.Property.Value( value ) );
+      }
+    }
+ %}
+%enddef
 
 %define DALI_CONTROL_EVENTHANDLER_PARAM( NameSpace, ClassName)
 
   CONTROL_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
   CONTROL_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
 
-  %enddef
+%enddef
 
-  namespace Dali
+namespace Dali
 {
   DALI_CONTROL_EVENTHANDLER_PARAM( Dali::Toolkit, Control);
 }
diff --git a/plugins/dali-swig/SWIG/events/padding.i b/plugins/dali-swig/SWIG/events/padding.i
new file mode 100644 (file)
index 0000000..0fa03a6
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+%csmethodmodifiers Dali::Rect<float>::x "private";
+%csmethodmodifiers Dali::Rect<float>::y "private";
+%csmethodmodifiers Dali::Rect<float>::left "private";
+%csmethodmodifiers Dali::Rect<float>::right "private";
+%csmethodmodifiers Dali::Rect<float>::width "private";
+%csmethodmodifiers Dali::Rect<float>::bottom "private";
+%csmethodmodifiers Dali::Rect<float>::height "private";
+%csmethodmodifiers Dali::Rect<float>::top "private";
+%ignore Dali::Rect<float>::IsEmpty;
+%ignore Dali::Rect<float>::Left;
+%ignore Dali::Rect<float>::Right;
+%ignore Dali::Rect<float>::Top;
+%ignore Dali::Rect<float>::Bottom;
+%ignore Dali::Rect<float>::Area;
+%ignore Dali::Rect<float>::Intersects;
+%ignore Dali::Rect<float>::Contains;
+
+%define DALI_PADDINGTYPE_PROPERTY_PARAM(NameSpace,ClassName)
+  %typemap(cscode) NameSpace::ClassName %{
+    public static bool operator ==(PaddingType a, PaddingType b)
+    {
+        // If both are null, or both are same instance, return true.
+        if (System.Object.ReferenceEquals(a, b))
+        {
+            return true;
+        }
+
+        // If one is null, but not both, return false.
+        if (((object)a == null) || ((object)b == null))
+        {
+            return false;
+        }
+
+        // Return true if the fields match:
+        return ( System.Math.Abs( a.Left - b.Left ) < NDalic.GetRangedEpsilon(a.Left, b.Left) )&&
+               ( System.Math.Abs( a.Right - b.Right ) < NDalic.GetRangedEpsilon(a.Right, b.Right) )&&
+               ( System.Math.Abs( a.Bottom - b.Bottom ) < NDalic.GetRangedEpsilon(a.Bottom, b.Bottom) )&&
+               ( System.Math.Abs( a.Top - b.Top ) < NDalic.GetRangedEpsilon(a.Top, b.Top) );
+    }
+
+    public static bool operator !=(PaddingType a, PaddingType b)
+    {
+        return !(a == b);
+    }
+
+    ///< The Left value
+    public float Left
+    {
+        set
+        {
+            left = value;
+        }
+        get
+        {
+            return left;
+        }
+    }
+
+    ///< The Right value
+    public float Right
+    {
+        set
+        {
+            right = value;
+        }
+        get
+        {
+            return right;
+        }
+    }
+
+    ///< The Bottom value
+    public float Bottom
+    {
+        set
+        {
+            bottom = value;
+        }
+        get
+        {
+            return bottom;
+        }
+    }
+
+    ///< The Top value
+    public float Top
+    {
+        set
+        {
+            top = value;
+        }
+        get
+        {
+            return top;
+        }
+    }
+
+%}
+
+%enddef
+
+namespace Dali
+{
+  DALI_PADDINGTYPE_PROPERTY_PARAM( Dali, Rect<float>);
+}
diff --git a/plugins/dali-swig/SWIG/events/rectangle.i b/plugins/dali-swig/SWIG/events/rectangle.i
new file mode 100644 (file)
index 0000000..b9e9c95
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+%csmethodmodifiers Dali::Rect<int>::x "private";
+%csmethodmodifiers Dali::Rect<int>::y "private";
+%csmethodmodifiers Dali::Rect<int>::left "private";
+%csmethodmodifiers Dali::Rect<int>::right "private";
+%csmethodmodifiers Dali::Rect<int>::width "private";
+%csmethodmodifiers Dali::Rect<int>::bottom "private";
+%csmethodmodifiers Dali::Rect<int>::height "private";
+%csmethodmodifiers Dali::Rect<int>::top "private";
+
+%define DALI_RECTANGLE_PROPERTY_PARAM(NameSpace,ClassName)
+  %typemap(cscode) NameSpace::ClassName %{
+    public static bool operator ==(Rectangle a, Rectangle b)
+    {
+        // If both are null, or both are same instance, return true.
+        if (System.Object.ReferenceEquals(a, b))
+        {
+            return true;
+        }
+
+        // If one is null, but not both, return false.
+        if (((object)a == null) || ((object)b == null))
+        {
+            return false;
+        }
+
+        // Return true if the fields match:
+        return a.X == b.X && a.Y == b.Y && a.Width == b.Width && a.Height == b.Height;
+    }
+
+    public static bool operator !=(Rectangle a, Rectangle b)
+    {
+        return !(a == b);
+    }
+
+    ///< X position of the rectangle
+    public int X
+    {
+        set
+        {
+            x = value;
+        }
+        get
+        {
+            return x;
+        }
+    }
+
+    ///< Y position of the rectangle
+    public int Y
+    {
+        set
+        {
+            y = value;
+        }
+        get
+        {
+            return y;
+        }
+    }
+
+    ///< Width of the rectangle
+    public int Width
+    {
+        set
+        {
+            width = value;
+        }
+        get
+        {
+            return width;
+        }
+    }
+
+    ///< Height of the rectangle
+    public int Height
+    {
+        set
+        {
+            height = value;
+        }
+        get
+        {
+            return height;
+        }
+    }
+%}
+
+%enddef
+
+namespace Dali
+{
+  DALI_RECTANGLE_PROPERTY_PARAM( Dali, Rect<int>);
+}
diff --git a/plugins/dali-swig/SWIG/events/rectinteger.i b/plugins/dali-swig/SWIG/events/rectinteger.i
deleted file mode 100644 (file)
index b89d1f5..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-%define DALI_RECTINTEGER_PROPERTY_PARAM(NameSpace,ClassName)
-  %typemap(cscode) NameSpace::ClassName %{
-
-  public int X {
-    set {
-      NDalicPINVOKE.RectInteger_x_set(swigCPtr, value);
-      if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-    }
-    get {
-      int ret = NDalicPINVOKE.RectInteger_x_get(swigCPtr);
-      if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-      return ret;
-    }
-  }
-
-  public int Y {
-    set {
-      NDalicPINVOKE.RectInteger_y_set(swigCPtr, value);
-      if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-    }
-    get {
-      int ret = NDalicPINVOKE.RectInteger_y_get(swigCPtr);
-      if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-      return ret;
-    }
-  }
-
-  public int W {
-    set {
-      NDalicPINVOKE.RectInteger_width_set(swigCPtr, value);
-      if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-    }
-    get {
-      int ret = NDalicPINVOKE.RectInteger_width_get(swigCPtr);
-      if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-      return ret;
-    }
-  }
-
-  public int H {
-    set {
-      NDalicPINVOKE.RectInteger_height_set(swigCPtr, value);
-      if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-    }
-    get {
-      int ret = NDalicPINVOKE.RectInteger_height_get(swigCPtr);
-      if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-      return ret;
-    }
-  }
-
-%}
-
-%enddef
-
-namespace Dali
-{
-  DALI_RECTINTEGER_PROPERTY_PARAM( Dali, Rect<int>);
-}
index 6b2329b..5067594 100755 (executable)
@@ -33,26 +33,26 @@ using System.Runtime.InteropServices;
     */
   public class TouchEventArgs : EventArgs
   {
-     private TouchData _touchData;
+     private Touch _touch;
 
      /**
-       * @brief TouchData - contains the information of touch points
+       * @brief Touch - contains the information of touch points
        *
        */
-     public TouchData TouchData
+     public Touch Touch
      {
         get
         {
-           return _touchData;
+           return _touch;
         }
         set
         {
-           _touchData = value;
+           _touch = value;
         }
      }
   }
 
-  private event EventHandler<TouchEventArgs> _stageTouchEventHandler;
+  private event EventHandler<TouchEventArgs> _stageTouchHandler;
   private EventCallbackDelegateType1<IntPtr> _stageTouchCallbackDelegate;
 
   /**
@@ -61,13 +61,13 @@ using System.Runtime.InteropServices;
     * (i.e. the down & up touch events only).
     *
     */
-  public event EventHandler<TouchEventArgs> TouchEvent
+  public event EventHandler<TouchEventArgs> Touch
   {
      add
      {
         lock(this)
         {
-          _stageTouchEventHandler += value;
+          _stageTouchHandler += value;
           _stageTouchCallbackDelegate = OnStageTouch;
           this.TouchSignal().Connect(_stageTouchCallbackDelegate);
         }
@@ -76,11 +76,11 @@ using System.Runtime.InteropServices;
      {
         lock(this)
         {
-           if (_stageTouchEventHandler != null)
+           if (_stageTouchHandler != null)
            {
               this.TouchSignal().Disconnect(_stageTouchCallbackDelegate);
            }
-           _stageTouchEventHandler -= value;
+           _stageTouchHandler -= value;
         }
      }
   }
@@ -91,56 +91,55 @@ using System.Runtime.InteropServices;
 
     if( data != null )
     {
-      e.TouchData = TouchData.GetTouchDataFromPtr( data );
+      e.Touch = Dali.Touch.GetTouchFromPtr( data );
     }
 
-    if (_stageTouchEventHandler != null)
+    if (_stageTouchHandler != null)
     {
-      _stageTouchEventHandler(this, e);
+      _stageTouchHandler(this, e);
     }
   }
 
-
   /**
-    * @brief WheelEvent arguments that passed via Wheel signal
+    * @brief Wheel arguments that passed via Wheel signal
     *
     */
   public class WheelEventArgs : EventArgs
   {
-     private WheelEvent _wheelEvent;
+     private Wheel _wheel;
 
      /**
-       * @brief WheelEvent - store a wheel rolling type MOUSE_WHEEL or CUSTOM_WHEEL
+       * @brief Wheel - store a wheel rolling type MOUSE_WHEEL or CUSTOM_WHEEL
        *
        */
-     public WheelEvent WheelEvent
+     public Wheel Wheel
      {
         get
         {
-           return _wheelEvent;
+           return _wheel;
         }
         set
         {
-           _wheelEvent = value;
+           _wheel = value;
         }
      }
   }
 
-  private event EventHandler<WheelEventArgs> _stageWheelEventHandler;
+  private event EventHandler<WheelEventArgs> _stageWheelHandler;
   private EventCallbackDelegateType1<IntPtr> _stageWheelCallbackDelegate;
 
   /**
-    * @brief Event for WheelEvent signal which can be used to subscribe/unsubscribe the event handler
-    * WheelEvent signal is emitted is emitted when wheel event is received.
+    * @brief Event for Wheel signal which can be used to subscribe/unsubscribe the event handler
+    * Wheel signal is emitted is emitted when wheel event is received.
     *
     */
-  public event EventHandler<WheelEventArgs> WheelEvent
+  public event EventHandler<WheelEventArgs> Wheel
   {
      add
      {
         lock(this)
         {
-          _stageWheelEventHandler += value;
+          _stageWheelHandler += value;
           _stageWheelCallbackDelegate = OnStageWheel;
           this.WheelEventSignal().Connect(_stageWheelCallbackDelegate);
         }
@@ -149,11 +148,11 @@ using System.Runtime.InteropServices;
      {
         lock(this)
         {
-           if (_stageWheelEventHandler != null)
+           if (_stageWheelHandler != null)
            {
               this.WheelEventSignal().Disconnect(_stageWheelCallbackDelegate);
            }
-           _stageWheelEventHandler -= value;
+           _stageWheelHandler -= value;
         }
      }
   }
@@ -164,55 +163,55 @@ using System.Runtime.InteropServices;
 
     if( data != null )
     {
-      e.WheelEvent = Dali.WheelEvent.GetWheelEventFromPtr( data );
+      e.Wheel = Dali.Wheel.GetWheelFromPtr( data );
     }
 
-    if (_stageWheelEventHandler != null)
+    if (_stageWheelHandler != null)
     {
-      _stageWheelEventHandler(this, e);
+      _stageWheelHandler(this, e);
     }
   }
 
   /**
-    * @brief Event arguments that passed via KeyEvent signal
+    * @brief Event arguments that passed via Key signal
     *
     */
   public class KeyEventArgs : EventArgs
   {
-     private KeyEvent _keyEvent;
+     private Key _key;
 
      /**
-       * @brief KeyEvent - is the keyevent sent to Stage.
+       * @brief Key - is the keyevent sent to Stage.
        *
        */
-     public KeyEvent KeyEvent
+     public Key Key
      {
         get
         {
-           return _keyEvent;
+           return _key;
         }
         set
         {
-           _keyEvent = value;
+           _key = value;
         }
      }
   }
 
-  private event EventHandler<KeyEventArgs> _stageKeyEventHandler;
+  private event EventHandler<KeyEventArgs> _stageKeyHandler;
   private EventCallbackDelegateType1<IntPtr> _stageKeyCallbackDelegate;
 
   /**
-    * @brief Event for KeyEvent signal which can be used to subscribe/unsubscribe the event handler
-    * KeyEvent signal is emitted is emitted when key event is received.
+    * @brief Event for Key signal which can be used to subscribe/unsubscribe the event handler
+    * Key signal is emitted is emitted when key event is received.
     *
     */
-  public event EventHandler<KeyEventArgs> KeyEvent
+  public event EventHandler<KeyEventArgs> Key
   {
      add
      {
         lock(this)
         {
-            _stageKeyEventHandler += value;
+            _stageKeyHandler += value;
             _stageKeyCallbackDelegate = OnStageKey;
             this.KeyEventSignal().Connect(_stageKeyCallbackDelegate);
         }
@@ -221,11 +220,11 @@ using System.Runtime.InteropServices;
      {
         lock(this)
         {
-           if (_stageKeyEventHandler != null)
+           if (_stageKeyHandler != null)
            {
               this.KeyEventSignal().Disconnect(_stageKeyCallbackDelegate);
            }
-           _stageKeyEventHandler -= value;
+           _stageKeyHandler -= value;
         }
      }
   }
@@ -237,13 +236,13 @@ using System.Runtime.InteropServices;
 
     if( data != null )
     {
-      e.KeyEvent = Dali.KeyEvent.GetKeyEventFromPtr( data );
+      e.Key = Dali.Key.GetKeyFromPtr( data );
     }
 
-    if (_stageKeyEventHandler != null)
+    if (_stageKeyHandler != null)
     {
       //here we send all data to user event handlers
-      _stageKeyEventHandler(this, e);
+      _stageKeyHandler(this, e);
     }
   }
 
diff --git a/plugins/dali-swig/SWIG/gestures/gesture.i b/plugins/dali-swig/SWIG/gestures/gesture.i
new file mode 100644 (file)
index 0000000..cfb7510
--- /dev/null
@@ -0,0 +1,32 @@
+%rename(GestureType) Dali::Gesture::Type;
+%rename(StateType) Dali::Gesture::State;
+
+%csmethodmodifiers Dali::Gesture::type "private";
+%csmethodmodifiers Dali::Gesture::state "private";
+%csmethodmodifiers Dali::Gesture::time "private";
+
+%typemap(cscode) Dali::Gesture %{
+  public Gesture.GestureType Type
+  {
+    get
+    {
+      return type;
+    }
+  }
+
+  public Gesture.StateType State
+  {
+    get
+    {
+      return state;
+    }
+  }
+
+  public uint Time
+  {
+    get
+    {
+      return time;
+    }
+  }
+%}
\ No newline at end of file
diff --git a/plugins/dali-swig/SWIG/gestures/hover.i b/plugins/dali-swig/SWIG/gestures/hover.i
new file mode 100644 (file)
index 0000000..da7c275
--- /dev/null
@@ -0,0 +1,66 @@
+%rename(Hover) Dali::HoverEvent;
+
+%csmethodmodifiers Dali::HoverEvent::points "private";
+%csmethodmodifiers Dali::HoverEvent::time "private";
+
+%typemap(cscode) Dali::HoverEvent %{
+  public static Hover GetHoverFromPtr(global::System.IntPtr cPtr) {
+    Hover ret = new Hover(cPtr, false);
+    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+    return ret;
+  }
+
+  public uint Time
+  {
+    get
+    {
+      return time;
+    }
+  }
+
+  public int GetDeviceId(uint point) {
+    if( point < points.Count )
+    {
+      return points[(int)point].deviceId;
+    }
+    return -1;
+  }
+
+  public PointStateType GetState(uint point) {
+    if( point < points.Count )
+    {
+      return (Dali.PointStateType)(points[(int)point].state);
+    }
+    return PointStateType.FINISHED;
+  }
+
+  public Actor GetHitActor(uint point) {
+    if( point < points.Count )
+    {
+      return points[(int)point].hitActor;
+    }
+    else
+    {
+      // Return a native empty handle
+      Actor actor = new Actor();
+      actor.Reset();
+      return actor;
+    }
+  }
+
+  public Vector2 GetLocalPosition(uint point) {
+    if( point < points.Count )
+    {
+      return points[(int)point].local;
+    }
+    return new Vector2(0.0f, 0.0f);
+  }
+
+  public Vector2 GetScreenPosition(uint point) {
+    if( point < points.Count )
+    {
+      return points[(int)point].screen;
+    }
+    return new Vector2(0.0f, 0.0f);
+  }
+%}
\ No newline at end of file
diff --git a/plugins/dali-swig/SWIG/gestures/key.i b/plugins/dali-swig/SWIG/gestures/key.i
new file mode 100644 (file)
index 0000000..9ba9232
--- /dev/null
@@ -0,0 +1,65 @@
+%rename(Key) Dali::KeyEvent;
+%rename(StateType) Dali::KeyEvent::State;
+
+%csmethodmodifiers Dali::KeyEvent::keyPressedName "private";
+%csmethodmodifiers Dali::KeyEvent::keyPressed "private";
+%csmethodmodifiers Dali::KeyEvent::keyCode "private";
+%csmethodmodifiers Dali::KeyEvent::keyModifier "private";
+%csmethodmodifiers Dali::KeyEvent::time "private";
+%csmethodmodifiers Dali::KeyEvent::state "private";
+
+%typemap(cscode) Dali::KeyEvent %{
+  public static Key GetKeyFromPtr(global::System.IntPtr cPtr) {
+    Key ret = new Key(cPtr, false);
+    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+    return ret;
+  }
+
+  public string KeyPressedName
+  {
+    get
+    {
+      return keyPressedName;
+    }
+  }
+
+  public string KeyPressed
+  {
+    get
+    {
+      return keyPressed;
+    }
+  }
+
+  public int KeyCode
+  {
+    get
+    {
+      return keyCode;
+    }
+  }
+
+  public int KeyModifier
+  {
+    get
+    {
+      return keyModifier;
+    }
+  }
+
+  public uint Time
+  {
+    get
+    {
+      return time;
+    }
+  }
+
+  public Key.StateType State
+  {
+    get
+    {
+      return state;
+    }
+  }
+%}
\ No newline at end of file
diff --git a/plugins/dali-swig/SWIG/gestures/long-press-gesture.i b/plugins/dali-swig/SWIG/gestures/long-press-gesture.i
new file mode 100644 (file)
index 0000000..c89e897
--- /dev/null
@@ -0,0 +1,35 @@
+%csmethodmodifiers Dali::LongPressGesture::numberOfTouches "private";
+%csmethodmodifiers Dali::LongPressGesture::screenPoint "private";
+%csmethodmodifiers Dali::LongPressGesture::localPoint "private";
+
+%typemap(cscode) Dali::LongPressGesture %{
+  public static LongPressGesture GetLongPressGestureFromPtr(global::System.IntPtr cPtr) {
+    LongPressGesture ret = new LongPressGesture(cPtr, false);
+    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+    return ret;
+  }
+
+  public uint NumberOfTouches
+  {
+    get
+    {
+      return numberOfTouches;
+    }
+  }
+
+  public Vector2 ScreenPoint
+  {
+    get
+    {
+      return screenPoint;
+    }
+  }
+
+  public Vector2 LocalPoint
+  {
+    get
+    {
+      return localPoint;
+    }
+  }
+%}
\ No newline at end of file
diff --git a/plugins/dali-swig/SWIG/gestures/pan-gesture.i b/plugins/dali-swig/SWIG/gestures/pan-gesture.i
new file mode 100644 (file)
index 0000000..efcfc16
--- /dev/null
@@ -0,0 +1,71 @@
+%csmethodmodifiers Dali::PanGesture::velocity "private";
+%csmethodmodifiers Dali::PanGesture::displacement "private";
+%csmethodmodifiers Dali::PanGesture::position "private";
+%csmethodmodifiers Dali::PanGesture::screenVelocity "private";
+%csmethodmodifiers Dali::PanGesture::screenDisplacement "private";
+%csmethodmodifiers Dali::PanGesture::screenPosition "private";
+%csmethodmodifiers Dali::PanGesture::numberOfTouches "private";
+
+%typemap(cscode) Dali::PanGesture %{
+  public static PanGesture GetPanGestureFromPtr(global::System.IntPtr cPtr) {
+    PanGesture ret = new PanGesture(cPtr, false);
+    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+    return ret;
+  }
+
+  public Vector2 Velocity
+  {
+    get
+    {
+      return velocity;
+    }
+  }
+
+  public Vector2 Displacement
+  {
+    get
+    {
+      return displacement;
+    }
+  }
+
+  public Vector2 Position
+  {
+    get
+    {
+      return position;
+    }
+  }
+
+  public Vector2 ScreenVelocity
+  {
+    get
+    {
+      return screenVelocity;
+    }
+  }
+
+  public Vector2 ScreenDisplacement
+  {
+    get
+    {
+      return screenDisplacement;
+    }
+  }
+
+  public Vector2 ScreenPosition
+  {
+    get
+    {
+      return screenPosition;
+    }
+  }
+
+  public uint NumberOfTouches
+  {
+    get
+    {
+      return numberOfTouches;
+    }
+  }
+%}
\ No newline at end of file
diff --git a/plugins/dali-swig/SWIG/gestures/pinch-gesture.i b/plugins/dali-swig/SWIG/gestures/pinch-gesture.i
new file mode 100644 (file)
index 0000000..41af12e
--- /dev/null
@@ -0,0 +1,44 @@
+%csmethodmodifiers Dali::PinchGesture::scale "private";
+%csmethodmodifiers Dali::PinchGesture::speed "private";
+%csmethodmodifiers Dali::PinchGesture::screenCenterPoint "private";
+%csmethodmodifiers Dali::PinchGesture::localCenterPoint "private";
+
+%typemap(cscode) Dali::PinchGesture %{
+  public static PinchGesture GetPinchGestureFromPtr(global::System.IntPtr cPtr) {
+    PinchGesture ret = new PinchGesture(cPtr, false);
+    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+    return ret;
+  }
+
+  public float Scale
+  {
+    get
+    {
+      return scale;
+    }
+  }
+
+  public float Speed
+  {
+    get
+    {
+      return speed;
+    }
+  }
+
+  public Vector2 ScreenCenterPoint
+  {
+    get
+    {
+      return screenCenterPoint;
+    }
+  }
+
+  public Vector2 LocalCenterPoint
+  {
+    get
+    {
+      return localCenterPoint;
+    }
+  }
+%}
\ No newline at end of file
diff --git a/plugins/dali-swig/SWIG/gestures/tap-gesture.i b/plugins/dali-swig/SWIG/gestures/tap-gesture.i
new file mode 100644 (file)
index 0000000..72b29cc
--- /dev/null
@@ -0,0 +1,44 @@
+%csmethodmodifiers Dali::TapGesture::numberOfTaps "private";
+%csmethodmodifiers Dali::TapGesture::numberOfTouches "private";
+%csmethodmodifiers Dali::TapGesture::screenPoint "private";
+%csmethodmodifiers Dali::TapGesture::localPoint "private";
+
+%typemap(cscode) Dali::TapGesture %{
+  public static TapGesture GetTapGestureFromPtr(global::System.IntPtr cPtr) {
+    TapGesture ret = new TapGesture(cPtr, false);
+    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+    return ret;
+  }
+
+  public uint NumberOfTaps
+  {
+    get
+    {
+      return numberOfTaps;
+    }
+  }
+
+  public uint NumberOfTouches
+  {
+    get
+    {
+      return numberOfTouches;
+    }
+  }
+
+  public Vector2 ScreenPoint
+  {
+    get
+    {
+      return screenPoint;
+    }
+  }
+
+  public Vector2 LocalPoint
+  {
+    get
+    {
+      return localPoint;
+    }
+  }
+%}
\ No newline at end of file
diff --git a/plugins/dali-swig/SWIG/gestures/touch.i b/plugins/dali-swig/SWIG/gestures/touch.i
new file mode 100644 (file)
index 0000000..ec63732
--- /dev/null
@@ -0,0 +1,9 @@
+%rename(Touch) Dali::TouchData;
+
+%typemap(cscode) Dali::TouchData %{
+  public static Touch GetTouchFromPtr(global::System.IntPtr cPtr) {
+    Touch ret = new Touch(cPtr, false);
+    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+    return ret;
+  }
+%}
\ No newline at end of file
diff --git a/plugins/dali-swig/SWIG/gestures/wheel.i b/plugins/dali-swig/SWIG/gestures/wheel.i
new file mode 100644 (file)
index 0000000..4da34a4
--- /dev/null
@@ -0,0 +1,65 @@
+%rename(Wheel) Dali::WheelEvent;
+%rename(WheelType) Dali::WheelEvent::Type;
+
+%csmethodmodifiers Dali::WheelEvent::type "private";
+%csmethodmodifiers Dali::WheelEvent::direction "private";
+%csmethodmodifiers Dali::WheelEvent::modifiers "private";
+%csmethodmodifiers Dali::WheelEvent::point "private";
+%csmethodmodifiers Dali::WheelEvent::z "private";
+%csmethodmodifiers Dali::WheelEvent::timeStamp "private";
+
+%typemap(cscode) Dali::WheelEvent %{
+  public static Wheel GetWheelFromPtr(global::System.IntPtr cPtr) {
+    Wheel ret = new Wheel(cPtr, false);
+    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+    return ret;
+  }
+
+  public Wheel.WheelType Type
+  {
+    get
+    {
+      return type;
+    }
+  }
+
+  public int Direction
+  {
+    get
+    {
+      return direction;
+    }
+  }
+
+  public uint Modifiers
+  {
+    get
+    {
+      return modifiers;
+    }
+  }
+
+  public Vector2 Point
+  {
+    get
+    {
+      return point;
+    }
+  }
+
+  public int Z
+  {
+    get
+    {
+      return z;
+    }
+  }
+
+  public uint TimeStamp
+  {
+    get
+    {
+      return timeStamp;
+    }
+  }
+%}
\ No newline at end of file
diff --git a/plugins/dali-swig/SWIG/property-value.i b/plugins/dali-swig/SWIG/property-value.i
new file mode 100644 (file)
index 0000000..290b4a1
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#if defined(SWIGCSHARP)
+
+
+ %typemap(cscode) Dali::Property::Value %{
+
+    // Extension to property value class that allows us to create a
+    // PropertyValue from a C# object, e.g. int, float, string
+    static public Property.Value CreateFromObject( System.Object obj)
+    {
+      System.Type type = obj.GetType ();
+
+        Property.Value value;
+
+        if ( type.Equals (typeof(int)) )
+        {
+          System.Console.WriteLine (" got an int property value ");
+          value = new Property.Value ((int) obj );
+        }
+        if ( type.Equals (typeof(System.Int32)) )
+        {
+          System.Console.WriteLine (" got an int property value ");
+          value = new Property.Value ((int) obj );
+        }
+        else if ( type.Equals (typeof(bool)) )
+        {
+          System.Console.WriteLine (" got an bool property value ");
+          value = new Property.Value ((bool) obj );
+        }
+        else if ( type.Equals (typeof(float)) )
+        {
+          System.Console.WriteLine (" got an float property value ");
+          value = new Property.Value ((float) obj );
+        }
+        else if ( type.Equals (typeof(string)) )
+        {
+          System.Console.WriteLine (" got a string property value ");
+          value = new Property.Value ((string) obj );
+        }
+        else if ( type.Equals (typeof(Vector2)) )
+        {
+          System.Console.WriteLine (" got an Vector2 property value ");
+          value = new Property.Value ((Vector2) obj );
+        }
+        else if ( type.Equals (typeof(Vector3)) )
+        {
+          System.Console.WriteLine (" got an Vector3 property value ");
+          value = new Property.Value ((Vector3) obj );
+        }
+        else if ( type.Equals (typeof(Vector4)) )
+        {
+          System.Console.WriteLine (" got an Vector4 property value ");
+
+          value = new Property.Value ((Vector4) obj );
+        }
+        else if ( type.Equals (typeof(Position)) )
+        {
+          System.Console.WriteLine (" got an Position property value ");
+          value = new Property.Value ((Position) obj );
+        }
+        else if ( type.Equals (typeof(Size)) )
+        {
+          System.Console.WriteLine (" got an Size property value ");
+          value = new Property.Value ((Size) obj );
+        }
+        else if ( type.Equals (typeof(Color)) )
+        {
+          System.Console.WriteLine (" got an Color property value ");
+          value = new Property.Value ((Color) obj );
+        }
+        else
+        {
+           throw new global::System.InvalidOperationException("Unimplemented type for Property Value");
+        }
+        return  value;
+    }
+
+
+ %}
+
+
+
+
+#endif
\ No newline at end of file
index 214abe4..e339809 100644 (file)
   * Required to get access to any data passed as a parameter in a Signal ( in C# they are delegate parameters).
   * E.g.
   *
-  * CREATE_CSHARP_WRAPPER_FROM_C_PTR_FUNCTION( TouchData );
-  * Creates a function called GetTouchDataFromPtr which allows you to:
+  * CREATE_CSHARP_WRAPPER_FROM_C_PTR_FUNCTION( Touch );
+  * Creates a function called GetTouchFromPtr which allows you to:
   *
   * static void OnStageTouched(IntPtr data)
   * {
-  *    TouchData touchData = TouchData.GetTouchDataFromPtr( data );
+  *    Touch touch = Touch.GetTouchFromPtr( data );
   * }
   *
   * ## means concat in a SWIG macro
@@ -54,15 +54,6 @@ DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, Actor );
 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, Image );
 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, ResourceImage );
 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, Animation );
-DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, TouchEvent );
-DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, TouchData );
-DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, HoverEvent );
-DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, WheelEvent );
-DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, KeyEvent );
-DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, LongPressGesture );
-DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, PanGesture );
-DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, PinchGesture );
-DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, TapGesture );
 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, PropertyNotification );
 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, BaseHandle );
 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, RefObject );
index 8fe3c70..0ddd6f1 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,352 +21,415 @@ using Dali;
 
 namespace MyCSharpExample
 {
-    class Example
+  class Example
+  {
+    // This is simple structure to contain Control name and implement state at once
+    // name : control name
+    // isImplemented : the state which the control is implemented in public or not
+    private struct Item
     {
-        // This is simple structure to contain Control name and implement state at once
-        // name : control name
-        // isImplemented : the state which the control is implemented in public or not
-        private struct Item
-        {
-            public String name;
-            public bool isImplemented;
+      public String name;
+      public bool isImplemented;
+
+      public Item(String name, bool isImplemented)
+      {
+        this.name = name;
+        this.isImplemented = isImplemented;
+      }
+    }
 
-            public Item(String name, bool isImplemented)
-            {
-                this.name = name;
-                this.isImplemented = isImplemented;
-            }
-        }
+    private Dali.Application _application;
+    private TableView _contentContainer;
+    private Stage _stage;
+    private Popup _popup;
+
+    // List of items
+    private Item[] mViewList = {
+      new Item("PushButton", true),  new Item("DropDown", false),    new Item("Toggle", true),
+      new Item("InputField", false),  new Item("AnimateGif", false),  new Item("Loading", false),
+      new Item("ProgressBar", false), new Item("CheckBox", false),    new Item("RadioButton", true),
+      new Item("Tooltip", true),     new Item("Popup", true),       new Item("Toast", true),
+      new Item("ItemView", false),    new Item("CheckBox", true)
+    };
+
+    public Example(Dali.Application application)
+    {
+      _application = application;
+      _application.Initialized += OnInitialize;
+    }
+
+    public void OnInitialize(object source, NUIApplicationInitEventArgs e)
+    {
+      Console.WriteLine("Customized Application Initialize event handler");
+      _stage = Stage.GetCurrent();
+      _stage.BackgroundColor = Color.White;
+
+      // Top label
+      TextLabel topLabel = new TextLabel();
+      topLabel.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
+      topLabel.SetResizePolicy(ResizePolicyType.SIZE_RELATIVE_TO_PARENT, DimensionType.HEIGHT);
+      topLabel.AnchorPoint = NDalic.AnchorPointTopCenter;
+      topLabel.ParentOrigin = NDalic.ParentOriginTopCenter;
+      topLabel.SetSizeModeFactor(new Vector3( 0.0f, 0.1f, 0.0f ) );
+      topLabel.BackgroundColor = new Color(43.0f / 255.0f, 145.0f / 255.0f, 175.0f / 255.0f, 1.0f);
+      topLabel.TextColor = NDalic.WHITE;
+      topLabel.Text = " DALi Views";
+      topLabel.HorizontalAlignment = "BEGIN";
+      topLabel.VerticalAlignment = "CENTER";
+      topLabel.PointSize = 42.0f;
+      _stage.Add(topLabel);
+
+      // Grid container to contain items. Use tableView because FlexContainer support focus navigation just two direction ( up/down or left/right )
+      _contentContainer = new TableView(6, 5);
+      _contentContainer.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
+      _contentContainer.SetResizePolicy(ResizePolicyType.SIZE_RELATIVE_TO_PARENT, DimensionType.HEIGHT);
+      _contentContainer.SetSizeModeFactor(new Vector3( 0.0f, 0.9f, 0.0f ) );
+      _contentContainer.AnchorPoint = NDalic.AnchorPointBottomCenter;
+      _contentContainer.ParentOrigin = NDalic.ParentOriginBottomCenter;
+      _contentContainer.SetRelativeHeight(0, 0.07f);
+      _contentContainer.SetRelativeHeight(1, 0.26f);
+      _contentContainer.SetRelativeHeight(2, 0.07f);
+      _contentContainer.SetRelativeHeight(3, 0.26f);
+      _contentContainer.SetRelativeHeight(4, 0.07f);
+      _contentContainer.SetRelativeHeight(5, 0.26f);
+      _contentContainer.SetKeyboardFocusable(true);
+      _stage.Add(_contentContainer);
+
+      CreateContent();
+
+      FocusManager.Instance.PreFocusChange += OnPreFocusChange;
+    }
+
+    // Callback for KeyboardFocusManager
+    private Actor OnPreFocusChange(object source, FocusManager.PreFocusChangeEventArgs e)
+    {
+      if (!e.Proposed && !e.Current)
+      {
+        e.Proposed = _contentContainer.GetChildAt(1);
+      }
+      return e.Proposed;
+    }
+
+    private void CreateContent()
+    {
+      for (int i = 0; i < mViewList.Length; i++)
+      {
+        CreateItem(mViewList[i], i);
+      }
+    }
 
-        private Dali.Application _application;
-        private TableView _contentContainer;
-        private Stage _stage;
-        private Popup _popup;
-
-        // List of items
-        private Item[] mViewList = {
-            new Item("PushButton", true),  new Item("DropDown", false),    new Item("Toggle", false),
-            new Item("InputField", false),  new Item("AnimateGif", false),  new Item("Loading", false),
-            new Item("ProgressBar", false), new Item("CheckBox", false),    new Item("RadioButton", true),
-            new Item("Tooltip", false),     new Item("Popup", true),       new Item("Toast", true),
-            new Item("ItemView", false),    new Item("CheckBox", true)
-        };
-
-        public Example(Dali.Application application)
+    private void CreateItem(Item item, int idx)
+    {
+      // Make label for item
+      TextLabel itemLabel = new TextLabel("    " + item.name);
+      itemLabel.Size = new Vector3(_stage.GetSize().Width * 0.2f, _stage.GetSize().Height * 0.05f, 0.0f);
+      itemLabel.HorizontalAlignment = "BEGIN";
+      itemLabel.VerticalAlignment = "BOTTOM";
+      itemLabel.PointSize = 18.0f;
+      _contentContainer.AddChild(itemLabel, new TableView.CellPosition(((uint)idx / 5) * 2, (uint)idx % 5));
+
+      // If item is implemented in public, attach it on stage
+      if (item.isImplemented)
+      {
+        if (item.name.CompareTo("PushButton") == 0)
         {
-            _application = application;
-            _application.Initialized += OnInitialize;
+          PushButton pushButton = new PushButton();
+          pushButton.LabelText = "Push Button";
+          pushButton.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
+          pushButton.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.HEIGHT);
+          pushButton.UnselectedColor = new Vector4(1.0f,0.0f,0.0f,1.0f);
+          pushButton.SelectedColor = new Vector4(0.0f,1.0f,0.0f,1.0f);
+          pushButton.Clicked += (obj, e) =>
+          {
+            e.Button.LabelText = "Click Me";
+            e.Button.UnselectedColor = new Vector4(0.0f,0.0f,1.0f,1.0f);
+            return true;
+          };
+
+          _contentContainer.AddChild(pushButton, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
         }
+        if (item.name.CompareTo("DropDown") == 0)
+        {
 
-        public void OnInitialize(object source, NUIApplicationInitEventArgs e)
+        }
+        if (item.name.CompareTo("Toggle") == 0)
         {
-            Console.WriteLine("Customized Application Initialize event handler");
-            _stage = Stage.GetCurrent();
-            _stage.BackgroundColor = Color.White;
-
-            // Top label
-            TextLabel topLabel = new TextLabel();
-            topLabel.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
-            topLabel.SetResizePolicy(ResizePolicyType.SIZE_RELATIVE_TO_PARENT, DimensionType.HEIGHT);
-            topLabel.AnchorPoint = NDalic.AnchorPointTopCenter;
-            topLabel.ParentOrigin = NDalic.ParentOriginTopCenter;
-            topLabel.SetSizeModeFactor(new Vector3( 0.0f, 0.1f, 0.0f ) );
-            topLabel.BackgroundColor = new Color(43.0f / 255.0f, 145.0f / 255.0f, 175.0f / 255.0f, 1.0f);
-            topLabel.TextColor = NDalic.WHITE;
-            topLabel.Text = " DALi Views";
-            topLabel.HorizontalAlignment = "BEGIN";
-            topLabel.VerticalAlignment = "CENTER";
-            topLabel.PointSize = 42.0f;
-            _stage.Add(topLabel);
-
-            // Grid container to contain items. Use tableView because FlexContainer support focus navigation just two direction ( up/down or left/right )
-            _contentContainer = new TableView(6, 5);
-            _contentContainer.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
-            _contentContainer.SetResizePolicy(ResizePolicyType.SIZE_RELATIVE_TO_PARENT, DimensionType.HEIGHT);
-            _contentContainer.SetSizeModeFactor(new Vector3( 0.0f, 0.9f, 0.0f ) );
-            _contentContainer.AnchorPoint = NDalic.AnchorPointBottomCenter;
-            _contentContainer.ParentOrigin = NDalic.ParentOriginBottomCenter;
-            _contentContainer.SetRelativeHeight(0, 0.07f);
-            _contentContainer.SetRelativeHeight(1, 0.26f);
-            _contentContainer.SetRelativeHeight(2, 0.07f);
-            _contentContainer.SetRelativeHeight(3, 0.26f);
-            _contentContainer.SetRelativeHeight(4, 0.07f);
-            _contentContainer.SetRelativeHeight(5, 0.26f);
-            _contentContainer.SetKeyboardFocusable(true);
-            _stage.Add(_contentContainer);
-
-            CreateContent();
-
-            FocusManager.Instance.PreFocusChange += OnPreFocusChange;
+          ToggleButton toggleButton = new ToggleButton();
+          Dali.Property.Array array = new Dali.Property.Array();
+          array.Add( new Dali.Property.Value("./images/star-highlight.png") );
+          array.Add( new Dali.Property.Value("./images/star-mod.png") );
+          array.Add( new Dali.Property.Value("./images/star-dim.png") );
+          toggleButton.StateVisuals = array;
+
+          Dali.Property.Array tooltips = new Dali.Property.Array();
+          tooltips.Add( new Dali.Property.Value("State A") );
+          tooltips.Add( new Dali.Property.Value("State B") );
+          tooltips.Add( new Dali.Property.Value("State C") );
+          toggleButton.Tooltips = tooltips;
+
+          toggleButton.WidthResizePolicy  = "FILL_TO_PARENT";
+          toggleButton.HeightResizePolicy = "FILL_TO_PARENT";
+          toggleButton.Clicked += (obj, e) =>
+          {
+            Console.WriteLine("Toggle button state changed.");
+            return true;
+          };
+
+          _contentContainer.AddChild(toggleButton, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
         }
+        if (item.name.CompareTo("InputField") == 0)
+        {
 
-        // Callback for KeyboardFocusManager
-        private Actor OnPreFocusChange(object source, FocusManager.PreFocusChangeEventArgs e)
+        }
+        if (item.name.CompareTo("AnimateGif") == 0)
         {
-            if (!e.Proposed && !e.Current)
-            {
-                e.Proposed = _contentContainer.GetChildAt(1);
-            }
-            return e.Proposed;
+
         }
+        if (item.name.CompareTo("Loading") == 0)
+        {
 
-        private void CreateContent()
+        }
+        if (item.name.CompareTo("ProgressBar") == 0)
         {
-            for (int i = 0; i < mViewList.Length; i++)
-            {
-                CreateItem(mViewList[i], i);
-            }
+
         }
+        if (item.name.CompareTo("ScrollBar") == 0)
+        {
 
-        private void CreateItem(Item item, int idx)
+        }
+        if (item.name.CompareTo("CheckBox") == 0)
         {
-            // Make label for item
-            TextLabel itemLabel = new TextLabel("    " + item.name);
-            itemLabel.Size = new Vector3(_stage.GetSize().Width * 0.2f, _stage.GetSize().Height * 0.05f, 0.0f);
-            itemLabel.HorizontalAlignment = "BEGIN";
-            itemLabel.VerticalAlignment = "BOTTOM";
-            itemLabel.PointSize = 18.0f;
-            _contentContainer.AddChild(itemLabel, new TableView.CellPosition(((uint)idx / 5) * 2, (uint)idx % 5));
-
-            // If item is implemented in public, attach it on stage
-            if (item.isImplemented)
-            {
-                if (item.name.CompareTo("PushButton") == 0)
-                {
-                    PushButton pushButton = new PushButton();
-                    pushButton.LabelText = "Push Button";
-                    pushButton.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
-                    pushButton.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.HEIGHT);
-                    pushButton.UnselectedColor = new Vector4(1.0f,0.0f,0.0f,1.0f);
-                    pushButton.SelectedColor = new Vector4(0.0f,1.0f,0.0f,1.0f);
-                    pushButton.Clicked += (obj, e) =>
-                    {
-                        e.Button.LabelText = "Click Me";
-                        e.Button.UnselectedColor = new Vector4(0.0f,0.0f,1.0f,1.0f);
-                        return true;
-                    };
-
-                    _contentContainer.AddChild(pushButton, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
-                }
-                if (item.name.CompareTo("DropDown") == 0)
-                {
-
-                }
-                if (item.name.CompareTo("Toggle") == 0)
-                {
-
-                }
-                if (item.name.CompareTo("InputField") == 0)
-                {
-
-                }
-                if (item.name.CompareTo("AnimateGif") == 0)
-                {
-
-                }
-                if (item.name.CompareTo("Loading") == 0)
-                {
-
-                }
-                if (item.name.CompareTo("ProgressBar") == 0)
-                {
-
-                }
-                if (item.name.CompareTo("ScrollBar") == 0)
-                {
-
-                }
-                if (item.name.CompareTo("CheckBox") == 0)
-                {
-                    CheckBoxButton checkBoxButton = new CheckBoxButton();
-                    checkBoxButton.LabelText = "Yes";
-
-                    _contentContainer.AddChild(checkBoxButton, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
-                }
-                if (item.name.CompareTo("RadioButton") == 0)
-                {
-                    TableView tableView = new TableView(2, 1);
-                    tableView.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
-                    tableView.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.HEIGHT);
-
-                    RadioButton rButton = new RadioButton();
-                    rButton.LabelText = "Yes";
-                    rButton.Selected = true;
-                    tableView.AddChild(rButton, new TableView.CellPosition(0, 0));
-
-                    rButton = new RadioButton();
-                    rButton.LabelText = "No";
-
-                    tableView.AddChild(rButton, new TableView.CellPosition(1, 0));
-
-                    _contentContainer.AddChild(tableView, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
-                }
-                if (item.name.CompareTo("Tooltip") == 0)
-                {
-
-                }
-                if (item.name.CompareTo("Popup") == 0)
-                {
-                    PushButton button = new PushButton();
-                    button.LabelText = "Popup";
-                    button.ParentOrigin = NDalic.ParentOriginCenter;
-                    button.AnchorPoint = NDalic.AnchorPointCenter;
-                    button.MaximumSize = new Vector2(90.0f,50.0f);
-                    _popup = CreatePopup();
-                    _popup.SetTitle(CreateTitle("Popup"));
-
-                    TextLabel text = new TextLabel("This will erase the file permanently. Are you sure?");
-                    text.BackgroundColor = Color.White;
-                    text.MultiLine = true;
-                    text.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
-                    text.SetResizePolicy(ResizePolicyType.DIMENSION_DEPENDENCY, DimensionType.HEIGHT);
-                    text.SetPadding(new RectFloat(10.0f, 10.0f, 20.0f, 0.0f));
-                    _popup.SetContent(text);
-                    _popup.SetKeyboardFocusable(true);
-                    _popup.SetDisplayState(Popup.DisplayStateType.HIDDEN);
-
-                    button.Clicked += (obj, ee) =>
-                    {
-                        _stage.Add(_popup);
-                        _popup.SetDisplayState(Popup.DisplayStateType.SHOWN);
-                        FocusManager.Instance.SetCurrentFocusActor((_popup.FindChildByName( "Footer" )).FindChildByName("OKButton"));
-                        return true;
-                    };
-                    _contentContainer.AddChild(button, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
-                }
-                if (item.name.CompareTo("Toast") == 0)
-                {
-                    PushButton button = new PushButton();
-                    button.LabelText = "Toast";
-                    button.ParentOrigin = NDalic.ParentOriginCenter;
-                    button.AnchorPoint = NDalic.AnchorPointCenter;
-                    button.Clicked += (obj, ee) =>
-                    {
-                        TypeInfo typeInfo = new TypeInfo(TypeRegistry.Get().GetTypeInfo( "PopupToast" ));
-                        if( typeInfo )
-                        {
-                            BaseHandle baseHandle = typeInfo.CreateInstance();
-                            if( baseHandle )
-                            {
-                                Popup toast = Popup.DownCast( baseHandle );
-                                TextLabel text = new TextLabel("This is a Toast.\nIt will auto-hide itself");
-                                text.TextColor = Color.White;
-                                text.MultiLine = true;
-                                text.HorizontalAlignment = "center";
-                                toast.SetTitle( text);
-                                _stage.Add(toast);
-                                toast.SetDisplayState( Popup.DisplayStateType.SHOWN);
-                            }
-                        }
-                        return true;
-                    };
-                    _contentContainer.AddChild(button, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
-                }
-                if (item.name.CompareTo("ItemView") == 0)
-                {
-
-                }
-            }
-            else
-            {
-                ImageView notSupportView = new ImageView("images/not_yet_sign.png");
-                notSupportView.Size = new Vector3(_stage.GetSize().Width * 0.2f, _stage.GetSize().Height * 0.25f, 0.0f);
-                notSupportView.SetKeyboardFocusable(true);
-                _contentContainer.AddChild(notSupportView, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
-            }
+          CheckBoxButton checkBoxButton = new CheckBoxButton();
+          checkBoxButton.LabelText = "Yes";
+
+          _contentContainer.AddChild(checkBoxButton, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
         }
-        Popup CreatePopup()
+        if (item.name.CompareTo("RadioButton") == 0)
         {
-            Popup confirmationPopup = new Popup();
-
-            Actor footer = new Actor();
-            footer.SetName("Footer");
-            footer.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
-            footer.SetResizePolicy(ResizePolicyType.FIXED, DimensionType.HEIGHT);
-            footer.SetSize(0.0f, 80.0f);
-            footer.ParentOrigin = NDalic.ParentOriginCenter;
-            footer.AnchorPoint = NDalic.AnchorPointCenter;
-
-            PushButton okButton = CreateOKButton();
-            okButton.ParentOrigin = NDalic.ParentOriginCenter;
-            okButton.AnchorPoint = NDalic.AnchorPointCenter;
-            okButton.SetResizePolicy(ResizePolicyType.SIZE_FIXED_OFFSET_FROM_PARENT, DimensionType.ALL_DIMENSIONS);
-            okButton.SetSizeModeFactor(new Vector3(-20.0f, -20.0f, 0.0f));
-
-            PushButton cancelButton = CreateCancelButton();
-            cancelButton.ParentOrigin = NDalic.ParentOriginCenter;
-            cancelButton.AnchorPoint = NDalic.AnchorPointCenter;
-            cancelButton.SetResizePolicy(ResizePolicyType.SIZE_FIXED_OFFSET_FROM_PARENT, DimensionType.ALL_DIMENSIONS);
-            cancelButton.SetSizeModeFactor(new Vector3(-20.0f, -20.0f, 0.0f));
-
-            TableView controlLayout = new TableView(1, 2);
-            controlLayout.ParentOrigin = NDalic.ParentOriginCenter;
-            controlLayout.AnchorPoint = NDalic.AnchorPointCenter;
-            controlLayout.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.ALL_DIMENSIONS);
-            controlLayout.SetCellPadding(new Size(10.0f, 10.0f));
-            controlLayout.SetRelativeWidth(0, 0.5f);
-            controlLayout.SetRelativeWidth(1, 0.5f);
-            controlLayout.SetCellAlignment(new TableView.CellPosition(0, 0), HorizontalAlignmentType.CENTER, VerticalAlignmentType.CENTER);
-            controlLayout.SetCellAlignment(new TableView.CellPosition(0, 1), HorizontalAlignmentType.CENTER, VerticalAlignmentType.CENTER);
-            controlLayout.AddChild(okButton, new TableView.CellPosition(0, 0));
-            controlLayout.AddChild(cancelButton, new TableView.CellPosition(0, 1));
-
-            footer.Add(controlLayout);
-
-            confirmationPopup.SetFooter(footer);
-            return confirmationPopup;
+          TableView tableView = new TableView(2, 1);
+          tableView.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
+          tableView.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.HEIGHT);
+
+          RadioButton rButton = new RadioButton();
+          rButton.LabelText = "Yes";
+          rButton.Selected = true;
+          tableView.AddChild(rButton, new TableView.CellPosition(0, 0));
+
+          rButton = new RadioButton();
+          rButton.LabelText = "No";
+
+          tableView.AddChild(rButton, new TableView.CellPosition(1, 0));
+
+          _contentContainer.AddChild(tableView, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
         }
-        Actor CreateTitle(string title)
+        if (item.name.CompareTo("Tooltip") == 0)
         {
-            TextLabel titleActor = new TextLabel(title);
-            titleActor.TextColor = Color.White;
-            titleActor.MultiLine = true;
-            titleActor.HorizontalAlignment = "center";
-            return titleActor;
+          TableView tableView = new TableView(2, 1);
+          tableView.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
+          tableView.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.HEIGHT);
+
+          // Create two push buttons and add them to a table view
+          PushButton buttonWithSimpleTooltip = new PushButton();
+          buttonWithSimpleTooltip.LabelText = "Tooltip with text only";
+          buttonWithSimpleTooltip.UnselectedColor = new Vector4(0.5f,0.5f,0.7f,1.0f);
+          buttonWithSimpleTooltip.SelectedColor = new Vector4(0.7f,0.5f,0.7f,1.0f);
+          buttonWithSimpleTooltip.WidthResizePolicy = "FILL_TO_PARENT";
+          tableView.AddChild(buttonWithSimpleTooltip, new TableView.CellPosition(0, 0));
+
+          PushButton buttonWithIconTooltip = new PushButton();
+          buttonWithIconTooltip.LabelText = "Tooltip with Text and Icon";
+          buttonWithIconTooltip.WidthResizePolicy = "FILL_TO_PARENT";
+          buttonWithIconTooltip.UnselectedColor = new Vector4(0.5f,0.5f,0.7f,1.0f);
+          buttonWithIconTooltip.SelectedColor = new Vector4(0.7f,0.5f,0.7f,1.0f);
+          tableView.AddChild(buttonWithIconTooltip, new TableView.CellPosition(1, 0));
+
+          // Add a simple text only tooltip to the first push button
+          buttonWithSimpleTooltip.TooltipText = "Simple Tooltip";
+
+          // Create a property map for a tooltip with one icon and one text
+          Property.Array iconTooltipContent = new Property.Array();
+
+          Property.Map iconVisual = new Property.Map();
+          iconVisual.Add( Dali.Constants.Visual.Property.Type, new Property.Value((int)Dali.Constants.Visual.Type.Image) )
+            .Add( Dali.Constants.ImageVisualProperty.URL, new Property.Value("./images/star-highlight.png") );
+          iconTooltipContent.Add(new Property.Value(iconVisual));
+
+          Property.Map textVisual = new Property.Map();
+          textVisual.Add( Dali.Constants.Visual.Property.Type, new Property.Value((int)Dali.Constants.Visual.Type.Text) )
+            .Add( Dali.Constants.TextVisualProperty.Text, new Property.Value("Tooltip with Icon") );
+          iconTooltipContent.Add(new Property.Value(textVisual));
+
+          Property.Map iconTooltip = new Property.Map();
+          iconTooltip.Add( Dali.Constants.Tooltip.Property.Content, new Property.Value(iconTooltipContent) )
+            .Add( Dali.Constants.Tooltip.Property.Tail, new Property.Value(true) );
+
+          // Add the tooltip with icon and text to the second push button
+          buttonWithIconTooltip.Tooltip = iconTooltip;
+
+          _contentContainer.AddChild(tableView, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
         }
-
-        PushButton CreateOKButton()
+        if (item.name.CompareTo("Popup") == 0)
         {
-            PushButton okayButton = new PushButton();
-            okayButton.SetName("OKButton");
-            okayButton.LabelText = "OK";
-            okayButton.SetKeyboardFocusable(true);
-            okayButton.Clicked += (obj, ee) =>
-            {
-                _popup.SetDisplayState(Popup.DisplayStateType.HIDDEN);
-                return true;
-            };
-            return okayButton;
+          PushButton button = new PushButton();
+          button.LabelText = "Popup";
+          button.ParentOrigin = NDalic.ParentOriginCenter;
+          button.AnchorPoint = NDalic.AnchorPointCenter;
+          button.MaximumSize = new Vector2(90.0f,50.0f);
+          _popup = CreatePopup();
+          _popup.SetTitle(CreateTitle("Popup"));
+
+          TextLabel text = new TextLabel("This will erase the file permanently. Are you sure?");
+          text.BackgroundColor = Color.White;
+          text.MultiLine = true;
+          text.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
+          text.SetResizePolicy(ResizePolicyType.DIMENSION_DEPENDENCY, DimensionType.HEIGHT);
+          text.SetPadding(new PaddingType(10.0f, 10.0f, 20.0f, 0.0f));
+          _popup.SetContent(text);
+          _popup.SetKeyboardFocusable(true);
+          _popup.SetDisplayState(Popup.DisplayStateType.HIDDEN);
+
+          button.Clicked += (obj, ee) =>
+          {
+            _stage.Add(_popup);
+            _popup.SetDisplayState(Popup.DisplayStateType.SHOWN);
+            FocusManager.Instance.SetCurrentFocusActor((_popup.FindChildByName( "Footer" )).FindChildByName("OKButton"));
+            return true;
+          };
+          _contentContainer.AddChild(button, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
         }
-        PushButton CreateCancelButton()
+        if (item.name.CompareTo("Toast") == 0)
         {
-            PushButton cancelButton = new PushButton();
-            cancelButton.LabelText = "Cancel";
-            cancelButton.SetKeyboardFocusable(true);
-            cancelButton.Clicked += (obj, ee) =>
+          PushButton button = new PushButton();
+          button.LabelText = "Toast";
+          button.ParentOrigin = NDalic.ParentOriginCenter;
+          button.AnchorPoint = NDalic.AnchorPointCenter;
+          button.Clicked += (obj, ee) =>
+          {
+            TypeInfo typeInfo = new TypeInfo(TypeRegistry.Get().GetTypeInfo( "PopupToast" ));
+            if( typeInfo )
             {
-                _popup.SetDisplayState(Popup.DisplayStateType.HIDDEN);
-                return true;
-            };
-            return cancelButton;
+              BaseHandle baseHandle = typeInfo.CreateInstance();
+              if( baseHandle )
+              {
+                Popup toast = Popup.DownCast( baseHandle );
+                TextLabel text = new TextLabel("This is a Toast.\nIt will auto-hide itself");
+                text.TextColor = Color.White;
+                text.MultiLine = true;
+                text.HorizontalAlignment = "center";
+                toast.SetTitle( text);
+                _stage.Add(toast);
+                toast.SetDisplayState( Popup.DisplayStateType.SHOWN);
+              }
+            }
+            return true;
+          };
+          _contentContainer.AddChild(button, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
         }
-
-        public void MainLoop()
+        if (item.name.CompareTo("ItemView") == 0)
         {
-            _application.MainLoop();
-        }
 
-        /// <summary>
-        /// The main entry point for the application.
-        /// </summary>
+        }
+      }
+      else
+      {
+        ImageView notSupportView = new ImageView("images/not_yet_sign.png");
+        notSupportView.Size = new Vector3(_stage.GetSize().Width * 0.2f, _stage.GetSize().Height * 0.25f, 0.0f);
+        notSupportView.SetKeyboardFocusable(true);
+        _contentContainer.AddChild(notSupportView, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
+      }
+    }
+    Popup CreatePopup()
+    {
+      Popup confirmationPopup = new Popup();
+
+      Actor footer = new Actor();
+      footer.SetName("Footer");
+      footer.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.WIDTH);
+      footer.SetResizePolicy(ResizePolicyType.FIXED, DimensionType.HEIGHT);
+      footer.SetSize(0.0f, 80.0f);
+      footer.ParentOrigin = NDalic.ParentOriginCenter;
+      footer.AnchorPoint = NDalic.AnchorPointCenter;
+
+      PushButton okButton = CreateOKButton();
+      okButton.ParentOrigin = NDalic.ParentOriginCenter;
+      okButton.AnchorPoint = NDalic.AnchorPointCenter;
+      okButton.SetResizePolicy(ResizePolicyType.SIZE_FIXED_OFFSET_FROM_PARENT, DimensionType.ALL_DIMENSIONS);
+      okButton.SetSizeModeFactor(new Vector3(-20.0f, -20.0f, 0.0f));
+
+      PushButton cancelButton = CreateCancelButton();
+      cancelButton.ParentOrigin = NDalic.ParentOriginCenter;
+      cancelButton.AnchorPoint = NDalic.AnchorPointCenter;
+      cancelButton.SetResizePolicy(ResizePolicyType.SIZE_FIXED_OFFSET_FROM_PARENT, DimensionType.ALL_DIMENSIONS);
+      cancelButton.SetSizeModeFactor(new Vector3(-20.0f, -20.0f, 0.0f));
+
+      TableView controlLayout = new TableView(1, 2);
+      controlLayout.ParentOrigin = NDalic.ParentOriginCenter;
+      controlLayout.AnchorPoint = NDalic.AnchorPointCenter;
+      controlLayout.SetResizePolicy(ResizePolicyType.FILL_TO_PARENT, DimensionType.ALL_DIMENSIONS);
+      controlLayout.SetCellPadding(new Size(10.0f, 10.0f));
+      controlLayout.SetRelativeWidth(0, 0.5f);
+      controlLayout.SetRelativeWidth(1, 0.5f);
+      controlLayout.SetCellAlignment(new TableView.CellPosition(0, 0), HorizontalAlignmentType.CENTER, VerticalAlignmentType.CENTER);
+      controlLayout.SetCellAlignment(new TableView.CellPosition(0, 1), HorizontalAlignmentType.CENTER, VerticalAlignmentType.CENTER);
+      controlLayout.AddChild(okButton, new TableView.CellPosition(0, 0));
+      controlLayout.AddChild(cancelButton, new TableView.CellPosition(0, 1));
+
+      footer.Add(controlLayout);
+
+      confirmationPopup.SetFooter(footer);
+      return confirmationPopup;
+    }
+    Actor CreateTitle(string title)
+    {
+      TextLabel titleActor = new TextLabel(title);
+      titleActor.TextColor = Color.White;
+      titleActor.MultiLine = true;
+      titleActor.HorizontalAlignment = "center";
+      return titleActor;
+    }
 
-        [STAThread]
-        static void Main(string[] args)
-        {
-            Console.WriteLine("Hello Mono World");
+    PushButton CreateOKButton()
+    {
+      PushButton okayButton = new PushButton();
+      okayButton.SetName("OKButton");
+      okayButton.LabelText = "OK";
+      okayButton.SetKeyboardFocusable(true);
+      okayButton.Clicked += (obj, ee) =>
+      {
+        _popup.SetDisplayState(Popup.DisplayStateType.HIDDEN);
+        return true;
+      };
+      return okayButton;
+    }
+    PushButton CreateCancelButton()
+    {
+      PushButton cancelButton = new PushButton();
+      cancelButton.LabelText = "Cancel";
+      cancelButton.SetKeyboardFocusable(true);
+      cancelButton.Clicked += (obj, ee) =>
+      {
+        _popup.SetDisplayState(Popup.DisplayStateType.HIDDEN);
+        return true;
+      };
+      return cancelButton;
+    }
 
-            Example example = new Example(Application.NewApplication());
-            example.MainLoop();
-        }
+    public void MainLoop()
+    {
+      _application.MainLoop();
     }
+
+    /// <summary>
+    /// The main entry point for the application.
+    /// </summary>
+
+    [STAThread]
+      static void Main(string[] args)
+      {
+        Console.WriteLine("Hello Mono World");
+
+        Example example = new Example(Application.NewApplication("json/control-dashboard.json"));
+        example.MainLoop();
+      }
+  }
 }
index adf3a42..2da7ea4 100644 (file)
@@ -31,7 +31,21 @@ namespace MyCSharpExample
         private int _myRating;
         private bool _myDragEnabled;
 
-        public StarRating() : base(ViewWrapperImpl.CustomViewBehaviour.VIEW_BEHAVIOUR_DEFAULT)
+        // Called by DALi Builder if it finds a StarRating control in a JSON file
+        static CustomView CreateInstance()
+        {
+          return new StarRating();
+        }
+
+        // static constructor registers the control type (only runs once)
+        static StarRating()
+        {
+          // ViewRegistry registers control type with DALi type registery
+          // also uses introspection to find any properties that need to be registered with type registry
+          ViewRegistry.Instance.Register(CreateInstance, typeof(StarRating) );
+        }
+
+        public StarRating() : base(typeof(StarRating).Name, ViewWrapperImpl.CustomViewBehaviour.VIEW_BEHAVIOUR_DEFAULT)
         {
         }
 
@@ -62,7 +76,7 @@ namespace MyCSharpExample
             UpdateStartImages(_myRating);
 
             // Enable pan gesture detection
-            EnableGestureDetection(Gesture.Type.Pan);
+            EnableGestureDetection(Gesture.GestureType.Pan);
             _myDragEnabled = true; // Allow dragging by default (can be disabled)
         }
 
@@ -72,18 +86,18 @@ namespace MyCSharpExample
             // Only handle pan gesture if dragging is allowed
             if(_myDragEnabled)
             {
-                switch (gesture.state)
+                switch (gesture.State)
                 {
-                    case Gesture.State.Started:
+                    case Gesture.StateType.Started:
                     {
                         _gestureDisplacement = new Vector3(0.0f, 0.0f, 0.0f);
                         _currentValue = 0;
                         break;
                     }
-                    case Gesture.State.Continuing:
+                    case Gesture.StateType.Continuing:
                     {
                         // Calculate the rating according to pan desture displacement
-                        _gestureDisplacement.X += gesture.displacement.X;
+                        _gestureDisplacement.X += gesture.Displacement.X;
                         int delta = (int)Math.Ceiling(_gestureDisplacement.X / 40.0f);
                         _currentValue = _myRating + delta;
 
@@ -229,6 +243,8 @@ namespace MyCSharpExample
         [STAThread]
         static void Main(string[] args)
         {
+            System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (typeof(MyCSharpExample.StarRating).TypeHandle);
+
             Example example = new Example(Application.NewApplication());
             example.MainLoop ();
         }
index 9c02eee..ce7899b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,338 +21,412 @@ using Dali;
 
 namespace MyCSharpExample
 {
-  class Example
-  {
-    [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-    delegate void CallbackDelegate(IntPtr appPtr); // void, void delgate
-
-    private Dali.Application _application;
-
-    public Example(Dali.Application application)
-    {
-      _application = application;
-      Console.WriteLine( "InitSignal connection count = " + _application.InitSignal().GetConnectionCount() );
-
-      _application.Initialized += Initialize;
-      Console.WriteLine( "InitSignal connection count = " + _application.InitSignal().GetConnectionCount() );
-    }
-
-    public void Initialize(object source, NUIApplicationInitEventArgs e)
-    {
-
-      OperatorTests();
-
-      Handle handle = new Handle();
-      int myPropertyIndex = handle.RegisterProperty("myProperty", new Property.Value(10.0f), Property.AccessMode.READ_WRITE);
-      float myProperty = 0.0f;
-      handle.GetProperty(myPropertyIndex).Get(ref myProperty);
-      Console.WriteLine( "myProperty value: " + myProperty );
-
-      int myPropertyIndex2 = handle.RegisterProperty("myProperty2", new Property.Value(new Size(5.0f, 5.0f)), Property.AccessMode.READ_WRITE);
-      Size myProperty2 = new Size(0.0f, 0.0f);
-      handle.GetProperty(myPropertyIndex2).Get(myProperty2);
-      Console.WriteLine( "myProperty2 value: " + myProperty2.W + ", " + myProperty2.H );
-
-      Actor actor = new Actor();
-      actor.Size = new Position(200.0f, 200.0f, 0.0f);
-      actor.Name = "MyActor";
-      actor.Color = new Color(1.0f, 0.0f, 1.0f, 0.8f);
-      Console.WriteLine("Actor id: {0}", actor.GetId());
-      Console.WriteLine("Actor size: " + actor.Size.X + ", " + actor.Size.Y);
-      Console.WriteLine("Actor name: " + actor.Name);
-
-      Stage stage = Stage.GetCurrent();
-      stage.BackgroundColor = Color.White;
-
-      Size stageSize = stage.Size;
-      Console.WriteLine("Stage size: " + stageSize.W + ", " + stageSize.H);
-      stage.Add(actor);
-
-      TextLabel text = new TextLabel("Hello Mono World");
-      text.ParentOrigin = NDalic.ParentOriginCenter;
-      text.AnchorPoint = NDalic.AnchorPointCenter;
-      text.HorizontalAlignment = "CENTER";
-      stage.Add(text);
-
-      Console.WriteLine( "Text label text:  " + text.Text );
-
-      Console.WriteLine( "Text label point size:  " + text.PointSize );
-      text.PointSize = 32.0f;
-      Console.WriteLine( "Text label new point size:  " + text.PointSize );
-
-      using (RectInteger ri = new RectInteger(02,05,20,30))
-      {
-        Console.WriteLine( "    Created " + ri );
-        Console.WriteLine( "    IsEmpty() =  " + ri.IsEmpty() );
-        Console.WriteLine( "    Left =  " + ri.Left() );
-        Console.WriteLine( "    Right =  " + ri.Right() );
-        Console.WriteLine( "    Top  = " + ri.Top() );
-        Console.WriteLine( "    Bottom  = " + ri.Bottom() );
-        Console.WriteLine( "    Area  = " + ri.Area() );
-      }
-      Console.WriteLine( " *************************" );
-      using (RectInteger ri2 = new RectInteger(02,05,20,30))
-      {
-        Console.WriteLine( "    Created " + ri2 );
-        ri2.Set(1,1,40,40);
-        Console.WriteLine( "    IsEmpty() =  " + ri2.IsEmpty() );
-        Console.WriteLine( "    Left =  " + ri2.Left() );
-        Console.WriteLine( "    Right =  " + ri2.Right() );
-        Console.WriteLine( "    Top  = " + ri2.Top() );
-        Console.WriteLine( "    Bottom  = " + ri2.Bottom() );
-        Console.WriteLine( "    Area  = " + ri2.Area() );
-      }
-      Console.WriteLine( " *************************" );
-      using (RectDouble rd = new RectDouble(02,05,20.5,30.5))
-      {
-        Console.WriteLine( "    Created " + rd );
-        Console.WriteLine( "    IsEmpty() =  " + rd.IsEmpty() );
-        Console.WriteLine( "    Left =  " + rd.Left() );
-        Console.WriteLine( "    Right =  " + rd.Right() );
-        Console.WriteLine( "    Top  = " + rd.Top() );
-        Console.WriteLine( "    Bottom  = " + rd.Bottom() );
-        Console.WriteLine( "    Area  = " + rd.Area() );
-      }
-      Console.WriteLine( " *************************" );
-      RectDouble rd2 = new RectDouble();
-      rd2.x = 10;
-      rd2.y = 10;
-      rd2.width = 20;
-      rd2.height = 20;
-      Console.WriteLine( "    Created " + rd2 );
-      Console.WriteLine( "    IsEmpty() =  " + rd2.IsEmpty() );
-      Console.WriteLine( "    Left =  " + rd2.Left() );
-      Console.WriteLine( "    Right =  " + rd2.Right() );
-      Console.WriteLine( "    Top  = " + rd2.Top() );
-      Console.WriteLine( "    Bottom  = " + rd2.Bottom() );
-      Console.WriteLine( "    Area  = " + rd2.Area() );
-
-      Console.WriteLine( " *************************" );
-      Size Size = new Size(100, 50);
-      Console.WriteLine( "    Created " + Size );
-      Console.WriteLine( "    Size x =  " + Size.W + ", y = " + Size.H );
-      Size += new Size(20, 20);
-      Console.WriteLine( "    Size x =  " + Size.W + ", y = " + Size.H );
-      Size.W += 10;
-      Size.H += 10;
-      Console.WriteLine( "    Size width =  " + Size.W + ", height = " + Size.H );
-
-      Console.WriteLine( " *************************" );
-      Position Position = new Position(20, 100, 50);
-      Console.WriteLine( "    Created " + Position );
-      Console.WriteLine( "    Position x =  " + Position.X + ", y = " + Position.Y + ", z = " + Position.Z );
-      Position += new Position(20, 20, 20);
-      Console.WriteLine( "    Position x =  " + Position.X + ", y = " + Position.Y + ", z = " + Position.Z );
-      Position.X += 10;
-      Position.Y += 10;
-      Position.Z += 10;
-      Console.WriteLine( "    Position width =  " + Position.X + ", height = " + Position.Y + ", depth = " + Position.Z );
-      Position parentOrigin = new Dali.Position(NDalic.ParentOriginBottomRight);
-      Console.WriteLine( "    parentOrigin x =  " + parentOrigin.X + ", y = " + parentOrigin.Y + ", z = " + parentOrigin.Z );
-
-      Console.WriteLine( " *************************" );
-      Color color = new Color(20, 100, 50, 200);
-      Console.WriteLine( "    Created " + color );
-      Console.WriteLine( "    Color R =  " + color.R + ", G = " + color.G + ", B = " + color.B + ", A = " + color.A );
-      color += new Color(20, 20, 20, 20);
-      Console.WriteLine( "    Color R =  " + color.R + ", G = " + color.G + ", B = " + color.B + ", A = " + color.A );
-      color.R += 10;
-      color.G += 10;
-      color.B += 10;
-      color.A += 10;
-      Console.WriteLine( "    Color r =  " + color.R + ", g = " + color.G + ", b = " + color.B + ", a = " + color.A );
-    }
-
-
-  public void OperatorTests()
-  {
-    Actor actor = new Actor();
-    Actor differentActor = new Actor();
-    Actor actorSame = actor;
-    Actor nullActor = null;
-
-      // test the true operator
-    if ( actor )
-    {
-      Console.WriteLine ("BaseHandle Operator true (actor) : test passed ");
-    }
-    else
-    {
-      Console.WriteLine ("BaseHandle Operator true (actor): test failed ");
-    }
-
-    Actor parent = actor.GetParent ();
-
-    if ( parent )
-    {
-      Console.WriteLine ("Handle with Empty body  :failed ");
-    }
-    else
-    {
-      Console.WriteLine ("Valid with Empty body  :passed ");
-    }
-
-    actor.Add( differentActor );
-    // here we test two different C# objects, which on the native side have the same body/ ref-object
-    if ( actor == differentActor.GetParent() )
-    {
-       Console.WriteLine ("actor == differentActor.GetParent() :passed ");
-    }
-    else
-    {
-      Console.WriteLine ("actor == differentActor.GetParent() :failed ");
-    }
-
-    if ( differentActor == differentActor.GetParent() )
-    {
-       Console.WriteLine ("differentActor == differentActor.GetParent() :failed ");
-    }
-    else
-    {
-      Console.WriteLine ("differentActor == differentActor.GetParent() :passed ");
-    }
-
-
-    if ( nullActor )
-    {
-      Console.WriteLine ("BaseHandle Operator true (nullActor) : test failed ");
-    }
-    else
-    {
-      Console.WriteLine ("BaseHandle Operator true (nullActor): test passed ");
-    }
-
-    // ! operator
-    if ( !actor )
-    {
-      Console.WriteLine ("BaseHandle Operator !(actor) : test failed ");
-    }
-    else
-    {
-      Console.WriteLine ("BaseHandle Operator !(actor): test passed ");
-    }
-
-    if ( !nullActor )
-    {
-      Console.WriteLine ("BaseHandle Operator !(nullActor) : test passed ");
-    }
-    else
-    {
-      Console.WriteLine ("BaseHandle Operator !(nullActor): test failed ");
-    }
-
-    // Note: operator false only used inside & operator
-    // test equality operator ==
-    if ( actor == actorSame )
-    {
-      Console.WriteLine ("BaseHandle Operator  (actor == actorSame) : test passed");
-    }
-    else
-    {
-      Console.WriteLine ("BaseHandle Operator  (actor == actorSame) : test failed");
+    class Example
+    {
+        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+        delegate void CallbackDelegate(IntPtr appPtr); // void, void delgate
+
+        private Dali.Application _application;
+
+        public Example(Dali.Application application)
+        {
+            _application = application;
+            Console.WriteLine( "InitSignal connection count = " + _application.InitSignal().GetConnectionCount() );
+
+            _application.Initialized += Initialize;
+            Console.WriteLine( "InitSignal connection count = " + _application.InitSignal().GetConnectionCount() );
+        }
+
+        public void Initialize(object source, NUIApplicationInitEventArgs e)
+        {
+            OperatorTests();
+
+            CustomViewPropertyTest();
+
+            Handle handle = new Handle();
+            int myPropertyIndex = handle.RegisterProperty("myProperty", new Property.Value(10.0f), Property.AccessMode.READ_WRITE);
+            float myProperty = 0.0f;
+            handle.GetProperty(myPropertyIndex).Get(ref myProperty);
+            Console.WriteLine( "myProperty value: " + myProperty );
+
+            int myPropertyIndex2 = handle.RegisterProperty("myProperty2", new Property.Value(new Size(5.0f, 5.0f)), Property.AccessMode.READ_WRITE);
+            Size myProperty2 = new Size(0.0f, 0.0f);
+            handle.GetProperty(myPropertyIndex2).Get(myProperty2);
+            Console.WriteLine( "myProperty2 value: " + myProperty2.W + ", " + myProperty2.H );
+
+            Actor actor = new Actor();
+            actor.Size = new Position(200.0f, 200.0f, 0.0f);
+            actor.Name = "MyActor";
+            actor.Color = new Color(1.0f, 0.0f, 1.0f, 0.8f);
+            Console.WriteLine("Actor id: {0}", actor.GetId());
+            Console.WriteLine("Actor size: " + actor.Size.X + ", " + actor.Size.Y);
+            Console.WriteLine("Actor name: " + actor.Name);
+
+            Stage stage = Stage.GetCurrent();
+            stage.BackgroundColor = Color.White;
+            Size stageSize = stage.Size;
+            Console.WriteLine("Stage size: " + stageSize.W + ", " + stageSize.H);
+            stage.Add(actor);
+
+            TextLabel text = new TextLabel("Hello Mono World");
+            text.ParentOrigin = NDalic.ParentOriginCenter;
+            text.AnchorPoint = NDalic.AnchorPointCenter;
+            text.HorizontalAlignment = "CENTER";
+            stage.Add(text);
+
+            Console.WriteLine( "Text label text:  " + text.Text );
+
+            Console.WriteLine( "Text label point size:  " + text.PointSize );
+            text.PointSize = 32.0f;
+            Console.WriteLine( "Text label new point size:  " + text.PointSize );
+
+            RectanglePaddingClassTest();
+
+            Console.WriteLine( " *************************" );
+            Size Size = new Size(100, 50);
+            Console.WriteLine( "    Created " + Size );
+            Console.WriteLine( "    Size x =  " + Size.W + ", y = " + Size.H );
+            Size += new Size(20, 20);
+            Console.WriteLine( "    Size x =  " + Size.W + ", y = " + Size.H );
+            Size.W += 10;
+            Size.H += 10;
+            Console.WriteLine( "    Size width =  " + Size.W + ", height = " + Size.H );
+
+            Console.WriteLine( " *************************" );
+            Position Position = new Position(20, 100, 50);
+            Console.WriteLine( "    Created " + Position );
+            Console.WriteLine( "    Position x =  " + Position.X + ", y = " + Position.Y + ", z = " + Position.Z );
+            Position += new Position(20, 20, 20);
+            Console.WriteLine( "    Position x =  " + Position.X + ", y = " + Position.Y + ", z = " + Position.Z );
+            Position.X += 10;
+            Position.Y += 10;
+            Position.Z += 10;
+            Console.WriteLine( "    Position width =  " + Position.X + ", height = " + Position.Y + ", depth = " + Position.Z );
+            Position parentOrigin = new Dali.Position(NDalic.ParentOriginBottomRight);
+            Console.WriteLine( "    parentOrigin x =  " + parentOrigin.X + ", y = " + parentOrigin.Y + ", z = " + parentOrigin.Z );
+
+            Console.WriteLine( " *************************" );
+            Color color = new Color(20, 100, 50, 200);
+            Console.WriteLine( "    Created " + color );
+            Console.WriteLine( "    Color R =  " + color.R + ", G = " + color.G + ", B = " + color.B + ", A = " + color.A );
+            color += new Color(20, 20, 20, 20);
+            Console.WriteLine( "    Color R =  " + color.R + ", G = " + color.G + ", B = " + color.B + ", A = " + color.A );
+            color.R += 10;
+            color.G += 10;
+            color.B += 10;
+            color.A += 10;
+            Console.WriteLine( "    Color r =  " + color.R + ", g = " + color.G + ", b = " + color.B + ", a = " + color.A );
+        }
+
+        public void RectanglePaddingClassTest()
+        {
+            using (Rectangle r1 = new Rectangle(2, 5, 20, 30))
+            {
+                Console.WriteLine( "    Created " + r1 );
+                Console.WriteLine( "    IsEmpty() =  " + r1.IsEmpty() );
+                Console.WriteLine( "    Left =  " + r1.Left() );
+                Console.WriteLine( "    Right =  " + r1.Right() );
+                Console.WriteLine( "    Top  = " + r1.Top() );
+                Console.WriteLine( "    Bottom  = " + r1.Bottom() );
+                Console.WriteLine( "    Area  = " + r1.Area() );
+            }
+
+            Console.WriteLine( " *************************" );
+
+            using (Rectangle r2 = new Rectangle(2, 5, 20, 30))
+            {
+                Console.WriteLine( "    Created " + r2 );
+                r2.Set(1,1,40,40);
+                Console.WriteLine( "    IsEmpty() =  " + r2.IsEmpty() );
+                Console.WriteLine( "    Left =  " + r2.Left() );
+                Console.WriteLine( "    Right =  " + r2.Right() );
+                Console.WriteLine( "    Top  = " + r2.Top() );
+                Console.WriteLine( "    Bottom  = " + r2.Bottom() );
+                Console.WriteLine( "    Area  = " + r2.Area() );
+            }
+
+            Console.WriteLine( " *************************" );
+
+            Rectangle r3 = new Rectangle(10, 10, 20, 20);
+            Rectangle r4 = new Rectangle(10, 10, 20, 20);
+
+            if (r3 == r4)
+            {
+                Console.WriteLine("r3 == r4");
+            }
+            else
+            {
+                Console.WriteLine("r3 != r4");
+            }
+
+            r4 = new Rectangle(12, 10, 20, 20);
+
+            if (r3 == r4)
+            {
+                Console.WriteLine("r3 == r4");
+            }
+            else
+            {
+                Console.WriteLine("r3 != r4");
+            }
+
+            PaddingType p1 = new PaddingType(10.5f, 10.7f, 20.8f, 20.8f);
+            PaddingType p2 = new PaddingType(10.5f, 10.7f, 20.8f, 20.8f);
+
+            if (p1 == p2)
+            {
+                Console.WriteLine("p1 == p2");
+            }
+            else
+            {
+                Console.WriteLine("p1 != p2");
+            }
+
+            p2 = new PaddingType(12.0f, 10.7f, 20.2f, 20.0f);
+
+            if (p1 == p2)
+            {
+                Console.WriteLine("p1 == p2");
+            }
+            else
+            {
+                Console.WriteLine("p1 != p2");
+            }
+        }
+
+        public void OperatorTests()
+        {
+            Actor actor = new Actor();
+            Actor differentActor = new Actor();
+            Actor actorSame = actor;
+            Actor nullActor = null;
+
+            // test the true operator
+            if ( actor )
+            {
+                Console.WriteLine ("BaseHandle Operator true (actor) : test passed ");
+            }
+            else
+            {
+                Console.WriteLine ("BaseHandle Operator true (actor): test failed ");
+            }
+
+            Actor parent = actor.GetParent ();
+
+            if ( parent )
+            {
+                Console.WriteLine ("Handle with Empty body  :failed ");
+            }
+            else
+            {
+                Console.WriteLine ("Valid with Empty body  :passed ");
+            }
+
+            actor.Add( differentActor );
+
+            // here we test two different C# objects, which on the native side have the same body/ ref-object
+            if ( actor == differentActor.GetParent() )
+            {
+                Console.WriteLine ("actor == differentActor.GetParent() :passed ");
+            }
+            else
+            {
+                Console.WriteLine ("actor == differentActor.GetParent() :failed ");
+            }
+
+            if ( differentActor == differentActor.GetParent() )
+            {
+                Console.WriteLine ("differentActor == differentActor.GetParent() :failed ");
+            }
+            else
+            {
+                Console.WriteLine ("differentActor == differentActor.GetParent() :passed ");
+            }
+
+            if ( nullActor )
+            {
+                Console.WriteLine ("BaseHandle Operator true (nullActor) : test failed ");
+            }
+            else
+            {
+                Console.WriteLine ("BaseHandle Operator true (nullActor): test passed ");
+            }
+
+            // ! operator
+            if ( !actor )
+            {
+                Console.WriteLine ("BaseHandle Operator !(actor) : test failed ");
+            }
+            else
+            {
+                Console.WriteLine ("BaseHandle Operator !(actor): test passed ");
+            }
+
+            if ( !nullActor )
+            {
+                Console.WriteLine ("BaseHandle Operator !(nullActor) : test passed ");
+            }
+            else
+            {
+                Console.WriteLine ("BaseHandle Operator !(nullActor): test failed ");
+            }
+
+            // Note: operator false only used inside & operator
+            // test equality operator ==
+            if ( actor == actorSame )
+            {
+                Console.WriteLine ("BaseHandle Operator  (actor == actorSame) : test passed");
+            }
+            else
+            {
+                Console.WriteLine ("BaseHandle Operator  (actor == actorSame) : test failed");
+            }
+
+            if ( actor == differentActor )
+            {
+                Console.WriteLine ("BaseHandle Operator (actor == differentActor) : test failed");
+            }
+            else
+            {
+                Console.WriteLine ("BaseHandle Operator (actor == differentActor) : test passed");
+            }
+
+            if ( actor == nullActor )
+            {
+                Console.WriteLine ("BaseHandle Operator (actor == nullActor) : test failed");
+            }
+            else
+            {
+                Console.WriteLine ("BaseHandle Operator (actor == nullActor) : test passed");
+            }
+
+            if ( nullActor == nullActor )
+            {
+                Console.WriteLine ("BaseHandle Operator (nullActor == nullActor) : test passed");
+            }
+            else
+            {
+                Console.WriteLine ("BaseHandle Operator (nullActor == nullActor) : test failed");
+            }
+
+            // test || operator
+            if ( actor || actorSame )
+            {
+                Console.WriteLine ("BaseHandle Operator (actor || actorSame) : test passed");
+            }
+            else
+            {
+                Console.WriteLine ("BaseHandle Operator (actor || actorSame) : test failed");
+            }
+
+            if ( actor || nullActor )
+            {
+                Console.WriteLine ("BaseHandle Operator (actor || nullActor) : test passed");
+            }
+            else
+            {
+                Console.WriteLine ("BaseHandle Operator (actor || nullActor) : test failed");
+            }
+
+            if ( nullActor || nullActor )
+            {
+                Console.WriteLine ("BaseHandle Operator (nullActor || nullActor) : test failed");
+            }
+            else
+            {
+                Console.WriteLine ("BaseHandle Operator (nullActor || nullActor) : test passed");
+            }
+
+            // test && operator
+            if ( actor && actorSame )
+            {
+                Console.WriteLine ("BaseHandle Operator (actor && actorSame) : test passed");
+            }
+            else
+            {
+                Console.WriteLine ("BaseHandle Operator (actor && actorSame) : test failed");
+            }
+
+            if ( actor && nullActor )
+            {
+                Console.WriteLine ("BaseHandle Operator (actor && nullActor) : test failed");
+            }
+            else
+            {
+                Console.WriteLine ("BaseHandle Operator (actor && nullActor) : test passed");
+            }
+
+            if ( nullActor && nullActor )
+            {
+                Console.WriteLine ("BaseHandle Operator (nullActor && nullActor) : test failed");
+            }
+            else
+            {
+                Console.WriteLine ("BaseHandle Operator (nullActor && nullActor) : test passed");
+            }
+        }
+
+        public void CustomViewPropertyTest()
+        {
+            // Create a Spin control
+            Spin spin = new Spin();
+
+            // Background property
+            Property.Map background = new Property.Map();
+            background.Add( Dali.Constants.Visual.Property.Type, new Property.Value((int)Dali.Constants.Visual.Type.Color) )
+                .Add( Dali.Constants.ColorVisualProperty.MixColor, new Property.Value(Color.Red) );
+            spin.Background = background;
+
+            background = spin.Background;
+            Vector4 backgroundColor = new Vector4();
+            background.Find(Dali.Constants.ColorVisualProperty.MixColor).Get(backgroundColor);
+            if( backgroundColor == Color.Red )
+            {
+                Console.WriteLine ("Custom View Background property : test passed");
+            }
+            else
+            {
+                Console.WriteLine ("Custom View Background property : test failed");
+            }
+
+            // BackgroundColor property
+            spin.BackgroundColor = Color.Yellow;
+            if(spin.BackgroundColor == Color.Yellow)
+            {
+                Console.WriteLine ("Custom View BackgroundColor property : test passed");
+            }
+            else
+            {
+                Console.WriteLine ("Custom View BackgroundColor property : test failed");
+            }
+
+            // StyleName property
+            spin.StyleName = "MyCustomStyle";
+            if(spin.StyleName == "MyCustomStyle")
+            {
+                Console.WriteLine ("Custom View StyleName property : test passed");
+            }
+            else
+            {
+                Console.WriteLine ("Custom View StyleName property : test failed");
+            }
+        }
+
+        public void MainLoop()
+        {
+            _application.MainLoop ();
+        }
+
+        /// <summary>
+        /// The main entry point for the application.
+        /// </summary>
+        [STAThread]
+        static void Main(string[] args)
+        {
+            Console.WriteLine ("Hello Mono World");
+
+            Example example = new Example(Application.NewApplication());
+            example.MainLoop ();
+        }
     }
-
-    if ( actor == differentActor )
-    {
-      Console.WriteLine ("BaseHandle Operator (actor == differentActor) : test failed");
-    }
-    else
-    {
-      Console.WriteLine ("BaseHandle Operator (actor == differentActor) : test passed");
-    }
-
-    if ( actor == nullActor )
-    {
-      Console.WriteLine ("BaseHandle Operator (actor == nullActor) : test failed");
-    }
-    else
-    {
-      Console.WriteLine ("BaseHandle Operator (actor == nullActor) : test passed");
-    }
-
-    if ( nullActor == nullActor )
-    {
-      Console.WriteLine ("BaseHandle Operator (nullActor == nullActor) : test passed");
-    }
-    else
-    {
-      Console.WriteLine ("BaseHandle Operator (nullActor == nullActor) : test failed");
-    }
-
-    // test || operator
-    if ( actor || actorSame )
-    {
-      Console.WriteLine ("BaseHandle Operator (actor || actorSame) : test passed");
-    }
-    else
-    {
-      Console.WriteLine ("BaseHandle Operator (actor || actorSame) : test failed");
-    }
-
-    if ( actor || nullActor )
-    {
-      Console.WriteLine ("BaseHandle Operator (actor || nullActor) : test passed");
-    }
-    else
-    {
-      Console.WriteLine ("BaseHandle Operator (actor || nullActor) : test failed");
-    }
-
-    if ( nullActor || nullActor )
-    {
-      Console.WriteLine ("BaseHandle Operator (nullActor || nullActor) : test failed");
-    }
-    else
-    {
-      Console.WriteLine ("BaseHandle Operator (nullActor || nullActor) : test passed");
-    }
-
-
-    // test && operator
-    if ( actor && actorSame )
-    {
-      Console.WriteLine ("BaseHandle Operator (actor && actorSame) : test passed");
-    }
-    else
-    {
-      Console.WriteLine ("BaseHandle Operator (actor && actorSame) : test failed");
-    }
-
-    if ( actor && nullActor )
-    {
-      Console.WriteLine ("BaseHandle Operator (actor && nullActor) : test failed");
-    }
-    else
-    {
-      Console.WriteLine ("BaseHandle Operator (actor && nullActor) : test passed");
-    }
-
-    if ( nullActor && nullActor )
-    {
-      Console.WriteLine ("BaseHandle Operator (nullActor && nullActor) : test failed");
-    }
-    else
-    {
-      Console.WriteLine ("BaseHandle Operator (nullActor && nullActor) : test passed");
-    }
-
-  }
-
-    public void MainLoop()
-    {
-      _application.MainLoop ();
-    }
-
-    /// <summary>
-    /// The main entry point for the application.
-    /// </summary>
-    [STAThread]
-      static void Main(string[] args)
-      {
-        Console.WriteLine ("Hello Mono World");
-
-        Example example = new Example(Application.NewApplication());
-        example.MainLoop ();
-      }
-  }
 }
diff --git a/plugins/dali-swig/examples/date-picker-using-json.cs b/plugins/dali-swig/examples/date-picker-using-json.cs
new file mode 100644 (file)
index 0000000..dbc388c
--- /dev/null
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.Runtime.InteropServices;
+using Dali;
+
+namespace MyCSharpExample
+{
+    // A spin control (for continously changing values when users can easily predict a set of values)
+
+    class Example
+    {
+        private Dali.Application _application;
+        private Spin _spinYear;  // spin control for year
+        private Spin _spinMonth; // spin control for month
+        private Spin _spinDay;   // spin control for day
+        private Builder _builder; // DALi Builder
+
+        public Example(Dali.Application application)
+        {
+            _application = application;
+            _application.Initialized += Initialize;
+        }
+
+        public void Initialize(object source, NUIApplicationInitEventArgs e)
+        {
+
+            Stage stage = Stage.GetCurrent();
+            stage.BackgroundColor = Color.White;
+
+            // load date JSON template...
+
+            _builder = new Builder ();
+
+            // Optional constant to see logging information coming out
+            // of DALi JSON parser (builder)
+            Property.Map constants = new  Property.Map();
+            constants.Insert( "CONFIG_SCRIPT_LOG_LEVEL",  new Property.Value( "Verbose") );
+            _builder.AddConstants( constants );
+
+            _builder.LoadFromFile( "./json/date-picker.json" );
+
+            // create the date-picker from the template in the json file
+            BaseHandle handle =  _builder.Create( "date-picker");
+
+            Actor actorTree =  Actor.DownCast( handle );
+
+            stage.Add( actorTree );
+
+            Actor year  = actorTree.FindChildByName("Year");
+            Actor month  =  actorTree.FindChildByName("Month" );
+            Actor day  = actorTree.FindChildByName("Day");
+
+            // need to get the actual C# View associated with the actor,
+            _spinYear = (Spin ) ViewRegistry.GetCustomViewFromActor( year );
+            _spinMonth = (Spin ) ViewRegistry.GetCustomViewFromActor( month );
+            _spinDay = (Spin ) ViewRegistry.GetCustomViewFromActor( day );
+
+            _spinYear.Value = 2099;
+            _spinMonth.Value = 5;
+            _spinDay.Value = 23;
+
+
+            _spinYear.SetKeyboardFocusable(true);
+            _spinMonth.SetKeyboardFocusable(true);
+            _spinDay.SetKeyboardFocusable(true);
+
+
+            FocusManager keyboardFocusManager = FocusManager.Instance;
+            keyboardFocusManager.PreFocusChange += OnKeyboardPreFocusChange;
+            keyboardFocusManager.FocusedActorEnterKeyPressed += OnFocusedActorEnterKeyPressed;
+
+        }
+
+        private Actor OnKeyboardPreFocusChange(object source, FocusManager.PreFocusChangeEventArgs e)
+        {
+            Actor nextFocusActor = e.Proposed;
+
+            // When nothing has been focused initially, focus the text field in the first spin
+            if (!e.Current && !e.Proposed)
+            {
+                nextFocusActor = _spinYear.SpinText;
+            }
+            else if(e.Direction == View.KeyboardFocus.Direction.LEFT)
+            {
+                // Move the focus to the spin in the left of the current focused spin
+                if(e.Current == _spinMonth.SpinText)
+                {
+                    nextFocusActor = _spinYear.SpinText;
+                }
+                else if(e.Current == _spinDay.SpinText)
+                {
+                    nextFocusActor = _spinMonth.SpinText;
+                }
+            }
+            else if(e.Direction == View.KeyboardFocus.Direction.RIGHT)
+            {
+                // Move the focus to the spin in the right of the current focused spin
+                if(e.Current == _spinYear.SpinText)
+                {
+                    nextFocusActor = _spinMonth.SpinText;
+                }
+                else if(e.Current == _spinMonth.SpinText)
+                {
+                    nextFocusActor = _spinDay.SpinText;
+                }
+            }
+
+            return nextFocusActor;
+        }
+
+        private void OnFocusedActorEnterKeyPressed(object source, FocusManager.FocusedActorEnterKeyEventArgs e)
+        {
+            // Make the text field in the current focused spin to take the key input
+            KeyInputFocusManager manager = KeyInputFocusManager.Get();
+
+            if (e.Actor == _spinYear.SpinText)
+            {
+                if (manager.GetCurrentFocusControl() != _spinYear.SpinText)
+                {
+                    manager.SetFocus(_spinYear.SpinText);
+                }
+            }
+            else if (e.Actor == _spinMonth.SpinText)
+            {
+                if (manager.GetCurrentFocusControl() != _spinMonth.SpinText)
+                {
+                    manager.SetFocus(_spinMonth.SpinText);
+                }
+            }
+            else if (e.Actor == _spinDay.SpinText)
+            {
+                if (manager.GetCurrentFocusControl() != _spinDay.SpinText)
+                {
+                    manager.SetFocus(_spinDay.SpinText);
+                }
+            }
+        }
+
+        public void MainLoop()
+        {
+            _application.MainLoop ();
+        }
+
+        /// <summary>
+        /// The main entry point for the application.
+        /// </summary>
+        [STAThread]
+        static void Main(string[] args)
+        {
+            Example example = new Example(Application.NewApplication());
+            example.MainLoop ();
+        }
+    }
+}
diff --git a/plugins/dali-swig/examples/date-picker.cs b/plugins/dali-swig/examples/date-picker.cs
new file mode 100644 (file)
index 0000000..c9701cf
--- /dev/null
@@ -0,0 +1,196 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.Runtime.InteropServices;
+using Dali;
+
+namespace MyCSharpExample
+{
+    // A spin control (for continously changing values when users can easily predict a set of values)
+
+    class Example
+    {
+        private Dali.Application _application;
+        private FlexContainer _container;   // Flex container to hold spin controls
+        private Spin _spinYear;  // spin control for year
+        private Spin _spinMonth; // spin control for month
+        private Spin _spinDay;   // spin control for day
+
+        public Example(Dali.Application application)
+        {
+            _application = application;
+            _application.Initialized += Initialize;
+        }
+
+        public void Initialize(object source, NUIApplicationInitEventArgs e)
+        {
+
+            Stage stage = Stage.GetCurrent();
+            stage.BackgroundColor = Color.White;
+
+            // Create a container for the spins
+            _container = new FlexContainer();
+
+            _container.ParentOrigin = NDalic.ParentOriginCenter;
+            _container.AnchorPoint = NDalic.AnchorPointCenter;
+            _container.FlexDirection = (int)FlexContainer.FlexDirectionType.ROW;
+            _container.Size = new Vector3(480.0f, 150.0f, 0.0f);
+
+            stage.Add(_container);
+
+            // Create a Spin control for year
+            _spinYear = new Spin();
+            _spinYear.ParentOrigin = NDalic.ParentOriginCenter;
+            _spinYear.AnchorPoint = NDalic.AnchorPointCenter;
+            _spinYear.Flex = 0.3f;
+            _spinYear.FlexMargin = new Vector4(5.0f, 0.0f, 5.0f, 0.0f);
+            _container.Add(_spinYear);
+
+            _spinYear.MinValue = 1900;
+            _spinYear.MaxValue = 2100;
+            _spinYear.Value = 2016;
+            _spinYear.Step = 1;
+            _spinYear.MaxTextLength = 4;
+            _spinYear.TextPointSize = 26;
+            _spinYear.TextColor = Color.White;
+            _spinYear.SetKeyboardFocusable(true);
+            _spinYear.Name = "_spinYear";
+
+            // Create a Spin control for month
+            _spinMonth = new Spin();
+            _spinMonth.ParentOrigin = NDalic.ParentOriginCenter;
+            _spinMonth.AnchorPoint = NDalic.AnchorPointCenter;
+            _spinMonth.Flex = 0.3f;
+            _spinMonth.FlexMargin = new Vector4(5.0f, 0.0f, 5.0f, 0.0f);
+            _container.Add(_spinMonth);
+
+            _spinMonth.MinValue = 1;
+            _spinMonth.MaxValue = 12;
+            _spinMonth.Value = 10;
+            _spinMonth.Step = 1;
+            _spinMonth.MaxTextLength = 2;
+            _spinMonth.TextPointSize = 26;
+            _spinMonth.TextColor = Color.White;
+            _spinMonth.SetKeyboardFocusable(true);
+            _spinMonth.Name = "_spinMonth";
+
+            // Create a Spin control for day
+            _spinDay = new Spin();
+            _spinDay.ParentOrigin = NDalic.ParentOriginCenter;
+            _spinDay.AnchorPoint = NDalic.AnchorPointCenter;
+            _spinDay.Flex = 0.3f;
+            _spinDay.FlexMargin = new Vector4(5.0f, 0.0f, 5.0f, 0.0f);
+            _container.Add(_spinDay);
+
+            _spinDay.MinValue = 1;
+            _spinDay.MaxValue = 31;
+            _spinDay.Value = 26;
+            _spinDay.Step = 1;
+            _spinDay.MaxTextLength = 2;
+            _spinDay.TextPointSize = 26;
+            _spinDay.TextColor = Color.White;
+            _spinDay.SetKeyboardFocusable(true);
+            _spinDay.Name = "_spinDay";
+
+            FocusManager keyboardFocusManager = FocusManager.Instance;
+            keyboardFocusManager.PreFocusChange += OnKeyboardPreFocusChange;
+            keyboardFocusManager.FocusedActorEnterKeyPressed += OnFocusedActorEnterKeyPressed;
+
+        }
+
+        private Actor OnKeyboardPreFocusChange(object source, FocusManager.PreFocusChangeEventArgs e)
+        {
+            Actor nextFocusActor = e.Proposed;
+
+            // When nothing has been focused initially, focus the text field in the first spin
+            if (!e.Current && !e.Proposed)
+            {
+                nextFocusActor = _spinYear.SpinText;
+            }
+            else if(e.Direction == View.KeyboardFocus.Direction.LEFT)
+            {
+                // Move the focus to the spin in the left of the current focused spin
+                if(e.Current == _spinMonth.SpinText)
+                {
+                    nextFocusActor = _spinYear.SpinText;
+                }
+                else if(e.Current == _spinDay.SpinText)
+                {
+                    nextFocusActor = _spinMonth.SpinText;
+                }
+            }
+            else if(e.Direction == View.KeyboardFocus.Direction.RIGHT)
+            {
+                // Move the focus to the spin in the right of the current focused spin
+                if(e.Current == _spinYear.SpinText)
+                {
+                    nextFocusActor = _spinMonth.SpinText;
+                }
+                else if(e.Current == _spinMonth.SpinText)
+                {
+                    nextFocusActor = _spinDay.SpinText;
+                }
+            }
+
+            return nextFocusActor;
+        }
+
+        private void OnFocusedActorEnterKeyPressed(object source, FocusManager.FocusedActorEnterKeyEventArgs e)
+        {
+            // Make the text field in the current focused spin to take the key input
+            KeyInputFocusManager manager = KeyInputFocusManager.Get();
+
+            if (e.Actor == _spinYear.SpinText)
+            {
+                if (manager.GetCurrentFocusControl() != _spinYear.SpinText)
+                {
+                    manager.SetFocus(_spinYear.SpinText);
+                }
+            }
+            else if (e.Actor == _spinMonth.SpinText)
+            {
+                if (manager.GetCurrentFocusControl() != _spinMonth.SpinText)
+                {
+                    manager.SetFocus(_spinMonth.SpinText);
+                }
+            }
+            else if (e.Actor == _spinDay.SpinText)
+            {
+                if (manager.GetCurrentFocusControl() != _spinDay.SpinText)
+                {
+                    manager.SetFocus(_spinDay.SpinText);
+                }
+            }
+        }
+
+        public void MainLoop()
+        {
+            _application.MainLoop ();
+        }
+
+        /// <summary>
+        /// The main entry point for the application.
+        /// </summary>
+        [STAThread]
+        static void Main(string[] args)
+        {
+            Example example = new Example(Application.NewApplication());
+            example.MainLoop ();
+        }
+    }
+}
index 324d5dd..314c9a8 100755 (executable)
@@ -39,7 +39,7 @@ namespace MyCSharpExample
       Console.WriteLine("Customized Application Initialize event handler");
       Stage stage = Stage.Instance;
       stage.BackgroundColor = Color.White;
-      stage.TouchEvent += OnStageTouched;
+      stage.Touch += OnStageTouched;
 
       // Add a _text label to the stage
       _text = new TextLabel("Hello Mono World");
@@ -66,7 +66,7 @@ namespace MyCSharpExample
     public void OnStageTouched(object sender, Stage.TouchEventArgs e)
     {
       // Only animate the _text label when touch down happens
-      if( e.TouchData.GetState(0) == PointStateType.DOWN )
+      if( e.Touch.GetState(0) == PointStateType.DOWN )
       {
         Console.WriteLine("Customized Stage Touch event handler");
         // Create a new _animation
index 43656a2..7cd5359 100755 (executable)
@@ -49,9 +49,9 @@ namespace ImageViewExample
       Log("Customized Application Initialize event handler");
       stage = Stage.Instance;
       stage.BackgroundColor = Color.Cyan;
-      stage.TouchEvent += OnStageTouched;
-      stage.WheelEvent += OnStageWheelMoved;
-      stage.KeyEvent += OnStageKeyPressed;
+      stage.Touch += OnStageTouched;
+      stage.Wheel += OnStageWheelMoved;
+      stage.Key += OnStageKeyPressed;
       //stage.EventProcessingFinished += OnStageEventProcessingFinished;
 
       layer = stage.GetDefaultLayer();
@@ -202,21 +202,21 @@ namespace ImageViewExample
     public void OnStageKeyPressed(object sender, Stage.KeyEventArgs e)
     {
       Log("OnStageKeyEventOccured()!");
-      Log("keyPressedName=" + e.KeyEvent.keyPressedName);
-      Log("state=" + e.KeyEvent.state);
+      Log("keyPressedName=" + e.Key.KeyPressedName);
+      Log("state=" + e.Key.State);
     }
 
     public void OnStageWheelMoved(object sender, Stage.WheelEventArgs e)
     {
       Log("OnStageWheelEventOccured()!");
-      Log("direction=" + e.WheelEvent.direction);
-      Log("type=" + e.WheelEvent.type);
+      Log("direction=" + e.Wheel.Direction);
+      Log("type=" + e.Wheel.Type);
     }
 
     // Callback for stage touched signal handling
     public void OnStageTouched(object sender, Stage.TouchEventArgs e)
     {
-      Log("OnStageTouched()! e.TouchData.GetState(0)=" + e.TouchData.GetState(0) );
+      Log("OnStageTouched()! e.TouchData.GetState(0)=" + e.Touch.GetState(0));
     }
 
     public void MainLoop()
diff --git a/plugins/dali-swig/examples/images/star-mod.png b/plugins/dali-swig/examples/images/star-mod.png
new file mode 100644 (file)
index 0000000..2e3212e
Binary files /dev/null and b/plugins/dali-swig/examples/images/star-mod.png differ
diff --git a/plugins/dali-swig/examples/json-loader.cs b/plugins/dali-swig/examples/json-loader.cs
new file mode 100644 (file)
index 0000000..388b077
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.Runtime.InteropServices;
+using Dali;
+
+namespace MyExampleApp
+{
+  class Example
+  {
+    private Dali.Application _application;
+    private Builder _builder;
+    private string _jsonFileName;
+
+    public Example(Dali.Application application, string fileName)
+    {
+      _application = application;
+      _jsonFileName = fileName;
+      _application.Initialized += Initialize;
+    }
+
+    public void Initialize(object source, NUIApplicationInitEventArgs e)
+    {
+        if( _jsonFileName.Length == 0)
+        {
+          Console.WriteLine("Please specify JSON file to load");
+          return;
+        }
+
+        _builder = new Builder ();
+
+        Property.Map constants = new  Property.Map();
+
+        //  In dali-demo we have some JSON files that can be loaded, but they need 3 different macros defining.
+        // The JSON folder is typically installed into dali-env/opt/share/com.samsung.dali-demo/res:
+        //
+        //string demoDirectory = ".../dali-env/opt/share/com.samsung.dali-demo/res";
+        //constants.Insert( "DEMO_IMAGE_DIR" ,  new Property.Value( demoDirectory+"/images") );
+        //constants.Insert( "DEMO_MODEL_DIR" ,  new Property.Value( demoDirectory+"/models") );
+        //constants.Insert( "DEMO_SCRIPT_DIR",  new Property.Value( demoDirectory+"/scripts") );
+        constants.Insert( "CONFIG_SCRIPT_LOG_LEVEL",  new Property.Value( "Verbose") );
+
+         _builder.AddConstants( constants );
+
+
+        Stage stage = Stage.GetCurrent();
+        stage.BackgroundColor = Color.White;
+
+        _builder.LoadFromFile( _jsonFileName );
+
+        _builder.AddActors( stage.GetRootLayer() );
+
+    }
+
+
+    public void MainLoop()
+    {
+      _application.MainLoop ();
+    }
+
+    /// <summary>
+    /// The main entry point for the application.
+    /// </summary>
+    [STAThread]
+    static void Main(string[] args)
+    {
+      string fileName= "";
+
+      if( args.Length > 0)
+      {
+          fileName = args[0];
+      }
+
+      Console.WriteLine("arguments = " + args.Length);
+      Example example = new Example(Application.NewApplication(), fileName);
+      example.MainLoop ();
+    }
+  }
+}
diff --git a/plugins/dali-swig/examples/json/control-dashboard.json b/plugins/dali-swig/examples/json/control-dashboard.json
new file mode 100644 (file)
index 0000000..c2609c4
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * This file is part of Dali Toolkit
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+{
+  "styles":
+  {
+    "ProgressBar":
+    {
+    }
+  }
+}
diff --git a/plugins/dali-swig/examples/json/date-picker-template.json b/plugins/dali-swig/examples/json/date-picker-template.json
new file mode 100644 (file)
index 0000000..dd01d8f
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * 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.
+ *
+ */
+{
+  // Data picker loaded directly on to the stage
+  //
+  "templates": {
+    "date-picker":
+    {
+      "type":"FlexContainer",
+      "name":"exampleDatePicker",
+      "parentOrigin": "CENTER",
+      "anchorPoint": "CENTER",
+      "flexDirection":"ROW",
+      "size":[480.0, 150, 0 ],
+      "actors": [
+      {
+
+        "type": "Spin",
+        "name": "Year",
+        "parentOrigin": "CENTER",
+        "anchorPoint": "CENTER",
+        "Value":2017,
+        "MinValue":1900,
+        "MaxValue":2100,
+        "Step":1,
+        "TextColor":[0.0,0.0,1.0,1.0],
+        "properties": { // properties registered dynamically
+            "flex":0.3,
+            "flexMargin": [5.0,0.0,5.0,0.0]
+        }
+      },
+      {
+
+        "type": "Spin",
+        "name": "Month",
+        "parentOrigin": "CENTER",
+        "anchorPoint": "CENTER",
+        "parentOrigin": "CENTER",
+        "Value":10,
+        "Step":1,
+        "MinValue":1,
+        "MaxValue":12,
+        "TextColor":[1.0,1.0,1.0,1.0],
+        "properties": { // properties registered dynamically
+            "flex":0.3,
+            "flexMargin": [5.0,0.0,5.0,0.0]
+        }
+
+      },
+      {
+
+        "type": "Spin",
+        "name": "Day",
+        "parentOrigin": "CENTER",
+        "anchorPoint": "CENTER",
+        "Value":1,
+        "MinValue":1,
+        "MaxValue":31,
+        "TextColor":[1.0,0.0,0.0,1.0],
+         "properties": { // properties registered dynamically
+            "flex":0.3,
+            "flexMargin": [5.0,0.0,5.0,0.0]
+        }
+      }]
+
+    }
+}
+
+}
+
diff --git a/plugins/dali-swig/examples/json/date-picker.json b/plugins/dali-swig/examples/json/date-picker.json
new file mode 100644 (file)
index 0000000..3126aa3
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * 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.
+ *
+ */
+{
+  // Data picker loaded directly on to the stage
+  //
+  "stage": [{
+
+      "type":"FlexContainer",
+      "name":"exampleDatePicker",
+      "parentOrigin": "CENTER",
+      "anchorPoint": "CENTER",
+      "flexDirection":"ROW",
+      "size":[480.0, 150, 0 ],
+      "actors": [
+      {
+
+        "type": "Spin",
+        "name": "Year",
+        "parentOrigin": "CENTER",
+        "anchorPoint": "CENTER",
+        "MinValue":1900,
+        "MaxValue":2100,
+        "Value":2017,
+        "Step":1,
+        "TextColor":[0.0,0.0,1.0,1.0],
+        "properties": { // properties registered dynamically
+            "flex":0.3,
+            "flexMargin": [5.0,0.0,5.0,0.0]
+        }
+      },
+      {
+
+        "type": "Spin",
+        "name": "Month",
+        "parentOrigin": "CENTER",
+        "anchorPoint": "CENTER",
+        "parentOrigin": "CENTER",
+        "Step":1,
+        "MinValue":1,
+        "MaxValue":12,
+        "Value":10,
+        "TextColor":[1.0,1.0,1.0,1.0],
+        "properties": { // properties registered dynamically
+            "flex":0.3,
+            "flexMargin": [5.0,0.0,5.0,0.0]
+        }
+
+      },
+      {
+
+        "type": "Spin",
+        "name": "Day",
+        "parentOrigin": "CENTER",
+        "anchorPoint": "CENTER",
+        "MinValue":1,
+        "MaxValue":31,
+        "Value":1,
+        "TextColor":[1.0,0.0,0.0,1.0],
+         "properties": { // properties registered dynamically
+            "flex":0.3,
+            "flexMargin": [5.0,0.0,5.0,0.0]
+        }
+      }]
+
+}]
+
+}
+
diff --git a/plugins/dali-swig/examples/json/spin.json b/plugins/dali-swig/examples/json/spin.json
new file mode 100644 (file)
index 0000000..df9b10c
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ *
+ */
+{
+  // a tree of actors
+  "stage": [
+    // You can add an array of  Actors / Views here
+    // Lets add a spin to the stage
+    {
+      "type":"Spin",
+      "parentOrigin":"CENTER",
+      "size":[120,120,0]
+      // now lets use the C# app json-loader.exe to load it
+    }
+
+  ]
+}
index 71e7ff0..834c4bd 100755 (executable)
@@ -154,7 +154,7 @@ namespace MyCSharpExample
       Console.WriteLine("View TOUCH EVENT callback....");
 
       // Only animate the _text label when touch down happens
-      if( e.TouchData.GetState(0) == PointStateType.DOWN )
+      if( e.Touch.GetState(0) == PointStateType.DOWN )
       {
         Console.WriteLine("Customized Stage Touch event handler");
         // Create a new _animation
diff --git a/plugins/dali-swig/examples/spin-control.cs b/plugins/dali-swig/examples/spin-control.cs
deleted file mode 100755 (executable)
index f385852..0000000
+++ /dev/null
@@ -1,460 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-using System;
-using System.Runtime.InteropServices;
-using Dali;
-
-namespace MyCSharpExample
-{
-    // A spin control (for continously changing values when users can easily predict a set of values)
-    class Spin : CustomView
-    {
-        private VisualBase _arrowVisual;
-        private TextField _textField;
-        private int _arrowVisualPropertyIndex;
-        private string _arrowImage;
-        private int _currentValue;
-        private int _minValue;
-        private int _maxValue;
-        private int _singleStep;
-        private bool _wrappingEnabled;
-        private string _fontFamily;
-        private string _fontStyle;
-        private int _pointSize;
-        private Color _textColor;
-        private Color _textBackgroundColor;
-        private int _maxTextLength;
-
-        public Spin() : base(ViewWrapperImpl.CustomViewBehaviour.REQUIRES_KEYBOARD_NAVIGATION_SUPPORT | ViewWrapperImpl.CustomViewBehaviour.DISABLE_STYLE_CHANGE_SIGNALS)
-        {
-        }
-
-        public override void OnInitialize()
-        {
-            // Initialize the properties
-            _arrowImage = "./images/arrow.png";
-            _textBackgroundColor = new Color(0.6f, 0.6f, 0.6f, 1.0f);
-            _currentValue = 0;
-            _minValue = 0;
-            _maxValue = 0;
-            _singleStep = 1;
-            _maxTextLength = 0;
-
-            // Create image visual for the arrow keys
-            _arrowVisualPropertyIndex = RegisterProperty("ArrowImage", new Dali.Property.Value(_arrowImage), Dali.Property.AccessMode.READ_WRITE);
-            _arrowVisual =  VisualFactory.Get().CreateVisual( _arrowImage, new Uint16Pair(150, 150) );
-            RegisterVisual( _arrowVisualPropertyIndex, _arrowVisual );
-
-            // Create a text field
-            _textField = new TextField();
-            _textField.ParentOrigin = NDalic.ParentOriginCenter;
-            _textField.AnchorPoint = NDalic.AnchorPointCenter;
-            _textField.WidthResizePolicy = "SIZE_RELATIVE_TO_PARENT";
-            _textField.HeightResizePolicy = "SIZE_RELATIVE_TO_PARENT";
-            _textField.SizeModeFactor = new Vector3( 1.0f, 0.45f, 1.0f );
-            _textField.PlaceholderText = "----";
-            _textField.BackgroundColor = _textBackgroundColor;
-            _textField.HorizontalAlignment = "Center";
-            _textField.VerticalAlignment = "Center";
-            _textField.SetKeyboardFocusable(true);
-            _textField.Name = "_textField";
-
-            this.Add(_textField);
-
-            _textField.KeyInputFocusGained += TextFieldKeyInputFocusGained;
-            _textField.KeyInputFocusLost += TextFieldKeyInputFocusLost;
-        }
-
-        public override Vector3 GetNaturalSize()
-        {
-            return new Vector3(150.0f, 150.0f, 0.0f);
-        }
-
-        public void TextFieldKeyInputFocusGained(object source, KeyInputFocusGainedEventArgs e)
-        {
-            // Make sure when the current spin that takes input focus also takes the keyboard focus
-            // For example, when you tap the spin directly
-            FocusManager.Instance.SetCurrentFocusActor(_textField);
-        }
-
-        public void TextFieldKeyInputFocusLost(object source, KeyInputFocusLostEventArgs e)
-        {
-            int previousValue = _currentValue;
-
-            // If the input value is invalid, change it back to the previous valid value
-            if(int.TryParse(_textField.Text, out _currentValue))
-            {
-                if (_currentValue < _minValue || _currentValue > _maxValue)
-                {
-                    _currentValue = previousValue;
-                }
-            }
-            else
-            {
-                _currentValue = previousValue;
-            }
-
-            // Otherwise take the new value
-            this.Value = _currentValue;
-        }
-
-        public override Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, View.KeyboardFocus.Direction direction, bool loopEnabled)
-        {
-            // Respond to Up/Down keys to change the value while keeping the current spin focused
-            Actor nextFocusedActor = currentFocusedActor;
-            if (direction == View.KeyboardFocus.Direction.UP)
-            {
-                this.Value += this.Step;
-                nextFocusedActor = _textField;
-            }
-            else if (direction == View.KeyboardFocus.Direction.DOWN)
-            {
-                this.Value -= this.Step;
-                nextFocusedActor = _textField;
-            }
-            else
-            {
-                // Return a native empty handle as nothing can be focused in the left or right
-                nextFocusedActor = new Actor();
-                nextFocusedActor.Reset();
-            }
-
-            return nextFocusedActor;
-        }
-
-        // Value property of type int:
-        public int Value
-        {
-            get
-            {
-                return _currentValue;
-            }
-            set
-            {
-                _currentValue = value;
-
-                // Make sure no invalid value is accepted
-                if (_currentValue < _minValue)
-                {
-                    _currentValue = _minValue;
-                }
-
-                if (_currentValue > _maxValue)
-                {
-                    _currentValue = _maxValue;
-                }
-
-                _textField.Text = _currentValue.ToString();
-            }
-        }
-
-        // MinValue property of type int:
-        public int MinValue
-        {
-            get
-            {
-                return _minValue;
-            }
-            set
-            {
-              _minValue = value;
-            }
-        }
-
-        // MaxValue property of type int:
-        public int MaxValue
-        {
-            get
-            {
-                return _maxValue;
-            }
-            set
-            {
-              _maxValue = value;
-            }
-        }
-
-        // Step property of type int:
-        public int Step
-        {
-            get
-            {
-                return _singleStep;
-            }
-            set
-            {
-              _singleStep = value;
-            }
-        }
-
-        // WrappingEnabled property of type bool:
-        public bool WrappingEnabled
-        {
-            get
-            {
-                return _wrappingEnabled;
-            }
-            set
-            {
-              _wrappingEnabled = value;
-            }
-        }
-
-        // TextPointSize property of type int:
-        public int TextPointSize
-        {
-            get
-            {
-                return _pointSize;
-            }
-            set
-            {
-              _pointSize = value;
-              _textField.PointSize = _pointSize;
-            }
-        }
-
-        // TextColor property of type Color:
-        public Color TextColor
-        {
-            get
-            {
-                return _textColor;
-            }
-            set
-            {
-              _textColor = value;
-              _textField.TextColor = _textColor;
-            }
-        }
-
-        // MaxTextLength property of type int:
-        public int MaxTextLength
-        {
-            get
-            {
-                return _maxTextLength;
-            }
-            set
-            {
-                _maxTextLength = value;
-                _textField.MaxLength = _maxTextLength;
-            }
-        }
-
-        public TextField SpinText
-        {
-            get
-            {
-                return _textField;
-            }
-            set
-            {
-                _textField = value;
-            }
-        }
-
-        // Indicator property of type string:
-        public string IndicatorImage
-        {
-            get
-            {
-                return _arrowImage;
-            }
-            set
-            {
-              _arrowImage = value;
-              _arrowVisual =  VisualFactory.Get().CreateVisual( _arrowImage, new Uint16Pair(150, 150) );
-              RegisterVisual( _arrowVisualPropertyIndex, _arrowVisual );
-            }
-        }
-    }
-
-    class Example
-    {
-        private Dali.Application _application;
-        private FlexContainer _container;
-        private Spin _spinYear;
-        private Spin _spinMonth;
-        private Spin _spinDay;
-
-        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-        delegate void CallbackDelegate();
-
-        public Example(Dali.Application application)
-        {
-            _application = application;
-            _application.Initialized += Initialize;
-        }
-
-        public void Initialize(object source, NUIApplicationInitEventArgs e)
-        {
-            Stage stage = Stage.GetCurrent();
-            stage.BackgroundColor = Color.White;
-
-            // Create a container for the spins
-            _container = new FlexContainer();
-
-            _container.ParentOrigin = NDalic.ParentOriginCenter;
-            _container.AnchorPoint = NDalic.AnchorPointCenter;
-            _container.FlexDirection = (int)FlexContainer.FlexDirectionType.ROW;
-            _container.Size = new Vector3(480.0f, 150.0f, 0.0f);
-
-            stage.Add(_container);
-
-            // Create a Spin control for year
-            _spinYear = new Spin();
-            _spinYear.ParentOrigin = NDalic.ParentOriginCenter;
-            _spinYear.AnchorPoint = NDalic.AnchorPointCenter;
-            _spinYear.Flex = 0.3f;
-            _spinYear.FlexMargin = new Vector4(5.0f, 0.0f, 5.0f, 0.0f);
-            _container.Add(_spinYear);
-
-            _spinYear.MinValue = 1900;
-            _spinYear.MaxValue = 2100;
-            _spinYear.Value = 2016;
-            _spinYear.Step = 1;
-            _spinYear.MaxTextLength = 4;
-            _spinYear.TextPointSize = 26;
-            _spinYear.TextColor = Color.White;
-            _spinYear.SetKeyboardFocusable(true);
-            _spinYear.Name = "_spinYear";
-
-            // Create a Spin control for month
-            _spinMonth = new Spin();
-            _spinMonth.ParentOrigin = NDalic.ParentOriginCenter;
-            _spinMonth.AnchorPoint = NDalic.AnchorPointCenter;
-            _spinMonth.Flex = 0.3f;
-            _spinMonth.FlexMargin = new Vector4(5.0f, 0.0f, 5.0f, 0.0f);
-            _container.Add(_spinMonth);
-
-            _spinMonth.MinValue = 1;
-            _spinMonth.MaxValue = 12;
-            _spinMonth.Value = 10;
-            _spinMonth.Step = 1;
-            _spinMonth.MaxTextLength = 2;
-            _spinMonth.TextPointSize = 26;
-            _spinMonth.TextColor = Color.White;
-            _spinMonth.SetKeyboardFocusable(true);
-            _spinMonth.Name = "_spinMonth";
-
-            // Create a Spin control for day
-            _spinDay = new Spin();
-            _spinDay.ParentOrigin = NDalic.ParentOriginCenter;
-            _spinDay.AnchorPoint = NDalic.AnchorPointCenter;
-            _spinDay.Flex = 0.3f;
-            _spinDay.FlexMargin = new Vector4(5.0f, 0.0f, 5.0f, 0.0f);
-            _container.Add(_spinDay);
-
-            _spinDay.MinValue = 1;
-            _spinDay.MaxValue = 31;
-            _spinDay.Value = 26;
-            _spinDay.Step = 1;
-            _spinDay.MaxTextLength = 2;
-            _spinDay.TextPointSize = 26;
-            _spinDay.TextColor = Color.White;
-            _spinDay.SetKeyboardFocusable(true);
-            _spinDay.Name = "_spinDay";
-
-            FocusManager keyboardFocusManager = FocusManager.Instance;
-            keyboardFocusManager.PreFocusChange += OnKeyboardPreFocusChange;
-            keyboardFocusManager.FocusedActorEnterKeyPressed += OnFocusedActorEnterKeyPressed;
-
-        }
-
-        private Actor OnKeyboardPreFocusChange(object source, FocusManager.PreFocusChangeEventArgs e)
-        {
-            Actor nextFocusActor = e.Proposed;
-
-            // When nothing has been focused initially, focus the text field in the first spin
-            if (!e.Current && !e.Proposed)
-            {
-                nextFocusActor = _spinYear.SpinText;
-            }
-            else if(e.Direction == View.KeyboardFocus.Direction.LEFT)
-            {
-                // Move the focus to the spin in the left of the current focused spin
-                if(e.Current == _spinMonth.SpinText)
-                {
-                    nextFocusActor = _spinYear.SpinText;
-                }
-                else if(e.Current == _spinDay.SpinText)
-                {
-                    nextFocusActor = _spinMonth.SpinText;
-                }
-            }
-            else if(e.Direction == View.KeyboardFocus.Direction.RIGHT)
-            {
-                // Move the focus to the spin in the right of the current focused spin
-                if(e.Current == _spinYear.SpinText)
-                {
-                    nextFocusActor = _spinMonth.SpinText;
-                }
-                else if(e.Current == _spinMonth.SpinText)
-                {
-                    nextFocusActor = _spinDay.SpinText;
-                }
-            }
-
-            return nextFocusActor;
-        }
-
-        private void OnFocusedActorEnterKeyPressed(object source, FocusManager.FocusedActorEnterKeyEventArgs e)
-        {
-            // Make the text field in the current focused spin to take the key input
-            KeyInputFocusManager manager = KeyInputFocusManager.Get();
-
-            if (e.Actor == _spinYear.SpinText)
-            {
-                if (manager.GetCurrentFocusControl() != _spinYear.SpinText)
-                {
-                    manager.SetFocus(_spinYear.SpinText);
-                }
-            }
-            else if (e.Actor == _spinMonth.SpinText)
-            {
-                if (manager.GetCurrentFocusControl() != _spinMonth.SpinText)
-                {
-                    manager.SetFocus(_spinMonth.SpinText);
-                }
-            }
-            else if (e.Actor == _spinDay.SpinText)
-            {
-                if (manager.GetCurrentFocusControl() != _spinDay.SpinText)
-                {
-                    manager.SetFocus(_spinDay.SpinText);
-                }
-            }
-        }
-
-        public void MainLoop()
-        {
-            _application.MainLoop ();
-        }
-
-        /// <summary>
-        /// The main entry point for the application.
-        /// </summary>
-        [STAThread]
-        static void Main(string[] args)
-        {
-            Example example = new Example(Application.NewApplication());
-            example.MainLoop ();
-        }
-    }
-}
index cd11e87..5b521b0 100755 (executable)
@@ -51,10 +51,10 @@ namespace MyCSharpExample
       Log("Initialize() is called!");
       Stage stage = Stage.GetCurrent();
       stage.BackgroundColor = Color.White;
-      stage.TouchEvent += OnStageTouched;
-      stage.TouchEvent += OnStageTouched2;
+      stage.Touch += OnStageTouched;
+      stage.Touch += OnStageTouched2;
       //stage.EventProcessingFinished += OnEventProcessingFinished;
-      stage.WheelEvent += OnStageWheelEvent;
+      stage.Wheel += OnStageWheelEvent;
 
       // Add a _text label to the stage
       _text = new TextLabel("Hello Mono World");
@@ -142,7 +142,7 @@ namespace MyCSharpExample
     public void OnStageTouched(object source, Stage.TouchEventArgs e)
     {
       // Only animate the _text label when touch down happens
-      if( e.TouchData.GetState(0) == PointStateType.DOWN )
+      if( e.Touch.GetState(0) == PointStateType.DOWN )
       {
         Log("OnStageTouched() is called! PointStateType.DOWN came!");
         myCount++;
@@ -157,7 +157,7 @@ namespace MyCSharpExample
     // Callback for stage touched signal handling
     public void OnStageTouched2(object source, Stage.TouchEventArgs e)
     {
-      Log("OnStageTouched2() is called!state="+ e.TouchData.GetState(0) );
+      Log("OnStageTouched2() is called!state="+ e.Touch.GetState(0) );
     }
 
     public void OnEventProcessingFinished(object source)
diff --git a/plugins/dali-swig/manual/cpp/devel-property-wrap.cpp b/plugins/dali-swig/manual/cpp/devel-property-wrap.cpp
new file mode 100755 (executable)
index 0000000..bbadec9
--- /dev/null
@@ -0,0 +1,210 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef CSHARP_DEVEL_PROPERTY
+#define CSHARP_DEVEL_PROPERTY
+#endif
+
+#include "common.h"
+
+#include <dali/devel-api/actors/actor-devel.h>
+#include <dali/devel-api/rendering/renderer-devel.h>
+#include <dali-toolkit/devel-api/controls/control-devel.h>
+#include <dali-toolkit/devel-api/controls/scrollable/item-view/item-view-devel.h>
+#include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
+#include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
+#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+SWIGEXPORT int SWIGSTDCALL CSharp_Actor_Property_SIBLING_ORDER_get() {
+  int jresult ;
+  int result;
+
+  result = (int)Dali::DevelActor::Property::SIBLING_ORDER;
+  jresult = (int)result;
+  return jresult;
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_View_Property_TOOLTIP_get() {
+  int jresult ;
+  int result;
+
+  result = (int)Dali::Toolkit::DevelControl::Property::TOOLTIP;
+  jresult = (int)result;
+  return jresult;
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_View_Property_STATE_get() {
+  int jresult ;
+  int result;
+
+  result = (int)Dali::Toolkit::DevelControl::Property::STATE;
+  jresult = (int)result;
+  return jresult;
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_View_Property_SUB_STATE_get() {
+  int jresult ;
+  int result;
+
+  result = (int)Dali::Toolkit::DevelControl::Property::SUB_STATE;
+  jresult = (int)result;
+  return jresult;
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_ItemView_Property_LAYOUT_get() {
+  int jresult ;
+  int result;
+
+  result = (int)Dali::Toolkit::DevelItemView::Property::LAYOUT;
+  jresult = (int)result;
+  return jresult;
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_Button_Property_UNSELECTED_VISUAL_get() {
+  int jresult ;
+  int result;
+
+  result = (int)Dali::Toolkit::DevelButton::Property::UNSELECTED_VISUAL;
+  jresult = (int)result;
+  return jresult;
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_Button_Property_SELECTED_VISUAL_get() {
+  int jresult ;
+  int result;
+
+  result = (int)Dali::Toolkit::DevelButton::Property::SELECTED_VISUAL;
+  jresult = (int)result;
+  return jresult;
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_Button_Property_DISABLED_SELECTED_VISUAL_get() {
+  int jresult ;
+  int result;
+
+  result = (int)Dali::Toolkit::DevelButton::Property::DISABLED_SELECTED_VISUAL;
+  jresult = (int)result;
+  return jresult;
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_Button_Property_DISABLED_UNSELECTED_VISUAL_get() {
+  int jresult ;
+  int result;
+
+  result = (int)Dali::Toolkit::DevelButton::Property::DISABLED_UNSELECTED_VISUAL;
+  jresult = (int)result;
+  return jresult;
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_Button_Property_UNSELECTED_BACKGROUND_VISUAL_get() {
+  int jresult ;
+  int result;
+
+  result = (int)Dali::Toolkit::DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL;
+  jresult = (int)result;
+  return jresult;
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_Button_Property_SELECTED_BACKGROUND_VISUAL_get() {
+  int jresult ;
+  int result;
+
+  result = (int)Dali::Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL;
+  jresult = (int)result;
+  return jresult;
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_Button_Property_DISABLED_UNSELECTED_BACKGROUND_VISUAL_get() {
+  int jresult ;
+  int result;
+
+  result = (int)Dali::Toolkit::DevelButton::Property::DISABLED_UNSELECTED_BACKGROUND_VISUAL;
+  jresult = (int)result;
+  return jresult;
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_Button_Property_DISABLED_SELECTED_BACKGROUND_VISUAL_get() {
+  int jresult ;
+  int result;
+
+  result = (int)Dali::Toolkit::DevelButton::Property::DISABLED_SELECTED_BACKGROUND_VISUAL;
+  jresult = (int)result;
+  return jresult;
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_Button_Property_LABEL_RELATIVE_ALIGNMENT_get() {
+  int jresult ;
+  int result;
+
+  result = (int)Dali::Toolkit::DevelButton::Property::LABEL_RELATIVE_ALIGNMENT;
+  jresult = (int)result;
+  return jresult;
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_Button_Property_LABEL_PADDING_get() {
+  int jresult ;
+  int result;
+
+  result = (int)Dali::Toolkit::DevelButton::Property::LABEL_PADDING;
+  jresult = (int)result;
+  return jresult;
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_Button_Property_VISUAL_PADDING_get() {
+  int jresult ;
+  int result;
+
+  result = (int)Dali::Toolkit::DevelButton::Property::VISUAL_PADDING;
+  jresult = (int)result;
+  return jresult;
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_Visual_Property_TRANSFORM_get() {
+  int jresult ;
+  int result;
+
+  result = (int)Dali::Toolkit::DevelVisual::Property::TRANSFORM;
+  jresult = (int)result;
+  return jresult;
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_Visual_Property_PREMULTIPLIED_ALPHA_get() {
+  int jresult ;
+  int result;
+
+  result = (int)Dali::Toolkit::DevelVisual::Property::PREMULTIPLIED_ALPHA;
+  jresult = (int)result;
+  return jresult;
+}
+
+SWIGEXPORT int SWIGSTDCALL CSharp_Visual_Property_MIX_COLOR_get() {
+  int jresult ;
+  int result;
+
+  result = (int)Dali::Toolkit::DevelVisual::Property::MIX_COLOR;
+  jresult = (int)result;
+  return jresult;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
index 3354408..9bf6950 100644 (file)
@@ -649,15 +649,21 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_ViewWrapperImpl(int jarg1) {
 }
 
 
-SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_ViewWrapperImpl_New(void * jarg1) {
+SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_ViewWrapperImpl_New(char * jarg1, void * jarg2) {
   void * jresult ;
-  Dali::Toolkit::Internal::ControlWrapper *arg1 = (Dali::Toolkit::Internal::ControlWrapper *) 0 ;
+  std::string arg1 ;
+  Dali::Toolkit::Internal::ControlWrapper *arg2 = (Dali::Toolkit::Internal::ControlWrapper *) 0 ;
   Dali::Toolkit::ControlWrapper result;
 
-  arg1 = (Dali::Toolkit::Internal::ControlWrapper *)jarg1;
+  if (!jarg1) {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
+    return 0;
+  }
+  (&arg1)->assign(jarg1);
+  arg2 = (Dali::Toolkit::Internal::ControlWrapper *)jarg2;
   {
     try {
-      result = Dali::Toolkit::Internal::ControlWrapper::New(arg1);
+      result = Dali::Toolkit::Internal::ControlWrapper::New(arg1,arg2);
     } catch (std::out_of_range& e) {
       {
         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
@@ -745,19 +751,25 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_GetControlWrapperImpl__SWIG_0(void * j
 }
 
 
-SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_ViewWrapper_New(void * jarg1) {
+SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_ViewWrapper_New(char * jarg1, void * jarg2) {
   void * jresult ;
-  Dali::Toolkit::Internal::ControlWrapper *arg1 = 0 ;
+  std::string arg1 ;
+  Dali::Toolkit::Internal::ControlWrapper *arg2 = 0 ;
   Dali::Toolkit::ControlWrapper result;
 
-  arg1 = (Dali::Toolkit::Internal::ControlWrapper *)jarg1;
-  if (!arg1) {
+  if (!jarg1) {
+    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
+    return 0;
+  }
+  (&arg1)->assign(jarg1);
+  arg2 = (Dali::Toolkit::Internal::ControlWrapper *)jarg2;
+  if (!arg2) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Toolkit::Internal::ControlWrapper & type is null", 0);
     return 0;
   }
   {
     try {
-      result = Dali::Toolkit::ControlWrapper::New(*arg1);
+      result = Dali::Toolkit::ControlWrapper::New(arg1,*arg2);
     } catch (std::out_of_range& e) {
       {
         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
index f704885..9c54cdd 100644 (file)
@@ -19,7 +19,7 @@ namespace Dali
 {
     public class CustomView : ViewWrapper
     {
-        public CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour) : base(new ViewWrapperImpl(behaviour))
+        public CustomView(string typeName, ViewWrapperImpl.CustomViewBehaviour behaviour) : base(typeName, new ViewWrapperImpl(behaviour))
         {
             // Registering CustomView virtual functions to viewWrapperImpl delegates.
             viewWrapperImpl.OnStageConnection = new ViewWrapperImpl.OnStageConnectionDelegate(OnStageConnection);
@@ -29,10 +29,10 @@ namespace Dali
             viewWrapperImpl.OnPropertySet = new ViewWrapperImpl.OnPropertySetDelegate(OnPropertySet);
             viewWrapperImpl.OnSizeSet = new ViewWrapperImpl.OnSizeSetDelegate(OnSizeSet);
             viewWrapperImpl.OnSizeAnimation = new ViewWrapperImpl.OnSizeAnimationDelegate(OnSizeAnimation);
-            viewWrapperImpl.OnTouchEvent = new ViewWrapperImpl.OnTouchEventDelegate(OnTouchEvent);
-            viewWrapperImpl.OnHoverEvent = new ViewWrapperImpl.OnHoverEventDelegate(OnHoverEvent);
-            viewWrapperImpl.OnKeyEvent = new ViewWrapperImpl.OnKeyEventDelegate(OnKeyEvent);
-            viewWrapperImpl.OnWheelEvent = new ViewWrapperImpl.OnWheelEventDelegate(OnWheelEvent);
+            viewWrapperImpl.OnTouch = new ViewWrapperImpl.OnTouchDelegate(OnTouch);
+            viewWrapperImpl.OnHover = new ViewWrapperImpl.OnHoverDelegate(OnHover);
+            viewWrapperImpl.OnKey = new ViewWrapperImpl.OnKeyDelegate(OnKey);
+            viewWrapperImpl.OnWheel = new ViewWrapperImpl.OnWheelDelegate(OnWheel);
             viewWrapperImpl.OnRelayout = new ViewWrapperImpl.OnRelayoutDelegate(OnRelayout);
             viewWrapperImpl.OnSetResizePolicy = new ViewWrapperImpl.OnSetResizePolicyDelegate(OnSetResizePolicy);
             viewWrapperImpl.GetNaturalSize = new ViewWrapperImpl.GetNaturalSizeDelegate(GetNaturalSize);
@@ -89,7 +89,7 @@ namespace Dali
          * @endcode
          * @param[in]  type  The gesture type(s) to enable.
          */
-        public void EnableGestureDetection(Gesture.Type type)
+        public void EnableGestureDetection(Gesture.GestureType type)
         {
             viewWrapperImpl.EnableGestureDetection(type);
         }
@@ -101,7 +101,7 @@ namespace Dali
          * @param[in]  type  The gesture type(s) to disable.
          * @see EnableGetureDetection
          */
-        public void DisableGestureDetection(Gesture.Type type)
+        public void DisableGestureDetection(Gesture.GestureType type)
         {
             viewWrapperImpl.DisableGestureDetection(type);
         }
@@ -171,12 +171,12 @@ namespace Dali
         /**
          * @brief Called by the KeyInputFocusManager to emit key event signals.
          *
-         * @param[in] keyEvent The key event.
+         * @param[in] key The key event.
          * @return True if the event was consumed.
          */
-        public bool EmitKeyEventSignal(KeyEvent keyEvent)
+        public bool EmitKeyEventSignal(Key key)
         {
-            return viewWrapperImpl.EmitKeyEventSignal(keyEvent);
+            return viewWrapperImpl.EmitKeyEventSignal(key);
         }
 
         /**
@@ -457,11 +457,11 @@ namespace Dali
          *
          * @brief Called after a touch-event is received by the owning actor.
          *
-         * @param[in] event The touch event
+         * @param[in] touch The touch event
          * @return True if the event should be consumed.
          * @note CustomViewBehaviour.REQUIRES_TOUCH_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour).
          */
-        public virtual bool OnTouchEvent(TouchEvent touchEvent)
+        public virtual bool OnTouch(Touch touch)
         {
             return false; // Do not consume
         }
@@ -469,11 +469,11 @@ namespace Dali
         /**
          * @brief Called after a hover-event is received by the owning actor.
          *
-         * @param[in] event The hover event
-         * @return True if the event should be consumed.
+         * @param[in] hover The hover event
+         * @return True if the hover event should be consumed.
          * @note CustomViewBehaviour.REQUIRES_HOVER_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour).
          */
-        public virtual bool OnHoverEvent(HoverEvent hoverEvent)
+        public virtual bool OnHover(Hover hover)
         {
             return false; // Do not consume
         }
@@ -481,10 +481,10 @@ namespace Dali
         /**
          * @brief Called after a key-event is received by the actor that has had its focus set.
          *
-         * @param[in] event the Key Event
+         * @param[in] key the Key Event
          * @return True if the event should be consumed.
          */
-        public virtual bool OnKeyEvent(KeyEvent keyEvent)
+        public virtual bool OnKey(Key key)
         {
             return false; // Do not consume
         }
@@ -492,11 +492,11 @@ namespace Dali
         /**
          * @brief Called after a wheel-event is received by the owning actor.
          *
-         * @param[in] event The wheel event
+         * @param[in] wheel The wheel event
          * @return True if the event should be consumed.
          * @note CustomViewBehaviour.REQUIRES_WHEEL_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour).
          */
-        public virtual bool OnWheelEvent(WheelEvent wheelEvent)
+        public virtual bool OnWheel(Wheel wheel)
         {
             return false; // Do not consume
         }
@@ -657,10 +657,10 @@ namespace Dali
          * @brief This method should be overridden by deriving classes when they wish to respond the accessibility
          * touch event.
          *
-         * @param[in] touchEvent The touch event.
+         * @param[in] touch The touch event.
          * @return true if the touch event has been consumed by this control
          */
-        public virtual bool OnAccessibilityTouch(TouchEvent touchEvent)
+        public virtual bool OnAccessibilityTouch(Touch touch)
         {
             return false;
         }
index 375445d..4b5d1f5 100755 (executable)
  */
 using System;
 
-namespace Dali 
+namespace Dali
 {
   namespace Constants
   {
 
-    public enum TextureType 
+    public enum TextureType
     {
       Texture2D     = Dali.TextureType.TEXTURE_2D,   ///< One 2D image                            @SINCE_1_1.43
       TextureCube   = Dali.TextureType.TEXTURE_CUBE  ///< Six 2D images arranged in a cube-shape  @SINCE_1_1.43
     }
 
-    public enum ViewMode 
+    public enum ViewMode
     {
       Mono              = Dali.ViewMode.MONO,                          ///< Monoscopic (single camera). This is the default @SINCE_1_0.0
       StereoHorizontal  = Dali.ViewMode.STEREO_HORIZONTAL, ///< Stereoscopic. Frame buffer is split horizontally with the left and right camera views in their respective sides. @SINCE_1_0.0
@@ -97,42 +97,6 @@ namespace Dali
 
     public struct Visual
     {
-      public static readonly int PropertyType = NDalic.VISUAL_PROPERTY_TYPE;
-      public static readonly int PropertyShader = NDalic.VISUAL_PROPERTY_SHADER;
-
-      public static readonly int VertexShader = NDalic.VERTEX_SHADER;
-      public static readonly int FragmentShader = NDalic.FRAGMENT_SHADER;
-      public static readonly int SubdivideGridX = NDalic.SUBDIVIDE_GRID_X;
-      public static readonly int SubdivideGridY = NDalic.SUBDIVIDE_GRID_Y;
-      public static readonly int Hints = NDalic.HINTS;
-
-      public static readonly int Color = NDalic.COLOR;
-      public static readonly int Size = NDalic.SIZE;
-      public static readonly int AntiAliasing = NDalic.ANTI_ALIASING;
-
-      public static readonly int MixColor = NDalic.MIX_COLOR;
-
-      public static readonly int StartPosition = NDalic.START_POSITION;
-      public static readonly int EndPosition = NDalic.END_POSITION;
-      public static readonly int Center = NDalic.CENTER;
-      public static readonly int Radius = NDalic.RADIUS;
-      public static readonly int StopOffset = NDalic.STOP_OFFSET;
-      public static readonly int StopColor = NDalic.STOP_COLOR;
-      public static readonly int Units = NDalic.UNITS;
-      public static readonly int SpreadMethod = NDalic.SPREAD_METHOD;
-
-      public static readonly int ImageVisualURL = NDalic.IMAGE_VISUAL_URL;
-      public static readonly int ImageVisualFittingMode = NDalic.IMAGE_VISUAL_FITTING_MODE;
-      public static readonly int ImageVisualSamplingMode = NDalic.IMAGE_VISUAL_SAMPLING_MODE;
-      public static readonly int ImageVisualDesiredWidth = NDalic.IMAGE_VISUAL_DESIRED_WIDTH;
-      public static readonly int ImageVisualDesiredHeight = NDalic.IMAGE_VISUAL_DESIRED_HEIGHT;
-      public static readonly int ImageVisualSynchronousLoading = NDalic.IMAGE_VISUAL_SYNCHRONOUS_LOADING;
-      public static readonly int ImageVisualBorderOnly = NDalic.IMAGE_VISUAL_BORDER_ONLY;
-      public static readonly int ImageVisualBatchingEnabled = NDalic.IMAGE_VISUAL_BATCHING_ENABLED;
-      public static readonly int ImageVisualPixelArea = NDalic.IMAGE_VISUAL_PIXEL_AREA;
-      public static readonly int ImageVisualWrapModeU = NDalic.IMAGE_VISUAL_WRAP_MODE_U;
-      public static readonly int ImageVisualWrapModeV = NDalic.IMAGE_VISUAL_WRAP_MODE_V;
-
       public enum Type
       {
         Border = Dali.VisualType.BORDER,
@@ -141,7 +105,133 @@ namespace Dali
         Image = Dali.VisualType.IMAGE,
         Mesh = Dali.VisualType.MESH,
         Primitive = Dali.VisualType.PRIMITIVE,
-        WireFrame = Dali.VisualType.WIREFRAME
+        WireFrame = Dali.VisualType.WIREFRAME,
+        Text = Dali.VisualType.TEXT
+      }
+
+      public struct Property
+      {
+        public static readonly int Type = NDalic.VISUAL_PROPERTY_TYPE;
+        public static readonly int Shader = NDalic.VISUAL_PROPERTY_SHADER;
+        public static readonly int Transform = NDalic.VISUAL_PROPERTY_TRANSFORM;
+        public static readonly int PremultipliedAlpha = NDalic.VISUAL_PROPERTY_PREMULTIPLIED_ALPHA;
+        public static readonly int MixCOlor = NDalic.VISUAL_PROPERTY_MIX_COLOR;
+      }
+
+      public struct ShaderProperty
+      {
+        public static readonly int VertexShader = NDalic.VISUAL_SHADER_VERTEX;
+        public static readonly int FragmentShader = NDalic.VISUAL_SHADER_FRAGMENT;
+        public static readonly int ShaderSubdivideGridX = NDalic.VISUAL_SHADER_SUBDIVIDE_GRID_X;
+        public static readonly int ShaderSubdivideGridY = NDalic.VISUAL_SHADER_SUBDIVIDE_GRID_Y;
+        public static readonly int ShaderHints = NDalic.VISUAL_SHADER_HINTS;
+      }
+    }
+
+    public struct BorderVisualProperty
+    {
+      public static readonly int Color = NDalic.BORDER_VISUAL_COLOR;
+      public static readonly int Size = NDalic.BORDER_VISUAL_SIZE;
+      public static readonly int AntiAliasing = NDalic.BORDER_VISUAL_ANTI_ALIASING;
+    }
+
+    public struct ColorVisualProperty
+    {
+      public static readonly int MixColor = NDalic.COLOR_VISUAL_MIX_COLOR;
+    }
+
+    public struct GradientVisualProperty
+    {
+      public static readonly int StartPosition = NDalic.GRADIENT_VISUAL_START_POSITION;
+      public static readonly int EndPosition = NDalic.GRADIENT_VISUAL_END_POSITION;
+      public static readonly int Center = NDalic.GRADIENT_VISUAL_CENTER;
+      public static readonly int Radius = NDalic.GRADIENT_VISUAL_RADIUS;
+      public static readonly int StopOffset = NDalic.GRADIENT_VISUAL_STOP_OFFSET;
+      public static readonly int StopColor = NDalic.GRADIENT_VISUAL_STOP_COLOR;
+      public static readonly int Units = NDalic.GRADIENT_VISUAL_UNITS;
+      public static readonly int SpreadMethod = NDalic.GRADIENT_VISUAL_SPREAD_METHOD;
+    }
+
+    public struct ImageVisualProperty
+    {
+      public static readonly int URL = NDalic.IMAGE_VISUAL_URL;
+      public static readonly int FittingMode = NDalic.IMAGE_VISUAL_FITTING_MODE;
+      public static readonly int SamplingMode = NDalic.IMAGE_VISUAL_SAMPLING_MODE;
+      public static readonly int DesiredWidth = NDalic.IMAGE_VISUAL_DESIRED_WIDTH;
+      public static readonly int DesiredHeight = NDalic.IMAGE_VISUAL_DESIRED_HEIGHT;
+      public static readonly int SynchronousLoading = NDalic.IMAGE_VISUAL_SYNCHRONOUS_LOADING;
+      public static readonly int BorderOnly = NDalic.IMAGE_VISUAL_BORDER_ONLY;
+      public static readonly int PixelArea = NDalic.IMAGE_VISUAL_PIXEL_AREA;
+      public static readonly int WrapModeU = NDalic.IMAGE_VISUAL_WRAP_MODE_U;
+      public static readonly int WrapModeV = NDalic.IMAGE_VISUAL_WRAP_MODE_V;
+    }
+
+    public struct MeshVisualProperty
+    {
+      public static readonly int ObjectURL = NDalic.MESH_VISUAL_OBJECT_URL;
+      public static readonly int MaterialtURL = NDalic.MESH_VISUAL_MATERIAL_URL;
+      public static readonly int TexturesPath = NDalic.MESH_VISUAL_TEXTURES_PATH;
+      public static readonly int ShadingMode = NDalic.MESH_VISUAL_SHADING_MODE;
+      public static readonly int UseMipmapping = NDalic.MESH_VISUAL_USE_MIPMAPPING;
+      public static readonly int UseSoftNormals = NDalic.MESH_VISUAL_USE_SOFT_NORMALS;
+      public static readonly int LightPosition = NDalic.MESH_VISUAL_LIGHT_POSITION;
+    }
+
+    public struct PrimitiveVisualProperty
+    {
+      public static readonly int Shape = NDalic.PRIMITIVE_VISUAL_SHAPE;
+      public static readonly int MixColor = NDalic.PRIMITIVE_VISUAL_MIX_COLOR;
+      public static readonly int Slices = NDalic.PRIMITIVE_VISUAL_SLICES;
+      public static readonly int Stacks = NDalic.PRIMITIVE_VISUAL_STACKS;
+      public static readonly int ScaleTopRadius = NDalic.PRIMITIVE_VISUAL_SCALE_TOP_RADIUS;
+      public static readonly int ScaleBottomRadius = NDalic.PRIMITIVE_VISUAL_SCALE_BOTTOM_RADIUS;
+      public static readonly int ScaleHeight = NDalic.PRIMITIVE_VISUAL_SCALE_HEIGHT;
+      public static readonly int ScaleRadius = NDalic.PRIMITIVE_VISUAL_SCALE_RADIUS;
+      public static readonly int ScaleDimensions = NDalic.PRIMITIVE_VISUAL_SCALE_DIMENSIONS;
+      public static readonly int BevelPercentage = NDalic.PRIMITIVE_VISUAL_BEVEL_PERCENTAGE;
+      public static readonly int BevelSmoothness = NDalic.PRIMITIVE_VISUAL_BEVEL_SMOOTHNESS;
+      public static readonly int LightPosition = NDalic.PRIMITIVE_VISUAL_LIGHT_POSITION;
+    }
+
+    public struct TextVisualProperty
+    {
+      public static readonly int Text = NDalic.TEXT_VISUAL_TEXT;
+      public static readonly int FontFamily = NDalic.TEXT_VISUAL_FONT_FAMILY;
+      public static readonly int FontStyle = NDalic.TEXT_VISUAL_FONT_STYLE;
+      public static readonly int PointSize = NDalic.TEXT_VISUAL_POINT_SIZE;
+      public static readonly int MultiLine = NDalic.TEXT_VISUAL_MULTI_LINE;
+      public static readonly int HorizontalAlignment = NDalic.TEXT_VISUAL_HORIZONTAL_ALIGNMENT;
+      public static readonly int VerticalAlignment = NDalic.TEXT_VISUAL_VERTICAL_ALIGNMENT;
+      public static readonly int TextColor = NDalic.TEXT_VISUAL_TEXT_COLOR;
+      public static readonly int EnableMarkup = NDalic.TEXT_VISUAL_ENABLE_MARKUP;
+    }
+
+    public struct Tooltip
+    {
+      public struct Property
+      {
+        public static readonly int Content = NDalic.TOOLTIP_CONTENT;
+        public static readonly int Layout = NDalic.TOOLTIP_LAYOUT;
+        public static readonly int WaitTime = NDalic.TOOLTIP_WAIT_TIME;
+        public static readonly int Background = NDalic.TOOLTIP_BACKGROUND;
+        public static readonly int Tail = NDalic.TOOLTIP_TAIL;
+        public static readonly int Position = NDalic.TOOLTIP_POSITION;
+        public static readonly int HoverPointOffset = NDalic.TOOLTIP_HOVER_POINT_OFFSET;
+        public static readonly int MovementThreshold = NDalic.TOOLTIP_MOVEMENT_THRESHOLD;
+        public static readonly int DisappearOnMovement = NDalic.TOOLTIP_DISAPPEAR_ON_MOVEMENT;
+      }
+
+      public struct BackgroundProperty
+      {
+        public static readonly int Visual = NDalic.TOOLTIP_BACKGROUND_VISUAL;
+        public static readonly int Border = NDalic.TOOLTIP_BACKGROUND_BORDER;
+      }
+
+      public struct TailProperty
+      {
+        public static readonly int Visibility = NDalic.TOOLTIP_TAIL_VISIBILITY;
+        public static readonly int AboveVisual = NDalic.TOOLTIP_TAIL_ABOVE_VISUAL;
+        public static readonly int BelowVisual = NDalic.TOOLTIP_TAIL_BELOW_VISUAL;
       }
     }
 
index 9a88a14..82c2f2f 100755 (executable)
@@ -104,7 +104,7 @@ namespace Dali
         public static extern global::System.IntPtr new_ViewWrapperImpl(int jarg1);
 
         [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_ViewWrapperImpl_New")]
-        public static extern global::System.IntPtr ViewWrapperImpl_New(global::System.Runtime.InteropServices.HandleRef jarg1);
+        public static extern global::System.IntPtr ViewWrapperImpl_New(string jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
 
         [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_delete_ViewWrapperImpl")]
         public static extern void delete_ViewWrapperImpl(global::System.Runtime.InteropServices.HandleRef jarg1);
@@ -116,7 +116,7 @@ namespace Dali
         public static extern global::System.IntPtr GetControlWrapperImpl__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1);
 
         [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_ViewWrapper_New")]
-        public static extern global::System.IntPtr ViewWrapper_New(global::System.Runtime.InteropServices.HandleRef jarg1);
+        public static extern global::System.IntPtr ViewWrapper_New(string jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
 
         [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_new_ViewWrapper__SWIG_0")]
         public static extern global::System.IntPtr new_ViewWrapper__SWIG_0();
@@ -187,5 +187,61 @@ namespace Dali
         [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_MakeCallback")]
         public static extern global::System.IntPtr MakeCallback(global::System.Runtime.InteropServices.HandleRef jarg1);
 
+        [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Actor_Property_SIBLING_ORDER_get")]
+        public static extern int Actor_Property_SIBLING_ORDER_get();
+
+        [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_View_Property_TOOLTIP_get")]
+        public static extern int View_Property_TOOLTIP_get();
+
+        [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_View_Property_STATE_get")]
+        public static extern int View_Property_STATE_get();
+
+        [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_View_Property_SUB_STATE_get")]
+        public static extern int View_Property_SUB_STATE_get();
+
+        [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_ItemView_Property_LAYOUT_get")]
+        public static extern int ItemView_Property_LAYOUT_get();
+
+        [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Button_Property_UNSELECTED_VISUAL_get")]
+        public static extern int Button_Property_UNSELECTED_VISUAL_get();
+
+        [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Button_Property_SELECTED_VISUAL_get")]
+        public static extern int Button_Property_SELECTED_VISUAL_get();
+
+        [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Button_Property_DISABLED_SELECTED_VISUAL_get")]
+        public static extern int Button_Property_DISABLED_SELECTED_VISUAL_get();
+
+        [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Button_Property_DISABLED_UNSELECTED_VISUAL_get")]
+        public static extern int Button_Property_DISABLED_UNSELECTED_VISUAL_get();
+
+        [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Button_Property_UNSELECTED_BACKGROUND_VISUAL_get")]
+        public static extern int Button_Property_UNSELECTED_BACKGROUND_VISUAL_get();
+
+        [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Button_Property_SELECTED_BACKGROUND_VISUAL_get")]
+        public static extern int Button_Property_SELECTED_BACKGROUND_VISUAL_get();
+
+        [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Button_Property_DISABLED_UNSELECTED_BACKGROUND_VISUAL_get")]
+        public static extern int Button_Property_DISABLED_UNSELECTED_BACKGROUND_VISUAL_get();
+
+        [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Button_Property_DISABLED_SELECTED_BACKGROUND_VISUAL_get")]
+        public static extern int Button_Property_DISABLED_SELECTED_BACKGROUND_VISUAL_get();
+
+        [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Button_Property_LABEL_RELATIVE_ALIGNMENT_get")]
+        public static extern int Button_Property_LABEL_RELATIVE_ALIGNMENT_get();
+
+        [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Button_Property_LABEL_PADDING_get")]
+        public static extern int Button_Property_LABEL_PADDING_get();
+
+        [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Button_Property_VISUAL_PADDING_get")]
+        public static extern int Button_Property_VISUAL_PADDING_get();
+
+        [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Visual_Property_TRANSFORM_get")]
+        public static extern int Visual_Property_TRANSFORM_get();
+
+        [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Visual_Property_PREMULTIPLIED_ALPHA_get")]
+        public static extern int Visual_Property_PREMULTIPLIED_ALPHA_get();
+
+        [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Visual_Property_MIX_COLOR_get")]
+        public static extern int Visual_Property_MIX_COLOR_get();
     }
 }
diff --git a/plugins/dali-swig/manual/csharp/PropertyRangeManager.cs b/plugins/dali-swig/manual/csharp/PropertyRangeManager.cs
new file mode 100644 (file)
index 0000000..7e6c4d4
--- /dev/null
@@ -0,0 +1,138 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Collections.Generic;
+
+namespace Dali
+{
+  /// <summary>
+  /// Helper class for calculating what property indexes should be assigned to C# View (view) classes.
+  /// </summary>
+  public class PropertyRangeManager
+  {
+    private Dictionary<String, PropertyRange > _propertyRange;
+
+    /// <summary>
+    /// Initializes a new instance of the <see cref="Dali.PropertyRangeManager"/> class.
+    /// </summary>
+    public PropertyRangeManager ()
+    {
+      _propertyRange = new Dictionary<String, PropertyRange > ();
+    }
+
+    /// <summary>
+    /// Only called if a View has scriptable properties
+    /// </summary>
+    private PropertyRange RegisterView( string viewName, System.Type viewType )
+    {
+      PropertyRange range;
+
+      if ( _propertyRange.TryGetValue (viewName, out range) )
+      {
+        // already registered
+        return range;
+      }
+
+      // Find out the event and animatable start indexes for the type
+      range = new PropertyRange();
+
+      GetPropertyStartRange( viewType, ref range);
+
+      // add it to our dictionary
+      _propertyRange.Add( viewName, range );
+
+      return range;
+
+     }
+
+    /// <summary>
+    /// Gets the index of the property.
+    /// Each property has to have unique index for this view type
+    /// </summary>
+    /// <returns>The property index.</returns>
+    /// <param name="viewName">View name</param>
+    /// <param name="viewType">View type</param>
+    /// <param name="type">Type.</param>
+    public int GetPropertyIndex( string viewName, System.Type viewType, ScriptableProperty.ScriptableType type )
+    {
+
+      PropertyRange range;
+
+      if (!  _propertyRange.TryGetValue (viewName, out range) )
+      {
+         // view not found, register it now
+          range = RegisterView( viewName, viewType);
+      }
+
+      int index =  range.GetNextFreePropertyIndex ( type );
+
+      // update the dictionary
+      _propertyRange[viewName]=range;
+
+      return index;
+
+    }
+
+    ///<summary>
+    /// We calculate the start property indices, based on the type and it's class  heirachy, e.g. DateView (70,000)- > Spin (60,000) -> View (50,000)
+    /// </summary>
+    private void GetPropertyStartRange( System.Type viewType, ref PropertyRange range )
+    {
+      const int maxCountPerDerivation = 1000; // For child and animtable properties we use a gap of 1000 between each
+      // views property range in the heirachy
+
+      // custom views start there property index, at view_PROPERTY_END_INDEX
+      // we add 1000, just incase View class (our C# custom view base) starts using scriptable properties
+      int startEventPropertyIndex = (int)View.PropertyRange.CONTROL_PROPERTY_END_INDEX+maxCountPerDerivation;
+
+      // for animatable properties current range starts at ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX,
+      // we add 1000, just incase View class starts using animatable properties
+      int startAnimatablePropertyIndex = (int)Dali.PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX +maxCountPerDerivation;
+
+      while ( viewType.BaseType.Name != "CustomView" )   // custom view is our C# view base class. we don't go any deeper.
+      {
+        // for every base class increase property start index
+        startEventPropertyIndex += (int)Dali.PropertyRanges.DEFAULT_PROPERTY_MAX_COUNT_PER_DERIVATION; // DALi uses 10,000
+        startAnimatablePropertyIndex += maxCountPerDerivation;
+
+        //Console.WriteLine ("getStartPropertyIndex =  " + viewType.Name +"current index " + startEventPropertyIndex);
+        viewType = viewType.BaseType;
+      }
+
+      range.startEventIndex = startEventPropertyIndex;
+      range.lastUsedEventIndex = startEventPropertyIndex;
+
+      range.startAnimationIndex = startAnimatablePropertyIndex;
+      range.lastUsedAnimationIndex = startAnimatablePropertyIndex;
+
+    }
+
+
+    public struct PropertyRange
+    {
+
+      public int GetNextFreePropertyIndex( ScriptableProperty.ScriptableType type)
+      {
+        if ( type == ScriptableProperty.ScriptableType.Default )
+        {
+           lastUsedEventIndex++;
+           return lastUsedEventIndex;
+        }
+        else
+        {
+          lastUsedAnimationIndex++;
+          return lastUsedAnimationIndex ;
+        }
+      }
+
+
+      public int startEventIndex;    /// start of the property range
+      public int lastUsedEventIndex;    /// last used of the property index
+
+      public int startAnimationIndex;  /// start of the property range
+      public int lastUsedAnimationIndex; /// last used of the property index
+    };
+
+
+
+}
+}
diff --git a/plugins/dali-swig/manual/csharp/ViewRegistry.cs b/plugins/dali-swig/manual/csharp/ViewRegistry.cs
new file mode 100644 (file)
index 0000000..c2be678
--- /dev/null
@@ -0,0 +1,507 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Collections.Generic;
+
+namespace Dali
+{
+  /// <summary>
+  /// Add this attribute to any property belonging to a View (control) you want to be scriptable from JSON
+  /// </summary>
+  /// <remarks>
+  /// Example:
+  ///
+  /// class MyView : public CustomView
+  /// {
+  ///  [ScriptableProperty()]
+  ///  public int MyProperty
+  ///  {
+  ///   get
+  ///   {
+  ///     return _myProperty;
+  ///   }
+  ///   set
+  ///   {
+  ///    _myProperty = value;
+  ///   }
+  ///  }
+  /// }
+  ///
+  /// Internally the following occurs for property registration ( this only occurs once per Type, not per Instance):
+  ///
+  /// - The controls static constructor should call ViewRegistry.Register()  (only called once for the lifecycle of the app)
+  /// - Within Register() the code will introspect the Controls properties, looking for the ScriptableProperty() attribute
+  /// - For every property with the ScriptableProperty() attribute, TypeRegistration.RegisterProperty is called.
+  /// - TypeRegistration.RegisterProperty calls in to DALi C++ Code Dali::CSharpTypeRegistry::RegisterProperty()
+  /// - DALi C++ now knows the existance of the property and will try calling SetProperty, if it finds the property in a JSON file (loaded using builder).
+  ///
+  ///  The DALi C# example
+  ///
+  ///  class MyView : public CustomView
+  ///  {
+  ///
+  ///    [ScriptableProperty()]
+  ///    public double Hours
+  ///    {
+  ///     get { return seconds / 3600; }
+  ///     set { seconds = value * 3600; }
+  ///    }
+  ///  }
+  ///
+  ///  Equivalent code in DALi C++:
+  ///  in MyControl.h
+  ///  class MyControl : public Control
+  ///  {
+  ///      struct Property
+  ///      {
+  ///         enum
+  ///        {
+  ///              HOURS =  Control::CONTROL_PROPERTY_END_INDEX + 1
+  ///        }
+  ///     }
+  ///
+  ///
+  /// in MyControl-impl.cpp
+  ///
+  /// DALI_TYPE_REGISTRATION_BEGIN( Toolkit::MyControl, Toolkit::Control, Create );
+  /// DALI_PROPERTY_REGISTRATION( Toolkit, MyControl, "Hours",  INTEGER, DISABLED                     )
+  /// DALI_TYPE_REGISTRATION_END()
+  /// </remarks>
+  ///
+  ///
+  public class ScriptableProperty : System.Attribute
+  {
+    public enum ScriptableType
+    {
+      Default,    // Read Writable, non-animatable property, event thread only
+    //  Animatable // Animatable property, Currently disabled, UK
+    }
+    public readonly ScriptableType type;
+
+    public ScriptableProperty(ScriptableType type = ScriptableType.Default )
+    {
+      this.type = type;
+    }
+  }
+
+  /// <summary>
+  /// View Registry singleton.
+  /// Used for registering controls and any scriptable properties they have ( see ScriptableProperty )
+  ///
+  /// Internal Design from C# to C++
+  ///
+  /// - Each custom C# view should have it's static constructor called before any JSON file is loaded.
+  /// Static constructors for a class will only run once ( they are run per control type, not per instance).
+  /// Example of running a static constructor:
+  ///      System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (typeof(Spin).TypeHandle);
+  /// Inside the static constructor the control should register it's type with the ViewRegistry
+  /// e.g.
+  ///
+  ///  static Spin()
+  ///  {
+  ///     ViewRegistry.Instance.Register(CreateInstance, typeof(Spin) );
+  ///  }
+  ///
+  ///  The control should also provide a CreateInstance function, which gets passed to the ViewRegistry
+  ///  // Eventually it will be called if DALi Builderfinds a Spin control in a JSON file
+  ///  static CustomView CreateInstance()
+  ///  {
+  ///    return new Spin();
+  ///  }
+  ///
+  ///
+  ///
+  /// The DALi C++ equivalent of this is
+  ///
+  ///  TypeRegistration mType( typeid(Toolkit::Spin), typeid(Toolkit::Control), CreateInstance );
+  ///
+  ///
+  ///
+  /// </summary>
+  public sealed class ViewRegistry
+  {
+    /// <summary>
+    /// ViewRegistry is a singleton
+    /// </summary>
+    private static ViewRegistry instance = null;
+
+    [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+    delegate IntPtr CreateControlDelegate( IntPtr cPtrControlName );
+
+    [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+    delegate IntPtr GetPropertyDelegate( IntPtr controlPtr, IntPtr propertyName );
+
+    [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+    delegate void SetPropertyDelegate( IntPtr controlPtr, IntPtr propertyName, IntPtr propertyValue );
+
+    private CreateControlDelegate _createCallback;
+    private SetPropertyDelegate _setPropertyCallback;
+    private GetPropertyDelegate _getPropertyCallback;
+    private PropertyRangeManager _propertyRangeManager;
+
+    /// <summary>
+    /// Given a C++ custom control the dictionary allows us to find what CustomView it belongs to
+    /// </summary>
+    private Dictionary<IntPtr, Dali.CustomView> _controlMap;
+
+    ///<summary>
+    // Maps the name of a custom view to a create instance function
+    /// E.g. given a string "Spin", we can get a function used to create the Spin View.
+    ///</summary>
+    private Dictionary<String, Func< CustomView > > _constructorMap;
+
+    /// <summary>
+    /// Lookup table to match C# types to DALi types, used for the automatic property registration
+    /// </summary>
+    private static readonly Dictionary<string, Dali.Property.Type> _daliPropertyTypeLookup
+    = new Dictionary< string, Dali.Property.Type  >
+    {
+      { "float",   Property.Type.FLOAT },
+      { "int",     Property.Type.INTEGER },
+      { "Int32",   Property.Type.INTEGER },
+      { "Boolean", Property.Type.BOOLEAN },
+      { "string",  Property.Type.STRING },
+      { "Vector2", Property.Type.VECTOR2 },
+      { "Vector3", Property.Type.VECTOR3 },
+      { "Vector4", Property.Type.VECTOR4 },
+      { "Size",    Property.Type.VECTOR2 },
+      { "Position",Property.Type.VECTOR3 },
+      { "Color",   Property.Type.VECTOR4 },
+    //  { "Matrix3", Property.Type.MATRIX3 }, commented out until we need to use Matrices from JSON
+    //  { "Matrix",  Property.Type.MATRIX },
+    };
+
+
+    public ViewRegistry()
+    {
+      _createCallback = new CreateControlDelegate( CreateControl );
+      _getPropertyCallback = new GetPropertyDelegate (GetProperty);
+      _setPropertyCallback  = new SetPropertyDelegate (SetProperty);
+
+      _controlMap = new Dictionary<IntPtr, CustomView>();
+      _constructorMap = new Dictionary<string, Func<CustomView>>();
+      _propertyRangeManager = new PropertyRangeManager();
+
+    }
+
+    private Dali.Property.Type GetDaliPropertyType( string cSharpTypeName )
+    {
+      Dali.Property.Type daliType;
+      if ( _daliPropertyTypeLookup.TryGetValue (cSharpTypeName, out daliType) )
+      {
+        //Console.WriteLine("mapped "+ cSharpTypeName + " to dAli type " +daliType );
+        return daliType;
+      }
+      else
+      {
+       // Console.WriteLine("Failed to find a mapping between C# property" + cSharpTypeName +" and DALi type");
+        return Property.Type.NONE;
+      }
+    }
+
+    /// <summary>
+    /// Called directly from DALi C++ type registry to create a control (View)  uses no marshalling.
+    /// </summary>
+    /// <returns>Pointer to the Control (Views) handle </returns>
+    /// <param name="cPtrControlName"> C pointer to the Control (View) name</param>
+    private static IntPtr CreateControl( IntPtr cPtrControlName )
+    {
+      string controlName = System.Runtime.InteropServices.Marshal.PtrToStringAnsi (cPtrControlName);
+      // Console.WriteLine ("Create controlled called from C++ create a " + controlName);
+
+      Func< CustomView > controlConstructor;
+
+      // find the control constructor
+      if ( Instance._constructorMap.TryGetValue (controlName, out controlConstructor) )
+      {
+        // Create the control
+        CustomView newControl = controlConstructor ();
+
+        // Store the mapping between this instance of the custom control and native part
+        // We store a pointer to the RefObject for the control
+        IntPtr cPtr = newControl.GetPtrfromActor();
+        RefObject refObj = newControl.GetObjectPtr ();
+        IntPtr refCptr = (IntPtr) RefObject.getCPtr(refObj);
+
+        //Console.WriteLine ("________Storing ref object cptr in control map Hex: {0:X}", refCptr);
+        Instance._controlMap.Add (refCptr , newControl );
+
+        return cPtr;  // return pointer to handle
+      }
+      else
+      {
+        throw new global::System.InvalidOperationException("C# View not registererd with ViewRegistry"+ controlName );
+        return IntPtr.Zero;
+      }
+    }
+
+    private static IntPtr GetProperty( IntPtr controlPtr, IntPtr propertyName )
+    {
+      string name = System.Runtime.InteropServices.Marshal.PtrToStringAnsi (propertyName);
+      return Instance.GetPropertyValue ( controlPtr, name);
+    }
+
+    private static void SetProperty(  IntPtr controlPtr, IntPtr propertyName, IntPtr propertyValue )
+    {
+      string name = System.Runtime.InteropServices.Marshal.PtrToStringAnsi (propertyName);
+      //Console.WriteLine ( SetControlProperty  called for:" + name );
+      Instance.SetPropertyValue ( controlPtr, name, propertyValue);
+
+    }
+
+    public static ViewRegistry Instance
+    {
+      get
+      {
+        if (instance==null)
+        {
+          instance = new ViewRegistry();
+        }
+        return instance;
+      }
+    }
+
+    public static CustomView GetCustomViewFromActor( Actor actor )
+    {
+      // we store a dictionary of ref-obects (C++ land) to custom views (C# land)
+      Dali.CustomView view;
+
+      RefObject refObj = actor.GetObjectPtr ();
+      IntPtr refObjectPtr = (IntPtr) RefObject.getCPtr(refObj);
+
+      if ( Instance._controlMap.TryGetValue ( refObjectPtr, out view) )
+      {
+
+        // call the get property function
+
+        return view;
+      }
+      else
+      {
+        return null;
+      }
+    }
+
+
+    /// <summary>
+    /// Function which registers a view and all it's scriptable properties with DALi's type registry.
+    /// Means the View can be created / configured from a JSON script.
+    ///
+    /// The function uses introspection to scan a Views C# properties, then selects the ones with
+    ///[ScriptableProperty] attribute to be registered.
+    /// Example of a Spin view registering itself
+    ///   static Spin()
+    /// {
+    ///   ViewRegistry registers control type with DALi type registery
+    ///   also uses introspection to find any properties that need to be registered with type registry
+    ///   ViewRegistry.Instance.Register(CreateInstance, typeof(Spin) );
+    /// }
+    ///
+    /// </summary>
+    public void Register(Func< CustomView > createFunction, System.Type viewType )
+    {
+      // add the mapping between the view name and it's create function
+      _constructorMap.Add (viewType.Name, createFunction);
+
+      // Call into DALi C++ to register the control with the type registry
+      TypeRegistration.RegisterControl( viewType.Name, _createCallback );
+
+      // Cycle through each property in the class
+      foreach (System.Reflection.PropertyInfo propertyInfo in viewType.GetProperties())
+      {
+
+        if ( propertyInfo.CanRead )
+        {
+
+          System.Attribute[] attrs = System.Attribute.GetCustomAttributes(propertyInfo);
+          foreach (System.Attribute attr in attrs)
+          {
+            // If the Scriptable attribute exists, then register it with the type registry.
+            if (attr is ScriptableProperty)
+            {
+              //Console.WriteLine ("Got a DALi JSON scriptable property = " + propertyInfo.Name +", of type " + propertyInfo.PropertyType.Name);
+
+              // first get the attribute type, ( default, or animatable)
+              ScriptableProperty scriptableProp = attr as ScriptableProperty;
+
+              // we get the start property index, based on the type and it's heirachy, e.g. DateView (70,000)-> Spin (60,000) -> View (50,000)
+              int propertyIndex =  _propertyRangeManager.GetPropertyIndex( viewType.Name, viewType, scriptableProp.type );
+
+              // get the enum for the property type... E.g. registering a string property returns Dali.PropertyType.String
+              Dali.Property.Type propertyType = GetDaliPropertyType( propertyInfo.PropertyType.Name );
+
+              // Example   RegisterProperty("spin","maxValue", 50001, FLOAT, set, get );
+              // Native call to register the property
+              TypeRegistration.RegisterProperty (viewType.Name, propertyInfo.Name , propertyIndex, propertyType, _setPropertyCallback, _getPropertyCallback);
+            }
+          }
+          // Console.WriteLine ("property name = " + propertyInfo.Name);
+        }
+      }
+    }
+
+    /// <summary>
+    /// Get a property value from a View
+    ///
+    /// </summary>
+    private IntPtr GetPropertyValue ( IntPtr controlPtr, string propertyName)
+    {
+      // Get the C# control that maps to the C++ control
+      Dali.CustomView view;
+
+      BaseHandle baseHandle = new BaseHandle (controlPtr, false);
+
+      RefObject refObj = baseHandle.GetObjectPtr ();
+
+      IntPtr refObjectPtr = (IntPtr) RefObject.getCPtr(refObj);
+
+      if ( _controlMap.TryGetValue ( refObjectPtr, out view) )
+      {
+
+        // call the get property function
+        System.Object val = view.GetType ().GetProperty (propertyName).GetAccessors () [0].Invoke (view, null);
+
+        Property.Value value = Property.Value.CreateFromObject (val);
+
+        return (IntPtr)Property.Value.getCPtr (value);
+      }
+      else
+      {
+        return IntPtr.Zero;
+      }
+    }
+
+    /// <summary>
+    /// Set a property value on a View
+    ///
+    /// </summary>
+    private void SetPropertyValue ( IntPtr controlPtr, string propertyName, IntPtr propertyValuePtr)
+    {
+      // Get the C# control that maps to the C++ control
+      Dali.CustomView view;
+
+      //Console.WriteLine ("SetPropertyValue   refObjectPtr = {0:X}", controlPtr);
+
+      Property.Value propValue = new Property.Value (propertyValuePtr, false);
+
+      if ( _controlMap.TryGetValue ( controlPtr, out view) )
+      {
+
+        System.Reflection.PropertyInfo propertyInfo = view.GetType().GetProperty(propertyName);
+
+        // We know the property name, we know it's type, we just need to convert from a DALi property value to native C# type
+        System.Type type = propertyInfo.PropertyType;
+        bool ok = false;
+
+        if ( type.Equals (typeof(Int32)) )
+        {
+          int value = 0;
+          ok = propValue.Get( ref value );
+          if ( ok )
+          {
+            propertyInfo.SetValue (view, value);
+          }
+        }
+        else if ( type.Equals (typeof(bool)) )
+        {
+          bool value = false;
+          ok = propValue.Get( ref value );
+          if ( ok )
+          {
+            propertyInfo.SetValue (view, value);
+          }
+        }
+        else if ( type.Equals (typeof(float)) )
+        {
+          float value = 0;
+          ok = propValue.Get( ref value );
+          if ( ok )
+          {
+            propertyInfo.SetValue (view, value);
+          }
+        }
+        else if ( type.Equals (typeof(string)) )
+        {
+          string value = "";
+          ok = propValue.Get( out value );
+          if ( ok )
+          {
+            propertyInfo.SetValue (view, value);
+          }
+        }
+        else if ( type.Equals (typeof(Vector2)) )
+        {
+          Vector2 value = new Vector2 ();
+          ok = propValue.Get( value );
+          if ( ok )
+          {
+            propertyInfo.SetValue (view, value);
+          }
+        }
+        else if ( type.Equals (typeof(Vector3)) )
+        {
+          Vector3 value = new Vector3 ();
+          ok = propValue.Get( value );
+          if ( ok )
+          {
+            propertyInfo.SetValue (view, value);
+          }
+        }
+        else if ( type.Equals (typeof(Vector4)) )
+        {
+          Vector4 value = new Vector4 ();
+          ok = propValue.Get( value );
+
+          if ( ok )
+          {
+           propertyInfo.SetValue (view, value);
+          }
+        }
+        else if ( type.Equals (typeof(Position)) )
+        {
+          Position value = new Position ();
+          ok = propValue.Get( value );
+          if ( ok )
+          {
+            propertyInfo.SetValue (view, value);
+          }
+        }
+        else if ( type.Equals (typeof(Size)) )
+        {
+          // DALi sizes are Vector3
+          Vector3 value = new Vector3();
+          ok = propValue.Get( value );
+          if ( ok )
+          {
+            propertyInfo.SetValue(view, new Size(value.X,value.Y));
+          };
+        }
+        else if ( type.Equals (typeof(Color)) )
+        {
+          // Colors are stored as Vector4's in DALi
+          Vector4 value = new Vector4();
+          ok = propValue.Get( value );
+          if ( ok )
+          {
+            propertyInfo.SetValue (view, (Color)value);
+          };
+        }
+        else
+        {
+          throw new global::System.InvalidOperationException("SetPropertyValue Unimplemented type for Property Value");
+        }
+        if ( !ok )
+        {
+          throw new global::System.InvalidOperationException("SetPropertyValue propValue.Get failed");
+        }
+      }
+      else
+      {
+        throw new global::System.InvalidOperationException("failed to find the control to write a property to: cptr = " + controlPtr);
+      }
+
+    }
+
+  }
+
+
+}
\ No newline at end of file
diff --git a/plugins/dali-swig/manual/csharp/ViewRegistryHelper.cs b/plugins/dali-swig/manual/csharp/ViewRegistryHelper.cs
new file mode 100644 (file)
index 0000000..8e9e19a
--- /dev/null
@@ -0,0 +1,15 @@
+using System;
+
+// include all custom views here which will be
+namespace Dali
+{
+  public class ViewRegistryHelper
+  {
+    static public void Initialize()
+    {
+       // Register all views with the type registry
+       System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (typeof(Dali.Spin).TypeHandle);
+    }
+  }
+}
+
index 76281fa..f0660b1 100644 (file)
@@ -55,7 +55,7 @@ namespace Dali
             }
         }
 
-        public ViewWrapper (ViewWrapperImpl implementation) : this (NDalicManualPINVOKE.ViewWrapper_New(ViewWrapperImpl.getCPtr(implementation)), true)
+        public ViewWrapper (string typeName, ViewWrapperImpl implementation) : this (NDalicManualPINVOKE.ViewWrapper_New(typeName, ViewWrapperImpl.getCPtr(implementation)), true)
         {
             viewWrapperImpl = implementation;
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
index 7605d4a..0f42e4e 100644 (file)
@@ -27,10 +27,10 @@ namespace Dali
         public delegate void OnPropertySetDelegate(int index, Property.Value propertyValue);
         public delegate void OnSizeSetDelegate(Vector3 targetSize);
         public delegate void OnSizeAnimationDelegate(Animation animation, Vector3 targetSize);
-        public delegate bool OnTouchEventDelegate(TouchEvent touchEvent);
-        public delegate bool OnHoverEventDelegate(HoverEvent hoverEvent);
-        public delegate bool OnKeyEventDelegate(KeyEvent keyEvent);
-        public delegate bool OnWheelEventDelegate(WheelEvent wheelEvent);
+        public delegate bool OnTouchDelegate(Touch touch);
+        public delegate bool OnHoverDelegate(Hover hover);
+        public delegate bool OnKeyDelegate(Key key);
+        public delegate bool OnWheelDelegate(Wheel wheel);
         public delegate void OnRelayoutDelegate(Vector2 size, RelayoutContainer container);
         public delegate void OnSetResizePolicyDelegate(ResizePolicyType policy, DimensionType dimension);
         public delegate Vector3 GetNaturalSizeDelegate();
@@ -46,7 +46,7 @@ namespace Dali
         public delegate void OnStyleChangeDelegate(StyleManager styleManager, StyleChangeType change);
         public delegate bool OnAccessibilityActivatedDelegate();
         public delegate bool OnAccessibilityPanDelegate(PanGesture gestures);
-        public delegate bool OnAccessibilityTouchDelegate(TouchEvent touchEvent);
+        public delegate bool OnAccessibilityTouchDelegate(Touch touch);
         public delegate bool OnAccessibilityValueChangeDelegate(bool isIncrease);
         public delegate bool OnAccessibilityZoomDelegate();
         public delegate void OnKeyInputFocusGainedDelegate();
@@ -68,10 +68,10 @@ namespace Dali
         public OnPropertySetDelegate OnPropertySet;
         public OnSizeSetDelegate OnSizeSet;
         public OnSizeAnimationDelegate OnSizeAnimation;
-        public OnTouchEventDelegate OnTouchEvent;
-        public OnHoverEventDelegate OnHoverEvent;
-        public OnKeyEventDelegate OnKeyEvent;
-        public OnWheelEventDelegate OnWheelEvent;
+        public OnTouchDelegate OnTouch;
+        public OnHoverDelegate OnHover;
+        public OnKeyDelegate OnKey;
+        public OnWheelDelegate OnWheel;
         public OnRelayoutDelegate OnRelayout;
         public OnSetResizePolicyDelegate OnSetResizePolicy;
         public GetNaturalSizeDelegate GetNaturalSize;
@@ -141,9 +141,9 @@ namespace Dali
             DirectorConnect();
         }
 
-        public static ViewWrapper New(ViewWrapperImpl viewWrapper)
+        public static ViewWrapper New(string typeName, ViewWrapperImpl viewWrapper)
         {
-            ViewWrapper ret = new ViewWrapper(NDalicManualPINVOKE.ViewWrapperImpl_New(ViewWrapperImpl.getCPtr(viewWrapper)), true);
+            ViewWrapper ret = new ViewWrapper(NDalicManualPINVOKE.ViewWrapperImpl_New(typeName, ViewWrapperImpl.getCPtr(viewWrapper)), true);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
@@ -255,10 +255,10 @@ namespace Dali
             Delegate4 = new DelegateViewWrapperImpl_4(DirectorOnPropertySet);
             Delegate5 = new DelegateViewWrapperImpl_5(DirectorOnSizeSet);
             Delegate6 = new DelegateViewWrapperImpl_6(DirectorOnSizeAnimation);
-            Delegate7 = new DelegateViewWrapperImpl_7(DirectorOnTouchEvent);
-            Delegate8 = new DelegateViewWrapperImpl_8(DirectorOnHoverEvent);
-            Delegate9 = new DelegateViewWrapperImpl_9(DirectorOnKeyEvent);
-            Delegate10 = new DelegateViewWrapperImpl_10(DirectorOnWheelEvent);
+            Delegate7 = new DelegateViewWrapperImpl_7(DirectorOnTouch);
+            Delegate8 = new DelegateViewWrapperImpl_8(DirectorOnHover);
+            Delegate9 = new DelegateViewWrapperImpl_9(DirectorOnKey);
+            Delegate10 = new DelegateViewWrapperImpl_10(DirectorOnWheel);
             Delegate11 = new DelegateViewWrapperImpl_11(DirectorOnRelayout);
             Delegate12 = new DelegateViewWrapperImpl_12(DirectorOnSetResizePolicy);
             Delegate13 = new DelegateViewWrapperImpl_13(DirectorGetNaturalSize);
@@ -325,24 +325,24 @@ namespace Dali
             OnSizeAnimation(new Animation(animation, false), new Vector3(targetSize, false));
         }
 
-        private bool DirectorOnTouchEvent(global::System.IntPtr arg0)
+        private bool DirectorOnTouch(global::System.IntPtr arg0)
         {
-            return OnTouchEvent(new TouchEvent(arg0, false));
+            return OnTouch(new Touch(arg0, false));
         }
 
-        private bool DirectorOnHoverEvent(global::System.IntPtr arg0)
+        private bool DirectorOnHover(global::System.IntPtr arg0)
         {
-            return OnHoverEvent(new HoverEvent(arg0, false));
+            return OnHover(new Hover(arg0, false));
         }
 
-        private bool DirectorOnKeyEvent(global::System.IntPtr arg0)
+        private bool DirectorOnKey(global::System.IntPtr arg0)
         {
-            return OnKeyEvent(new KeyEvent(arg0, false));
+            return OnKey(new Key(arg0, false));
         }
 
-        private bool DirectorOnWheelEvent(global::System.IntPtr arg0)
+        private bool DirectorOnWheel(global::System.IntPtr arg0)
         {
-            return OnWheelEvent(new WheelEvent(arg0, false));
+            return OnWheel(new Wheel(arg0, false));
         }
 
         private void DirectorOnRelayout(global::System.IntPtr size, global::System.IntPtr container)
@@ -424,9 +424,9 @@ namespace Dali
             return OnAccessibilityPan(new PanGesture(gesture, false));
         }
 
-        private bool DirectorOnAccessibilityTouch(global::System.IntPtr touchEvent)
+        private bool DirectorOnAccessibilityTouch(global::System.IntPtr touch)
         {
-            return OnAccessibilityTouch(new TouchEvent(touchEvent, false));
+            return OnAccessibilityTouch(new Touch(touch, false));
         }
 
         private bool DirectorOnAccessibilityValueChange(bool isIncrease)
@@ -521,7 +521,7 @@ namespace Dali
         public delegate void DelegateViewWrapperImpl_24(global::System.IntPtr styleManager, int change);
         public delegate bool DelegateViewWrapperImpl_25();
         public delegate bool DelegateViewWrapperImpl_26(global::System.IntPtr gesture);
-        public delegate bool DelegateViewWrapperImpl_27(global::System.IntPtr touchEvent);
+        public delegate bool DelegateViewWrapperImpl_27(global::System.IntPtr touch);
         public delegate bool DelegateViewWrapperImpl_28(bool isIncrease);
         public delegate bool DelegateViewWrapperImpl_29();
         public delegate void DelegateViewWrapperImpl_30();
index fe2e91c..9d6ea2d 100755 (executable)
@@ -20,7 +20,7 @@ $typeTable =  [
         ["VECTOR4",     "Vector4",          "",     "Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);"],
         ["MATRIX3",     "Matrix3",          "",     "Matrix3 temp = new Matrix3();"],
         ["MATRIX",      "Matrix",           "",     "Matrix temp = new Matrix();"  ],
-        ["RECTANGLE",   "RectInteger",      "",     "RectInteger temp = new RectInteger(0,0,0,0);"],
+        ["RECTANGLE",   "Rectangle",      "",     "Rectangle temp = new Rectangle(0,0,0,0);"],
         ["ROTATION",    "Quaternion",       "",    "Quaternion temp = new Quaternion();"],
         ["STRING",      "string",           "out",  "string temp;"],
         ["ARRAY",       "Dali.Property.Array",   "",     "Dali.Property.Array temp = new Dali.Property.Array();"],
diff --git a/plugins/dali-swig/views/spin.cs b/plugins/dali-swig/views/spin.cs
new file mode 100644 (file)
index 0000000..f31a49d
--- /dev/null
@@ -0,0 +1,314 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.Runtime.InteropServices;
+using Dali;
+
+// A spin control (for continously changing values when users can easily predict a set of values)
+
+namespace Dali
+{
+public class Spin : CustomView
+  {
+    private VisualBase _arrowVisual;
+    private TextField _textField;
+    private int _arrowVisualPropertyIndex;
+    private string _arrowImage;
+    private int _currentValue;
+    private int _minValue;
+    private int _maxValue;
+    private int _singleStep;
+    private bool _wrappingEnabled;
+    private string _fontFamily;
+    private string _fontStyle;
+    private int _pointSize;
+    private Color _textColor;
+    private Color _textBackgroundColor;
+    private int _maxTextLength;
+
+    // Called by DALi Builder if it finds a Spin control in a JSON file
+    static CustomView CreateInstance()
+    {
+      return new Spin();
+    }
+
+    // static constructor registers the control type (only runs once)
+    static Spin()
+    {
+      // ViewRegistry registers control type with DALi type registery
+      // also uses introspection to find any properties that need to be registered with type registry
+      ViewRegistry.Instance.Register(CreateInstance, typeof(Spin) );
+    }
+
+    public Spin() : base(typeof(Spin).Name, ViewWrapperImpl.CustomViewBehaviour.REQUIRES_KEYBOARD_NAVIGATION_SUPPORT | ViewWrapperImpl.CustomViewBehaviour.DISABLE_STYLE_CHANGE_SIGNALS)
+    {
+
+    }
+
+    public override void OnInitialize()
+    {
+      // Initialize the propertiesControl
+      _arrowImage = "./images/arrow.png";
+      _textBackgroundColor = new Color(0.6f, 0.6f, 0.6f, 1.0f);
+      _currentValue = 0;
+      _minValue = 0;
+      _maxValue = 0;
+      _singleStep = 1;
+      _maxTextLength = 0;
+
+      // Create image visual for the arrow keys
+      _arrowVisualPropertyIndex = RegisterProperty("ArrowImage", new Dali.Property.Value(_arrowImage), Dali.Property.AccessMode.READ_WRITE);
+      _arrowVisual =  VisualFactory.Get().CreateVisual( _arrowImage, new Uint16Pair(150, 150) );
+      RegisterVisual( _arrowVisualPropertyIndex, _arrowVisual );
+
+      // Create a text field
+      _textField = new TextField();
+      _textField.ParentOrigin = NDalic.ParentOriginCenter;
+      _textField.AnchorPoint = NDalic.AnchorPointCenter;
+      _textField.WidthResizePolicy = "SIZE_RELATIVE_TO_PARENT";
+      _textField.HeightResizePolicy = "SIZE_RELATIVE_TO_PARENT";
+      _textField.SizeModeFactor = new Vector3( 1.0f, 0.45f, 1.0f );
+      _textField.PlaceholderText = "----";
+      _textField.BackgroundColor = _textBackgroundColor;
+      _textField.HorizontalAlignment = "Center";
+      _textField.VerticalAlignment = "Center";
+      _textField.SetKeyboardFocusable(true);
+      _textField.Name = "_textField";
+
+      this.Add(_textField);
+
+      _textField.KeyInputFocusGained += TextFieldKeyInputFocusGained;
+      _textField.KeyInputFocusLost += TextFieldKeyInputFocusLost;
+    }
+
+    public override Vector3 GetNaturalSize()
+    {
+      return new Vector3(150.0f, 150.0f, 0.0f);
+    }
+
+    public void TextFieldKeyInputFocusGained(object source, KeyInputFocusGainedEventArgs e)
+    {
+      // Make sure when the current spin that takes input focus also takes the keyboard focus
+      // For example, when you tap the spin directly
+      FocusManager.Instance.SetCurrentFocusActor(_textField);
+    }
+
+    public void TextFieldKeyInputFocusLost(object source, KeyInputFocusLostEventArgs e)
+    {
+      int previousValue = _currentValue;
+
+      // If the input value is invalid, change it back to the previous valid value
+      if(int.TryParse(_textField.Text, out _currentValue))
+      {
+        if (_currentValue < _minValue || _currentValue > _maxValue)
+        {
+          _currentValue = previousValue;
+        }
+      }
+      else
+      {
+        _currentValue = previousValue;
+      }
+
+      // Otherwise take the new value
+      this.Value = _currentValue;
+    }
+
+    public override Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, View.KeyboardFocus.Direction direction, bool loopEnabled)
+    {
+      // Respond to Up/Down keys to change the value while keeping the current spin focused
+      Actor nextFocusedActor = currentFocusedActor;
+      if (direction == View.KeyboardFocus.Direction.UP)
+      {
+        this.Value += this.Step;
+        nextFocusedActor = _textField;
+      }
+      else if (direction == View.KeyboardFocus.Direction.DOWN)
+      {
+        this.Value -= this.Step;
+        nextFocusedActor = _textField;
+      }
+      else
+      {
+        // Return a native empty handle as nothing can be focused in the left or right
+        nextFocusedActor = new Actor();
+        nextFocusedActor.Reset();
+      }
+
+      return nextFocusedActor;
+    }
+
+
+    [ScriptableProperty()]
+    public int Value
+    {
+      get
+      {
+        return _currentValue;
+      }
+      set
+      {
+
+        Console.WriteLine ("Value set to "  + value );
+        _currentValue = value;
+
+        // Make sure no invalid value is accepted
+        if (_currentValue < _minValue)
+        {
+          _currentValue = _minValue;
+        }
+
+        if (_currentValue > _maxValue)
+        {
+          _currentValue = _maxValue;
+        }
+
+        _textField.Text = _currentValue.ToString();
+      }
+    }
+    // MinValue property of type int:
+    [ScriptableProperty()]
+    public int MinValue
+    {
+      get
+      {
+        return _minValue;
+      }
+      set
+      {
+        _minValue = value;
+      }
+    }
+
+    // MaxValue property of type int:
+    [ScriptableProperty()]
+    public int MaxValue
+    {
+      get
+      {
+        return _maxValue;
+      }
+      set
+      {
+        _maxValue = value;
+      }
+    }
+
+    // Step property of type int:
+    [ScriptableProperty()]
+    public int Step
+    {
+      get
+      {
+        return _singleStep;
+      }
+      set
+      {
+        _singleStep = value;
+      }
+    }
+
+    // WrappingEnabled property of type bool:
+    [ScriptableProperty()]
+    public bool WrappingEnabled
+    {
+      get
+      {
+        return _wrappingEnabled;
+      }
+      set
+      {
+        _wrappingEnabled = value;
+      }
+    }
+
+    // TextPointSize property of type int:
+    [ScriptableProperty()]
+    public int TextPointSize
+    {
+      get
+      {
+        return _pointSize;
+      }
+      set
+      {
+        _pointSize = value;
+        _textField.PointSize = _pointSize;
+      }
+    }
+
+    // TextColor property of type Color:
+    [ScriptableProperty()]
+    public Color TextColor
+    {
+      get
+      {
+        return _textColor;
+      }
+      set
+      {
+          Console.WriteLine ("TextColor set to "  + value.R + "," + value.G + ","+ value.B);
+
+        _textColor = value;
+        _textField.TextColor = _textColor;
+      }
+    }
+
+    // MaxTextLength property of type int:
+    [ScriptableProperty()]
+    public int MaxTextLength
+    {
+      get
+      {
+        return _maxTextLength;
+      }
+      set
+      {
+        _maxTextLength = value;
+        _textField.MaxLength = _maxTextLength;
+      }
+    }
+
+    public TextField SpinText
+    {
+      get
+      {
+        return _textField;
+      }
+      set
+      {
+        _textField = value;
+      }
+    }
+
+    // Indicator property of type string:
+    public string IndicatorImage
+    {
+      get
+      {
+        return _arrowImage;
+      }
+      set
+      {
+        _arrowImage = value;
+        _arrowVisual =  VisualFactory.Get().CreateVisual( _arrowImage, new Uint16Pair(150, 150) );
+        RegisterVisual( _arrowVisualPropertyIndex, _arrowVisual );
+      }
+  }
+}
+}
\ No newline at end of file