Updated all header files to new format 11/253111/2
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 4 Feb 2021 14:12:27 +0000 (14:12 +0000)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 4 Feb 2021 15:57:40 +0000 (15:57 +0000)
Change-Id: I68b3cf032fa1758fff92509f463101bdfd36cce1

260 files changed:
dali-scene-loader/internal/gltf2-asset.h
dali-scene-loader/internal/hash.h
dali-scene-loader/internal/json-reader.h
dali-scene-loader/internal/json-util.h
dali-scene-loader/public-api/alpha-function-helper.h
dali-scene-loader/public-api/animated-property.h
dali-scene-loader/public-api/animation-definition.h
dali-scene-loader/public-api/api.h
dali-scene-loader/public-api/blend-shape-details.h
dali-scene-loader/public-api/camera-parameters.h
dali-scene-loader/public-api/customization.h
dali-scene-loader/public-api/dli-loader.h
dali-scene-loader/public-api/environment-definition.h
dali-scene-loader/public-api/gltf2-loader.h
dali-scene-loader/public-api/index.h
dali-scene-loader/public-api/ktx-loader.h
dali-scene-loader/public-api/light-parameters.h
dali-scene-loader/public-api/load-result.h
dali-scene-loader/public-api/material-definition.h
dali-scene-loader/public-api/matrix-stack.h
dali-scene-loader/public-api/mesh-definition.h
dali-scene-loader/public-api/mesh-geometry.h
dali-scene-loader/public-api/node-definition.h
dali-scene-loader/public-api/parse-renderer-state.h
dali-scene-loader/public-api/renderer-state.h
dali-scene-loader/public-api/resource-bundle.h
dali-scene-loader/public-api/scene-definition.h
dali-scene-loader/public-api/shader-definition-factory.h
dali-scene-loader/public-api/shader-definition.h
dali-scene-loader/public-api/skeleton-definition.h
dali-scene-loader/public-api/skinning-details.h
dali-scene-loader/public-api/string-callback.h
dali-scene-loader/public-api/utils.h
dali-scene-loader/public-api/view-projection.h
dali-scene-loader/third-party/.clang-format [new file with mode: 0644]
dali-toolkit/devel-api/controls/control-devel.h
dali-toolkit/devel-api/controls/web-view/web-back-forward-list-item.h [changed mode: 0755->0644]
dali-toolkit/devel-api/controls/web-view/web-back-forward-list.h [changed mode: 0755->0644]
dali-toolkit/devel-api/controls/web-view/web-context.h [changed mode: 0755->0644]
dali-toolkit/devel-api/controls/web-view/web-cookie-manager.h [changed mode: 0755->0644]
dali-toolkit/devel-api/controls/web-view/web-settings.h [changed mode: 0755->0644]
dali-toolkit/devel-api/controls/web-view/web-view.h [changed mode: 0755->0644]
dali-toolkit/devel-api/layouting/flex-node.h
dali-toolkit/devel-api/shader-effects/dissolve-effect.h
dali-toolkit/devel-api/shader-effects/motion-blur-effect.h
dali-toolkit/devel-api/shader-effects/motion-stretch-effect.h
dali-toolkit/devel-api/text/text-utils-devel.h [changed mode: 0755->0644]
dali-toolkit/internal/accessibility-manager/accessibility-manager-impl.h
dali-toolkit/internal/builder/builder-declarations.h
dali-toolkit/internal/builder/builder-filesystem.h [changed mode: 0755->0644]
dali-toolkit/internal/builder/builder-get-is.inl.h
dali-toolkit/internal/builder/builder-impl-debug.h
dali-toolkit/internal/builder/builder-impl.h
dali-toolkit/internal/builder/builder-set-property.h
dali-toolkit/internal/builder/dictionary.h
dali-toolkit/internal/builder/json-parser-impl.h
dali-toolkit/internal/builder/json-parser-state.h
dali-toolkit/internal/builder/optional-value.h
dali-toolkit/internal/builder/replacement.h
dali-toolkit/internal/builder/style.h
dali-toolkit/internal/builder/tree-node-manipulator.h
dali-toolkit/internal/controls/alignment/alignment-impl.h
dali-toolkit/internal/controls/bloom-view/bloom-view-impl.h
dali-toolkit/internal/controls/bubble-effect/bubble-effect.h
dali-toolkit/internal/controls/bubble-effect/bubble-emitter-impl.h
dali-toolkit/internal/controls/bubble-effect/bubble-renderer.h
dali-toolkit/internal/controls/bubble-effect/color-adjuster.h
dali-toolkit/internal/controls/buttons/button-impl.h
dali-toolkit/internal/controls/buttons/check-box-button-impl.h
dali-toolkit/internal/controls/buttons/push-button-impl.h
dali-toolkit/internal/controls/buttons/radio-button-impl.h
dali-toolkit/internal/controls/buttons/toggle-button-impl.h
dali-toolkit/internal/controls/control/control-data-impl.h [changed mode: 0755->0644]
dali-toolkit/internal/controls/control/control-debug.h
dali-toolkit/internal/controls/control/control-renderers.h
dali-toolkit/internal/controls/effects-view/effects-view-impl.h
dali-toolkit/internal/controls/flex-container/flex-container-impl.h [changed mode: 0755->0644]
dali-toolkit/internal/controls/gaussian-blur-view/gaussian-blur-view-impl.h
dali-toolkit/internal/controls/image-view/image-view-impl.h
dali-toolkit/internal/controls/magnifier/magnifier-impl.h
dali-toolkit/internal/controls/model3d-view/model3d-view-impl.h
dali-toolkit/internal/controls/model3d-view/obj-loader.h
dali-toolkit/internal/controls/navigation-view/navigation-view-impl.h
dali-toolkit/internal/controls/page-turn-view/page-turn-book-spine-effect.h
dali-toolkit/internal/controls/page-turn-view/page-turn-effect.h
dali-toolkit/internal/controls/page-turn-view/page-turn-landscape-view-impl.h
dali-toolkit/internal/controls/page-turn-view/page-turn-portrait-view-impl.h
dali-toolkit/internal/controls/page-turn-view/page-turn-view-impl.h
dali-toolkit/internal/controls/popup/confirmation-popup-impl.h
dali-toolkit/internal/controls/popup/popup-impl.h
dali-toolkit/internal/controls/progress-bar/progress-bar-impl.h
dali-toolkit/internal/controls/scene3d-view/gltf-loader.h
dali-toolkit/internal/controls/scene3d-view/scene3d-view-impl.h
dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.h
dali-toolkit/internal/controls/scrollable/bouncing-effect-actor.h
dali-toolkit/internal/controls/scrollable/item-view/depth-layout.h [changed mode: 0755->0644]
dali-toolkit/internal/controls/scrollable/item-view/grid-layout.h [changed mode: 0755->0644]
dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.h [changed mode: 0755->0644]
dali-toolkit/internal/controls/scrollable/item-view/spiral-layout.h [changed mode: 0755->0644]
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-base-impl.h
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.h
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-effect-impl.h
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.h
dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-page-path-effect-impl.h
dali-toolkit/internal/controls/scrollable/scrollable-impl.h
dali-toolkit/internal/controls/shadow-view/shadow-view-impl.h
dali-toolkit/internal/controls/slider/slider-impl.h
dali-toolkit/internal/controls/super-blur-view/super-blur-view-impl.h
dali-toolkit/internal/controls/table-view/array-2d.h
dali-toolkit/internal/controls/table-view/table-view-impl.h [changed mode: 0755->0644]
dali-toolkit/internal/controls/text-controls/text-editor-impl.h [changed mode: 0755->0644]
dali-toolkit/internal/controls/text-controls/text-field-impl.h [changed mode: 0755->0644]
dali-toolkit/internal/controls/text-controls/text-label-impl.h
dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.h
dali-toolkit/internal/controls/text-controls/text-selection-toolbar-impl.h
dali-toolkit/internal/controls/tool-bar/tool-bar-impl.h
dali-toolkit/internal/controls/tooltip/tooltip.h
dali-toolkit/internal/controls/video-view/video-view-impl.h [changed mode: 0755->0644]
dali-toolkit/internal/controls/web-view/web-view-impl.h [changed mode: 0755->0644]
dali-toolkit/internal/drag-drop-detector/drag-and-drop-detector-impl.h [changed mode: 0755->0644]
dali-toolkit/internal/feedback/feedback-ids.h
dali-toolkit/internal/feedback/feedback-style.h
dali-toolkit/internal/filters/blur-two-pass-filter.h
dali-toolkit/internal/filters/emboss-filter.h
dali-toolkit/internal/filters/image-filter.h
dali-toolkit/internal/filters/spread-filter.h
dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h
dali-toolkit/internal/focus-manager/keyinput-focus-manager-impl.h
dali-toolkit/internal/helpers/color-conversion.h
dali-toolkit/internal/helpers/property-helper.h
dali-toolkit/internal/helpers/round-robin-container-view.h
dali-toolkit/internal/image-loader/async-image-loader-impl.h
dali-toolkit/internal/image-loader/atlas-packer.h
dali-toolkit/internal/image-loader/image-atlas-impl.h
dali-toolkit/internal/image-loader/image-load-thread.h
dali-toolkit/internal/styling/style-manager-impl.h
dali-toolkit/internal/text/bidirectional-line-info-run.h
dali-toolkit/internal/text/bidirectional-paragraph-info-run.h
dali-toolkit/internal/text/bidirectional-support.h [changed mode: 0755->0644]
dali-toolkit/internal/text/character-run.h
dali-toolkit/internal/text/character-set-conversion.h
dali-toolkit/internal/text/color-run.h
dali-toolkit/internal/text/color-segmentation.h
dali-toolkit/internal/text/cursor-helper-functions.h
dali-toolkit/internal/text/decorator/text-decorator.h
dali-toolkit/internal/text/embedded-item.h [changed mode: 0755->0644]
dali-toolkit/internal/text/font-description-run.h
dali-toolkit/internal/text/font-run.h
dali-toolkit/internal/text/glyph-metrics-helper.h
dali-toolkit/internal/text/glyph-run.h
dali-toolkit/internal/text/hidden-text.h
dali-toolkit/internal/text/input-style.h
dali-toolkit/internal/text/layouts/layout-engine.h [changed mode: 0755->0644]
dali-toolkit/internal/text/layouts/layout-parameters.h [changed mode: 0755->0644]
dali-toolkit/internal/text/line-run.h
dali-toolkit/internal/text/logical-model-impl.h [changed mode: 0755->0644]
dali-toolkit/internal/text/markup-processor-color.h
dali-toolkit/internal/text/markup-processor-embedded-item.h [changed mode: 0755->0644]
dali-toolkit/internal/text/markup-processor-font.h
dali-toolkit/internal/text/markup-processor-helper-functions.h [changed mode: 0755->0644]
dali-toolkit/internal/text/markup-processor.h [changed mode: 0755->0644]
dali-toolkit/internal/text/metrics.h [changed mode: 0755->0644]
dali-toolkit/internal/text/multi-language-helper-functions.h
dali-toolkit/internal/text/multi-language-support-impl.h
dali-toolkit/internal/text/multi-language-support.h
dali-toolkit/internal/text/paragraph-run.h
dali-toolkit/internal/text/property-string-parser.h
dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.h [changed mode: 0755->0644]
dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager.h
dali-toolkit/internal/text/rendering/atlas/atlas-manager-impl.h
dali-toolkit/internal/text/rendering/atlas/atlas-manager.h
dali-toolkit/internal/text/rendering/atlas/atlas-mesh-factory.h
dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.h
dali-toolkit/internal/text/rendering/text-backend-impl.h
dali-toolkit/internal/text/rendering/text-backend.h
dali-toolkit/internal/text/rendering/text-renderer.h
dali-toolkit/internal/text/rendering/text-typesetter.h
dali-toolkit/internal/text/rendering/vector-based/glyphy-shader/glyphy-common-glsl.h
dali-toolkit/internal/text/rendering/vector-based/glyphy-shader/glyphy-sdf-glsl.h
dali-toolkit/internal/text/rendering/vector-based/glyphy-shader/glyphy-shader.h
dali-toolkit/internal/text/rendering/vector-based/vector-based-renderer.h
dali-toolkit/internal/text/rendering/vector-based/vector-blob-atlas-share.h
dali-toolkit/internal/text/rendering/vector-based/vector-blob-atlas.h
dali-toolkit/internal/text/rendering/view-model.h [changed mode: 0755->0644]
dali-toolkit/internal/text/script-run.h [changed mode: 0755->0644]
dali-toolkit/internal/text/segmentation.h
dali-toolkit/internal/text/shaper.h
dali-toolkit/internal/text/text-control-interface.h
dali-toolkit/internal/text/text-controller-event-handler.h
dali-toolkit/internal/text/text-controller-impl-event-handler.h
dali-toolkit/internal/text/text-controller-impl.h [changed mode: 0755->0644]
dali-toolkit/internal/text/text-controller-input-font-handler.h
dali-toolkit/internal/text/text-controller-placeholder-handler.h
dali-toolkit/internal/text/text-controller-relayouter.h
dali-toolkit/internal/text/text-controller-text-updater.h
dali-toolkit/internal/text/text-controller.h
dali-toolkit/internal/text/text-definitions.h [changed mode: 0755->0644]
dali-toolkit/internal/text/text-editable-control-interface.h
dali-toolkit/internal/text/text-effects-style.h [changed mode: 0755->0644]
dali-toolkit/internal/text/text-enumerations-impl.h
dali-toolkit/internal/text/text-font-style.h
dali-toolkit/internal/text/text-io.h
dali-toolkit/internal/text/text-model-interface.h [changed mode: 0755->0644]
dali-toolkit/internal/text/text-model.h [changed mode: 0755->0644]
dali-toolkit/internal/text/text-run-container.h
dali-toolkit/internal/text/text-scroller-interface.h
dali-toolkit/internal/text/text-scroller.h
dali-toolkit/internal/text/text-selectable-control-interface.h
dali-toolkit/internal/text/text-selection-handle-controller.h
dali-toolkit/internal/text/text-vertical-scroller.h
dali-toolkit/internal/text/text-view-interface.h [changed mode: 0755->0644]
dali-toolkit/internal/text/text-view.h [changed mode: 0755->0644]
dali-toolkit/internal/text/visual-model-impl.h [changed mode: 0755->0644]
dali-toolkit/internal/text/xhtml-entities.h [changed mode: 0755->0644]
dali-toolkit/internal/transition-effects/cube-transition-cross-effect-impl.h
dali-toolkit/internal/transition-effects/cube-transition-effect-impl.h
dali-toolkit/internal/transition-effects/cube-transition-fold-effect-impl.h
dali-toolkit/internal/transition-effects/cube-transition-wave-effect-impl.h
dali-toolkit/internal/visuals/animated-gradient/animated-gradient-visual.h [changed mode: 0755->0644]
dali-toolkit/internal/visuals/animated-image/animated-image-visual.h
dali-toolkit/internal/visuals/animated-image/fixed-image-cache.h
dali-toolkit/internal/visuals/animated-image/image-cache.h
dali-toolkit/internal/visuals/animated-image/rolling-animated-image-cache.h
dali-toolkit/internal/visuals/animated-image/rolling-image-cache.h
dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.h
dali-toolkit/internal/visuals/animated-vector-image/vector-animation-manager.h
dali-toolkit/internal/visuals/animated-vector-image/vector-animation-task.h
dali-toolkit/internal/visuals/animated-vector-image/vector-animation-thread.h
dali-toolkit/internal/visuals/animated-vector-image/vector-rasterize-thread.h
dali-toolkit/internal/visuals/arc/arc-visual.h
dali-toolkit/internal/visuals/border/border-visual.h
dali-toolkit/internal/visuals/color/color-visual.h
dali-toolkit/internal/visuals/gradient/gradient-visual.h
dali-toolkit/internal/visuals/gradient/gradient.h
dali-toolkit/internal/visuals/gradient/linear-gradient.h
dali-toolkit/internal/visuals/gradient/radial-gradient.h
dali-toolkit/internal/visuals/image-atlas-manager.h
dali-toolkit/internal/visuals/image-visual-shader-factory.h
dali-toolkit/internal/visuals/image/image-visual.h
dali-toolkit/internal/visuals/mesh/mesh-visual.h
dali-toolkit/internal/visuals/npatch-data.h
dali-toolkit/internal/visuals/npatch-loader.h
dali-toolkit/internal/visuals/npatch/npatch-visual.h
dali-toolkit/internal/visuals/primitive/primitive-visual.h
dali-toolkit/internal/visuals/rendering-addon.h
dali-toolkit/internal/visuals/svg/svg-rasterize-thread.h
dali-toolkit/internal/visuals/svg/svg-visual.h
dali-toolkit/internal/visuals/text/text-visual.h [changed mode: 0755->0644]
dali-toolkit/internal/visuals/texture-manager-impl.h
dali-toolkit/internal/visuals/texture-upload-observer.h
dali-toolkit/internal/visuals/transition-data-impl.h
dali-toolkit/internal/visuals/visual-base-data-impl.h
dali-toolkit/internal/visuals/visual-base-impl.h
dali-toolkit/internal/visuals/visual-event-observer.h
dali-toolkit/internal/visuals/visual-factory-cache.h
dali-toolkit/internal/visuals/visual-factory-impl.h
dali-toolkit/internal/visuals/visual-string-constants.h
dali-toolkit/internal/visuals/visual-url.h
dali-toolkit/internal/visuals/wireframe/wireframe-visual.h
dali-toolkit/public-api/controls/control.h

index 79a72db..1ec67e2 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_GLTF2_ASSET_H_
 #define DALI_SCENE_LOADER_GLTF2_ASSET_H_
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // INTERNAL INCLUDES
-#include "dali-scene-loader/public-api/index.h"
 #include "dali-scene-loader/internal/json-reader.h"
+#include "dali-scene-loader/public-api/index.h"
 
 // EXTERNAL INCLUDES
-#include "dali/public-api/math/vector4.h"
-#include "dali/public-api/math/quaternion.h"
-#include "dali/public-api/common/vector-wrapper.h"
-#include "dali/devel-api/common/map-wrapper.h"
 #include <cstdint>
 #include <memory>
+#include "dali/devel-api/common/map-wrapper.h"
+#include "dali/public-api/common/vector-wrapper.h"
+#include "dali/public-api/math/quaternion.h"
+#include "dali/public-api/math/vector4.h"
 
 namespace gltf2
 {
-
 using Index = Dali::SceneLoader::Index;
 
-template <typename T>
+template<typename T>
 class Ref
 {
 public:
@@ -42,14 +41,18 @@ public:
   Ref(std::vector<T>& v, Index i)
   : mVector(&v),
     mIndex(i)
-  {}
+  {
+  }
 
   /**
    * @return The index of the object into the vector.
    * @note It is client code responsibility to ensure that the vector is unambiguous. It should be in
    *  a glTF document, since there's one vector for each type.
    */
-  Index GetIndex() const { return mIndex; }
+  Index GetIndex() const
+  {
+    return mIndex;
+  }
 
   /**
    * @brief There may be scenarios in which the object, whose vector we're populating, changes, e.g.
@@ -60,9 +63,18 @@ public:
     mVector = &v;
   }
 
-  operator bool() const { return mVector != nullptr; }
-  T* operator->() const { return &(*mVector)[mIndex]; }
-  T& operator*() const { return (*mVector)[mIndex]; }
+  operator bool() const
+  {
+    return mVector != nullptr;
+  }
+  T* operator->() const
+  {
+    return &(*mVector)[mIndex];
+  }
+  T& operator*() const
+  {
+    return (*mVector)[mIndex];
+  }
 
   bool operator==(const Ref<T>& other) const
   {
@@ -76,7 +88,7 @@ public:
 
 private:
   std::vector<T>* mVector = nullptr;
-  Index mIndex = Dali::SceneLoader::INVALID_INDEX;
+  Index           mIndex  = Dali::SceneLoader::INVALID_INDEX;
 };
 
 struct Asset
@@ -88,16 +100,16 @@ struct Component
 {
   enum Type
   {
-    BYTE = 5120,
-    UNSIGNED_BYTE = 5121,
-    SHORT = 5122,
+    BYTE           = 5120,
+    UNSIGNED_BYTE  = 5121,
+    SHORT          = 5122,
     UNSIGNED_SHORT = 5123,
-    UNSIGNED_INT = 5125,
-    FLOAT = 5126,
-    INVALID = -1
+    UNSIGNED_INT   = 5125,
+    FLOAT          = 5126,
+    INVALID        = -1
   };
 
-  static bool IsUnsigned(Type t);
+  static bool     IsUnsigned(Type t);
   static uint32_t Size(Type t);
 
   Component() = delete;
@@ -161,7 +173,7 @@ struct Attribute
 
 struct Buffer
 {
-  uint32_t mByteLength;
+  uint32_t         mByteLength;
   std::string_view mUri;
   //TODO: extensions
   //TODO: extras
@@ -174,7 +186,7 @@ struct BufferView
     enum Type
     {
       NONE,
-      ARRAY_BUFFER = 34962,
+      ARRAY_BUFFER         = 34962,
       ELEMENT_ARRAY_BUFFER = 34963
     };
 
@@ -182,10 +194,10 @@ struct BufferView
   };
 
   Ref<Buffer> mBuffer;
-  uint32_t mByteOffset = 0;
-  uint32_t mByteLength;
-  uint32_t mByteStride = 0;  // if 0 after reading, it needs to be calculated
-  uint32_t mTarget;
+  uint32_t    mByteOffset = 0;
+  uint32_t    mByteLength;
+  uint32_t    mByteStride = 0; // if 0 after reading, it needs to be calculated
+  uint32_t    mTarget;
   //TODO: extensions
   //TODO: extras
 };
@@ -193,7 +205,7 @@ struct BufferView
 struct BufferViewClient
 {
   Ref<BufferView> mBufferView;
-  uint32_t mByteOffset = 0;
+  uint32_t        mByteOffset = 0;
 };
 
 struct ComponentTypedBufferViewClient : BufferViewClient
@@ -215,18 +227,18 @@ struct Accessor : ComponentTypedBufferViewClient, Named
 {
   struct Sparse
   {
-    uint32_t mCount;
+    uint32_t                       mCount;
     ComponentTypedBufferViewClient mIndices;
-    BufferViewClient mValues;
+    BufferViewClient               mValues;
     //TODO: extensions
     //TODO: extras
   };
 
-  uint32_t mCount;
-  bool mNormalized = false;
-  AccessorType::Type mType = AccessorType::INVALID;
-  std::vector<float> mMin;
-  std::vector<float> mMax;
+  uint32_t                mCount;
+  bool                    mNormalized = false;
+  AccessorType::Type      mType       = AccessorType::INVALID;
+  std::vector<float>      mMin;
+  std::vector<float>      mMax;
   std::unique_ptr<Sparse> mSparse;
   //TODO: extensions
   //TODO: extras
@@ -247,11 +259,11 @@ struct Accessor : ComponentTypedBufferViewClient, Named
   }
 };
 
-struct Image: Named
+struct Image : Named
 {
   std::string_view mUri;
   std::string_view mMimeType;
-  Ref<BufferView> mBufferView;
+  Ref<BufferView>  mBufferView;
   //TODO: extensions
   //TODO: extras
 };
@@ -260,12 +272,12 @@ struct Filter
 {
   enum Type
   {
-    NEAREST = 9728,
-    LINEAR = 9729,
+    NEAREST                = 9728,
+    LINEAR                 = 9729,
     NEAREST_MIPMAP_NEAREST = 9984,
-    NEAREST_MIPMAP_LINEAR = 9985,
-    LINEAR_MIPMAP_NEAREST = 9986,
-    LINEAR_MIPMAP_LINEAR = 9987,
+    NEAREST_MIPMAP_LINEAR  = 9985,
+    LINEAR_MIPMAP_NEAREST  = 9986,
+    LINEAR_MIPMAP_LINEAR   = 9987,
   };
 
   Filter() = delete;
@@ -275,8 +287,8 @@ struct Wrap
 {
   enum Type
   {
-    REPEAT = 10497,
-    CLAMP_TO_EDGE = 33071,
+    REPEAT          = 10497,
+    CLAMP_TO_EDGE   = 33071,
     MIRRORED_REPEAT = 33648,
   };
 
@@ -287,23 +299,23 @@ struct Sampler
 {
   Filter::Type mMinFilter = Filter::LINEAR;
   Filter::Type mMagFilter = Filter::LINEAR;
-  Wrap::Type mWrapS = Wrap::CLAMP_TO_EDGE;
-  Wrap::Type mWrapT = Wrap::CLAMP_TO_EDGE;
+  Wrap::Type   mWrapS     = Wrap::CLAMP_TO_EDGE;
+  Wrap::Type   mWrapT     = Wrap::CLAMP_TO_EDGE;
   //TODO: extensions
   //TODO: extras
 };
 
 struct Texture
 {
-  Ref<Image> mSource;
+  Ref<Image>   mSource;
   Ref<Sampler> mSampler;
 };
 
 struct TextureInfo
 {
   Ref<gltf2::Texture> mTexture;
-  uint32_t mTexCoord = 0;
-  float mScale = 1.f;
+  uint32_t            mTexCoord = 0;
+  float               mScale    = 1.f;
 
   operator bool() const
   {
@@ -311,32 +323,32 @@ struct TextureInfo
   }
 };
 
-struct Material: Named
+struct Material : Named
 {
-  struct Pbr//MetallicRoughness
+  struct Pbr //MetallicRoughness
   {
     Dali::Vector4 mBaseColorFactor = Dali::Vector4::ONE;
-    TextureInfo mBaseColorTexture;
-    float mMetallicFactor = 1.f;
-    float mRoughnessFactor = 1.f;
-    TextureInfo mMetallicRoughnessTexture;
+    TextureInfo   mBaseColorTexture;
+    float         mMetallicFactor  = 1.f;
+    float         mRoughnessFactor = 1.f;
+    TextureInfo   mMetallicRoughnessTexture;
     //TODO: extensions
     //TODO: extras
   };
 
-  Pbr mPbrMetallicRoughness;
-  TextureInfo mNormalTexture;
-  TextureInfo mOcclusionTexture;
-  TextureInfo mEmissiveTexture;
-  Dali::Vector3 mEmissiveFactor;
-  AlphaMode::Type mAlphaMode = AlphaMode::OPAQUE;
-  float mAlphaCutoff = .5f;
-  bool mDoubleSided = false;
+  Pbr             mPbrMetallicRoughness;
+  TextureInfo     mNormalTexture;
+  TextureInfo     mOcclusionTexture;
+  TextureInfo     mEmissiveTexture;
+  Dali::Vector3   mEmissiveFactor;
+  AlphaMode::Type mAlphaMode   = AlphaMode::OPAQUE;
+  float           mAlphaCutoff = .5f;
+  bool            mDoubleSided = false;
   //TODO: extensions
   //TODO: extras
 };
 
-struct Mesh: Named
+struct Mesh : Named
 {
   struct Primitive
   {
@@ -352,11 +364,11 @@ struct Mesh: Named
       INVALID
     };
 
-    std::map<Attribute::Type, Ref<Accessor>> mAttributes;
+    std::map<Attribute::Type, Ref<Accessor>>              mAttributes;
     std::vector<std::map<Attribute::Type, Ref<Accessor>>> mTargets;
-    Ref<Accessor> mIndices;
-    Ref<Material> mMaterial;
-    Mode mMode = TRIANGLES;
+    Ref<Accessor>                                         mIndices;
+    Ref<Material>                                         mMaterial;
+    Mode                                                  mMode = TRIANGLES;
 
     //TODO: [morph] targets
     //TODO: extras
@@ -364,7 +376,7 @@ struct Mesh: Named
   };
 
   std::vector<Primitive> mPrimitives;
-  std::vector<float> mWeights;
+  std::vector<float>     mWeights;
   //TODO: extras
   //TODO: extensions
 };
@@ -373,14 +385,14 @@ struct Node;
 
 struct Skin : Named
 {
-  Ref<Accessor> mInverseBindMatrices;
-  Ref<Node> mSkeleton;
+  Ref<Accessor>          mInverseBindMatrices;
+  Ref<Node>              mSkeleton;
   std::vector<Ref<Node>> mJoints;
   //TODO: extras
   //TODO: extensions
 };
 
-struct Camera: Named
+struct Camera : Named
 {
   struct Perspective
   {
@@ -403,21 +415,21 @@ struct Camera: Named
   };
 
   std::string_view mType;
-  Perspective mPerspective;
-  Orthographic mOrthographic;
+  Perspective      mPerspective;
+  Orthographic     mOrthographic;
   //TODO: extras
   //TODO: extensions
 };
 
-struct Node: Named
+struct Node : Named
 {
-  Dali::Vector3 mTranslation = Dali::Vector3::ZERO;
-  Dali::Quaternion mRotation = Dali::Quaternion::IDENTITY;
-  Dali::Vector3 mScale = Dali::Vector3::ONE;
+  Dali::Vector3    mTranslation = Dali::Vector3::ZERO;
+  Dali::Quaternion mRotation    = Dali::Quaternion::IDENTITY;
+  Dali::Vector3    mScale       = Dali::Vector3::ONE;
 
-  Ref<Camera> mCamera;
+  Ref<Camera>            mCamera;
   std::vector<Ref<Node>> mChildren;
-  Ref<Mesh> mMesh;
+  Ref<Mesh>              mMesh;
 
   Ref<Skin> mSkin;
   //TODO: [morph] weights
@@ -443,8 +455,8 @@ struct Animation : Named
       static Type FromString(const char* s, size_t len);
     };
 
-    Ref<Accessor> mInput;
-    Ref<Accessor> mOutput;
+    Ref<Accessor>       mInput;
+    Ref<Accessor>       mOutput;
     Interpolation::Type mInterpolation;
 
     //TODO: extras
@@ -467,11 +479,11 @@ struct Animation : Named
       static Type FromString(const char* s, size_t len);
 
       Ref<Node> mNode;
-      Type mPath;
+      Type      mPath;
     };
 
     Ref<Sampler> mSampler;
-    Target mTarget;
+    Target       mTarget;
     //TODO: extras
     //TODO: extensions
   };
@@ -480,7 +492,7 @@ struct Animation : Named
   std::vector<Channel> mChannels;
 };
 
-struct Scene: Named
+struct Scene : Named
 {
   std::vector<Ref<Node>> mNodes;
 };
@@ -489,29 +501,29 @@ struct Document
 {
   Asset mAsset;
 
-  std::vector<Buffer> mBuffers;
+  std::vector<Buffer>     mBuffers;
   std::vector<BufferView> mBufferViews;
-  std::vector<Accessor> mAccessors;
+  std::vector<Accessor>   mAccessors;
 
-  std::vector<Image> mImages;
-  std::vector<Sampler> mSamplers;
-  std::vector<Texture> mTextures;
+  std::vector<Image>    mImages;
+  std::vector<Sampler>  mSamplers;
+  std::vector<Texture>  mTextures;
   std::vector<Material> mMaterials;
 
   std::vector<Mesh> mMeshes;
   std::vector<Skin> mSkins;
 
   std::vector<Camera> mCameras;
-  std::vector<Node> mNodes;
+  std::vector<Node>   mNodes;
 
   std::vector<Animation> mAnimations;
 
   std::vector<Scene> mScenes;
-  Ref<Scene> mScene;
+  Ref<Scene>         mScene;
 
-  Document() = default;
+  Document()                = default;
   Document(const Document&) = delete;
-  Document(Document&&) = default;
+  Document(Document&&)      = default;
 
   Document& operator=(const Document&) = delete;
   Document& operator=(Document&&) = default;
@@ -521,12 +533,12 @@ struct Document
  * @brief Provides a json::Property<T>::ReadFn for interpreting unsigned integers
  *  as a Ref<U> into a std::vector<U> data member of a type T.
  */
-template <typename T>
+template<typename T>
 struct RefReader
 {
   static T* sObject;
 
-  template <typename U, std::vector<U> T::* V>
+  template<typename U, std::vector<U> T::*V>
   static Ref<U> Read(const json_value_s& j)
   {
     uint32_t index = json::Read::Number<uint32_t>(j);
@@ -534,13 +546,13 @@ struct RefReader
   }
 };
 
-template <typename T>
+template<typename T>
 T* RefReader<T>::sObject = nullptr;
 
 /**
  * @brief Convenience method to set the object for RefReader.
  */
-template <typename T>
+template<typename T>
 void SetRefReaderObject(T& object)
 {
   RefReader<T>::sObject = &object;
@@ -551,7 +563,7 @@ void SetRefReaderObject(T& object)
  * @note The enum must: 1, be called Type, nested to T, 2, provide a FromString static method taking a const char*
  *  (string data) and a size_t (string length) and returning T::Type.
  */
-template <typename T> // T must have a nested enum called Type and a static Type FromString(const char*) method.
+template<typename T> // T must have a nested enum called Type and a static Type FromString(const char*) method.
 typename T::Type ReadStringEnum(const json_value_s& j)
 {
   auto str = json::Read::StringView(j);
@@ -564,12 +576,11 @@ typename T::Type ReadStringEnum(const json_value_s& j)
  * @note T must provide an AsFloat() member method returning the non-const array of its
  *  float components.
  */
-template <typename T>
-inline
-T ReadDaliVector(const json_value_s& j)
+template<typename T>
+inline T ReadDaliVector(const json_value_s& j)
 {
   std::vector<float> floats = json::Read::Array<float, json::Read::Number<float>>(j);
-  T result;
+  T                  result;
   std::copy(floats.begin(), std::min(floats.end(), floats.begin() + sizeof(T) / sizeof(float)), result.AsFloat());
   return result;
 }
@@ -580,6 +591,6 @@ T ReadDaliVector(const json_value_s& j)
  */
 Dali::Quaternion ReadQuaternion(const json_value_s& j);
 
-}
+} // namespace gltf2
 
 #endif //DALI_SCENE_LOADER_GLTF2_ASSET_H_
index 32c69da..22b770e 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_HASH_H_
 #define DALI_SCENE_LOADER_HASH_H_
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  */
 
-#include <string>
-#include <cstring>
 #include <cstdint>
+#include <cstring>
+#include <string>
 
 namespace Dali
 {
 namespace SceneLoader
 {
-
 /**
  * @brief Rudimentary hash generator that follows a builder pattern.
  */
@@ -94,7 +93,7 @@ public:
    * @brief Applies the bytes of an object @a value, to the hash.
    * @return Its updated self.
    */
-  template <typename T>
+  template<typename T>
   Hash& AddObjectBytes(const T& value);
 
   operator uint64_t() const;
@@ -105,13 +104,12 @@ private:
   uint64_t Concatenate(uint64_t value);
 };
 
-
 template<typename T>
-Hash& Hash::AddObjectBytes(const T & value)
+Hash& Hash::AddObjectBytes(const T& value)
 {
   auto i0 = reinterpret_cast<const uint8_t*>(&value);
   auto i1 = i0 + sizeof(T);
-  while (i0 != i1)
+  while(i0 != i1)
   {
     mValue = Concatenate(*i0);
     ++i0;
@@ -119,7 +117,7 @@ Hash& Hash::AddObjectBytes(const T & value)
   return *this;
 }
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif // DALI_SCENE_LOADER_HASH_H_
index 2f769a7..4fb6f7a 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_JSON_READER_H_
 #define DALI_SCENE_LOADER_JSON_READER_H_
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include "dali-scene-loader/third-party/json.h"
 
 // EXTERNAL INCLUDES
-#include "dali/public-api/common/vector-wrapper.h"
 #include <algorithm>
-#include <map>
-#include <string_view>
-#include <sstream>
 #include <cstring>
+#include <map>
 #include <memory>
+#include <sstream>
+#include <string_view>
+#include "dali/public-api/common/vector-wrapper.h"
 
 namespace json
 {
-
 /**
  * @brief Helper for freeing the memory allocated by json_parse()
  */
@@ -60,9 +59,8 @@ int StrCmp(const json_string_s& js, const std::string& s);
  * @brief Convenience function to compare json_string_s and other supported string type,
  *  in swapped order.
  */
-template <typename String>
-inline
-int StrCmp(String& s, const json_string_s& js)
+template<typename String>
+inline int StrCmp(String& s, const json_string_s& js)
 {
   return -StrCmp(js, s);
 }
@@ -77,28 +75,33 @@ namespace detail
 /**
  * @brief Compile-time type-enum mapping.
  */
-template <typename T>
+template<typename T>
 struct Type2Enum
-{};
-
-#define TYPE2ENUM(x) template<> struct Type2Enum<json_## x ##_s>\
-{\
-  enum { VALUE = json_type_## x };\
+{
 };
 
+#define TYPE2ENUM(x)             \
+  template<>                     \
+  struct Type2Enum<json_##x##_s> \
+  {                              \
+    enum                         \
+    {                            \
+      VALUE = json_type_##x      \
+    };                           \
+  };
+
 TYPE2ENUM(object)
 TYPE2ENUM(array)
 TYPE2ENUM(string)
 TYPE2ENUM(number)
 #undef TYPE2ENUM
-}
+} // namespace detail
 
 /**
  * @brief Casts the payload of a json_value_s to the given type.
  */
-template <typename Out>
-inline
-const Out& Cast(const json_value_s& j)
+template<typename Out>
+inline const Out& Cast(const json_value_s& j)
 {
   Validate(j, static_cast<json_type_e>(detail::Type2Enum<typename std::decay<Out>::type>::VALUE));
   return *static_cast<const Out*>(j.payload);
@@ -108,9 +111,8 @@ const Out& Cast(const json_value_s& j)
  * @brief Casts the payload of a json_value_s to the given type.
  * @note std::runtime_error is thrown if the value is not the given type.
  */
-template <typename Out>
-inline
-Out& Cast(json_value_s& j)
+template<typename Out>
+inline Out& Cast(json_value_s& j)
 {
   Validate(j, static_cast<json_type_e>(detail::Type2Enum<typename std::decay<Out>::type>::VALUE));
   return *static_cast<Out*>(j.payload);
@@ -129,11 +131,11 @@ struct Read
 {
   static bool Boolean(const json_value_s& j)
   {
-    if (j.type == json_type_true)
+    if(j.type == json_type_true)
     {
       return true;
     }
-    else if (j.type == json_type_false)
+    else if(j.type == json_type_false)
     {
       return false;
     }
@@ -143,25 +145,25 @@ struct Read
     }
   }
 
-  template <typename T>
+  template<typename T>
   static T Number(const json_value_s& j)
   {
-    auto& jn = Cast<const json_number_s>(j);
+    auto&             jn = Cast<const json_number_s>(j);
     std::stringstream ss;
-    for (auto i0 = jn.number, i1 = i0 + jn.number_size; i0 != i1; ++i0)
+    for(auto i0 = jn.number, i1 = i0 + jn.number_size; i0 != i1; ++i0)
     {
       ss.put(*i0);
     }
 
     T result;
-    if (ss >> result)
+    if(ss >> result)
     {
       return result;
     }
     throw std::runtime_error("Failed to convert value to number");
   }
 
-  template <typename E>
+  template<typename E>
   static E Enum(const json_value_s& j)
   {
     size_t number = Number<size_t>(j);
@@ -180,14 +182,14 @@ struct Read
     return std::string(js.string, js.string_size);
   }
 
-  template <typename T, T(*readElement)(const json_value_s&)>
+  template<typename T, T (*readElement)(const json_value_s&)>
   static std::vector<T> Array(const json_value_s& j)
   {
-    auto& ja = Cast<const json_array_s>(j);
+    auto&          ja = Cast<const json_array_s>(j);
     std::vector<T> result;
     result.reserve(ja.length);
     auto i = ja.start;
-    while (i)
+    while(i)
     {
       result.push_back(std::move(readElement(*i->value)));
       i = i->next;
@@ -204,9 +206,13 @@ struct PropertyCore
 protected:
   explicit PropertyCore(const std::string& key)
   : mKey(key)
-  {}
+  {
+  }
 
-  const std::string& GetKey() const { return mKey; }
+  const std::string& GetKey() const
+  {
+    return mKey;
+  }
 
 private:
   std::string mKey;
@@ -215,17 +221,19 @@ private:
 /**
  * @brief Base class for the properties of a type T.
  */
-template <typename T>
+template<typename T>
 struct PropertyBase : PropertyCore
 {
   using PropertyCore::GetKey;
 
   explicit PropertyBase(const std::string& key)
   : PropertyCore(key)
-  {}
+  {
+  }
 
   virtual ~PropertyBase()
-  {}
+  {
+  }
 
   virtual void Read(const json_value_s& j, T& obj) = 0;
 };
@@ -233,28 +241,31 @@ struct PropertyBase : PropertyCore
 /**
  * @brief Concrete property of an object to read into from JSON with a given function.
  */
-template <class T, typename U>
+template<class T, typename U>
 struct Property : PropertyBase<T>
 {
-  using ReadFn = U(*)(const json_value_s&);
-  using MemberPtr = U T::*;
+  using ReadFn        = U (*)(const json_value_s&);
+  using MemberPtr     = U T::*;
   using SetterArgType = typename std::conditional<sizeof(U) <= sizeof(uintptr_t), U, const U&>::type;
-  using Setter = void (T::*)(SetterArgType);
+  using Setter        = void (T::*)(SetterArgType);
 
   Property(const std::string& key, ReadFn read, MemberPtr ptr)
   : PropertyBase<T>(key),
     mRead(read),
     mAccessor(new DirectAccessor(ptr))
-  {}
+  {
+  }
 
   Property(const std::string& key, ReadFn read, Setter setter)
   : PropertyBase<T>(key),
     mRead(read),
     mAccessor(new SetterAccessor(setter))
-  {}
+  {
+  }
 
   ~Property()
-  {}
+  {
+  }
 
   void Read(const json_value_s& j, T& obj) override
   {
@@ -265,7 +276,8 @@ private:
   struct AccessorBase
   {
     virtual ~AccessorBase()
-    {}
+    {
+    }
 
     virtual void Set(U value, T& obj) const = 0;
   };
@@ -274,7 +286,8 @@ private:
   {
     DirectAccessor(MemberPtr ptr)
     : mPointer(ptr)
-    {}
+    {
+    }
 
     void Set(U value, T& obj) const override
     {
@@ -288,7 +301,8 @@ private:
   {
     SetterAccessor(Setter setter)
     : mSetter(setter)
-    {}
+    {
+    }
 
     void Set(U value, T& obj) const override
     {
@@ -298,16 +312,15 @@ private:
     Setter mSetter;
   };
 
-  ReadFn mRead;
+  ReadFn                        mRead;
   std::unique_ptr<AccessorBase> mAccessor;
 };
 
 /**
  * @brief Helper function to make a Property for a member of type U, of object of type T.
  */
-template <class T, typename U>
-Property<T, U>* MakeProperty(const std::string& key, typename Property<T, U>::ReadFn readFn,
-  U T::* ptr)
+template<class T, typename U>
+Property<T, U>* MakeProperty(const std::string& key, typename Property<T, U>::ReadFn readFn, U T::*ptr)
 {
   return new Property<T, U>(key, readFn, ptr);
 }
@@ -333,7 +346,7 @@ protected:
  * @brief Object Reader template for reading into an object of a given type,
  *  with properties registered for the various members.
  */
-template <typename T>
+template<typename T>
 class Reader : protected ReaderCore
 {
 public:
@@ -347,7 +360,7 @@ public:
 
   ~Reader()
   {
-    for (auto& p : mProperties)
+    for(auto& p : mProperties)
     {
       delete Cast(p);
     }
@@ -355,9 +368,8 @@ public:
 
   Reader<T>& Register(PropertyBase<T>& prop)
   {
-    auto iInsert = std::lower_bound(mProperties.begin(), mProperties.end(), &prop,
-      SortPredicate);
-    if (iInsert == mProperties.end() || Cast(*iInsert)->GetKey() != prop.GetKey())
+    auto iInsert = std::lower_bound(mProperties.begin(), mProperties.end(), &prop, SortPredicate);
+    if(iInsert == mProperties.end() || Cast(*iInsert)->GetKey() != prop.GetKey())
     {
       mProperties.insert(iInsert, &prop);
     }
@@ -372,14 +384,13 @@ public:
   void Read(const json_object_s& jo, T& obj) const
   {
     auto i = jo.start;
-    while (i)
+    while(i)
     {
-      auto iFind = std::lower_bound(mProperties.begin(), mProperties.end(),
-        *i->name, FindPredicate);
-      if (iFind != mProperties.end())
+      auto iFind = std::lower_bound(mProperties.begin(), mProperties.end(), *i->name, FindPredicate);
+      if(iFind != mProperties.end())
       {
         auto prop = Cast(*iFind);
-        if (0 == StrCmp(*i->name, prop->GetKey()))
+        if(0 == StrCmp(*i->name, prop->GetKey()))
         {
           prop->Read(*i->value, obj);
         }
@@ -411,29 +422,29 @@ private:
  * @brief Wraps a Reader<T> in a function usable as a Property<T>::ReadFn, i.e. to facilitate
  *  deserializing structures of nested objects.
  */
-template <typename T>
+template<typename T>
 struct ObjectReader
 {
   static const Reader<T>* sReader;
 
   static T Read(const json_value_s& j)
   {
-    T result;
+    T     result;
     auto& jo = Cast<json_object_s>(j);
     sReader->Read(jo, result);
     return result;
   }
 };
 
-template <typename T>
+template<typename T>
 const Reader<T>* ObjectReader<T>::sReader = nullptr;
 
-template <typename T>
+template<typename T>
 void SetObjectReader(const Reader<T>& r)
 {
   ObjectReader<T>::sReader = &r;
 }
 
-} // json
+} // namespace json
 
 #endif //DALI_SCENE_LOADER_JSON_READER_H_
index 64a99cd..9121bcd 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_JSON_UTIL_H_
 #define DALI_SCENE_LOADER_JSON_UTIL_H_
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include "dali-scene-loader/public-api/index.h"
 
 // EXTERNAL INCLUDES
-#include "dali/public-api/common/vector-wrapper.h"
+#include "dali-toolkit/devel-api/builder/tree-node.h"
 #include "dali/public-api/animation/time-period.h"
-#include "dali/public-api/object/property.h"
+#include "dali/public-api/common/vector-wrapper.h"
 #include "dali/public-api/math/vector4.h"
-#include "dali-toolkit/devel-api/builder/tree-node.h"
+#include "dali/public-api/object/property.h"
 
 namespace Dali
 {
 namespace SceneLoader
 {
-
 bool ReadBool(const Toolkit::TreeNode* node, bool& num);
 
 bool ReadInt(const Toolkit::TreeNode* node, int& num);
@@ -89,7 +88,7 @@ Property::Value ReadPropertyValue(const Property::Type& propType, const Toolkit:
  */
 Property::Value ReadPropertyValue(const Toolkit::TreeNode& tn);
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif //DALI_SCENE_LOADER_JSON_UTIL_H_
index 1a6c9ad..a524b81 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_ALPHA_FUNCTION_HELPER_H_
 #define DALI_SCENE_LOADER_ALPHA_FUNCTION_HELPER_H_
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 #include "dali-scene-loader/public-api/api.h"
 
-#include "dali/public-api/animation/alpha-function.h"
 #include <string>
+#include "dali/public-api/animation/alpha-function.h"
 
 namespace Dali
 {
 namespace SceneLoader
 {
-
 /**
  * @return Given a name, provide a AlphaFunction; if the name was not
  *  recognised, get the default one.
@@ -39,7 +38,7 @@ AlphaFunction DALI_SCENE_LOADER_API GetAlphaFunction(const std::string& name, bo
  */
 void DALI_SCENE_LOADER_API RegisterAlphaFunction(const std::string& name, AlphaFunction alphaFn) noexcept(false);
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif //DALI_SCENE_LOADER_ALPHA_FUNCTION_HELPER_H_
index 026b68a..085b977 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_ANIMATED_PROPERTY_H
 #define DALI_SCENE_LOADER_ANIMATED_PROPERTY_H
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include "dali-scene-loader/public-api/api.h"
 
 // EXTERNAL INCLUDES
+#include <functional>
+#include <memory>
 #include "dali/public-api/actors/actor.h"
 #include "dali/public-api/animation/animation.h"
 #include "dali/public-api/object/property.h"
-#include <memory>
-#include <functional>
 
 namespace Dali
 {
 namespace SceneLoader
 {
-
 /**
  * @brief Intermediate representation for a property that's given to
  *  a Animation to animate. Since there is no getting an
@@ -78,20 +77,20 @@ public: // DATA
   struct Value
   {
     Property::Value mValue;
-    bool mIsRelative;
+    bool            mIsRelative;
   };
 
   std::string mNodeName;
   std::string mPropertyName;
 
-  KeyFrames mKeyFrames;
+  KeyFrames              mKeyFrames;
   std::unique_ptr<Value> mValue;
 
   AlphaFunction mAlphaFunction = AlphaFunction::DEFAULT;
-  TimePeriod mTimePeriod = TimePeriod(0.f);
+  TimePeriod    mTimePeriod    = TimePeriod(0.f);
 };
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif //DALI_SCENE_LOADER_ANIMATED_PROPERTY_H
index 41de471..ea0dcb9 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_ANIMATION_DEFINITION_H
 #define DALI_SCENE_LOADER_ANIMATION_DEFINITION_H
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  */
 
-#include "dali-scene-loader/public-api/api.h"
 #include "dali-scene-loader/public-api/animated-property.h"
+#include "dali-scene-loader/public-api/api.h"
 #include "dali/public-api/common/vector-wrapper.h"
 
 namespace Dali
 {
 namespace SceneLoader
 {
-
 /**
  * @brief Animation handle + name + definition of properties.
  */
@@ -66,23 +65,23 @@ public: // METHODS
 public: // DATA
   std::string mName;
 
-  float mDuration = DEFAULT_DURATION_SECONDS;
-  int mLoopCount = 1;
+  float                mDuration         = DEFAULT_DURATION_SECONDS;
+  int                  mLoopCount        = 1;
   Animation::EndAction mDisconnectAction = Animation::BAKE_FINAL;
-  Animation::EndAction mEndAction = Animation::BAKE;
-  float mSpeedFactor = 1.f;
-  Vector2 mPlayRange = Vector2{ 0.f, 1.f };
+  Animation::EndAction mEndAction        = Animation::BAKE;
+  float                mSpeedFactor      = 1.f;
+  Vector2              mPlayRange        = Vector2{0.f, 1.f};
 
   std::vector<AnimatedProperty> mProperties;
 };
 
 struct AnimationGroupDefinition
 {
-  std::string mName;
+  std::string              mName;
   std::vector<std::string> mAnimations;
 };
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif //DALI_SCENE_LOADER_ANIMATION_DEFINITION_H
index f5ffea0..45f4a1c 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_API_H
 #define DALI_SCENE_LOADER_API_H
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 #elif defined(WIN32)
 #ifdef BUILDING_DALI_SCENE_LOADER
-#define DALI_SCENE_LOADER_API  __declspec(dllexport)
+#define DALI_SCENE_LOADER_API __declspec(dllexport)
 #else
-#define DALI_SCENE_LOADER_API  __declspec(dllimport)
-#endif  // BUILDING_DALI_SCENE_LOADER
+#define DALI_SCENE_LOADER_API __declspec(dllimport)
+#endif // BUILDING_DALI_SCENE_LOADER
 
 #endif
 
index 67283a8..505fc5a 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_BLEND_SHAPE_DETAILS_H
 #define DALI_SCENE_LOADER_BLEND_SHAPE_DETAILS_H
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include "dali-scene-loader/public-api/api.h"
 
 // EXTERNAL INCLUDES
-#include "dali/public-api/rendering/shader.h"
-#include "dali/public-api/actors/actor.h"
 #include <string>
+#include "dali/public-api/actors/actor.h"
+#include "dali/public-api/rendering/shader.h"
 
 namespace Dali
 {
 namespace SceneLoader
 {
-
 struct MeshDefinition;
 struct MeshGeometry;
 
@@ -47,21 +46,21 @@ struct DALI_SCENE_LOADER_API BlendShapes
     enum
     {
       POSITIONS = 0x1,
-      NORMALS = 0x2,
-      TANGENTS = 0x4
+      NORMALS   = 0x2,
+      TANGENTS  = 0x4
     };
   };
 
   // shader properties - animatable (uniforms)
-  static const std::string NUMBER_OF_BLEND_SHAPES;  ///< Integer number of blend shapes loaded.
-  static const std::string UNNORMALIZE_FACTOR;  ///< Scalar(s) for position components of blend shapes; Version 1.0: float array (1 per blend shape); Version 2.0: single float.
-  static const std::string COMPONENT_SIZE;  ///< Integer offset from one component (positions / normals / tangents) of a blend shape to the next.
+  static const std::string NUMBER_OF_BLEND_SHAPES; ///< Integer number of blend shapes loaded.
+  static const std::string UNNORMALIZE_FACTOR;     ///< Scalar(s) for position components of blend shapes; Version 1.0: float array (1 per blend shape); Version 2.0: single float.
+  static const std::string COMPONENT_SIZE;         ///< Integer offset from one component (positions / normals / tangents) of a blend shape to the next.
 
   // shader properties - read-only (not available as uniforms)
-  static const std::string COMPONENTS;  ///< Integer bitmask of the blend shape components that the shader uses; refer to the Components enum.
+  static const std::string COMPONENTS; ///< Integer bitmask of the blend shape components that the shader uses; refer to the Components enum.
 
   // actor property (instance) - animatable (uniforms)
-  static const std::string WEIGHTS_UNIFORM;  ///< The weight of each blend shape in a float array
+  static const std::string WEIGHTS_UNIFORM; ///< The weight of each blend shape in a float array
 
   /**
    * @brief Registers properties based on the mesh definition (and geometry) and identified by the above string constants,
@@ -72,7 +71,7 @@ struct DALI_SCENE_LOADER_API BlendShapes
   BlendShapes() = delete;
 };
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif // DALI_SCENE_LOADER_BLEND_SHAPE_DETAILS_H
index 044c7f4..06370fc 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_CAMERA_PARAMETERS_H
 #define DALI_SCENE_LOADER_CAMERA_PARAMETERS_H
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
  *
  */
 
- // INTERNAL INCLUDES
+// INTERNAL INCLUDES
 #include "dali-scene-loader/public-api/api.h"
 #include "dali-scene-loader/public-api/view-projection.h"
 
 
 namespace Dali
 {
-
 class CameraActor;
 
 namespace SceneLoader
 {
-
 struct DALI_SCENE_LOADER_API CameraParameters
 {
-  Matrix matrix = Matrix::IDENTITY;
-  Vector4 orthographicSize = Vector4{ -1.f, 1.f, 1.f, -1.f };
-  float yFov = 60.f;
-  float zNear = 0.1f;
-  float zFar = 1000.f;
-  bool isPerspective = true;
+  Matrix  matrix           = Matrix::IDENTITY;
+  Vector4 orthographicSize = Vector4{-1.f, 1.f, 1.f, -1.f};
+  float   yFov             = 60.f;
+  float   zNear            = 0.1f;
+  float   zFar             = 1000.f;
+  bool    isPerspective    = true;
 
   /**
    * @return The view-projection matrix of the camera.
@@ -61,7 +59,7 @@ struct DALI_SCENE_LOADER_API CameraParameters
   void ConfigureCamera(CameraActor& camera) const;
 };
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif // DALI_SCENE_LOADER_CAMERA_PARAMETERS_H
index ff29b95..cdac2fc 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_CUSTOMIZATION_STATE_H_
 #define DALI_SCENE_LOADER_CUSTOMIZATION_STATE_H_
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  */
 
- // INTERNAL INCLUDES
+// INTERNAL INCLUDES
 #include "dali-scene-loader/public-api/api.h"
 
 // EXTERNAL INCLUDES
-#include "dali/public-api/common/vector-wrapper.h"
-#include <string>
 #include <memory>
+#include <string>
+#include "dali/public-api/common/vector-wrapper.h"
 
 namespace Dali
 {
 namespace SceneLoader
 {
-
 /**
  * @brief Offers a description of an aspect of the scene that can be customized:
  *     the number of options, and the name of the nodes that are registered
@@ -37,7 +36,7 @@ namespace SceneLoader
  */
 struct DALI_SCENE_LOADER_API Customization
 {
-  using Tag = std::string;
+  using Tag        = std::string;
   using OptionType = uint32_t;
 
   /**
@@ -114,11 +113,11 @@ struct DALI_SCENE_LOADER_API Customization
 
   static const OptionType NONE = OptionType(-1);
 
-  OptionType numOptions = 0;
-  std::vector<std::string> nodes;  // to apply option to.
+  OptionType               numOptions = 0;
+  std::vector<std::string> nodes; // to apply option to.
 };
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif //DALI_SCENE_LOADER_CUSTOMIZATION_STATE_H_
index e09d4d0..b46a7bf 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_DLI_LOADER_H
 #define DALI_SCENE_LOADER_DLI_LOADER_H
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  */
 
- // INTERNAL INCLUDES
-#include "dali-scene-loader/public-api/api.h"
+// INTERNAL INCLUDES
 #include "dali-scene-loader/public-api/animation-definition.h"
+#include "dali-scene-loader/public-api/api.h"
 #include "dali-scene-loader/public-api/customization.h"
-#include "dali-scene-loader/public-api/string-callback.h"
 #include "dali-scene-loader/public-api/index.h"
+#include "dali-scene-loader/public-api/string-callback.h"
 
 // EXTERNAL INCLUDES
 #include "dali/public-api/common/vector-wrapper.h"
@@ -46,17 +46,19 @@ class SceneDefinition;
 class DALI_SCENE_LOADER_API DliLoader
 {
 public:
-  using ConvertFontCode = void(*)(const std::string& code, std::string& fontFamily, std::string& slant, std::string& weight, float& size);
-  using ConvertColorCode = Vector4(*)(const std::string& code);
+  using ConvertFontCode  = void (*)(const std::string& code, std::string& fontFamily, std::string& slant, std::string& weight, float& size);
+  using ConvertColorCode = Vector4 (*)(const std::string& code);
 
-  using CategoryProcessor = std::function<void(Property::Array&& categoryData, StringCallback onError)>;
+  using CategoryProcessor       = std::function<void(Property::Array&& categoryData, StringCallback onError)>;
   using CategoryProcessorVector = std::vector<std::pair<std::string /*name*/, CategoryProcessor>>;
 
   using NodeProcessor = std::function<void(const NodeDefinition& nodeDef,
-    Property::Map&& nodeData, StringCallback onError)>;
+                                           Property::Map&&       nodeData,
+                                           StringCallback        onError)>;
 
   using AnimationProcessor = std::function<void(const AnimationDefinition& animDef,
-    Property::Map&& animData, StringCallback onError)>;
+                                                Property::Map&&            animData,
+                                                StringCallback             onError)>;
 
   struct InputParams
   {
@@ -105,7 +107,7 @@ public:
   struct LoadParams
   {
     InputParams const& input;
-    LoadResult& output;
+    LoadResult&        output;
   };
 
   DliLoader();
@@ -133,7 +135,7 @@ private:
   const std::unique_ptr<Impl> mImpl;
 };
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif // DALI_SCENE_LOADER_DLI_LOADER_H
index 1b1906f..066f6fa 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_ENVIRONMENT_DEFINITION_H
 #define DALI_SCENE_LOADER_ENVIRONMENT_DEFINITION_H
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  */
 
- // INTERNAL INCLUDES
+// INTERNAL INCLUDES
 #include "dali-scene-loader/public-api/api.h"
 #include "dali-scene-loader/public-api/ktx-loader.h"
 
 // EXTERNAL INCLUDES
-#include "dali/public-api/rendering/texture.h"
 #include "dali/public-api/math/quaternion.h"
+#include "dali/public-api/rendering/texture.h"
 
 namespace Dali
 {
 namespace SceneLoader
 {
-
 /**
  * @brief Defines an environment map with either or both of radiance
  *  and irradiance maps.
@@ -39,7 +38,7 @@ struct DALI_SCENE_LOADER_API EnvironmentDefinition
   struct Textures
   {
     Texture mDiffuse;  // irradiance
-    Texture mSpecular;  // radiance
+    Texture mSpecular; // radiance
 
     bool IsLoaded() const
     {
@@ -54,7 +53,7 @@ struct DALI_SCENE_LOADER_API EnvironmentDefinition
   };
 
   using EnvironmentData = std::pair<EnvironmentDefinition, Textures>;
-  using Vector = std::vector<EnvironmentData>;
+  using Vector          = std::vector<EnvironmentData>;
 
   EnvironmentDefinition() = default;
 
@@ -80,11 +79,11 @@ struct DALI_SCENE_LOADER_API EnvironmentDefinition
 public: // DATA
   std::string mDiffuseMapPath;
   std::string mSpecularMapPath;
-  Quaternion mCubeOrientation = Quaternion::IDENTITY;
-  float mIblIntensity = 1.0f;
+  Quaternion  mCubeOrientation = Quaternion::IDENTITY;
+  float       mIblIntensity    = 1.0f;
 };
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif //DALI_SCENE_LOADER_ENVIRONMENT_DEFINITION_H
index ce3ec79..9871ec0 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_GLTF2_LOADER_H
 #define DALI_SCENE_LOADER_GLTF2_LOADER_H
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
  *
  */
 
- // INTERNAL INCLUDES
+// INTERNAL INCLUDES
 #include "dali-scene-loader/public-api/api.h"
 
 // EXTERNAL INCLUDES
@@ -38,7 +38,7 @@ class ShaderDefinitionFactory;
  */
 DALI_SCENE_LOADER_API void LoadGltfScene(const std::string& url, ShaderDefinitionFactory& shaderFactory, LoadResult& params);
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif //DALI_SCENE_LOADER_GLTF2_LOADER_H
index 278f19a..9ad5fc2 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_INDEX_H_
 #define DALI_SCENE_LOADER_INDEX_H_
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -27,12 +27,11 @@ namespace Dali
 {
 namespace SceneLoader
 {
-
 using Index = uint32_t;
 
 constexpr Index INVALID_INDEX = static_cast<Index>(-1);
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif //DALI_SCENE_LOADER_INDEX_H_
index 6167fef..d94f4ca 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_KTX_LOADER_H
 #define DALI_SCENE_LOADER_KTX_LOADER_H
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -29,13 +29,12 @@ namespace Dali
 {
 namespace SceneLoader
 {
-
 /**
  * @brief Stores the pixel data objects for each face of the cube texture and their mipmaps.
  */
 struct DALI_SCENE_LOADER_API CubeData
 {
-  std::vector< std::vector<PixelData> > data;
+  std::vector<std::vector<PixelData> > data;
 
   Texture CreateTexture() const;
 };
@@ -48,7 +47,7 @@ struct DALI_SCENE_LOADER_API CubeData
  */
 DALI_SCENE_LOADER_API bool LoadCubeMapData(const std::string& path, CubeData& cubedata);
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif // DALI_SCENE_LOADER_KTX_LOADER_H
index 0d8d514..11b014b 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_LIGHT_PARAMETERS_H
 #define DALI_SCENE_LOADER_LIGHT_PARAMETERS_H
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include "dali-scene-loader/public-api/api.h"
 
 // EXTERNAL INCLUDES
+#include <stdint.h>
 #include "dali/public-api/math/matrix.h"
 #include "dali/public-api/math/vector3.h"
-#include <stdint.h>
 
 namespace Dali
 {
 namespace SceneLoader
 {
-
 struct DALI_SCENE_LOADER_API LightParameters
 {
   Matrix transform;
 
-  Vector3 color;
-  float intensity;
-  float shadowIntensity;
+  Vector3  color;
+  float    intensity;
+  float    shadowIntensity;
   uint32_t shadowMapSize;
-  float orthographicSize;
+  float    orthographicSize;
 };
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif // DALI_SCENE_LOADER_LIGHT_PARAMETERS_H
index ca05bfd..4ed3ff5 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_OUTPUT_H
 #define DALI_SCENE_LOADER_OUTPUT_H
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // INTERNAL INCLUDES
-#include "dali-scene-loader/public-api/api.h"
 #include "dali-scene-loader/public-api/animation-definition.h"
-#include "dali-scene-loader/public-api/light-parameters.h"
+#include "dali-scene-loader/public-api/api.h"
 #include "dali-scene-loader/public-api/camera-parameters.h"
+#include "dali-scene-loader/public-api/light-parameters.h"
 
 namespace Dali
 {
 namespace SceneLoader
 {
-
 class ResourceBundle;
 class SceneDefinition;
 
@@ -67,7 +66,7 @@ struct DALI_SCENE_LOADER_API LoadResult
   std::vector<LightParameters>& mLightParameters;
 };
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif //DALI_SCENE_LOADER_OUTPUT_H
index d360c88..80e93e7 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_MATERIAL_DEFINITION_H
 #define DALI_SCENE_LOADER_MATERIAL_DEFINITION_H
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include "dali-scene-loader/public-api/utils.h"
 
 // EXTERNAL INCLUDES
-#include "dali/public-api/math/vector4.h"
-#include "dali/public-api/common/vector-wrapper.h"
 #include <cmath>
+#include "dali/public-api/common/vector-wrapper.h"
+#include "dali/public-api/math/vector4.h"
 
 namespace Dali
 {
 namespace SceneLoader
 {
-
 /**
  * @brief Helper enum for encoding and decoding sampler states.
  */
@@ -43,54 +42,53 @@ struct DALI_SCENE_LOADER_API SamplerFlags
   enum Values : Type
   {
     // Filter - 3 bits
-    FILTER_NEAREST = 0,
-    FILTER_LINEAR = NthBit(0),
+    FILTER_NEAREST        = 0,
+    FILTER_LINEAR         = NthBit(0),
     FILTER_MIPMAP_NEAREST = NthBit(1),
-    FILTER_MIPMAP_LINEAR = NthBit(2),
+    FILTER_MIPMAP_LINEAR  = NthBit(2),
 
     // Wrap - 2 bits
     WRAP_REPEAT = 0,
-    WRAP_CLAMP = NthBit(0),
+    WRAP_CLAMP  = NthBit(0),
     WRAP_MIRROR = NthBit(1),
 
     // Layout - apply shift, then mask
     FILTER_MIN_BITS = 3,
     FILTER_MIN_MASK = NthBit(FILTER_MIN_BITS) - 1,
 
-    FILTER_MAG_BITS = 1,
+    FILTER_MAG_BITS  = 1,
     FILTER_MAG_SHIFT = FILTER_MIN_BITS,
-    FILTER_MAG_MASK = NthBit(FILTER_MAG_BITS) - 1,
+    FILTER_MAG_MASK  = NthBit(FILTER_MAG_BITS) - 1,
 
-    WRAP_S_BITS = 2,
+    WRAP_S_BITS  = 2,
     WRAP_S_SHIFT = FILTER_MAG_SHIFT + FILTER_MAG_BITS,
-    WRAP_S_MASK = NthBit(WRAP_S_BITS) - 1,
+    WRAP_S_MASK  = NthBit(WRAP_S_BITS) - 1,
 
-    WRAP_T_BITS = 2,
+    WRAP_T_BITS  = 2,
     WRAP_T_SHIFT = WRAP_S_SHIFT + WRAP_S_BITS,
-    WRAP_T_MASK = NthBit(WRAP_T_BITS) - 1,
+    WRAP_T_MASK  = NthBit(WRAP_T_BITS) - 1,
 
     // Diagnostics
     MIPMAP_MASK = FILTER_MIPMAP_LINEAR | FILTER_MIPMAP_NEAREST,
 
     // Default
-    DEFAULT = FILTER_LINEAR | (FILTER_LINEAR << FILTER_MAG_SHIFT) | (WRAP_REPEAT << WRAP_S_SHIFT) | (WRAP_REPEAT << WRAP_T_SHIFT),  // LINEAR filters, REPEAT wraps
+    DEFAULT = FILTER_LINEAR | (FILTER_LINEAR << FILTER_MAG_SHIFT) | (WRAP_REPEAT << WRAP_S_SHIFT) | (WRAP_REPEAT << WRAP_T_SHIFT), // LINEAR filters, REPEAT wraps
   };
 
   /**
    * @return SamplerFlags bit pattern calculated from the given Dali Sampler settings.
    */
-  static Type Encode(FilterMode::Type minFilter, FilterMode::Type magFilter,
-    WrapMode::Type wrapS, WrapMode::Type wrapT);
+  static Type Encode(FilterMode::Type minFilter, FilterMode::Type magFilter, WrapMode::Type wrapS, WrapMode::Type wrapT);
 
   /**
    * @brief Decodes the minification filter patter of @a flags into the corresponding FilterMode.
    */
-  static FilterMode::Type  GetMinFilter(Type flags);
+  static FilterMode::Type GetMinFilter(Type flags);
 
   /**
    * @brief Decodes the magnification filter patter of @a flags into the corresponding FilterMode.
    */
-  static FilterMode::Type  GetMagFilter(Type flags);
+  static FilterMode::Type GetMagFilter(Type flags);
 
   /**
    * @brief Decodes the horizontal wrap pattern of @a flags into the corresponding WrapMode.
@@ -113,7 +111,7 @@ struct DALI_SCENE_LOADER_API SamplerFlags
  */
 struct DALI_SCENE_LOADER_API TextureDefinition
 {
-  std::string mImageUri;
+  std::string        mImageUri;
   SamplerFlags::Type mSamplerFlags;
 
   TextureDefinition(const std::string& imageUri = "", SamplerFlags::Type samplerFlags = SamplerFlags::DEFAULT);
@@ -130,22 +128,22 @@ struct DALI_SCENE_LOADER_API MaterialDefinition
   enum Flags : uint32_t
   {
     // Texture semantics
-    ALBEDO = NthBit(0),
-    METALLIC = NthBit(1),
-    ROUGHNESS = NthBit(2),
-    NORMAL = NthBit(3),
-    EMISSIVE = NthBit(4),  // TODO: support
-    OCCLUSION = NthBit(5),  // TODO: support
-    SUBSURFACE = NthBit(6),  // Note: dli-only
+    ALBEDO     = NthBit(0),
+    METALLIC   = NthBit(1),
+    ROUGHNESS  = NthBit(2),
+    NORMAL     = NthBit(3),
+    EMISSIVE   = NthBit(4), // TODO: support
+    OCCLUSION  = NthBit(5), // TODO: support
+    SUBSURFACE = NthBit(6), // Note: dli-only
 
     // Other binary options
-    TRANSPARENCY = NthBit(20),
-    GLTF_CHANNELS = NthBit(21),  // https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#pbrmetallicroughnessmetallicroughnesstexture
+    TRANSPARENCY  = NthBit(20),
+    GLTF_CHANNELS = NthBit(21), // https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#pbrmetallicroughnessmetallicroughnesstexture
 
     // Alpha cutoff - reserved from the 24th bit
-    ALPHA_CUTOFF_BITS = 8,
+    ALPHA_CUTOFF_BITS  = 8,
     ALPHA_CUTOFF_SHIFT = sizeof(uint32_t) * 8 - ALPHA_CUTOFF_BITS,
-    ALPHA_CUTOFF_MASK = (1 << ALPHA_CUTOFF_BITS) - 1,
+    ALPHA_CUTOFF_MASK  = (1 << ALPHA_CUTOFF_BITS) - 1,
   };
 
   /**
@@ -153,7 +151,7 @@ struct DALI_SCENE_LOADER_API MaterialDefinition
    */
   struct TextureStage
   {
-    uint32_t mSemantic;
+    uint32_t          mSemantic;
     TextureDefinition mTexture;
   };
 
@@ -163,7 +161,7 @@ struct DALI_SCENE_LOADER_API MaterialDefinition
   {
     struct TextureData
     {
-      PixelData mPixels;
+      PixelData          mPixels;
       SamplerFlags::Type mSamplerFlags;
     };
 
@@ -221,14 +219,14 @@ struct DALI_SCENE_LOADER_API MaterialDefinition
 public: // DATA
   uint32_t mFlags = 0x0;
 
-  Index mEnvironmentIdx = 0;
-  Vector4 mColor = Color::WHITE;
-  float mMetallic = 1.f;
-  float mRoughness = 1.f;
+  Index                     mEnvironmentIdx = 0;
+  Vector4                   mColor          = Color::WHITE;
+  float                     mMetallic       = 1.f;
+  float                     mRoughness      = 1.f;
   std::vector<TextureStage> mTextureStages;
 };
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif //DALI_SCENE_LOADER_MATERIAL_DEFINITION_H
index f764da1..5c5c923 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_MATRIX_STACK_H_
 #define DALI_SCENE_LOADER_MATRIX_STACK_H_
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include "dali-scene-loader/public-api/api.h"
 
 // EXTERNAL INCLUDES
-#include "dali/public-api/math/matrix.h"
 #include "dali/public-api/common/vector-wrapper.h"
+#include "dali/public-api/math/matrix.h"
 
 namespace Dali
 {
 namespace SceneLoader
 {
-
 /**
  * @brief A stack of matrices whereby each newly pushed matrix is stored
  *  after being multiplied by the previous one (if any).
@@ -39,17 +38,17 @@ class DALI_SCENE_LOADER_API MatrixStack
 public:
   MatrixStack();
 
-  bool IsEmpty() const;
-  void Push(const Matrix& model);
+  bool          IsEmpty() const;
+  void          Push(const Matrix& model);
   const Matrix& Top() const;
-  void Pop();
-  void PopAll();  // clears the stack, but retains the storage.
+  void          Pop();
+  void          PopAll(); // clears the stack, but retains the storage.
 
 private:
   std::vector<Matrix> mStack;
 };
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif //DALI_SCENE_LOADER_MATRIX_STACK_H_
index 057aad7..cd0ddc9 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_MESH_DEFINITION_H
 #define DALI_SCENE_LOADER_MESH_DEFINITION_H
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 // INTERNAL INCLUDES
 #include "dali-scene-loader/public-api/api.h"
-#include "dali-scene-loader/public-api/mesh-geometry.h"
 #include "dali-scene-loader/public-api/blend-shape-details.h"
-#include "dali-scene-loader/public-api/utils.h"
 #include "dali-scene-loader/public-api/index.h"
+#include "dali-scene-loader/public-api/mesh-geometry.h"
+#include "dali-scene-loader/public-api/utils.h"
 
 // EXTERNAL INCLUDES
-#include "dali/public-api/common/vector-wrapper.h"
 #include <memory>
+#include "dali/public-api/common/vector-wrapper.h"
 
 namespace Dali
 {
 namespace SceneLoader
 {
-
 /**
  * @brief Defines a mesh with its attributes, the primitive type to render it as,
  *  and the file to load it from with the offset and length information for the
@@ -42,25 +41,28 @@ struct DALI_SCENE_LOADER_API MeshDefinition
 {
   using Vector = std::vector<std::pair<MeshDefinition, MeshGeometry>>;
 
-  enum : uint32_t { INVALID = std::numeric_limits<uint32_t>::max() };
+  enum : uint32_t
+  {
+    INVALID = std::numeric_limits<uint32_t>::max()
+  };
 
   enum Flags : uint16_t
   {
     FLIP_UVS_VERTICAL = NthBit(0),
-    U32_INDICES = NthBit(1),  // default is unsigned short
-    U16_JOINT_IDS = NthBit(2), // default is floats
+    U32_INDICES       = NthBit(1), // default is unsigned short
+    U16_JOINT_IDS     = NthBit(2), // default is floats
   };
 
   enum Attributes
   {
-    INDICES = NthBit(0),
-    POSITIONS = NthBit(1),
-    NORMALS = NthBit(2),
-    TEX_COORDS = NthBit(3),
-    TANGENTS = NthBit(4),
-    LEGACY_BITANGENTS = NthBit(5),  // these are ignored; we're calculating them in the (PBR) shader.
-    JOINTS_0 = NthBit(6),
-    WEIGHTS_0 = NthBit(7),
+    INDICES           = NthBit(0),
+    POSITIONS         = NthBit(1),
+    NORMALS           = NthBit(2),
+    TEX_COORDS        = NthBit(3),
+    TANGENTS          = NthBit(4),
+    LEGACY_BITANGENTS = NthBit(5), // these are ignored; we're calculating them in the (PBR) shader.
+    JOINTS_0          = NthBit(6),
+    WEIGHTS_0         = NthBit(7),
   };
 
   /**
@@ -69,10 +71,10 @@ struct DALI_SCENE_LOADER_API MeshDefinition
    */
   struct Blob
   {
-    uint32_t mOffset = INVALID;  // the default means that the blob is undefined.
-    uint32_t mLength = 0;  // if the blob is undefined, its data may still be generated. This is enabled by setting length to some non-0 value. Refer to MeshDefinition for details.
-    uint16_t mStride = 0;  // ignore if 0
-    uint16_t mElementSizeHint = 0;  // ignore if 0 or stride == 0
+    uint32_t           mOffset          = INVALID; // the default means that the blob is undefined.
+    uint32_t           mLength          = 0;       // if the blob is undefined, its data may still be generated. This is enabled by setting length to some non-0 value. Refer to MeshDefinition for details.
+    uint16_t           mStride          = 0;       // ignore if 0
+    uint16_t           mElementSizeHint = 0;       // ignore if 0 or stride == 0
     std::vector<float> mMin;
     std::vector<float> mMax;
 
@@ -80,8 +82,7 @@ struct DALI_SCENE_LOADER_API MeshDefinition
 
     Blob() = default;
 
-    Blob(uint32_t offset, uint32_t length, uint16_t stride = 0, uint16_t elementSizeHint = 0,
-      const std::vector<float>& min = {}, const std::vector<float>& max = {});
+    Blob(uint32_t offset, uint32_t length, uint16_t stride = 0, uint16_t elementSizeHint = 0, const std::vector<float>& min = {}, const std::vector<float>& max = {});
 
     /**
      * @brief Calculates the size of a tightly-packed buffer for the elements from the blob.
@@ -122,14 +123,14 @@ struct DALI_SCENE_LOADER_API MeshDefinition
 
     SparseBlob(const Blob& indices, const Blob& values, uint32_t count);
 
-    Blob mIndices;
-    Blob mValues;
+    Blob     mIndices;
+    Blob     mValues;
     uint32_t mCount = 0u;
   };
 
   struct Accessor
   {
-    Blob mBlob;
+    Blob                        mBlob;
     std::unique_ptr<SparseBlob> mSparse;
 
     Accessor() = default;
@@ -140,8 +141,8 @@ struct DALI_SCENE_LOADER_API MeshDefinition
     Accessor(Accessor&&) = default;
     Accessor& operator=(Accessor&&) = default;
 
-    Accessor(const MeshDefinition::Blob& blob,
-      const MeshDefinition::SparseBlob& sparse);
+    Accessor(const MeshDefinition::Blob&       blob,
+             const MeshDefinition::SparseBlob& sparse);
 
     bool IsDefined() const
     {
@@ -155,30 +156,30 @@ struct DALI_SCENE_LOADER_API MeshDefinition
   struct BlendShape
   {
     std::string name;
-    Accessor deltas;
-    Accessor normals;
-    Accessor tangents;
-    float weight = 0.f;
+    Accessor    deltas;
+    Accessor    normals;
+    Accessor    tangents;
+    float       weight = 0.f;
   };
 
   struct RawData
   {
     struct Attrib
     {
-      std::string mName;
-      Property::Type mType;
-      uint32_t mNumElements;
+      std::string          mName;
+      Property::Type       mType;
+      uint32_t             mNumElements;
       std::vector<uint8_t> mData;
 
       void AttachBuffer(Geometry& g) const;
     };
 
     std::vector<uint16_t> mIndices;
-    std::vector<Attrib> mAttribs;
+    std::vector<Attrib>   mAttribs;
 
-    unsigned int mBlendShapeBufferOffset;
+    unsigned int        mBlendShapeBufferOffset;
     Dali::Vector<float> mBlendShapeUnnormalizeFactor;
-    PixelData mBlendShapeData;
+    PixelData           mBlendShapeData;
   };
 
   MeshDefinition() = default;
@@ -235,25 +236,25 @@ struct DALI_SCENE_LOADER_API MeshDefinition
   MeshGeometry Load(RawData&& raw) const;
 
 public: // DATA
-  uint32_t mFlags = 0x0;
+  uint32_t       mFlags         = 0x0;
   Geometry::Type mPrimitiveType = Geometry::TRIANGLES;
-  std::string mUri;
-  Accessor mIndices;
-  Accessor mPositions;
-  Accessor mNormals;  // data can be generated based on positions
-  Accessor mTexCoords;
-  Accessor mTangents;  // data can be generated based on normals and texCoords (the latter isn't mandatory; the results will be better if available)
-  Accessor mJoints0;
-  Accessor mWeights0;
-
-  Blob mBlendShapeHeader;
+  std::string    mUri;
+  Accessor       mIndices;
+  Accessor       mPositions;
+  Accessor       mNormals; // data can be generated based on positions
+  Accessor       mTexCoords;
+  Accessor       mTangents; // data can be generated based on normals and texCoords (the latter isn't mandatory; the results will be better if available)
+  Accessor       mJoints0;
+  Accessor       mWeights0;
+
+  Blob                    mBlendShapeHeader;
   std::vector<BlendShape> mBlendShapes;
-  BlendShapes::Version mBlendShapeVersion = BlendShapes::Version::INVALID;
+  BlendShapes::Version    mBlendShapeVersion = BlendShapes::Version::INVALID;
 
   Index mSkeletonIdx = INVALID_INDEX;
 };
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif //DALI_SCENE_LOADER_MESH_DEFINITION_H
index bf282da..026e9a7 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_MESH_GEOMETRY_H
 #define DALI_SCENE_LOADER_MESH_GEOMETRY_H
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -28,16 +28,15 @@ namespace Dali
 {
 namespace SceneLoader
 {
-
 struct DALI_SCENE_LOADER_API MeshGeometry
 {
-  Geometry geometry;                         ///< The array of vertices.
-  Texture blendShapeGeometry;                ///< The array of vertices of the different blend shapes encoded inside a texture with power of two dimensions.
+  Geometry      geometry;                    ///< The array of vertices.
+  Texture       blendShapeGeometry;          ///< The array of vertices of the different blend shapes encoded inside a texture with power of two dimensions.
   Vector<float> blendShapeUnnormalizeFactor; ///< Factor used to unnormalize the geometry of the blend shape.
-  unsigned int blendShapeBufferOffset;             ///< Offset used to calculate the start of each blend shape.
+  unsigned int  blendShapeBufferOffset;      ///< Offset used to calculate the start of each blend shape.
 };
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif // DALI_SCENE_LOADER_MESH_GEOMETRY_H
index 3dec499..b496cf7 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_NODE_DEFINITION_H_
 #define DALI_SCENE_LOADER_NODE_DEFINITION_H_
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include "dali-scene-loader/public-api/resource-bundle.h"
 
 // EXTERNAL INCLUDES
-#include "dali/public-api/math/quaternion.h"
+#include <functional>
+#include <memory>
+#include <string>
+#include "dali/public-api/actors/actor.h"
 #include "dali/public-api/math/matrix.h"
+#include "dali/public-api/math/quaternion.h"
 #include "dali/public-api/math/vector4.h"
-#include "dali/public-api/actors/actor.h"
-#include <string>
-#include <memory>
-#include <functional>
 
 namespace Dali
 {
 namespace SceneLoader
 {
-
 class ViewProjection;
 
 /**
@@ -70,7 +69,7 @@ public:
 struct DALI_SCENE_LOADER_API ConstraintDefinition
 {
   std::string mProperty;  ///< name of the property to constrain.
-  Index mSourceIdx;  ///< index of the node to serve as the source of the constraint.
+  Index       mSourceIdx; ///< index of the node to serve as the source of the constraint.
 
   bool operator<(const ConstraintDefinition& other) const
   {
@@ -90,7 +89,7 @@ struct DALI_SCENE_LOADER_API ConstraintDefinition
 
 struct DALI_SCENE_LOADER_API Transforms
 {
-  MatrixStack modelStack;
+  MatrixStack           modelStack;
   const ViewProjection& viewProjection;
 };
 
@@ -100,7 +99,7 @@ struct DALI_SCENE_LOADER_API Transforms
  */
 struct DALI_SCENE_LOADER_API SkinningShaderConfigurationRequest
 {
-  Index mSkeletonIdx;
+  Index  mSkeletonIdx;
   Shader mShader;
 
   bool operator<(const SkinningShaderConfigurationRequest& other) const
@@ -115,8 +114,8 @@ struct DALI_SCENE_LOADER_API SkinningShaderConfigurationRequest
 struct DALI_SCENE_LOADER_API BlendshapeShaderConfigurationRequest
 {
   std::string mNodeName;
-  Index mMeshIdx;
-  Shader mShader;
+  Index       mMeshIdx;
+  Shader      mShader;
 
   bool operator<(const BlendshapeShaderConfigurationRequest& other) const
   {
@@ -129,8 +128,8 @@ struct DALI_SCENE_LOADER_API BlendshapeShaderConfigurationRequest
  */
 struct DALI_SCENE_LOADER_API ConstraintRequest
 {
-  const ConstraintDefinition* const mConstraint;  ///< Definition of the constraint to create.
-  Actor mTarget;  ///< Target of the constraint.
+  const ConstraintDefinition* const mConstraint; ///< Definition of the constraint to create.
+  Actor                             mTarget;     ///< Target of the constraint.
 };
 
 /**
@@ -140,18 +139,18 @@ struct DALI_SCENE_LOADER_API ConstraintRequest
  */
 struct DALI_SCENE_LOADER_API NodeDefinition
 {
-public:  // TYPES
+public: // TYPES
   using Vector = std::vector<NodeDefinition>;
 
   struct CreateParams
   {
   public: // input
     const ResourceBundle& mResources;
-    Transforms& mXforms;
+    Transforms&           mXforms;
 
   public: // output
-    std::vector<ConstraintRequest> mConstrainables;
-    std::vector<SkinningShaderConfigurationRequest> mSkinnables;
+    std::vector<ConstraintRequest>                    mConstrainables;
+    std::vector<SkinningShaderConfigurationRequest>   mSkinnables;
     std::vector<BlendshapeShaderConfigurationRequest> mBlendshapeRequests;
   };
 
@@ -176,14 +175,14 @@ public:  // TYPES
     {
       auto choice = choices.Get(mTag);
       return std::min(choice != Customization::NONE ? choice : 0,
-        static_cast<Index>(node.mChildren.size() - 1));
+                      static_cast<Index>(node.mChildren.size() - 1));
     }
   };
 
   class IVisitor
   {
   public:
-    virtual void Start(NodeDefinition& n) = 0;
+    virtual void Start(NodeDefinition& n)  = 0;
     virtual void Finish(NodeDefinition& n) = 0;
 
   protected:
@@ -193,7 +192,7 @@ public:  // TYPES
   class IConstVisitor
   {
   public:
-    virtual void Start(const NodeDefinition& n) = 0;
+    virtual void Start(const NodeDefinition& n)  = 0;
     virtual void Finish(const NodeDefinition& n) = 0;
 
   protected:
@@ -202,7 +201,7 @@ public:  // TYPES
 
   struct Extra
   {
-    std::string mKey;
+    std::string     mKey;
     Property::Value mValue;
 
     bool operator<(const Extra& other) const
@@ -211,7 +210,7 @@ public:  // TYPES
     }
   };
 
-public:  // METHODS
+public: // METHODS
   /**
    * @brief Creates a DALi Actor from this definition only.
    * @note Not recursive.
@@ -225,28 +224,28 @@ public: // DATA
 
   std::string mName;
 
-  Vector3 mPosition = Vector3::ZERO;
+  Vector3    mPosition    = Vector3::ZERO;
   Quaternion mOrientation = Quaternion::IDENTITY;
-  Vector3 mScale = Vector3::ONE;
-  Vector3 mSize = Vector3::ONE;
+  Vector3    mScale       = Vector3::ONE;
+  Vector3    mSize        = Vector3::ONE;
 
   bool mIsVisible = true;
 
-  std::unique_ptr<Renderable> mRenderable;
+  std::unique_ptr<Renderable>              mRenderable;
   std::unique_ptr<CustomizationDefinition> mCustomization;
-  std::vector<Extra> mExtras;
-  std::vector<ConstraintDefinition> mConstraints;
+  std::vector<Extra>                       mExtras;
+  std::vector<ConstraintDefinition>        mConstraints;
 
   std::vector<Index> mChildren;
-  Index mParentIdx = INVALID_INDEX;
+  Index              mParentIdx = INVALID_INDEX;
 };
 
 class DALI_SCENE_LOADER_API ModelNode : public NodeDefinition::Renderable
 {
 public: // DATA
-  Vector4 mColor = Color::WHITE;
-  Index mMeshIdx = INVALID_INDEX;
-  Index mMaterialIdx = INVALID_INDEX;
+  Vector4 mColor       = Color::WHITE;
+  Index   mMeshIdx     = INVALID_INDEX;
+  Index   mMaterialIdx = INVALID_INDEX;
 
 public: // METHODS
   void RegisterResources(IResourceReceiver& receiver) const override;
@@ -260,11 +259,11 @@ public: // METHODS
 class DALI_SCENE_LOADER_API ArcNode : public ModelNode
 {
 public: // DATA
-  bool mAntiAliasing = true;
-  int mArcCaps = 0;
+  bool  mAntiAliasing      = true;
+  int   mArcCaps           = 0;
   float mStartAngleDegrees = .0f;
-  float mEndAngleDegrees = .0f;
-  float mRadius = .0f;
+  float mEndAngleDegrees   = .0f;
+  float mRadius            = .0f;
 
 public: // METHODS
   static void GetEndVectorWithDiffAngle(float startAngle, float endAngle, Vector2& endVector);
@@ -272,7 +271,7 @@ public: // METHODS
   void OnCreate(const NodeDefinition& node, NodeDefinition::CreateParams& params, Actor& actor) const override;
 };
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif //DALI_SCENE_LOADER_NODE_DEFINITION_H_
index 97792aa..38103d0 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_INTERPRET_RENDERER_STATE_H
 #define DALI_SCENE_LOADER_INTERPRET_RENDERER_STATE_H
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics 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,7 +26,6 @@ namespace SceneLoader
 {
 namespace RendererState
 {
-
 /*
  * @brief Attempts to interpret a string for renderer states, which can be a combination of the following
  *  (using '|' as a delimiter, if multiple specified):<br/>
@@ -42,8 +41,8 @@ namespace RendererState
  */
 DALI_SCENE_LOADER_API Type Parse(const char* string, size_t length = 0, StringCallback onError = DefaultErrorCallback);
 
-}
-}
-}
+} // namespace RendererState
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif //DALI_SCENE_LOADER_INTERPRET_RENDERER_STATE_H
index dc1bf63..f70100a 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_RENDERER_STATE_H
 #define DALI_SCENE_LOADER_RENDERER_STATE_H
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -27,7 +27,6 @@ namespace Dali
 {
 namespace SceneLoader
 {
-
 /*
  * @brief Contains values for comparison functions used in depth and stencil testing.
  * @note Relative order of members must match DepthFunction::Type and StencilFunction::Type.
@@ -36,7 +35,7 @@ struct DALI_SCENE_LOADER_API Comparison
 {
   enum Type
   {
-    OMIT,  // not specified; will not be set.
+    OMIT, // not specified; will not be set.
     NEVER,
     ALWAYS,
     LESS,
@@ -58,13 +57,13 @@ struct DALI_SCENE_LOADER_API BlendFactor
 {
   enum Type
   {
-    OMIT,  // not specified - will not be updated
+    OMIT, // not specified - will not be updated
     ZERO,
-    ONE,  // default for source alpha
+    ONE, // default for source alpha
     SRC_COLOR,
     ONE_MINUS_SRC_COLOR,
-    SRC_ALPHA,  // default for source RGB
-    ONE_MINUS_SRC_ALPHA,  // default for destination RGB and destination alpha
+    SRC_ALPHA,           // default for source RGB
+    ONE_MINUS_SRC_ALPHA, // default for destination RGB and destination alpha
     DST_ALPHA,
     ONE_MINUS_DST_ALPHA,
     DST_COLOR,
@@ -87,12 +86,12 @@ struct DALI_SCENE_LOADER_API BufferMode
 {
   enum Type
   {
-    OMIT,  ///< not specified - will not be updated
-    NONE,  ///< Don’t write to either color or stencil buffer (But will potentially render to depth buffer).
-    AUTO,  ///< Writes are managed by the Actor Clipping API. This is DALi's default.
-    COLOR,  ///< Ignore stencil properties.  Write to the color buffer.
-    STENCIL,  ///< Use the stencil properties. Do not write to the color buffer.
-    COLOR_STENCIL  ///< Use the stencil properties AND Write to the color buffer.
+    OMIT,         ///< not specified - will not be updated
+    NONE,         ///< Don’t write to either color or stencil buffer (But will potentially render to depth buffer).
+    AUTO,         ///< Writes are managed by the Actor Clipping API. This is DALi's default.
+    COLOR,        ///< Ignore stencil properties.  Write to the color buffer.
+    STENCIL,      ///< Use the stencil properties. Do not write to the color buffer.
+    COLOR_STENCIL ///< Use the stencil properties AND Write to the color buffer.
   };
 
   BufferMode() = delete;
@@ -103,36 +102,35 @@ struct DALI_SCENE_LOADER_API BufferMode
  */
 namespace RendererState
 {
-
-using Type = uint32_t;  // 8 bits reserved for flags, 4 * 4 bit for blend factors, 4 bits for depth function
+using Type = uint32_t; // 8 bits reserved for flags, 4 * 4 bit for blend factors, 4 bits for depth function
 
 enum DALI_SCENE_LOADER_API Value : Type
 {
   NONE = 0x0,
 
   DEPTH_WRITE = 0x01,
-  DEPTH_TEST = 0x02,
+  DEPTH_TEST  = 0x02,
 
   CULL_FRONT = 0x04,
-  CULL_BACK = 0x08,
+  CULL_BACK  = 0x08,
 
   ALPHA_BLEND = 0x10,
 
   DEPTH_FUNCTION_SHIFT = 6,
-  DEPTH_FUNCTION_BITS = 4,
-  DEPTH_FUNCTION_MASK = ((1 << DEPTH_FUNCTION_BITS) - 1) << DEPTH_FUNCTION_SHIFT,
+  DEPTH_FUNCTION_BITS  = 4,
+  DEPTH_FUNCTION_MASK  = ((1 << DEPTH_FUNCTION_BITS) - 1) << DEPTH_FUNCTION_SHIFT,
 
   BLEND_FACTOR_BASE_SHIFT = DEPTH_FUNCTION_SHIFT + DEPTH_FUNCTION_BITS,
-  BLEND_FACTOR_ITEM_BITS = 4,
-  BLEND_FACTOR_ITEMS = 4,
-  BLEND_FACTOR_BITS = BLEND_FACTOR_ITEM_BITS * BLEND_FACTOR_ITEMS,
-  BLEND_FACTOR_MASK = ((1 << BLEND_FACTOR_BITS) - 1) << BLEND_FACTOR_BASE_SHIFT,
-  BLEND_FACTOR_ITEM_MASK = (1 << BLEND_FACTOR_ITEM_BITS) - 1,  // after rshifting by BLEND_FACTOR_BASE_SHIFT
+  BLEND_FACTOR_ITEM_BITS  = 4,
+  BLEND_FACTOR_ITEMS      = 4,
+  BLEND_FACTOR_BITS       = BLEND_FACTOR_ITEM_BITS * BLEND_FACTOR_ITEMS,
+  BLEND_FACTOR_MASK       = ((1 << BLEND_FACTOR_BITS) - 1) << BLEND_FACTOR_BASE_SHIFT,
+  BLEND_FACTOR_ITEM_MASK  = (1 << BLEND_FACTOR_ITEM_BITS) - 1, // after rshifting by BLEND_FACTOR_BASE_SHIFT
 
   // Buffer mode is DALi's RenderMode, just to avoid too much conflation.
-  BUFFER_MODE_BITS = 3u,
-  BUFFER_MODE_SHIFT = 32u - BUFFER_MODE_BITS,  // from end
-  BUFFER_MODE_MASK = ((1u << BUFFER_MODE_BITS) - 1u) << BUFFER_MODE_SHIFT,
+  BUFFER_MODE_BITS  = 3u,
+  BUFFER_MODE_SHIFT = 32u - BUFFER_MODE_BITS, // from end
+  BUFFER_MODE_MASK  = ((1u << BUFFER_MODE_BITS) - 1u) << BUFFER_MODE_SHIFT,
 
   DEFAULT = DEPTH_WRITE | DEPTH_TEST | CULL_BACK | (Comparison::LESS_EQUAL << DEPTH_FUNCTION_SHIFT),
 };
@@ -141,12 +139,11 @@ enum DALI_SCENE_LOADER_API Value : Type
  * @brief Encodes the given blend factors into a RenderMode value, maskable into other options,
  *  passable into ApplyRenderMode().
  */
-inline
-DALI_SCENE_LOADER_API constexpr uint32_t FromBlendFactors(BlendFactor::Type srcRgb, BlendFactor::Type destRgb,
-  BlendFactor::Type srcAlpha, BlendFactor::Type destAlpha)
+inline DALI_SCENE_LOADER_API constexpr uint32_t FromBlendFactors(BlendFactor::Type srcRgb, BlendFactor::Type destRgb, BlendFactor::Type srcAlpha, BlendFactor::Type destAlpha)
 {
   return (srcRgb | (destRgb << BLEND_FACTOR_ITEM_BITS) | (srcAlpha << (BLEND_FACTOR_ITEM_BITS * 2)) |
-    (destAlpha << (BLEND_FACTOR_ITEM_BITS * 3))) << BLEND_FACTOR_BASE_SHIFT;
+          (destAlpha << (BLEND_FACTOR_ITEM_BITS * 3)))
+         << BLEND_FACTOR_BASE_SHIFT;
 }
 
 /*
@@ -157,9 +154,9 @@ DALI_SCENE_LOADER_API constexpr uint32_t FromBlendFactors(BlendFactor::Type srcR
  */
 DALI_SCENE_LOADER_API void Apply(Type rendererState, Renderer& renderer);
 
-} // RendererState
+} // namespace RendererState
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif //DALI_SCENE_LOADER_RENDERER_STATE_H
index 16860ec..b1e0936 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_RESOURCE_BUNDLE_H_
 #define DALI_SCENE_LOADER_RESOURCE_BUNDLE_H_
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // INTERNAL
-#include "dali-scene-loader/public-api/mesh-definition.h"
-#include "dali-scene-loader/public-api/material-definition.h"
 #include "dali-scene-loader/public-api/environment-definition.h"
+#include "dali-scene-loader/public-api/material-definition.h"
+#include "dali-scene-loader/public-api/mesh-definition.h"
 #include "dali-scene-loader/public-api/shader-definition.h"
 #include "dali-scene-loader/public-api/skeleton-definition.h"
 
 // EXTERNAL
+#include <functional>
+#include <memory>
 #include "dali/public-api/common/vector-wrapper.h"
 #include "dali/public-api/rendering/shader.h"
 #include "dali/public-api/rendering/texture-set.h"
-#include <memory>
-#include <functional>
 
 namespace Dali
 {
 namespace SceneLoader
 {
-
 /*
  * @brief The types of resources that .dli may define.
  */
@@ -73,9 +72,9 @@ public:
 
     enum Value : Type
     {
-      None = 0,
-      ForceReload = NthBit(0),  ///< Load resources [again] even if they were already loaded.
-      KeepUnused = NthBit(1)  ///<s Don't reset handles to resources that had a 0 reference count.
+      None        = 0,
+      ForceReload = NthBit(0), ///< Load resources [again] even if they were already loaded.
+      KeepUnused  = NthBit(1)  ///<s Don't reset handles to resources that had a 0 reference count.
     };
   };
 
@@ -111,19 +110,19 @@ public:
    *  UNLESS the KeepUnused option was specified.
    */
   void LoadResources(const ResourceRefCounts& refCounts,
-    PathProvider pathProvider,
-    Options::Type options = Options::None);
+                     PathProvider             pathProvider,
+                     Options::Type            options = Options::None);
 
 public: // DATA
   EnvironmentDefinition::Vector mEnvironmentMaps;
-  ShaderDefinition::Vector mShaders;
-  MeshDefinition::Vector mMeshes;
-  MaterialDefinition::Vector mMaterials;
+  ShaderDefinition::Vector      mShaders;
+  MeshDefinition::Vector        mMeshes;
+  MaterialDefinition::Vector    mMaterials;
 
   SkeletonDefinition::Vector mSkeletons;
 };
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif //DALI_SCENE_LOADER_RESOURCE_BUNDLE_H_
index 66ea758..192d8d4 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_SCENE_DEFINITION_H_
 #define DALI_SCENE_LOADER_SCENE_DEFINITION_H_
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 // INTERNAL INCLUDES
 #include "dali-scene-loader/public-api/customization.h"
-#include "dali-scene-loader/public-api/utils.h"
 #include "dali-scene-loader/public-api/node-definition.h"
 #include "dali-scene-loader/public-api/string-callback.h"
+#include "dali-scene-loader/public-api/utils.h"
 
 // EXTERNAL INCLUDES
-#include "dali/public-api/math/quaternion.h"
+#include <memory>
+#include <string>
+#include "dali/public-api/actors/actor.h"
 #include "dali/public-api/math/matrix.h"
+#include "dali/public-api/math/quaternion.h"
 #include "dali/public-api/math/vector4.h"
-#include "dali/public-api/actors/actor.h"
-#include <string>
-#include <memory>
 
 namespace Dali
 {
 namespace SceneLoader
 {
-
 class MatrixStack;
 
 /*
@@ -44,9 +43,9 @@ class MatrixStack;
  */
 class DALI_SCENE_LOADER_API SceneDefinition
 {
-public:  // TYPES
-  using NodePredicate = std::function<bool(const NodeDefinition&)>;
-  using NodeConsumer = std::function<void(NodeDefinition&)>;
+public: // TYPES
+  using NodePredicate     = std::function<bool(const NodeDefinition&)>;
+  using NodeConsumer      = std::function<void(NodeDefinition&)>;
   using ConstNodeConsumer = std::function<void(const NodeDefinition&)>;
 
 public: // METHODS
@@ -112,8 +111,7 @@ public: // METHODS
    *  from node definitions.
    * @return Handle to the root actor.
    */
-  Actor CreateNodes(Index iNode, const Customization::Choices& choices,
-    NodeDefinition::CreateParams& params) const;
+  Actor CreateNodes(Index iNode, const Customization::Choices& choices, NodeDefinition::CreateParams& params) const;
 
   /*
    * @brief Creates / update a registry of mappings from customization tags to
@@ -123,8 +121,8 @@ public: // METHODS
    *  choice of 0.
    */
   void GetCustomizationOptions(const Customization::Choices& choices,
-    Customization::Map& outCustomizationOptions,
-    Customization::Choices* outMissingChoices) const;
+                               Customization::Map&           outCustomizationOptions,
+                               Customization::Choices*       outMissingChoices) const;
 
   /*
    * @brief Attempts to add @a nodeDef to the end of nodes, and its index to the end of
@@ -198,9 +196,9 @@ public: // METHODS
   /*
    * @brief Applies constraints from the given requests.
    */
-  void ApplyConstraints(Actor& root,
-    std::vector<ConstraintRequest>&& constrainables,
-    StringCallback onError = DefaultErrorCallback) const;
+  void ApplyConstraints(Actor&                           root,
+                        std::vector<ConstraintRequest>&& constrainables,
+                        StringCallback                   onError = DefaultErrorCallback) const;
 
   /*
    * @brief Sets up joint matrix properties and constraints on actors that are involved in skeletal
@@ -239,8 +237,9 @@ public: // METHODS
    *   of separate instances need to be declared in the .dli to avoid clashing uniform
    *   definitions and constraints.
    */
-  void ConfigureSkinningShaders(const ResourceBundle& resources,
-    Actor root, std::vector<SkinningShaderConfigurationRequest>&& requests) const;
+  void ConfigureSkinningShaders(const ResourceBundle&                             resources,
+                                Actor                                             root,
+                                std::vector<SkinningShaderConfigurationRequest>&& requests) const;
 
   /*
    * @brief Ensures there is no two meshes with blend shapes sharing the same shader.
@@ -258,21 +257,22 @@ public: // METHODS
    * @param[in] resources The resources bundle. Meshes need to be accessed to configure the blend shapes.
    * @param[in] onError The error callback.
    */
-  bool ConfigureBlendshapeShaders(const ResourceBundle& resources,
-    Actor root, std::vector<BlendshapeShaderConfigurationRequest>&& requests,
-    StringCallback onError = DefaultErrorCallback) const;
+  bool ConfigureBlendshapeShaders(const ResourceBundle&                               resources,
+                                  Actor                                               root,
+                                  std::vector<BlendshapeShaderConfigurationRequest>&& requests,
+                                  StringCallback                                      onError = DefaultErrorCallback) const;
 
   SceneDefinition& operator=(SceneDefinition&& other);
 
 private: // METHODS
   bool FindNode(const std::string& name, std::unique_ptr<NodeDefinition>** result);
 
-private: // DATA
-  std::vector<std::unique_ptr<NodeDefinition>> mNodes;  // size unknown up front (may discard nodes).
-  std::vector<Index> mRootNodeIds;
+private:                                               // DATA
+  std::vector<std::unique_ptr<NodeDefinition>> mNodes; // size unknown up front (may discard nodes).
+  std::vector<Index>                           mRootNodeIds;
 };
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif //DALI_SCENE_LOADER_SCENE_DEFINITION_H_
index 4f55bbe..387984d 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_SHADER_DEFINITION_FACTORY_H_
 #define DALI_SCENE_LOADER_SHADER_DEFINITION_FACTORY_H_
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,8 +18,8 @@
  */
 
 // INTERNAL INCLUDES
-#include "dali-scene-loader/public-api/index.h"
 #include "dali-scene-loader/public-api/api.h"
+#include "dali-scene-loader/public-api/index.h"
 
 // EXTERNAL INCLUDER
 #include <memory>
@@ -28,7 +28,6 @@ namespace Dali
 {
 namespace SceneLoader
 {
-
 struct NodeDefinition;
 class ResourceBundle;
 
@@ -57,7 +56,7 @@ private:
   const std::unique_ptr<Impl> mImpl;
 };
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif //DALI_SCENE_LOADER_SHADER_DEFINITION_FACTORY_H_
index 29693fb..d7f390b 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_SHADER_DEFINITION_H
 #define DALI_SCENE_LOADER_SHADER_DEFINITION_H
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include "dali-scene-loader/public-api/renderer-state.h"
 
 // EXTERNAL INCLUDES
+#include <memory>
 #include "dali/public-api/common/vector-wrapper.h"
 #include "dali/public-api/rendering/shader.h"
-#include <memory>
 
 namespace Dali
 {
 namespace SceneLoader
 {
-
 /*
  * @brief Defines a shader with paths to the files which define its
  *  vertex and fragment components, and a mapping of uniform names (which are
@@ -76,15 +75,15 @@ struct DALI_SCENE_LOADER_API ShaderDefinition
 public: // DATA
   RendererState::Type mRendererState = RendererState::NONE;
 
-  std::string mVertexShaderPath;
-  std::string mFragmentShaderPath;
+  std::string              mVertexShaderPath;
+  std::string              mFragmentShaderPath;
   std::vector<std::string> mDefines;
   std::vector<std::string> mHints;
 
   Property::Map mUniforms;
 };
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif //DALI_SCENE_LOADER_SHADER_DEFINITION_H
index a06f19b..9bd7133 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_SKELETON_H
 #define DALI_SCENE_LOADER_SKELETON_H
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -28,7 +28,6 @@ namespace Dali
 {
 namespace SceneLoader
 {
-
 /*
  * @brief A set of joints (stored as node indices), and an optional root node index.
  * @note The list of joints must not be empty and must not contain INVALID_INDEX.
@@ -39,17 +38,17 @@ struct DALI_SCENE_LOADER_API SkeletonDefinition
 {
   struct Joint
   {
-    Index mNodeIdx;
+    Index  mNodeIdx;
     Matrix mInverseBindMatrix;
   };
 
   using Vector = std::vector<SkeletonDefinition>;
 
-  Index mRootNodeIdx = INVALID_INDEX;
+  Index              mRootNodeIdx = INVALID_INDEX;
   std::vector<Joint> mJoints;
 };
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif //DALI_SCENE_LOADER_SKELETON_H
index 415d25a..4ad1676 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_SKINNING_DETAILS_H_
 #define DALI_SCENE_LOADER_SKINNING_DETAILS_H_
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics 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,8 +21,8 @@
 #include "dali-scene-loader/public-api/api.h"
 
 // EXTERNAL INCLUDES
-#include "dali/public-api/rendering/shader.h"
 #include <string>
+#include "dali/public-api/rendering/shader.h"
 
 namespace Dali
 {
@@ -43,7 +43,7 @@ struct DALI_SCENE_LOADER_API Skinning
   Skinning() = delete;
 };
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif // DALI_SCENE_LOADER_SKINNING_DETAILS_H_
index 9569b2d..5a1d289 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_STRING_CALLBACK_H
 #define DALI_SCENE_LOADER_STRING_CALLBACK_H
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -28,7 +28,6 @@ namespace Dali
 {
 namespace SceneLoader
 {
-
 /*
  * @brief A callback to post strings to.
  */
@@ -39,7 +38,7 @@ using StringCallback = std::function<void(const std::string&)>;
  */
 DALI_SCENE_LOADER_API void DefaultErrorCallback(const std::string& message);
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif //DALI_SCENE_LOADER_STRING_CALLBACK_H
index 1aace35..f9213e1 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_UTILS_H_
 #define DALI_SCENE_LOADER_UTILS_H_
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include "dali-scene-loader/public-api/api.h"
 
 // EXTERNAL INCLUDES
+#include <cctype>
+#include <sstream>
 #include "dali/public-api/actors/actor.h"
-#include "dali/public-api/rendering/renderer.h"
 #include "dali/public-api/common/dali-common.h"
-#include <sstream>
-#include <cctype>
+#include "dali/public-api/rendering/renderer.h"
 
 namespace Dali
 {
 namespace SceneLoader
 {
-
 /*
  * @brief Fixed size backing buffer to use with std::ostreams where control over
  *  allocations (which this does not make), is required.
@@ -52,14 +51,16 @@ public:
 class DALI_SCENE_LOADER_API ExceptionFlinger
 {
 public:
-  enum { MESSAGE_BUFFER_SIZE = 512 };
+  enum
+  {
+    MESSAGE_BUFFER_SIZE = 512
+  };
 
   ExceptionFlinger(const char* location) noexcept(true);
 
-  [[noreturn]]
-  ~ExceptionFlinger() noexcept(false);
+  [[noreturn]] ~ExceptionFlinger() noexcept(false);
 
-  template <typename T>
+  template<typename T>
   ExceptionFlinger& operator<<(const T& rhs) noexcept(true)
   {
     mStream << rhs;
@@ -71,13 +72,12 @@ private:
   {
     const char* mLocation;
 
-    [[noreturn]]
-    ~Impl() noexcept(false);
+    [[noreturn]] ~Impl() noexcept(false);
   };
 
   static char* GetMessageBuffer() noexcept(true);
 
-  Impl mImpl;
+  Impl         mImpl;
   StreamBuffer mStreamBuffer;
   std::ostream mStream;
 };
@@ -90,13 +90,15 @@ DALI_SCENE_LOADER_API std::string FormatString(const char* format, ...);
 /*
  * @return The @n th bit in a bitmask.
  */
-DALI_SCENE_LOADER_API constexpr size_t NthBit(size_t n) { return 1 << n; }
+DALI_SCENE_LOADER_API constexpr size_t NthBit(size_t n)
+{
+  return 1 << n;
+}
 
 /*
  * @return Whether all of @a mask 's bits are set on @a value.
  */
-inline
-DALI_SCENE_LOADER_API bool MaskMatch(uint32_t value, uint32_t mask)
+inline DALI_SCENE_LOADER_API bool MaskMatch(uint32_t value, uint32_t mask)
 {
   return (value & mask) == mask;
 }
@@ -104,8 +106,7 @@ DALI_SCENE_LOADER_API bool MaskMatch(uint32_t value, uint32_t mask)
 /*
  * @brief Convert a four-letter(, null-terminated) string literal into a uint32_t.
  */
-inline
-DALI_SCENE_LOADER_API constexpr uint32_t FourCC(const char(&fourCC)[5])
+inline DALI_SCENE_LOADER_API constexpr uint32_t FourCC(const char (&fourCC)[5])
 {
   return (fourCC[3] << 24) | (fourCC[2] << 16) | (fourCC[1] << 8) | fourCC[0];
 }
@@ -116,11 +117,10 @@ DALI_SCENE_LOADER_API constexpr uint32_t FourCC(const char(&fourCC)[5])
  * @param[in] b, compare string
  * @return true if strings are equal
  */
-inline
-DALI_SCENE_LOADER_API bool CaseInsensitiveCharacterCompare( unsigned char a, unsigned char b )
+inline DALI_SCENE_LOADER_API bool CaseInsensitiveCharacterCompare(unsigned char a, unsigned char b)
 {
   // Converts to lower case in the current locale.
-  return std::tolower( a ) == std::tolower( b );
+  return std::tolower(a) == std::tolower(b);
 }
 
 /*
@@ -128,13 +128,12 @@ DALI_SCENE_LOADER_API bool CaseInsensitiveCharacterCompare( unsigned char a, uns
  * @param[in] a, compare string
  * @param[in] b, compare string
  */
-inline
-DALI_SCENE_LOADER_API bool CaseInsensitiveStringCompare( const std::string& a, const std::string& b )
+inline DALI_SCENE_LOADER_API bool CaseInsensitiveStringCompare(const std::string& a, const std::string& b)
 {
   bool result = false;
-  if( a.length() == b.length() )
+  if(a.length() == b.length())
   {
-    result = std::equal( a.begin(), a.end(), b.begin(), &CaseInsensitiveCharacterCompare );
+    result = std::equal(a.begin(), a.end(), b.begin(), &CaseInsensitiveCharacterCompare);
   }
   return result;
 }
@@ -154,9 +153,8 @@ DALI_SCENE_LOADER_API std::string LoadTextFile(const char* path, bool* fail = nu
  * @note Use of a @a fn that is itself recursing in @a is also discouraged
  *  for performance and stability reasons.
  */
-template <typename Func>
-inline
-DALI_SCENE_LOADER_API void VisitActor(Actor a, Func fn)
+template<typename Func>
+inline DALI_SCENE_LOADER_API void VisitActor(Actor a, Func fn)
 {
   fn(a);
 
@@ -171,8 +169,7 @@ DALI_SCENE_LOADER_API void VisitActor(Actor a, Func fn)
  * @brief Convenience function to set the given actor @a 's anchor point
  *  and parent origin to center.
  */
-inline
-DALI_SCENE_LOADER_API void SetActorCentered(Actor a)
+inline DALI_SCENE_LOADER_API void SetActorCentered(Actor a)
 {
   a.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER);
   a.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
@@ -184,10 +181,10 @@ using Type = uint32_t;
 
 enum DALI_SCENE_LOADER_API Values : Type
 {
-  NONE = 0x00,
+  NONE          = 0x00,
   FLIP_VERTICAL = 0x01,
 };
-}
+} // namespace TexturedQuadOptions
 
 /*
  * @brief Makes... geometry for a textured quad.
@@ -198,9 +195,9 @@ DALI_SCENE_LOADER_API Geometry MakeTexturedQuadGeometry(TexturedQuadOptions::Typ
  * @brief Fixes the path of a file. Replaces the '\\' separator by the '/' one.
  * @param[in,out] path The path to be fixed.
  */
-DALI_SCENE_LOADER_API void ToUnixFileSeparators( std::string& path );
+DALI_SCENE_LOADER_API void ToUnixFileSeparators(std::string& path);
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif /* DALI_SCENE_LOADER_UTILS_H_ */
index 70efc4f..26ce908 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE_LOADER_VIEW_PROJECTION_H_
 #define DALI_SCENE_LOADER_VIEW_PROJECTION_H_
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -27,7 +27,6 @@ namespace Dali
 {
 namespace SceneLoader
 {
-
 /**
  * @brief Contains view and projection matrices, also caching the view-projection
  *      and inverse projection matrices.
@@ -35,18 +34,36 @@ namespace SceneLoader
 class ViewProjection
 {
 public:
-  Matrix& GetView() { return mView; }
-  Matrix& GetProjection() { return mProjection; }
+  Matrix& GetView()
+  {
+    return mView;
+  }
+  Matrix& GetProjection()
+  {
+    return mProjection;
+  }
 
   /*
    * @brief Updates the cached view projection and inverse projection matrices.
    */
   void Update();
 
-  const Matrix& GetView() const { return mView; }
-  const Matrix& GetProjection() const { return mProjection; }
-  const Matrix& GetInverseProjection() const { return mInvProjection; }
-  const Matrix& GetViewProjection() const { return mViewProjection; }
+  const Matrix& GetView() const
+  {
+    return mView;
+  }
+  const Matrix& GetProjection() const
+  {
+    return mProjection;
+  }
+  const Matrix& GetInverseProjection() const
+  {
+    return mInvProjection;
+  }
+  const Matrix& GetViewProjection() const
+  {
+    return mViewProjection;
+  }
 
 private:
   Matrix mView;
@@ -55,7 +72,7 @@ private:
   Matrix mViewProjection;
 };
 
-}
-}
+} // namespace SceneLoader
+} // namespace Dali
 
 #endif //DALI_SCENE_LOADER_VIEW_PROJECTION_H_
diff --git a/dali-scene-loader/third-party/.clang-format b/dali-scene-loader/third-party/.clang-format
new file mode 100644 (file)
index 0000000..297ddc2
--- /dev/null
@@ -0,0 +1,5 @@
+---
+Language:        Cpp
+DisableFormat: true
+SortIncludes: false
+...
index 9baeeb2..c9d13f2 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_CONTROL_DEVEL_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -39,31 +39,31 @@ class Base;
 namespace DevelControl
 {
 /// @brief AccessibilityActivate signal type.
-typedef Signal< void ( ) > AccessibilityActivateSignalType;
+typedef Signal<void()> AccessibilityActivateSignalType;
 
 /// @brief AccessibilityReadingSkipped signal type.
-typedef Signal< void ( ) > AccessibilityReadingSkippedSignalType;
+typedef Signal<void()> AccessibilityReadingSkippedSignalType;
 
 /// @brief AccessibilityReadingPaused signal type.
-typedef Signal< void ( ) > AccessibilityReadingPausedSignalType;
+typedef Signal<void()> AccessibilityReadingPausedSignalType;
 
 /// @brief AccessibilityReadingResumed signal type.
-typedef Signal< void ( ) > AccessibilityReadingResumedSignalType;
+typedef Signal<void()> AccessibilityReadingResumedSignalType;
 
 /// @brief AccessibilityReadingCancelled signal type.
-typedef Signal< void ( ) > AccessibilityReadingCancelledSignalType;
+typedef Signal<void()> AccessibilityReadingCancelledSignalType;
 
 /// @brief AccessibilityReadingStopped signal type.
-typedef Signal< void ( ) > AccessibilityReadingStoppedSignalType;
+typedef Signal<void()> AccessibilityReadingStoppedSignalType;
 
 /// @brief AccessibilityGetName signal type.
-typedef Signal< void ( std::string& ) > AccessibilityGetNameSignalType;
+typedef Signal<void(std::string&)> AccessibilityGetNameSignalType;
 
 /// @brief AccessibilityGetDescription signal type.
-typedef Signal< void ( std::string& ) > AccessibilityGetDescriptionSignalType;
+typedef Signal<void(std::string&)> AccessibilityGetDescriptionSignalType;
 
 /// @brief AccessibilityDoGesture signal type.
-typedef Signal< void ( std::pair<Dali::Accessibility::GestureInfo, bool>& ) > AccessibilityDoGestureSignalType;
+typedef Signal<void(std::pair<Dali::Accessibility::GestureInfo, bool>&)> AccessibilityDoGestureSignalType;
 
 enum State
 {
@@ -371,7 +371,7 @@ DALI_TOOLKIT_API Dali::Property GetVisualProperty(Control control, Dali::Propert
  * @brief The signal is emmited as a succession of "activate" signal send by accessibility client.
  * @return The signal to connect to
  */
-DALI_TOOLKIT_API AccessibilityActivateSignalType &AccessibilityActivateSignal( Toolkit::Control control );
+DALI_TOOLKIT_API AccessibilityActivateSignalType& AccessibilityActivateSignal(Toolkit::Control control);
 
 /**
  * @brief The signal is emmited when text send via Dali::Accessibility::Bridge::Say
@@ -379,21 +379,21 @@ DALI_TOOLKIT_API AccessibilityActivateSignalType &AccessibilityActivateSignal( T
  *
  * @return The signal to connect to
  */
-DALI_TOOLKIT_API AccessibilityReadingSkippedSignalType &AccessibilityReadingSkippedSignal( Toolkit::Control control );
+DALI_TOOLKIT_API AccessibilityReadingSkippedSignalType& AccessibilityReadingSkippedSignal(Toolkit::Control control);
 
 /**
  * @brief
  *
  * @return The signal to connect to
  */
-DALI_TOOLKIT_API AccessibilityReadingPausedSignalType &AccessibilityReadingPausedSignal( Toolkit::Control control );
+DALI_TOOLKIT_API AccessibilityReadingPausedSignalType& AccessibilityReadingPausedSignal(Toolkit::Control control);
 
 /**
  * @brief
  *
  * @return The signal to connect to
  */
-DALI_TOOLKIT_API AccessibilityReadingResumedSignalType &AccessibilityReadingResumedSignal( Toolkit::Control control );
+DALI_TOOLKIT_API AccessibilityReadingResumedSignalType& AccessibilityReadingResumedSignal(Toolkit::Control control);
 
 /**
  * @brief The signal is emmited when text send via Dali::Accessibility::Bridge::Say
@@ -401,7 +401,7 @@ DALI_TOOLKIT_API AccessibilityReadingResumedSignalType &AccessibilityReadingResu
  *
  * @return The signal to connect to
  */
-DALI_TOOLKIT_API AccessibilityReadingCancelledSignalType &AccessibilityReadingCancelledSignal( Toolkit::Control control );
+DALI_TOOLKIT_API AccessibilityReadingCancelledSignalType& AccessibilityReadingCancelledSignal(Toolkit::Control control);
 
 /**
  * @brief The signal is emmited when text send via Dali::Accessibility::Bridge::Say
@@ -409,7 +409,7 @@ DALI_TOOLKIT_API AccessibilityReadingCancelledSignalType &AccessibilityReadingCa
  *
  * @return The signal to connect to
  */
-DALI_TOOLKIT_API AccessibilityReadingStoppedSignalType &AccessibilityReadingStoppedSignal( Toolkit::Control control );
+DALI_TOOLKIT_API AccessibilityReadingStoppedSignalType& AccessibilityReadingStoppedSignal(Toolkit::Control control);
 
 /**
  * @brief The signal is emmited when accessibility client asks for object's name.
@@ -421,7 +421,7 @@ DALI_TOOLKIT_API AccessibilityReadingStoppedSignalType &AccessibilityReadingStop
  * Priority is as above. If none is used, default implementation is provided.
  * @return [description]
  */
-DALI_TOOLKIT_API AccessibilityGetNameSignalType &AccessibilityGetNameSignal( Toolkit::Control control );
+DALI_TOOLKIT_API AccessibilityGetNameSignalType& AccessibilityGetNameSignal(Toolkit::Control control);
 
 /**
  * @brief The signal is emmited when accessibility client asks for object's description.
@@ -433,7 +433,7 @@ DALI_TOOLKIT_API AccessibilityGetNameSignalType &AccessibilityGetNameSignal( Too
  * Priority is as above. If none is used, default implementation is provided.
  * @return signal handler
  */
-DALI_TOOLKIT_API AccessibilityGetDescriptionSignalType &AccessibilityGetDescriptionSignal( Toolkit::Control control );
+DALI_TOOLKIT_API AccessibilityGetDescriptionSignalType& AccessibilityGetDescriptionSignal(Toolkit::Control control);
 
 /**
  * @brief The signal is emitted when accessibility client call "DoGesture" method via IPC mechanism.
@@ -441,7 +441,7 @@ DALI_TOOLKIT_API AccessibilityGetDescriptionSignalType &AccessibilityGetDescript
  * This signal allows developers to serve incoming gesture in specific way.
  * @return signal handler
  */
-DALI_TOOLKIT_API AccessibilityDoGestureSignalType &AccessibilityDoGestureSignal( Toolkit::Control control );
+DALI_TOOLKIT_API AccessibilityDoGestureSignalType& AccessibilityDoGestureSignal(Toolkit::Control control);
 
 /**
  * @brief The method allows connection with other actor with usage of concrete accessibility relation type.
@@ -450,7 +450,7 @@ DALI_TOOLKIT_API AccessibilityDoGestureSignalType &AccessibilityDoGestureSignal(
  * @param destination Actor object
  * @param relation    enumerated value describing relation
  */
-DALI_TOOLKIT_API void AppendAccessibilityRelation( Dali::Actor control, Actor destination, Dali::Accessibility::RelationType relation );
+DALI_TOOLKIT_API void AppendAccessibilityRelation(Dali::Actor control, Actor destination, Dali::Accessibility::RelationType relation);
 
 /**
  * @brief The method allows removing relation
@@ -459,7 +459,7 @@ DALI_TOOLKIT_API void AppendAccessibilityRelation( Dali::Actor control, Actor de
  * @param destination Actor object
  * @param relation    enumerated value describing relation
  */
-DALI_TOOLKIT_API void RemoveAccessibilityRelation( Dali::Actor control, Actor destination, Dali::Accessibility::RelationType relation );
+DALI_TOOLKIT_API void RemoveAccessibilityRelation(Dali::Actor control, Actor destination, Dali::Accessibility::RelationType relation);
 
 /**
  * @brief The method returns collection accessibility addresses representing objects connected with current object
@@ -467,14 +467,14 @@ DALI_TOOLKIT_API void RemoveAccessibilityRelation( Dali::Actor control, Actor de
  * @param control object to append attribute to
  * @return std::vector, where index is casted value of Accessibility::RelationType and value is std::vector of type Accessibility::Address
  */
-DALI_TOOLKIT_API std::vector<std::vector<Accessibility::Address>> GetAccessibilityRelations( Dali::Actor control );
+DALI_TOOLKIT_API std::vector<std::vector<Accessibility::Address>> GetAccessibilityRelations(Dali::Actor control);
 
 /**
  * @brief The method removes all previously appended relations
  *
  * @param control object to append attribute to
  */
-DALI_TOOLKIT_API void ClearAccessibilityRelations( Dali::Actor control );
+DALI_TOOLKIT_API void ClearAccessibilityRelations(Dali::Actor control);
 
 /**
  * @brief The method allows to add or modify value matched with given key.
@@ -484,21 +484,21 @@ DALI_TOOLKIT_API void ClearAccessibilityRelations( Dali::Actor control );
  * @param key   std::string value
  * @param value std::string value
  */
-DALI_TOOLKIT_API void AppendAccessibilityAttribute( Dali::Actor control, const std::string& key, const std::string value );
+DALI_TOOLKIT_API void AppendAccessibilityAttribute(Dali::Actor control, const std::string& key, const std::string value);
 
 /**
  * @brief The method erases key with its value from accessibility attributes
  * @param control object to append attribute to
  * @param key std::string value
  */
-DALI_TOOLKIT_API void RemoveAccessibilityAttribute( Dali::Actor control, const std::string& key );
+DALI_TOOLKIT_API void RemoveAccessibilityAttribute(Dali::Actor control, const std::string& key);
 
 /**
  * @brief The method clears accessibility attributes
  *
  * @param control object to append attribute to
  */
-DALI_TOOLKIT_API void ClearAccessibilityAttributes( Dali::Actor control );
+DALI_TOOLKIT_API void ClearAccessibilityAttributes(Dali::Actor control);
 
 /**
  * @brief The method inserts reading information of an accessible object into attributes
@@ -506,7 +506,7 @@ DALI_TOOLKIT_API void ClearAccessibilityAttributes( Dali::Actor control );
  * @param control object to append attribute to
  * @param types Reading information types
  */
-DALI_TOOLKIT_API void SetAccessibilityReadingInfoType( Dali::Actor control, const Dali::Accessibility::ReadingInfoTypes types );
+DALI_TOOLKIT_API void SetAccessibilityReadingInfoType(Dali::Actor control, const Dali::Accessibility::ReadingInfoTypes types);
 
 /**
  * @brief The method returns reading information of an accessible object
@@ -514,7 +514,7 @@ DALI_TOOLKIT_API void SetAccessibilityReadingInfoType( Dali::Actor control, cons
  * @param control object to append attribute to
  * @return Reading information types
  */
-DALI_TOOLKIT_API Dali::Accessibility::ReadingInfoTypes GetAccessibilityReadingInfoType( Dali::Actor control );
+DALI_TOOLKIT_API Dali::Accessibility::ReadingInfoTypes GetAccessibilityReadingInfoType(Dali::Actor control);
 
 /**
  * @brief The method erases highlight.
@@ -522,7 +522,7 @@ DALI_TOOLKIT_API Dali::Accessibility::ReadingInfoTypes GetAccessibilityReadingIn
  * @param control object to append attribute to
  * @return bool value, false when it is not possible or something went wrong, at the other way true.
  */
-DALI_TOOLKIT_API bool ClearAccessibilityHighlight( Dali::Actor control );
+DALI_TOOLKIT_API bool ClearAccessibilityHighlight(Dali::Actor control);
 
 /**
  * @brief The method grabs highlight.
@@ -530,7 +530,7 @@ DALI_TOOLKIT_API bool ClearAccessibilityHighlight( Dali::Actor control );
  * @param control object to append attribute to
  * @return bool value, false when it is not possible or something went wrong, at the other way true.
  */
-DALI_TOOLKIT_API bool GrabAccessibilityHighlight( Dali::Actor control );
+DALI_TOOLKIT_API bool GrabAccessibilityHighlight(Dali::Actor control);
 
 /**
  * @brief The metod presents bitset of control's states.
@@ -538,7 +538,7 @@ DALI_TOOLKIT_API bool GrabAccessibilityHighlight( Dali::Actor control );
  * @param control object to append attribute to
  * @return Dali::Accessibility::States is vector of enumerated State.
  */
-DALI_TOOLKIT_API Dali::Accessibility::States GetAccessibilityStates( Dali::Actor control );
+DALI_TOOLKIT_API Dali::Accessibility::States GetAccessibilityStates(Dali::Actor control);
 
 /**
  * @brief The method force sending notifications about current states to accessibility clients
@@ -547,7 +547,7 @@ DALI_TOOLKIT_API Dali::Accessibility::States GetAccessibilityStates( Dali::Actor
  * @param states      mask with states expected to broadcast
  * @param doRecursive flag pointing if notifications of children's state would be sent
  */
-DALI_TOOLKIT_API void NotifyAccessibilityStateChange( Dali::Actor control, Dali::Accessibility::States states, bool doRecursive );
+DALI_TOOLKIT_API void NotifyAccessibilityStateChange(Dali::Actor control, Dali::Accessibility::States states, bool doRecursive);
 
 /**
  * The method allows to set specific constructor for creating accessibility structure
@@ -566,14 +566,14 @@ DALI_TOOLKIT_API void NotifyAccessibilityStateChange( Dali::Actor control, Dali:
   *
   * param constructor callback creating Accessible object
   */
-DALI_TOOLKIT_API void SetAccessibilityConstructor( Dali::Actor control, std::function<std::unique_ptr<Dali::Accessibility::Accessible>(Dali::Actor)> constructor);
+DALI_TOOLKIT_API void SetAccessibilityConstructor(Dali::Actor control, std::function<std::unique_ptr<Dali::Accessibility::Accessible>(Dali::Actor)> constructor);
 
 /**
  * Returns accessibility object bound to actor, if any
  *
  * This method won't bound new accessibility object. Use Dali::Accessibility::Accessible::Get in that case.
  */
-DALI_TOOLKIT_API Dali::Accessibility::Accessible *GetBoundAccessibilityObject( Dali::Actor control );
+DALI_TOOLKIT_API Dali::Accessibility::Accessible* GetBoundAccessibilityObject(Dali::Actor control);
 
 } // namespace DevelControl
 
old mode 100755 (executable)
new mode 100644 (file)
index 44a3bc1..2ae0e35
 
 namespace Dali
 {
-
 class WebEngineBackForwardListItem;
 
 namespace Toolkit
 {
-
 /**
  * @addtogroup dali_toolkit_controls_web_view
  * @{
@@ -50,7 +48,7 @@ public:
   /**
    * @brief Creates a WebBackForwardListItem.
    */
-  WebBackForwardListItem( const Dali::WebEngineBackForwardListItem* item );
+  WebBackForwardListItem(const Dali::WebEngineBackForwardListItem* item);
 
   /**
    * @brief Destructor.
@@ -82,7 +80,6 @@ public:
   std::string GetOriginalUrl() const;
 
 private:
-
   const Dali::WebEngineBackForwardListItem* mWebEngineBackForwardListItem;
 };
 
old mode 100755 (executable)
new mode 100644 (file)
index 144c02b..9dc81fc
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_WEB_BACK_FORWARD_LIST_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics 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,7 +24,6 @@
 
 namespace Dali
 {
-
 class WebEngineBackForwardList;
 
 namespace Toolkit
@@ -49,7 +48,7 @@ public:
   /**
    * @brief Creates a WebBackForwardList.
    */
-  WebBackForwardList( const Dali::WebEngineBackForwardList& list );
+  WebBackForwardList(const Dali::WebEngineBackForwardList& list);
 
   /**
    * @brief Destructor.
@@ -78,9 +77,8 @@ public:
   uint32_t GetItemCount() const;
 
 private:
-  const Dali::WebEngineBackForwardList&  mWebEngineBackForwardList;
+  const Dali::WebEngineBackForwardList& mWebEngineBackForwardList;
   Dali::Toolkit::WebBackForwardListItem mWebBackForwardListItem;
-
 };
 
 /**
old mode 100755 (executable)
new mode 100644 (file)
index 1640c70..ead4efd
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_WEB_CONTEXT_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <string>
 #include <dali/devel-api/adaptor-framework/web-engine-context.h>
+#include <string>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/dali-toolkit-common.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 /**
  * @addtogroup dali_toolkit_controls_web_view
  * @{
@@ -45,13 +43,12 @@ namespace Toolkit
 class DALI_TOOLKIT_API WebContext
 {
 public:
-
   /**
    * @brief Creates a WebContext.
    *
    * @param[in] context The context of web engine.
    */
-  WebContext( Dali::WebEngineContext& context );
+  WebContext(Dali::WebEngineContext& context);
 
   /**
    * @brief Destructor.
@@ -70,14 +67,14 @@ public:
    *
    * @param[in] cacheModel The cache model
    */
-  void SetCacheModel(Dali::WebEngineContext::CacheModel cacheModel );
+  void SetCacheModel(Dali::WebEngineContext::CacheModel cacheModel);
 
   /**
    * @brief Sets the given proxy URI to network backend of specific context.
    *
    * @param[in] uri The proxy URI to set
    */
-  void SetProxyUri( const std::string& uri );
+  void SetProxyUri(const std::string& uri);
 
   /**
    * Adds CA certificates to persistent NSS certificate database
@@ -89,7 +86,7 @@ public:
    *
    * @param[in] certificatePath path to a CA certificate file(s), see above for details
    */
-  void SetCertificateFilePath( const std::string& certificatePath );
+  void SetCertificateFilePath(const std::string& certificatePath);
 
   /**
    * Toggles the cache to be enabled or disabled
@@ -99,7 +96,7 @@ public:
    *
    * @param[in] cacheDisabled enable or disable cache
    */
-  void DisableCache( bool cacheDisabled );
+  void DisableCache(bool cacheDisabled);
 
   /**
    * @brief Sets a proxy auth credential to network backend of specific context.
@@ -107,7 +104,7 @@ public:
    * @param[in] username username to set
    * @param[in] password password to set
    */
-  void SetDefaultProxyAuth( const std::string& username, const std::string& password );
+  void SetDefaultProxyAuth(const std::string& username, const std::string& password);
 
   /**
    * Requests for deleting all web databases.
@@ -133,8 +130,7 @@ public:
   void ClearCache();
 
 private:
-
-  Dali::WebEngineContext&  mWebEngineContext;
+  Dali::WebEngineContext& mWebEngineContext;
 };
 
 /**
old mode 100755 (executable)
new mode 100644 (file)
index adb8481..a332e06
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_WEB_COOKIE_MANAGER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics 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,8 @@
  */
 
 // EXTERNAL INCLUDES
-#include <string>
 #include <dali/devel-api/adaptor-framework/web-engine-cookie-manager.h>
+#include <string>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/dali-toolkit-common.h>
@@ -31,7 +31,6 @@ class WebEngineCookieManager;
 
 namespace Toolkit
 {
-
 /**
  * @addtogroup dali_toolkit_controls_web_view
  * @{
@@ -47,12 +46,11 @@ namespace Toolkit
 class DALI_TOOLKIT_API WebCookieManager
 {
 public:
-
   /**
    * @brief Creates a WebCookieManager.
    * @param[in] manager A #Dali::WebEngineCookieManager
    */
-  WebCookieManager( Dali::WebEngineCookieManager& manager );
+  WebCookieManager(Dali::WebEngineCookieManager& manager);
 
   /**
    * @brief Destructor.
@@ -67,7 +65,7 @@ public:
    *
    * @param[in] policy A #Dali::WebEngineCookieManager::CookieAcceptPolicy
    */
-  void SetCookieAcceptPolicy(Dali::WebEngineCookieManager::CookieAcceptPolicy policy );
+  void SetCookieAcceptPolicy(Dali::WebEngineCookieManager::CookieAcceptPolicy policy);
 
   /**
    * @brief Gets the cookie acceptance policy. The default is Toolkit::WebCookieManager::CookieAcceptPolicy::NO_THIRD_PARTY.
@@ -93,11 +91,10 @@ public:
    * @param[in] path The path where to read/write Cookies
    * @param[in] storage The type of storage
    */
-  void SetPersistentStorage( const std::string& path, Dali::WebEngineCookieManager::CookiePersistentStorage storage );
+  void SetPersistentStorage(const std::string& path, Dali::WebEngineCookieManager::CookiePersistentStorage storage);
 
 private:
-
-  Dali::WebEngineCookieManager&  mWebEngineCookieManager;
+  Dali::WebEngineCookieManager& mWebEngineCookieManager;
 };
 
 /**
old mode 100755 (executable)
new mode 100644 (file)
index dc46e7c..4d24b58
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_WEB_SETTINGS_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -30,7 +30,6 @@ class WebEngineSettings;
 
 namespace Toolkit
 {
-
 /**
  * @addtogroup dali_toolkit_controls_web_view
  * @{
@@ -51,7 +50,7 @@ public:
    *
    * @param[in] settings A settings of web engine.
    */
-  WebSettings( Dali::WebEngineSettings& settings );
+  WebSettings(Dali::WebEngineSettings& settings);
 
   /**
    * @brief Destructor.
@@ -64,7 +63,7 @@ public:
    * @param[in] allowed if true, allow to run mixed contents,
    *      otherwise not allow
    */
-  void AllowMixedContents( bool allowed );
+  void AllowMixedContents(bool allowed);
 
   /**
    * @brief Enable the spatial navigation or not.
@@ -72,7 +71,7 @@ public:
    * @param[in] enabled if true, use spatial navigation,
    *       otherwise to disable
    */
-  void EnableSpatialNavigation( bool enabled );
+  void EnableSpatialNavigation(bool enabled);
 
   /**
    * @brief Returns the default font size in pixel. The default value is 16.
@@ -86,7 +85,7 @@ public:
    *
    * @param[in] defaultFontSize A new default font size to set
    */
-  void SetDefaultFontSize( int defaultFontSize );
+  void SetDefaultFontSize(int defaultFontSize);
 
   /**
    * @brief Enables/disables web security.
@@ -94,7 +93,7 @@ public:
    * @param[in] enabled if true, to enable the web security
    *       otherwise to disable
    */
-  void EnableWebSecurity( bool enabled );
+  void EnableWebSecurity(bool enabled);
 
   /**
    * @brief Allow/Disallow file access from external url
@@ -102,7 +101,7 @@ public:
    * @param[in] allowed if true, to allow file access from external url
    *       otherwise to disallow
    */
-  void AllowFileAccessFromExternalUrl( bool allowed );
+  void AllowFileAccessFromExternalUrl(bool allowed);
 
   /**
    * @brief Returns whether JavaScript can be executable. The default is true.
@@ -116,7 +115,7 @@ public:
    *
    * @param[in] enabled True if JavaScript executing is enabled, false otherwise
    */
-  void EnableJavaScript( bool enabled );
+  void EnableJavaScript(bool enabled);
 
   /**
    * @brief Allow if the scripts can open new windows.
@@ -124,7 +123,7 @@ public:
    * @param[in] allowed if true, the scripts can open new windows,
    *       otherwise not
    */
-  void AllowScriptsOpenWindows( bool allowed );
+  void AllowScriptsOpenWindows(bool allowed);
 
   /**
    * @brief Returns whether images can be loaded automatically. The default is true.
@@ -138,7 +137,7 @@ public:
    *
    * @param[in] automatic True if images are loaded automatically, false otherwise
    */
-  void AllowImagesLoadAutomatically( bool automatic );
+  void AllowImagesLoadAutomatically(bool automatic);
 
   /**
    * @brief Gets the default text encoding name (e.g. UTF-8).
@@ -152,7 +151,7 @@ public:
    *
    * @param[in] defaultTextEncodingName The default text encoding name
    */
-  void SetDefaultTextEncodingName( const std::string& defaultTextEncodingName );
+  void SetDefaultTextEncodingName(const std::string& defaultTextEncodingName);
 
 private:
   Dali::WebEngineSettings& mWebEngineSettings;
old mode 100755 (executable)
new mode 100644 (file)
index 48e57ce..8c842b7
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_WEB_VIEW_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -22,8 +22,8 @@
 #include <functional>
 
 // INTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/web-engine-plugin.h>
 #include <dali-toolkit/public-api/controls/control.h>
+#include <dali/devel-api/adaptor-framework/web-engine-plugin.h>
 
 namespace Dali
 {
@@ -56,7 +56,6 @@ class WebView;
 class DALI_TOOLKIT_API WebView : public Control
 {
 public:
-
   /**
    * @brief Enumeration for the start and end property ranges for this control.
    */
@@ -126,37 +125,37 @@ public:
    */
   enum class LoadErrorCode
   {
-    UNKNOWN = 0,            ///< Unknown.
-    CANCELED,               ///< User canceled.
-    CANT_SUPPORT_MIMETYPE,  ///< Can't show the page for this MIME type.
-    FAILED_FILE_IO,         ///< File IO error.
-    CANT_CONNECT,           ///< Cannot connect to the network.
-    CANT_LOOKUP_HOST,       ///< Fail to look up host from the DNS.
-    FAILED_TLS_HANDSHAKE,   ///< Fail to SSL/TLS handshake.
-    INVALID_CERTIFICATE,    ///< Received certificate is invalid.
-    REQUEST_TIMEOUT,        ///< Connection timeout.
-    TOO_MANY_REDIRECTS,     ///< Too many redirects.
-    TOO_MANY_REQUESTS,      ///< Too many requests during this load.
-    BAD_URL,                ///< Malformed URL.
-    UNSUPPORTED_SCHEME,     ///< Unsupported scheme.
-    AUTHENTICATION,         ///< User authentication failed on the server.
-    INTERNAL_SERVER         ///< Web server has an internal server error.
+    UNKNOWN = 0,           ///< Unknown.
+    CANCELED,              ///< User canceled.
+    CANT_SUPPORT_MIMETYPE, ///< Can't show the page for this MIME type.
+    FAILED_FILE_IO,        ///< File IO error.
+    CANT_CONNECT,          ///< Cannot connect to the network.
+    CANT_LOOKUP_HOST,      ///< Fail to look up host from the DNS.
+    FAILED_TLS_HANDSHAKE,  ///< Fail to SSL/TLS handshake.
+    INVALID_CERTIFICATE,   ///< Received certificate is invalid.
+    REQUEST_TIMEOUT,       ///< Connection timeout.
+    TOO_MANY_REDIRECTS,    ///< Too many redirects.
+    TOO_MANY_REQUESTS,     ///< Too many requests during this load.
+    BAD_URL,               ///< Malformed URL.
+    UNSUPPORTED_SCHEME,    ///< Unsupported scheme.
+    AUTHENTICATION,        ///< User authentication failed on the server.
+    INTERNAL_SERVER        ///< Web server has an internal server error.
   };
 
   /**
    * @brief WebView signal type related with page loading.
    */
-  using WebViewPageLoadSignalType = Signal< void( WebView, const std::string& ) >;
+  using WebViewPageLoadSignalType = Signal<void(WebView, const std::string&)>;
 
   /**
    * @brief WebView signal type related with page loading error.
    */
-  using WebViewPageLoadErrorSignalType = Signal< void( WebView, const std::string&, LoadErrorCode ) >;
+  using WebViewPageLoadErrorSignalType = Signal<void(WebView, const std::string&, LoadErrorCode)>;
 
   /**
    * @brief WebView signal type related with scroll edge reached.
    */
-  using WebViewScrollEdgeReachedSignalType = Signal< void( WebView, Dali::WebEnginePlugin::ScrollEdge ) >;
+  using WebViewScrollEdgeReachedSignalType = Signal<void(WebView, Dali::WebEnginePlugin::ScrollEdge)>;
 
 public:
   /**
@@ -181,7 +180,7 @@ public:
    * @param [in] argc The count of arguments of Applications
    * @param [in] argv The string array of arguments of Applications
    */
-  static WebView New( int argc, char** argv );
+  static WebView New(int argc, char** argv);
 
   /**
    * @brief Creates an uninitialized WebView.
@@ -287,7 +286,7 @@ public:
    * @param[in] deltaX The delta x of scroll
    * @param[in] deltaY The delta y of scroll
    */
-  void ScrollBy( int deltaX, int deltaY );
+  void ScrollBy(int deltaX, int deltaY);
 
   /**
    * @brief Returns whether forward is possible.
index 5a73458..d19c90b 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_LAYOUTING_FLEX_NODE_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -115,7 +115,7 @@ struct SizeTuple
  * @note int, height measure specification mode
  * @note SizeTuple, return value
  */
-using MeasureCallback = void (*)(Dali::Actor, float , int , float , int, SizeTuple *);
+using MeasureCallback = void (*)(Dali::Actor, float, int, float, int, SizeTuple*);
 
 /**
  * This class provides the API for calling into the Flex layout implementation.
index 47c171f..8572a12 100644 (file)
  */
 
 // EXTERNAL INCLUDES
-#include <string.h>
 #include <dali/public-api/actors/actor.h>
 #include <dali/public-api/math/vector2.h>
 #include <dali/public-api/object/property-map.h>
+#include <string.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/dali-toolkit-common.h>
@@ -44,7 +44,7 @@ namespace Toolkit
  * @param[in] displacement The direction of the central line
  * @param[in] initialProgress The normalised initial progress of the shader
  */
-DALI_TOOLKIT_API void DissolveEffectSetCentralLine( Actor& actor, const Vector2& position, const Vector2& displacement, float initialProgress );
+DALI_TOOLKIT_API void DissolveEffectSetCentralLine(Actor& actor, const Vector2& position, const Vector2& displacement, float initialProgress);
 
 /**
  * @brief Create a new Dissolve effect
@@ -58,7 +58,7 @@ DALI_TOOLKIT_API void DissolveEffectSetCentralLine( Actor& actor, const Vector2&
  *  @return The newly created Property::Map with the dissolve effect
  */
 
-DALI_TOOLKIT_API Property::Map CreateDissolveEffect( bool useHighPrecision = true);
+DALI_TOOLKIT_API Property::Map CreateDissolveEffect(bool useHighPrecision = true);
 
 } // namespace Toolkit
 
index 8201976..aed1634 100644 (file)
@@ -35,7 +35,7 @@ namespace Toolkit
  * @param[in] actor The actor that registers the uniform properties
  * @param[in] numBlurSamples Number of samples used by the shader
  */
-DALI_TOOLKIT_API void SetMotionBlurProperties( Actor& actor, unsigned int numBlurSamples = 8 );
+DALI_TOOLKIT_API void SetMotionBlurProperties(Actor& actor, unsigned int numBlurSamples = 8);
 
 /**
  * @brief Create a new MotionBlurEffect
index 5f4976d..8ad7c67 100644 (file)
@@ -32,7 +32,7 @@ namespace Toolkit
 /**
  * @brief Set the properties for the motion stretch
  */
-DALI_TOOLKIT_API void SetMotionStretchProperties( Actor& actor );
+DALI_TOOLKIT_API void SetMotionStretchProperties(Actor& actor);
 
 /**
  * @brief Creates a new MotionStretchEffect
old mode 100755 (executable)
new mode 100644 (file)
index e4bf375..87bffdd
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_UTILS_DEVEL_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -89,7 +89,7 @@ struct DALI_TOOLKIT_API RendererParameters
                                    //
   float minLineSize;               ///< The line's minimum size (in points).
 
-  Extents padding;                 ///< The padding of the boundaries where the text is going to be laid-out.
+  Extents padding; ///< The padding of the boundaries where the text is going to be laid-out.
 };
 
 /**
index b55d448..97da737 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_ACCESSIBILITY_MANAGER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
+#include <dali/public-api/object/base-object.h>
 #include <string>
 #include <vector>
-#include <dali/public-api/object/base-object.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/accessibility-manager/accessibility-manager.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class AccessibilityManager;
 
 /**
@@ -43,7 +40,6 @@ class AccessibilityManager;
 class AccessibilityManager : public Dali::BaseObject, public Dali::ConnectionTracker
 {
 public:
-
   typedef Dali::Toolkit::AccessibilityManager::AccessibilityActionSignalType       AccessibilityActionSignalType;
   typedef Dali::Toolkit::AccessibilityManager::AccessibilityActionScrollSignalType AccessibilityActionScrollSignalType;
 
@@ -173,7 +169,6 @@ public:
   Actor GetFocusIndicatorActor();
 
 public:
-
   /**
    * @copydoc Toolkit::AccessibilityManager::FocusChangedSignal()
    */
@@ -189,8 +184,7 @@ public:
    */
   Toolkit::AccessibilityManager::FocusedActorActivatedSignalType& FocusedActorActivatedSignal();
 
-public:  // Signals
-
+public: // Signals
   /**
    * @copydoc Dali::Toolkit::AccessibilityManager::StatusChangedSignal
    */
@@ -400,25 +394,22 @@ public:  // Signals
   }
 
 protected:
-
   /**
    * Destructor
    */
   virtual ~AccessibilityManager();
 
 private:
-
   // Undefined
   AccessibilityManager(const AccessibilityManager&);
 
   AccessibilityManager& operator=(const AccessibilityManager& rhs);
 
 private:
-
   std::vector<Actor> mFocusOrder;
 
-  Toolkit::AccessibilityManager::FocusChangedSignalType mFocusChangedSignal; ///< The signal to notify the focus change
-  Toolkit::AccessibilityManager::FocusOvershotSignalType mFocusOvershotSignal; ///< The signal to notify the focus overshooted
+  Toolkit::AccessibilityManager::FocusChangedSignalType          mFocusChangedSignal;          ///< The signal to notify the focus change
+  Toolkit::AccessibilityManager::FocusOvershotSignalType         mFocusOvershotSignal;         ///< The signal to notify the focus overshooted
   Toolkit::AccessibilityManager::FocusedActorActivatedSignalType mFocusedActorActivatedSignal; ///< The signal to notify the activation of focused actor
 
   // Action signals.
index 09a5fd1..963869b 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_BUILDER_DECLARATIONS_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/extents.h>
+#include <dali/public-api/math/matrix.h>
+#include <dali/public-api/math/matrix3.h>
 #include <dali/public-api/math/rect.h>
 #include <dali/public-api/math/vector2.h>
 #include <dali/public-api/math/vector3.h>
 #include <dali/public-api/math/vector4.h>
-#include <dali/public-api/math/matrix.h>
-#include <dali/public-api/math/matrix3.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/builder/tree-node.h>
 typedef Dali::Toolkit::TreeNode TreeNode;
 typedef TreeNode::ConstIterator TreeConstIter;
 
-typedef OptionalValue<const TreeNode&> OptionalChild;
-typedef OptionalValue<std::string> OptionalString;
-typedef OptionalValue<float> OptionalFloat;
-typedef OptionalValue<int> OptionalInteger;
-typedef OptionalValue<unsigned int> OptionalUnsignedInt;
-typedef OptionalValue<bool> OptionalBoolean;
-typedef OptionalValue<Dali::Vector2> OptionalVector2;
-typedef OptionalValue<Dali::Vector3> OptionalVector3;
-typedef OptionalValue<Dali::Vector4> OptionalVector4;
-typedef OptionalValue<std::string> OptionalString;
-typedef OptionalValue<Dali::Matrix> OptionalMatrix;
-typedef OptionalValue<Dali::Matrix3> OptionalMatrix3;
+typedef OptionalValue<const TreeNode&>  OptionalChild;
+typedef OptionalValue<std::string>      OptionalString;
+typedef OptionalValue<float>            OptionalFloat;
+typedef OptionalValue<int>              OptionalInteger;
+typedef OptionalValue<unsigned int>     OptionalUnsignedInt;
+typedef OptionalValue<bool>             OptionalBoolean;
+typedef OptionalValue<Dali::Vector2>    OptionalVector2;
+typedef OptionalValue<Dali::Vector3>    OptionalVector3;
+typedef OptionalValue<Dali::Vector4>    OptionalVector4;
+typedef OptionalValue<std::string>      OptionalString;
+typedef OptionalValue<Dali::Matrix>     OptionalMatrix;
+typedef OptionalValue<Dali::Matrix3>    OptionalMatrix3;
 typedef OptionalValue<Dali::Rect<int> > OptionalRect;
-typedef OptionalValue<Dali::Extents> OptionalExtents;
+typedef OptionalValue<Dali::Extents>    OptionalExtents;
 
 #endif // DALI_TOOLKIT_BUILDER_DECLARATIONS_H
old mode 100755 (executable)
new mode 100644 (file)
index 2222d1b..5e032a0
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_BUILDER_FILESYSTEM_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <string>
 #include <fstream>
 #include <sstream>
+#include <string>
 
 #include <stdio.h>
 
 #include <dali/devel-api/adaptor-framework/file-loader.h>
 
-inline std::string GetFileContents(const std::string &fn)
+inline std::string GetFileContents(const std::stringfn)
 {
-  std::streampos bufferSize = 0;
+  std::streampos     bufferSize = 0;
   Dali::Vector<char> fileBuffer;
-  if( !Dali::FileLoader::ReadFile( fn, bufferSize, fileBuffer, Dali::FileLoader::FileType::BINARY ) )
+  if(!Dali::FileLoader::ReadFile(fn, bufferSize, fileBuffer, Dali::FileLoader::FileType::BINARY))
   {
-      return std::string();
+    return std::string();
   }
 
-  return std::string( &fileBuffer[0], bufferSize );
+  return std::string(&fileBuffer[0], bufferSize);
 }
 
 #endif // DALI_TOOLKIT_INTERNAL_BUILDER_FILESYSTEM_H
index 01dab59..0a7f6d5 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_BUILDER_GET_IS_INL
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 inline OptionalChild IsChild(const TreeNode* node, const std::string& childName)
 {
-  if( node )
+  if(node)
   {
     const TreeNode* c = node->GetChild(childName);
-    if( NULL != c )
+    if(NULL != c)
     {
-      return OptionalChild( *c );
+      return OptionalChild(*c);
     }
     else
     {
@@ -43,12 +43,12 @@ inline OptionalChild IsChild(const TreeNode* node, const std::string& childName)
 
 inline OptionalChild IsChildIgnoreCase(const TreeNode* node, const std::string& childName)
 {
-  if( node )
+  if(node)
   {
     const TreeNode* c = node->GetChildIgnoreCase(childName);
-    if( NULL != c )
+    if(NULL != c)
     {
-      return OptionalChild( *c );
+      return OptionalChild(*c);
     }
     else
     {
@@ -73,7 +73,7 @@ inline OptionalChild IsChildIgnoreCase(const TreeNode& node, const std::string&
 
 inline OptionalString IsString(const OptionalChild& node)
 {
-  if( node && (*node).GetType() == TreeNode::STRING )
+  if(node && (*node).GetType() == TreeNode::STRING)
   {
     return OptionalString((*node).GetString());
   }
@@ -87,36 +87,36 @@ inline OptionalFloat IsFloat(const OptionalChild& node)
 {
   OptionalFloat ret;
 
-  if( node )
+  if(node)
   {
-    if( (*node).GetType() == TreeNode::FLOAT )
+    if((*node).GetType() == TreeNode::FLOAT)
     {
       ret = (*node).GetFloat();
     }
-    else if( (*node).GetType() == TreeNode::INTEGER )
+    else if((*node).GetType() == TreeNode::INTEGER)
     {
       // JSON has number not float/int but JsonParser discriminates.
       // Here we don't care so we allow coercion
-      ret = static_cast<float>( (*node).GetInteger() );
+      ret = static_cast<float>((*node).GetInteger());
     }
   }
 
   return ret;
 }
 
-inline OptionalInteger IsInteger(const OptionalChild &node)
+inline OptionalInteger IsInteger(const OptionalChildnode)
 {
   OptionalInteger ret;
 
-  if( node )
+  if(node)
   {
-    if( (*node).GetType() == TreeNode::INTEGER )
+    if((*node).GetType() == TreeNode::INTEGER)
     {
       ret = (*node).GetInteger();
     }
-    else if( (*node).GetType() == TreeNode::FLOAT )
+    else if((*node).GetType() == TreeNode::FLOAT)
     {
-      ret = static_cast<int>(  (*node).GetFloat() );
+      ret = static_cast<int>((*node).GetFloat());
     }
   }
 
@@ -125,7 +125,7 @@ inline OptionalInteger IsInteger(const OptionalChild &node)
 
 inline OptionalBoolean IsBoolean(const OptionalChild& node)
 {
-  if( node && (*node).GetType() == TreeNode::BOOLEAN )
+  if(node && (*node).GetType() == TreeNode::BOOLEAN)
   {
     return OptionalBoolean(1 == (*node).GetInteger());
   }
@@ -135,18 +135,17 @@ inline OptionalBoolean IsBoolean(const OptionalChild& node)
   }
 }
 
-
 // copy N Numbers
-template <typename T>
+template<typename T>
 inline bool CopyNumbers(TreeNode::ConstIterator iter, int N, T& vector)
 {
   for(int i = 0; i < N; ++i)
   {
-    if( (*iter).second.GetType() == TreeNode::FLOAT)
+    if((*iter).second.GetType() == TreeNode::FLOAT)
     {
       vector[i] = (*iter).second.GetFloat();
     }
-    else if( (*iter).second.GetType() == TreeNode::INTEGER )
+    else if((*iter).second.GetType() == TreeNode::INTEGER)
     {
       vector[i] = static_cast<float>((*iter).second.GetInteger());
     }
@@ -164,10 +163,10 @@ inline OptionalVector4 IsVector4(const OptionalChild& node)
 {
   OptionalVector4 ret;
 
-  if( node && (TreeNode::ARRAY == (*node).GetType()) && (*node).Size() >= 4 )
+  if(node && (TreeNode::ARRAY == (*node).GetType()) && (*node).Size() >= 4)
   {
     Dali::Vector4 v;
-    if( CopyNumbers((*node).CBegin(), 4, v) )
+    if(CopyNumbers((*node).CBegin(), 4, v))
     {
       ret = OptionalVector4(v);
     }
@@ -180,10 +179,10 @@ inline OptionalVector3 IsVector3(const OptionalChild& node)
 {
   OptionalVector3 ret;
 
-  if( node && (TreeNode::ARRAY == (*node).GetType()) && (*node).Size() >= 3 )
+  if(node && (TreeNode::ARRAY == (*node).GetType()) && (*node).Size() >= 3)
   {
     Dali::Vector3 v;
-    if( CopyNumbers((*node).CBegin(), 3, v) )
+    if(CopyNumbers((*node).CBegin(), 3, v))
     {
       ret = OptionalVector3(v);
     }
@@ -196,10 +195,10 @@ inline OptionalVector2 IsVector2(const OptionalChild& node)
 {
   OptionalVector2 ret;
 
-  if( node && (TreeNode::ARRAY == (*node).GetType()) && (*node).Size() >= 2 )
+  if(node && (TreeNode::ARRAY == (*node).GetType()) && (*node).Size() >= 2)
   {
     Dali::Vector2 v;
-    if( CopyNumbers((*node).CBegin(), 2, v) )
+    if(CopyNumbers((*node).CBegin(), 2, v))
     {
       ret = OptionalVector2(v);
     }
@@ -208,14 +207,14 @@ inline OptionalVector2 IsVector2(const OptionalChild& node)
   return ret;
 }
 
-inline OptionalMatrix IsMatrix(const OptionalChild &node)
+inline OptionalMatrix IsMatrix(const OptionalChildnode)
 {
   OptionalMatrix ret;
 
-  if( node && (TreeNode::ARRAY == (*node).GetType()) && (*node).Size() >= 16 )
+  if(node && (TreeNode::ARRAY == (*node).GetType()) && (*node).Size() >= 16)
   {
     float v[16];
-    if( CopyNumbers((*node).CBegin(), 16, v) )
+    if(CopyNumbers((*node).CBegin(), 16, v))
     {
       ret = OptionalMatrix(Dali::Matrix(v));
     }
@@ -228,14 +227,12 @@ inline OptionalMatrix3 IsMatrix3(const OptionalChild& node)
 {
   OptionalMatrix3 ret;
 
-  if( node && (TreeNode::ARRAY == (*node).GetType()) && (*node).Size() >= 9 )
+  if(node && (TreeNode::ARRAY == (*node).GetType()) && (*node).Size() >= 9)
   {
     float v[9];
-    if( CopyNumbers((*node).CBegin(), 9, v) )
+    if(CopyNumbers((*node).CBegin(), 9, v))
     {
-      ret = OptionalMatrix3(Dali::Matrix3(v[0], v[1], v[2],
-                                          v[3], v[4], v[5],
-                                          v[6], v[7], v[8] ));
+      ret = OptionalMatrix3(Dali::Matrix3(v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7], v[8]));
     }
   }
 
@@ -250,8 +247,8 @@ inline OptionalRect IsRect(const OptionalChild& node)
     if((*node).Size() >= 4)
     {
       TreeNode::ConstIterator iter((*node).CBegin());
-      int v[4];
-      if( CopyNumbers((*node).CBegin(), 4, v) )
+      int                     v[4];
+      if(CopyNumbers((*node).CBegin(), 4, v))
       {
         ret = OptionalRect(Dali::Rect<int>(v[0], v[1], v[2], v[3]));
       }
@@ -268,8 +265,8 @@ inline OptionalExtents IsExtents(const OptionalChild& node)
     if((*node).Size() >= 4)
     {
       TreeNode::ConstIterator iter((*node).CBegin());
-      int v[4];
-      if( CopyNumbers((*node).CBegin(), 4, v) )
+      int                     v[4];
+      if(CopyNumbers((*node).CBegin(), 4, v))
       {
         extents = OptionalExtents(Dali::Extents(v[0], v[1], v[2], v[3]));
       }
@@ -281,164 +278,162 @@ inline OptionalExtents IsExtents(const OptionalChild& node)
 //
 //
 //
-inline OptionalString IsString( const TreeNode& parent, const std::string& childName)
+inline OptionalString IsString(const TreeNode& parent, const std::string& childName)
 {
-  return IsString( IsChild(&parent, childName) );
+  return IsString(IsChild(&parent, childName));
 }
 
-inline OptionalFloat IsFloat( const TreeNode& parent, const std::string& childName)
+inline OptionalFloat IsFloat(const TreeNode& parent, const std::string& childName)
 {
-  return IsFloat( IsChild(&parent, childName) );
+  return IsFloat(IsChild(&parent, childName));
 }
 
-inline OptionalInteger IsInteger( const TreeNode& parent, const std::string& childName)
+inline OptionalInteger IsInteger(const TreeNode& parent, const std::string& childName)
 {
-  return IsInteger( IsChild(&parent, childName) );
+  return IsInteger(IsChild(&parent, childName));
 }
 
-inline OptionalBoolean IsBoolean( const TreeNode& parent, const std::string& childName)
+inline OptionalBoolean IsBoolean(const TreeNode& parent, const std::string& childName)
 {
-  return IsBoolean( IsChild(parent, childName) );
+  return IsBoolean(IsChild(parent, childName));
 }
 
-inline OptionalVector4 IsVector4(const TreeNode &parent, const std::string& childName)
+inline OptionalVector4 IsVector4(const TreeNodeparent, const std::string& childName)
 {
-  return IsVector4( IsChild(parent, childName) );
+  return IsVector4(IsChild(parent, childName));
 }
 
-inline OptionalVector3 IsVector3(const TreeNode &parent, const std::string& childName)
+inline OptionalVector3 IsVector3(const TreeNodeparent, const std::string& childName)
 {
-  return IsVector3( IsChild(parent, childName) );
+  return IsVector3(IsChild(parent, childName));
 }
 
-inline OptionalVector2 IsVector2(const TreeNode &parent, const std::string& childName)
+inline OptionalVector2 IsVector2(const TreeNodeparent, const std::string& childName)
 {
-  return IsVector2( IsChild(parent, childName) );
+  return IsVector2(IsChild(parent, childName));
 }
 
-inline OptionalMatrix IsMatrix(const TreeNode &parent, const std::string& childName)
+inline OptionalMatrix IsMatrix(const TreeNodeparent, const std::string& childName)
 {
-  return IsMatrix( IsChild(parent, childName) );
+  return IsMatrix(IsChild(parent, childName));
 }
 
-inline OptionalMatrix3 IsMatrix3(const TreeNode &parent, const std::string& childName)
+inline OptionalMatrix3 IsMatrix3(const TreeNodeparent, const std::string& childName)
 {
-  return IsMatrix3( IsChild(&parent, childName) );
+  return IsMatrix3(IsChild(&parent, childName));
 }
 
-inline OptionalRect IsRect(const TreeNode &parent, const std::string& childName)
+inline OptionalRect IsRect(const TreeNodeparent, const std::string& childName)
 {
-  return IsRect( IsChild(&parent, childName) );
+  return IsRect(IsChild(&parent, childName));
 }
 
-inline OptionalExtents IsExtents(const TreeNode &parent, const std::string& childName)
+inline OptionalExtents IsExtents(const TreeNodeparent, const std::string& childName)
 {
-  return IsExtents( IsChild(&parent, childName) );
+  return IsExtents(IsChild(&parent, childName));
 }
 
 //
 //
 //
-inline OptionalString IsString( const TreeNode& node )
+inline OptionalString IsString(const TreeNode& node)
 {
-  return IsString( OptionalChild( node ) );
+  return IsString(OptionalChild(node));
 }
 
-inline OptionalFloat IsFloat( const TreeNode& node )
+inline OptionalFloat IsFloat(const TreeNode& node)
 {
-  return IsFloat( OptionalChild( node ) );
+  return IsFloat(OptionalChild(node));
 }
 
-inline OptionalInteger IsInteger( const TreeNode& node )
+inline OptionalInteger IsInteger(const TreeNode& node)
 {
-  return IsInteger( OptionalChild( node ) );
+  return IsInteger(OptionalChild(node));
 }
 
-inline OptionalBoolean IsBoolean( const TreeNode& node )
+inline OptionalBoolean IsBoolean(const TreeNode& node)
 {
-  return IsBoolean( OptionalChild( node ) );
+  return IsBoolean(OptionalChild(node));
 }
 
-inline OptionalVector4 IsVector4(const TreeNode &node )
+inline OptionalVector4 IsVector4(const TreeNode& node)
 {
-  return IsVector4( OptionalChild( node ) );
+  return IsVector4(OptionalChild(node));
 }
 
-inline OptionalVector3 IsVector3(const TreeNode &node )
+inline OptionalVector3 IsVector3(const TreeNode& node)
 {
-  return IsVector3( OptionalChild( node ) );
+  return IsVector3(OptionalChild(node));
 }
 
-inline OptionalVector2 IsVector2(const TreeNode &node )
+inline OptionalVector2 IsVector2(const TreeNode& node)
 {
-  return IsVector2( OptionalChild( node ) );
+  return IsVector2(OptionalChild(node));
 }
 
-inline OptionalMatrix IsMatrix(const TreeNode &node )
+inline OptionalMatrix IsMatrix(const TreeNode& node)
 {
-  return IsMatrix( OptionalChild( node ) );
+  return IsMatrix(OptionalChild(node));
 }
 
-inline OptionalMatrix3 IsMatrix3(const TreeNode &node )
+inline OptionalMatrix3 IsMatrix3(const TreeNode& node)
 {
-  return IsMatrix3( OptionalChild( node ) );
+  return IsMatrix3(OptionalChild(node));
 }
 
-inline OptionalRect IsRect(const TreeNode &node )
+inline OptionalRect IsRect(const TreeNode& node)
 {
-  return IsRect( OptionalChild( node ) );
+  return IsRect(OptionalChild(node));
 }
 
-inline OptionalExtents IsExtents(const TreeNode &node )
+inline OptionalExtents IsExtents(const TreeNode& node)
 {
-  return IsExtents( OptionalChild( node ) );
+  return IsExtents(OptionalChild(node));
 }
 
 //
 //
 //
-inline Dali::Vector4 GetVector4(const TreeNode &child)
+inline Dali::Vector4 GetVector4(const TreeNodechild)
 {
-  OptionalVector4 v( IsVector4( OptionalChild( child ) ) );
+  OptionalVector4 v(IsVector4(OptionalChild(child)));
   DALI_ASSERT_ALWAYS(v);
   return *v;
 }
 
-inline Dali::Vector3 GetVector3(const TreeNode &child)
+inline Dali::Vector3 GetVector3(const TreeNodechild)
 {
-  OptionalVector3 v( IsVector3( OptionalChild( child ) ) );
+  OptionalVector3 v(IsVector3(OptionalChild(child)));
   DALI_ASSERT_ALWAYS(v);
   return *v;
 }
 
-inline Dali::Vector2 GetVector2(const TreeNode &child)
+inline Dali::Vector2 GetVector2(const TreeNodechild)
 {
-  OptionalVector2 v( IsVector2( OptionalChild( child ) ) );
+  OptionalVector2 v(IsVector2(OptionalChild(child)));
   DALI_ASSERT_ALWAYS(v);
   return *v;
 }
 
-inline float GetFloat(const TreeNode &child)
+inline float GetFloat(const TreeNodechild)
 {
-  OptionalFloat v( IsFloat( OptionalChild( child ) ) );
+  OptionalFloat v(IsFloat(OptionalChild(child)));
   DALI_ASSERT_ALWAYS(v);
   return *v;
 }
 
-inline bool GetBoolean(const TreeNode &child)
+inline bool GetBoolean(const TreeNodechild)
 {
-  OptionalBoolean v( IsBoolean( OptionalChild( child ) ) );
+  OptionalBoolean v(IsBoolean(OptionalChild(child)));
   DALI_ASSERT_ALWAYS(v);
   return *v;
 }
 
-inline int GetInteger(const TreeNode &child)
+inline int GetInteger(const TreeNodechild)
 {
-  OptionalInteger v( IsInteger( OptionalChild( child ) ) );
+  OptionalInteger v(IsInteger(OptionalChild(child)));
   DALI_ASSERT_ALWAYS(v);
   return *v;
 }
 
-
-
 #endif // DALI_TOOLKIT_INTERNAL_BUILDER_GET_IS_INL
index 8d30929..14c1c17 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_BUILDER_IMPL_DEBUG_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
-#include <dali/integration-api/debug.h>
 #include <dali-toolkit/devel-api/builder/json-parser.h>
+#include <dali/integration-api/debug.h>
 
-#if defined( DEBUG_ENABLED )
+#if defined(DEBUG_ENABLED)
 
 namespace Dali
 {
@@ -28,36 +28,33 @@ namespace Toolkit
 {
 namespace Internal
 {
-
-#define DUMP_PARSE_TREE(parser)  LogTree(parser)
-#define DUMP_TEST_MAPPINGS(parser)                                      \
-  OptionalChild mappings = IsChild( parser.GetRoot(), KEYNAME_MAPPINGS ); \
-  if( mappings )                                                        \
-  {                                                                     \
-    std::ostringstream oss;                                             \
-    oss << "Mappings: {" << std::endl;                                  \
-    for( TreeNode::ConstIterator iter = (*mappings).CBegin(); iter != (*mappings).CEnd(); ++iter ) \
-    {                                                                   \
-      Property::Value value;                                            \
-      bool converted = GetPropertyMap(*mappings, (*iter).first, Property::NONE, value ); \
-      if( converted )                                                   \
-      {                                                                 \
-        oss << "  " << (*iter).first << ":" << value << std::endl;      \
-      }                                                                 \
-    }                                                                   \
-    oss << "}" << std::endl;                                            \
-    DALI_LOG_INFO( gFilterScript, Debug::Verbose, oss.str().c_str() );  \
+#define DUMP_PARSE_TREE(parser) LogTree(parser)
+#define DUMP_TEST_MAPPINGS(parser)                                                                 \
+  OptionalChild mappings = IsChild(parser.GetRoot(), KEYNAME_MAPPINGS);                            \
+  if(mappings)                                                                                     \
+  {                                                                                                \
+    std::ostringstream oss;                                                                        \
+    oss << "Mappings: {" << std::endl;                                                             \
+    for(TreeNode::ConstIterator iter = (*mappings).CBegin(); iter != (*mappings).CEnd(); ++iter)   \
+    {                                                                                              \
+      Property::Value value;                                                                       \
+      bool            converted = GetPropertyMap(*mappings, (*iter).first, Property::NONE, value); \
+      if(converted)                                                                                \
+      {                                                                                            \
+        oss << "  " << (*iter).first << ":" << value << std::endl;                                 \
+      }                                                                                            \
+    }                                                                                              \
+    oss << "}" << std::endl;                                                                       \
+    DALI_LOG_INFO(gFilterScript, Debug::Verbose, oss.str().c_str());                               \
   }
 
+void LogTree(const Toolkit::JsonParser& mParser);
 
-void LogTree( const Toolkit::JsonParser& mParser );
-
-std::string PropertyValueToString( const Property::Value& value );
-
+std::string PropertyValueToString(const Property::Value& value);
 
-} // Internal
-} // Toolkit
-} // Dali
+} // namespace Internal
+} // namespace Toolkit
+} // namespace Dali
 
 #else
 
index 049b3ce..59ff5de 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_BUILDER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <string>
-#include <list>
-#include <map>
-#include <dali/public-api/common/vector-wrapper.h>
+#include <dali/integration-api/debug.h>
 #include <dali/public-api/actors/actor.h>
+#include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/object/base-object.h>
 #include <dali/public-api/object/property-map.h>
 #include <dali/public-api/render-tasks/render-task.h>
-#include <dali/integration-api/debug.h>
+#include <list>
+#include <map>
+#include <string>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/builder/json-parser.h>
 #include <dali-toolkit/devel-api/builder/builder.h>
+#include <dali-toolkit/devel-api/builder/json-parser.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, ...) \
-  DALI_LOG_WARNING("Script:" format, ## __VA_ARGS__)
+  DALI_LOG_WARNING("Script:" format, ##__VA_ARGS__)
 
 // Info messages are usually debug build
 #define DALI_SCRIPT_INFO(format, ...) \
-  DALI_LOG_INFO(Dali::Toolkit::Internal::gFilterScript, Debug::General, "Script:" format, ## __VA_ARGS__)
+  DALI_LOG_INFO(Dali::Toolkit::Internal::gFilterScript, Debug::General, "Script:" format, ##__VA_ARGS__)
 
 // Info Verbose need to be swiched on in gFilterScript filter constructor (by default set to General)
 #define DALI_SCRIPT_VERBOSE(format, ...) \
-  DALI_LOG_INFO(Dali::Toolkit::Internal::gFilterScript, Debug::Verbose, "Script:" format, ## __VA_ARGS__)
+  DALI_LOG_INFO(Dali::Toolkit::Internal::gFilterScript, Debug::Verbose, "Script:" format, ##__VA_ARGS__)
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-  class TreeNode;
+class TreeNode;
 }
 
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 #if defined(DEBUG_ENABLED)
 extern Dali::Integration::Log::Filter* gFilterScript;
 #endif
@@ -74,24 +71,23 @@ class Replacement;
 class Builder : public Dali::BaseObject
 {
 public:
-
   Builder();
 
   /**
    * @copydoc Toolkit::Builder::LoadFromString
    */
-  void LoadFromString( const std::string &data,
-                       Dali::Toolkit::Builder::UIFormat rep = Dali::Toolkit::Builder::JSON );
+  void LoadFromString(const std::string&               data,
+                      Dali::Toolkit::Builder::UIFormat rep = Dali::Toolkit::Builder::JSON);
 
   /**
    * @copydoc Toolkit::Builder::AddConstants
    */
-  void AddConstants( const Property::Map& map );
+  void AddConstants(const Property::Map& map);
 
   /**
    * @copydoc Toolkit::Builder::AddConstant
    */
-  void AddConstant( const std::string& key, const Property::Value& value );
+  void AddConstant(const std::string& key, const Property::Value& value);
 
   /**
    * @copydoc Toolkit::Builder::GetConfigurations
@@ -106,52 +102,52 @@ public:
   /**
    * @copydoc Toolkit::Builder::GetConstant
    */
-  const Property::Value& GetConstant( const std::string& key ) const;
+  const Property::Value& GetConstant(const std::string& key) const;
 
   /**
    * @copydoc Toolkit::Builder::CreateAnimation( const std::string& animationName );
    */
-  Animation CreateAnimation( const std::string& animationName );
+  Animation CreateAnimation(const std::string& animationName);
 
   /**
    * @copydoc Toolkit::Builder::CreateAnimation( const std::string& animationName, const Property::Map& map );
    */
-  Animation CreateAnimation( const std::string& animationName, const Property::Map& map );
+  Animation CreateAnimation(const std::string& animationName, const Property::Map& map);
 
   /**
    * @copydoc Toolkit::Builder::CreateAnimation( const std::string&,Dali::Actor);
    */
-  Animation CreateAnimation( const std::string& animationName, Dali::Actor sourceActor );
+  Animation CreateAnimation(const std::string& animationName, Dali::Actor sourceActor);
 
   /**
    * @copydoc Toolkit::Builder::CreateAnimation( const std::string&,const Property::Map&, Dali::Actor);
    */
-  Animation CreateAnimation( const std::string& animationName, const Property::Map& map, Dali::Actor sourceActor );
+  Animation CreateAnimation(const std::string& animationName, const Property::Map& map, Dali::Actor sourceActor);
 
   /**
    * @copydoc Toolkit::Builder::Create( const std::string& templateName );
    */
-  BaseHandle Create( const std::string& templateName );
+  BaseHandle Create(const std::string& templateName);
 
   /**
    * @copydoc Toolkit::Builder::Create( const std::string& templateName, const Property::Map& map );
    */
-  BaseHandle Create( const std::string& templateName, const Property::Map& map );
+  BaseHandle Create(const std::string& templateName, const Property::Map& map);
 
   /**
    * @copydoc Toolkit::Builder::CreateFromJson( const std::string& json );
    */
-  BaseHandle CreateFromJson( const std::string& json );
+  BaseHandle CreateFromJson(const std::string& json);
 
   /**
    * @copydoc Toolkit::Builder::ApplyFromJson( Handle& handle, const std::string& json );
    */
-  bool ApplyFromJson(  Handle& handle, const std::string& json );
+  bool ApplyFromJson(Handle& handle, const std::string& json);
 
   /**
    * @copydoc Toolkit::Builder::ApplyStyle
    */
-  bool ApplyStyle( const std::string& styleName, Handle& handle );
+  bool ApplyStyle(const std::string& styleName, Handle& handle);
 
   /**
    * Lookup the stylename in builder. If it's found in the parse tree,
@@ -159,7 +155,7 @@ public:
    * @param[in] styleName The style name to search for
    * @return true if the stylename exists
    */
-  bool LookupStyleName( const std::string& styleName );
+  bool LookupStyleName(const std::string& styleName);
 
   /**
    * Lookup the stylename in the recorded Styles - if it exists,
@@ -169,32 +165,32 @@ public:
    * @param[in] styleName The stylename to search for
    * @return A const pointer to the style object
    */
-  const StylePtr GetStyle( const std::string& styleName );
+  const StylePtr GetStyle(const std::string& styleName);
 
   /**
    * @copydoc Toolkit::Builder::AddActors
    */
-  void AddActors( Actor toActor );
+  void AddActors(Actor toActor);
 
   /**
    * @copydoc Toolkit::Builder::AddActors
    */
-  void AddActors( const std::string &sectionName, Actor toActor );
+  void AddActors(const std::string& sectionName, Actor toActor);
 
   /**
    * @copydoc Toolkit::Builder::CreateRenderTask
    */
-  void CreateRenderTask( const std::string &name );
+  void CreateRenderTask(const std::string& name);
 
   /**
    * @copydoc Toolkit::Builder::GetPath
    */
-  Path GetPath( const std::string &name );
+  Path GetPath(const std::string& name);
 
   /**
    * @copydoc Toolkit::Builder::GetPathConstrainer
    */
-  Dali::PathConstrainer GetPathConstrainer( const std::string& name );
+  Dali::PathConstrainer GetPathConstrainer(const std::string& name);
 
   /*
    * Check if a given constrainer is of type PathConstrainer
@@ -202,12 +198,12 @@ public:
    * @return True if constainer is of type PathConstrainer, False otherwise
    *
    */
-  bool IsPathConstrainer( const std::string& name );
+  bool IsPathConstrainer(const std::string& name);
 
   /**
    * @copydoc Toolkit::Builder::GetLinearConstrainer
    */
-  Dali::LinearConstrainer GetLinearConstrainer( const std::string& name );
+  Dali::LinearConstrainer GetLinearConstrainer(const std::string& name);
 
   /*
    * Check if a given constrainer is of type LinearConstrainer
@@ -215,7 +211,7 @@ public:
    * @return True if constainer is of type LinearConstrainer, False otherwise
    *
    */
-  bool IsLinearConstrainer( const std::string& name );
+  bool IsLinearConstrainer(const std::string& name);
 
   /**
    * @copydoc Toolkit::Builder::QuitSignal
@@ -227,17 +223,23 @@ public:
    */
   void EmitQuitSignal();
 
-
 protected:
-
   ~Builder() override;
 
 private:
-  typedef std::vector<const char*> KeyStack;
-  typedef std::vector< TreeNode::KeyNodePair > MappingsLut;
-  typedef struct{ std::string name; Dali::LinearConstrainer linearConstrainer; } LinearConstrainerEntry;
+  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;
-  typedef struct{ std::string name; Dali::PathConstrainer pathConstrainer; } PathConstrainerEntry;
+  typedef struct
+  {
+    std::string           name;
+    Dali::PathConstrainer pathConstrainer;
+  } PathConstrainerEntry;
   typedef std::vector<PathConstrainerEntry> PathConstrainerLut;
   typedef std::map<const std::string, Path> PathLut;
 
@@ -248,77 +250,77 @@ private:
   // Undefined
   Builder& operator=(const Builder& rhs);
 
-  void LoadConstants( const TreeNode& root, Property::Map& intoMap );
-
-  void LoadConfiguration( const TreeNode& root, Property::Map& intoMap );
+  void LoadConstants(const TreeNode& root, Property::Map& intoMap);
 
-  Animation CreateAnimation( const std::string& animationName,
-                             const Replacement& replacement,
-                             Dali::Actor        sourceActor );
+  void LoadConfiguration(const TreeNode& root, Property::Map& intoMap);
 
-  BaseHandle Create( const std::string& templateName,
-                     const Replacement& constant );
+  Animation CreateAnimation(const std::string& animationName,
+                            const Replacement& replacement,
+                            Dali::Actor        sourceActor);
 
-  BaseHandle DoCreate( const TreeNode&    root,
-                       const TreeNode&    node,
-                       Actor              parent,
-                       const Replacement& replacements );
+  BaseHandle Create(const std::string& templateName,
+                    const Replacement& constant);
 
-  void SetupTask( RenderTask&              task,
-                  const Toolkit::TreeNode& node,
-                  const Replacement&       replacement );
+  BaseHandle DoCreate(const TreeNode&    root,
+                      const TreeNode&    node,
+                      Actor              parent,
+                      const Replacement& replacements);
 
-  bool ApplyStyle( const std::string& styleName,
-                   Handle&            handle,
-                   const Replacement& replacement);
+  void SetupTask(RenderTask&              task,
+                 const Toolkit::TreeNode& node,
+                 const Replacement&       replacement);
 
-  void ApplyAllStyleProperties( const TreeNode&    root,
-                                const TreeNode&    node,
-                                Dali::Handle&      handle,
-                                const Replacement& constant );
+  bool ApplyStyle(const std::string& styleName,
+                  Handle&            handle,
+                  const Replacement& replacement);
 
-  void RecordStyles( const char*        styleName,
-                     const TreeNode&    node,
-                     Dali::Handle&      handle,
-                     const Replacement& replacements );
+  void ApplyAllStyleProperties(const TreeNode&    root,
+                               const TreeNode&    node,
+                               Dali::Handle&      handle,
+                               const Replacement& constant);
 
-  void RecordStyle( StylePtr           style,
+  void RecordStyles(const char*        styleName,
                     const TreeNode&    node,
                     Dali::Handle&      handle,
-                    const Replacement& replacements );
+                    const Replacement& replacements);
 
-  void RecordTransitions( const TreeNode::KeyNodePair& keyValue,
-                          Property::Array& transitions,
-                          const Replacement& replacements );
+  void RecordStyle(StylePtr           style,
+                   const TreeNode&    node,
+                   Dali::Handle&      handle,
+                   const Replacement& replacements);
 
-  void RecordTransitionData( const TreeNode::KeyNodePair& keyNode,
-                             Toolkit::TransitionData& transitionData,
-                             const Replacement& replacements );
+  void RecordTransitions(const TreeNode::KeyNodePair& keyValue,
+                         Property::Array&             transitions,
+                         const Replacement&           replacements);
 
-  void ApplyProperties( const TreeNode&    root,
-                        const TreeNode&    node,
-                        Dali::Handle&      handle,
-                        const Replacement& constant );
+  void RecordTransitionData(const TreeNode::KeyNodePair& keyNode,
+                            Toolkit::TransitionData&     transitionData,
+                            const Replacement&           replacements);
 
-  void ApplySignals( const TreeNode& root,
-                     const TreeNode& node,
-                     Dali::Handle& handle );
+  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 ApplySignals(const TreeNode& root,
+                    const TreeNode& node,
+                    Dali::Handle&   handle);
 
-  void SetProperties( const TreeNode&    node,
-                      Handle&            handle,
-                      const Replacement& constant );
+  void ApplyStylesByActor(const TreeNode&    root,
+                          const TreeNode&    node,
+                          Dali::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 );
+  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);
 
   /**
    * Find the key in the mapping table, if it's present, then generate
@@ -330,16 +332,16 @@ private:
    * @param[in] propertyType The property type if known, or NONE
    * @param[in,out] value The string value to test and write back to.
    */
-  bool GetPropertyMap( const TreeNode&  mappingRoot,
-                       const char*      theKey,
-                       Property::Type   propertyType,
-                       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 );
+  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
@@ -352,12 +354,11 @@ private:
    * @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);
 
   /**
    * Tests if the value is a string delimited by <>. If it is, then it attempts to
@@ -367,9 +368,9 @@ private:
    * @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 ConvertChildValue(const TreeNode&  mappingRoot,
+                         KeyStack&        keyStack,
+                         Property::Value& value);
 
 private:
   Toolkit::JsonParser                 mParser;
index a9ae431..b5f523a 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_BUILDER_SET_PROPERTY_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -23,7 +23,6 @@ namespace Toolkit
 {
 namespace Internal
 {
-
 /**
  * Set a property value from a tree node.
  * This function determines the type of the property from the format of the string in the node.
@@ -31,8 +30,8 @@ namespace Internal
  * @param node  The node string to convert from
  * @param value The property value to set
  */
-void DeterminePropertyFromNode( const TreeNode&  node,
-                                Property::Value& value );
+void DeterminePropertyFromNode(const TreeNode&  node,
+                               Property::Value& value);
 
 /**
  * Set a property value from a tree node as DeterminePropertyFromNode() above
@@ -42,9 +41,9 @@ void DeterminePropertyFromNode( const TreeNode&  node,
  * @param value The property value to set
  * @param replacement The overriding replacement map (if any)
  */
-void DeterminePropertyFromNode( const TreeNode&    node,
-                                Property::Value&   value,
-                                const Replacement& replacement );
+void DeterminePropertyFromNode(const TreeNode&    node,
+                               Property::Value&   value,
+                               const Replacement& replacement);
 
 /**
  * Set a property value as the given type from a tree node.
@@ -53,9 +52,9 @@ void DeterminePropertyFromNode( const TreeNode&    node,
  * @param value The property value to set
  * @return true if the string could be converted to the correct type.
  */
-bool DeterminePropertyFromNode( const TreeNode&  node,
-                                Property::Type   type,
-                                Property::Value& value );
+bool DeterminePropertyFromNode(const TreeNode&  node,
+                               Property::Type   type,
+                               Property::Value& value);
 
 /**
  * Set a property value as the given type from a tree node as DeterminePropertyFromNode() above
@@ -65,14 +64,13 @@ bool DeterminePropertyFromNode( const TreeNode&  node,
  * @param replacement The overriding replacement map (if any)
  * @return true if the string could be converted to the correct type.
  */
-bool DeterminePropertyFromNode( const TreeNode&    node,
-                                Property::Type     type,
-                                Property::Value&   value,
-                                const Replacement& replacement );
-
+bool DeterminePropertyFromNode(const TreeNode&    node,
+                               Property::Type     type,
+                               Property::Value&   value,
+                               const Replacement& replacement);
 
-} // Internal namespace
-} // Toolkit namespace
-} // Dali namespace
+} // namespace Internal
+} // namespace Toolkit
+} // namespace Dali
 
 #endif //DALI_TOOLKIT_INTERNAL_BUILDER_SET_PROPERTY_H
index a3036d9..b570c04 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_BUILDER_DICTIONARY_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -30,7 +30,6 @@ 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
@@ -41,7 +40,7 @@ namespace Internal
 
 using DictionaryKeys = std::vector<std::string>;
 
-inline void Merge( DictionaryKeys& toDict, const DictionaryKeys& fromDict )
+inline void Merge(DictionaryKeys& toDict, const DictionaryKeys& fromDict)
 {
   for(const auto& element : fromDict)
   {
@@ -53,7 +52,6 @@ inline void Merge( DictionaryKeys& toDict, const DictionaryKeys& fromDict )
   }
 }
 
-
 template<typename EntryType>
 class Dictionary
 {
@@ -64,7 +62,7 @@ private:
   struct Element
   {
     std::string key;
-    EntryType entry;
+    EntryType   entry;
     Element(std::string name, EntryType entry)
     : key(std::move(name)),
       entry(std::move(entry))
@@ -82,9 +80,9 @@ private:
 
   auto FindElement(std::string_view key)
   {
-    return std::find_if(container.begin(), container.end(), [key](auto& e){
-        return bool(key == e.key);
-      });
+    return std::find_if(container.begin(), container.end(), [key](auto& e) {
+      return bool(key == e.key);
+    });
   }
 
 public:
@@ -138,12 +136,12 @@ public:
 
       if(iter != End())
       {
-        container.erase( iter );
+        container.erase(iter);
       }
     }
   }
 
-  void Merge( const Dictionary<EntryType>& dictionary )
+  void Merge(const Dictionary<EntryType>& dictionary)
   {
     for(const auto& element : dictionary.container)
     {
@@ -166,7 +164,7 @@ public:
    */
   const EntryType* FindConst(std::string_view key) const
   {
-    if( ! key.empty() )
+    if(!key.empty())
     {
       auto iter = FindElementCaseInsensitive(key);
 
@@ -184,7 +182,7 @@ public:
    */
   EntryType* Find(std::string_view key) const
   {
-    if( ! key.empty() )
+    if(!key.empty())
     {
       auto iter = FindElementCaseInsensitive(key);
 
@@ -209,7 +207,7 @@ public:
     return container.cend();
   }
 
-  void GetKeys( DictionaryKeys& keys ) const
+  void GetKeys(DictionaryKeys& keys) const
   {
     keys.clear();
     for(const auto& element : container)
@@ -224,10 +222,8 @@ public:
   }
 };
 
-
-
-}//Internal
-}//Toolkit
-}//Dali
+} // namespace Internal
+} // namespace Toolkit
+} // namespace Dali
 
 #endif // DALI_TOOLKIT_INTERNAL_BUILDER_DICTIONARY_H
index f635a82..58c2ce0 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_JSON_PARSER_IMPL_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <string>
-#include <list>
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/object/base-object.h>
+#include <list>
+#include <string>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/builder/json-parser.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /*
  * Parses JSON
  */
@@ -105,45 +102,42 @@ public:
   void Write(std::ostream& output, int indent) const;
 
 private:
-  typedef std::vector<char> VectorChar;
+  typedef std::vector<char>    VectorChar;
   typedef VectorChar::iterator VectorCharIter;
 
-  typedef std::list<VectorChar> SourceContainer;
+  typedef std::list<VectorChar>           SourceContainer;
   typedef std::list<VectorChar>::iterator SourceContainerIter;
 
-  JsonParser(JsonParser &);
+  JsonParser(JsonParser&);
   JsonParser& operator=(const JsonParser&);
 
-  SourceContainer mSources;         ///< List of strings from Parse() merge operations
-
-  TreeNode* mRoot;                  ///< Tree root
+  SourceContainer mSources; ///< List of strings from Parse() merge operations
 
-  const char *mErrorDescription;    ///< Last parse error description
-  int mErrorPosition;               ///< Last parse error position
-  int mErrorLine;                   ///< Last parse error line
-  int mErrorColumn;                 ///< Last parse error column
+  TreeNode* mRoot; ///< Tree root
 
-  int mNumberOfChars;               ///< The size of string data for all nodes
-  int mNumberOfNodes;               ///< Node count
+  const char* mErrorDescription; ///< Last parse error description
+  int         mErrorPosition;    ///< Last parse error position
+  int         mErrorLine;        ///< Last parse error line
+  int         mErrorColumn;      ///< Last parse error column
 
+  int mNumberOfChars; ///< The size of string data for all nodes
+  int mNumberOfNodes; ///< Node count
 };
 
 } // namespace Internal
 
-
 inline const Internal::JsonParser& GetImplementation(const Toolkit::JsonParser& parser)
 {
-  DALI_ASSERT_ALWAYS( parser && "JsonParser handle is empty" );
+  DALI_ASSERT_ALWAYS(parser && "JsonParser handle is empty");
 
   const BaseObject& handle = parser.GetBaseObject();
 
   return static_cast<const Internal::JsonParser&>(handle);
 }
 
-
 inline Internal::JsonParser& GetImplementation(Toolkit::JsonParser& parser)
 {
-  DALI_ASSERT_ALWAYS( parser && "JsonParser handle is empty" );
+  DALI_ASSERT_ALWAYS(parser && "JsonParser handle is empty");
 
   BaseObject& handle = parser.GetBaseObject();
 
@@ -154,5 +148,4 @@ inline Internal::JsonParser& GetImplementation(Toolkit::JsonParser& parser)
 
 } // namespace Dali
 
-
 #endif // DALI_JSON_PARSER_IMPL_H
index 4d7e7a4..d6eb0e9 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_JSON_PARSE_STATE_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * A safer std::advance()
  */
-template <typename IteratorType,typename EndIteratorType>
+template<typename IteratorType, typename EndIteratorType>
 inline int AdvanceIter(IteratorType& iter, EndIteratorType& end, int n)
 {
-  for(int i =0; i < n; ++i)
+  for(int i = 0; i < n; ++i)
   {
     if(iter == end)
     {
@@ -85,51 +82,69 @@ public:
    * Get the error description of the last parse
    * @return The error description or NULL if no error
    */
-  const char* GetErrorDescription() { return mErrorDescription; }
+  const char* GetErrorDescription()
+  {
+    return mErrorDescription;
+  }
 
   /**
    * Get the error line number
    * @return The line number of the error
    */
-  int GetErrorLineNumber() { return mErrorNewLine; }
+  int GetErrorLineNumber()
+  {
+    return mErrorNewLine;
+  }
 
   /**
    * Get the error column
    * @return The error column
    */
-  int GetErrorColumn() { return mErrorColumn; }
+  int GetErrorColumn()
+  {
+    return mErrorColumn;
+  }
 
   /**
    * Get the error position
    * @return The error position
    */
-  int GetErrorPosition() { return mErrorPosition; }
+  int GetErrorPosition()
+  {
+    return mErrorPosition;
+  }
 
   /**
    * Get the size of the string data that has been parsed
    * @return The size of string data
    */
-  int GetParsedStringSize() { return mNumberOfParsedChars; };
+  int GetParsedStringSize()
+  {
+    return mNumberOfParsedChars;
+  };
 
   /**
    * Get the number of nodes created
    * @return The number of nodes
    */
-  int GetCreatedNodeCount() { return mNumberOfCreatedNodes; };
+  int GetCreatedNodeCount()
+  {
+    return mNumberOfCreatedNodes;
+  };
 
 private:
-  VectorCharIter mIter;                ///< Current position
-  VectorCharIter mStart;               ///< Start position
-  VectorCharIter mEnd;                 ///< End of buffer being parsed
-  TreeNode* mRoot;                     ///< Root node created
-  TreeNodeManipulator mCurrent;        ///< The Current modifiable node
-  const char* mErrorDescription;       ///< The error description if set
-  int mErrorNewLine;                   ///< The error line number
-  int mErrorColumn;                    ///< The error column
-  int mErrorPosition;                  ///< The error position
-  int mNumberOfParsedChars;            ///< The size of string data
-  int mNumberOfCreatedNodes;           ///< The number of nodes created
-  bool mFirstParse;                    ///< Flag if first parse
+  VectorCharIter      mIter;                 ///< Current position
+  VectorCharIter      mStart;                ///< Start position
+  VectorCharIter      mEnd;                  ///< End of buffer being parsed
+  TreeNode*           mRoot;                 ///< Root node created
+  TreeNodeManipulator mCurrent;              ///< The Current modifiable node
+  const char*         mErrorDescription;     ///< The error description if set
+  int                 mErrorNewLine;         ///< The error line number
+  int                 mErrorColumn;          ///< The error column
+  int                 mErrorPosition;        ///< The error position
+  int                 mNumberOfParsedChars;  ///< The size of string data
+  int                 mNumberOfCreatedNodes; ///< The number of nodes created
+  bool                mFirstParse;           ///< Flag if first parse
 
   /**
    * The current parse state
@@ -231,7 +246,7 @@ private:
     {
       return Error("Attempt to walk up above root");
     }
-    mCurrent = TreeNodeManipulator( mCurrent.GetParent() );
+    mCurrent = TreeNodeManipulator(mCurrent.GetParent());
     return true;
   }
 
@@ -269,7 +284,7 @@ private:
   {
     int c = AdvanceIter(mIter, mEnd, n);
     mErrorPosition += c;
-    mErrorColumn   += c;
+    mErrorColumn += c;
   }
 
   /**
@@ -279,7 +294,7 @@ private:
   {
     int c = AdvanceIter(mIter, mEnd, n);
     mErrorPosition += c;
-    mErrorColumn   += c;
+    mErrorColumn += c;
     return mEnd == mIter;
   }
 
@@ -290,8 +305,8 @@ private:
   {
     int c = AdvanceIter(mIter, mEnd, n);
     mErrorPosition += c;
-    mErrorColumn   += c;
-    static_cast<void>( ParseWhiteSpace() );
+    mErrorColumn += c;
+    static_cast<void>(ParseWhiteSpace());
   }
 
   /**
@@ -421,7 +436,6 @@ private:
   bool HandleCharacterComma(const char* name);
 };
 
-
 } // namespace Internal
 
 } // namespace Toolkit
index 666dd30..7251ad2 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_BUILDER_OPTIONAL_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  */
 
-template <typename T>
+template<typename T>
 struct OptionalTypes
 {
-  typedef T ValueType;
-  typedef const T& ReturnType;
-  static ReturnType Get(const ValueType& v) { return v; }
-  static ValueType Set(const ReturnType v) { return v; }
-  static bool Ok(const ValueType& v) { return true; }
+  typedef T         ValueType;
+  typedef const T&  ReturnType;
+  static ReturnType Get(const ValueType& v)
+  {
+    return v;
+  }
+  static ValueType Set(const ReturnType v)
+  {
+    return v;
+  }
+  static bool Ok(const ValueType& v)
+  {
+    return true;
+  }
 };
 
-template <typename T>
+template<typename T>
 struct OptionalTypes<T*>
 {
-  typedef T* ValueType;
-  typedef const T* ReturnType;
-  static ReturnType Get(const ValueType v) { return v; }
-  static ValueType Set(const ReturnType v) { return v; }
-  static bool Ok(const ReturnType v) { return NULL != v; }
+  typedef T*        ValueType;
+  typedef const T*  ReturnType;
+  static ReturnType Get(const ValueType v)
+  {
+    return v;
+  }
+  static ValueType Set(const ReturnType v)
+  {
+    return v;
+  }
+  static bool Ok(const ReturnType v)
+  {
+    return NULL != v;
+  }
 };
 
-template <typename T>
+template<typename T>
 struct OptionalTypes<T&>
 {
-  typedef T* ValueType;
-  typedef const T& ReturnType;
-  static ReturnType Get(const ValueType v) { return *v; }
-  static ValueType Set(const ReturnType v) { return &v; }
-  static bool Ok(const ReturnType v) { return true; }
+  typedef T*        ValueType;
+  typedef const T&  ReturnType;
+  static ReturnType Get(const ValueType v)
+  {
+    return *v;
+  }
+  static ValueType Set(const ReturnType v)
+  {
+    return &v;
+  }
+  static bool Ok(const ReturnType v)
+  {
+    return true;
+  }
 };
 
-template <typename T>
+template<typename T>
 class OptionalValue
 {
 public:
-  typedef void ( OptionalValue::*bool_type )() const;
+  typedef void (OptionalValue::*bool_type)() const;
   typedef typename OptionalTypes<T>::ReturnType ReturnType;
-  typedef typename OptionalTypes<T>::ValueType ValueType;
+  typedef typename OptionalTypes<T>::ValueType  ValueType;
 
-  OptionalValue(): mOk(false), mValue() {}
-  OptionalValue( T value ): mOk(OptionalTypes<T>::Ok(value)), mValue(OptionalTypes<T>::Set(value)) {}
-  OptionalValue( bool b, T value ): mOk(b), mValue(OptionalTypes<T>::Set(value)) {}
+  OptionalValue()
+  : mOk(false),
+    mValue()
+  {
+  }
+  OptionalValue(T value)
+  : mOk(OptionalTypes<T>::Ok(value)),
+    mValue(OptionalTypes<T>::Set(value))
+  {
+  }
+  OptionalValue(bool b, T value)
+  : mOk(b),
+    mValue(OptionalTypes<T>::Set(value))
+  {
+  }
 
-  ReturnType operator *() const { return OptionalTypes<T>::Get(mValue); }
+  ReturnType operator*() const
+  {
+    return OptionalTypes<T>::Get(mValue);
+  }
 
   // safe bool idiom
-  operator bool_type() const {
+  operator bool_type() const
+  {
     return mOk == true ? &OptionalValue::this_type_does_not_support_comparisons : 0;
   }
 
 private:
-  bool mOk;
+  bool      mOk;
   ValueType mValue;
-  void this_type_does_not_support_comparisons() const {}
+  void      this_type_does_not_support_comparisons() const
+  {
+  }
 };
 
-template <typename T, typename U>
-bool operator==( const OptionalValue<T>& lhs, const OptionalValue<U>& rhs )
+template<typename T, typename U>
+bool operator==(const OptionalValue<T>& lhs, const OptionalValue<U>& rhs)
 {
   lhs.this_type_does_not_support_comparisons();
   return false;
 }
 
-template <typename T, typename U>
-bool operator!=( const OptionalValue<T>& lhs, const OptionalValue<U>& rhs )
+template<typename T, typename U>
+bool operator!=(const OptionalValue<T>& lhs, const OptionalValue<U>& rhs)
 {
   lhs.this_type_does_not_support_comparisons();
   return false;
index 24260de..7780ec6 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_BUILDER_REPLACEMENT_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-  class TreeNode;
+class TreeNode;
 }
 
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /*
  * Supports template replacement functionality
  *
@@ -46,7 +43,6 @@ namespace Internal
 class Replacement
 {
 public:
-
   /*
    * Constructor
    */
@@ -59,7 +55,7 @@ public:
    * @param overrideMap The user overriding map
    * @param defaultMap The default map to use
    */
-  Replacement( const Property::Map& overrideMap, const Property::Map& defaultMap );
+  Replacement(const Property::Map& overrideMap, const Property::Map& defaultMap);
 
   /*
    * Constructor with default map
@@ -67,175 +63,175 @@ public:
    * Make a deep copy of the tree.
    * @param overrideMap The user overriding map
    */
-  Replacement( const Property::Map& defaultMap );
+  Replacement(const Property::Map& defaultMap);
 
   /* @brief Check node for a type
    *
    * @param node The TreeNode to check
    * @return Optional value
    */
-  OptionalString IsString( const TreeNode& node ) const;
+  OptionalString IsString(const TreeNode& node) const;
 
   /* @brief Check node for a type
    *
    * @param node The TreeNode to check
    * @return Optional value
    */
-  OptionalBoolean IsBoolean( const TreeNode & node ) const;
+  OptionalBoolean IsBoolean(const TreeNode& node) const;
 
   /* @brief Check node for a type
    *
    * @param node The TreeNode to check
    * @return Optional value
    */
-  OptionalFloat IsFloat( const TreeNode & node ) const;
+  OptionalFloat IsFloat(const TreeNode& node) const;
 
   /* @brief Check node for a type
    *
    * @param node The TreeNode to check
    * @return Optional value
    */
-  OptionalInteger IsInteger( const TreeNode & node ) const;
+  OptionalInteger IsInteger(const TreeNode& node) const;
 
   /* @brief Check node for a type
    *
    * @param node The TreeNode to check
    * @return Optional value
    */
-  OptionalVector2 IsVector2( const TreeNode & node ) const;
+  OptionalVector2 IsVector2(const TreeNode& node) const;
 
   /* @brief Check node for a type
    *
    * @param node The TreeNode to check
    * @return Optional value
    */
-  OptionalVector3 IsVector3( const TreeNode & node ) const;
+  OptionalVector3 IsVector3(const TreeNode& node) const;
 
   /* @brief Check node for a type
    *
    * @param node The TreeNode to check
    * @return Optional value
    */
-  OptionalVector4 IsVector4( const TreeNode & node ) const;
+  OptionalVector4 IsVector4(const TreeNode& node) const;
 
   /* @brief Check node for a type
    *
    * @param node The TreeNode to check
    * @return Optional value
    */
-  OptionalMatrix IsMatrix( const TreeNode & node ) const;
+  OptionalMatrix IsMatrix(const TreeNode& node) const;
 
   /* @brief Check node for a type
    *
    * @param node The TreeNode to check
    * @return Optional value
    */
-  OptionalMatrix3 IsMatrix3( const TreeNode & node ) const;
+  OptionalMatrix3 IsMatrix3(const TreeNode& node) const;
 
   /* @brief Check node for a type
    *
    * @param node The TreeNode to check
    * @return Optional value
    */
-  OptionalRect IsRect( const TreeNode & node ) const;
+  OptionalRect IsRect(const TreeNode& node) const;
 
   /* @brief Check node for a type
    *
    * @param node The TreeNode to check
    * @return Optional value
    */
-  OptionalExtents IsExtents( const TreeNode & node ) const;
+  OptionalExtents IsExtents(const TreeNode& node) const;
 
   /* @brief Check node for a type
    *
    * @param child The optional child TreeNode
    * @return Optional value
    */
-  OptionalString IsString( OptionalChild child ) const;
+  OptionalString IsString(OptionalChild child) const;
 
   /* @brief Check node for a type
    *
    * @param child The optional child TreeNode
    * @return Optional value
    */
-  OptionalFloat IsFloat( OptionalChild child ) const;
+  OptionalFloat IsFloat(OptionalChild child) const;
 
   /* @brief Check node for a type
    *
    * @param child The optional child TreeNode
    * @return Optional value
    */
-  OptionalBoolean IsBoolean( OptionalChild child ) const;
+  OptionalBoolean IsBoolean(OptionalChild child) const;
 
   /* @brief Check node for a type
    *
    * @param child The optional child TreeNode
    * @return Optional value
    */
-  OptionalInteger IsInteger( OptionalChild child ) const;
+  OptionalInteger IsInteger(OptionalChild child) const;
 
   /* @brief Check node for a type
    *
    * @param child The optional child TreeNode
    * @return Optional value
    */
-  OptionalVector2 IsVector2( OptionalChild child ) const;
+  OptionalVector2 IsVector2(OptionalChild child) const;
 
   /* @brief Check node for a type
    *
    * @param child The optional child TreeNode
    * @return Optional value
    */
-  OptionalVector3 IsVector3( OptionalChild child ) const;
+  OptionalVector3 IsVector3(OptionalChild child) const;
 
   /* @brief Check node for a type
    *
    * @param child The optional child TreeNode
    * @return Optional value
    */
-  OptionalVector4 IsVector4( OptionalChild child ) const;
+  OptionalVector4 IsVector4(OptionalChild child) const;
 
   /* @brief Check node for a type
    *
    * @param child The optional child TreeNode
    * @return Optional value
    */
-  OptionalMatrix IsMatrix( OptionalChild child ) const;
+  OptionalMatrix IsMatrix(OptionalChild child) const;
 
   /* @brief Check node for a type
    *
    * @param child The optional child TreeNode
    * @return Optional value
    */
-  OptionalMatrix3 IsMatrix3( OptionalChild child ) const;
+  OptionalMatrix3 IsMatrix3(OptionalChild child) const;
 
   /* @brief Check node for a type
    *
    * @param child The optional child TreeNode
    * @return Optional value
    */
-  OptionalRect IsRect( OptionalChild child ) const;
+  OptionalRect IsRect(OptionalChild child) const;
 
   /* @brief Check node for a type
    *
    * @param child The optional child TreeNode
    * @return Optional value
    */
-  bool IsMap( OptionalChild child, Property::Value& out ) const;
+  bool IsMap(OptionalChild child, Property::Value& out) const;
 
   /* @brief Check node for a type
    *
    * @param child The optional child TreeNode
    * @return Optional value
    */
-  bool IsArray( OptionalChild child, Property::Value& out ) const;
+  bool IsArray(OptionalChild child, Property::Value& out) const;
 
   /* @brief Check node for a type
    *
    * @param child The optional child TreeNode
    * @return Optional value
    */
-  OptionalExtents IsExtents( OptionalChild child ) const;
+  OptionalExtents IsExtents(OptionalChild child) const;
 
 private:
   // Overriding map (overrides the default map). The map is not owned.
@@ -249,11 +245,10 @@ private:
   // Replacement( const Replacement& copy );
 
   // Returns the string if the node has a full replacement ie IMAGES if node is "{IMAGES}"
-  OptionalString HasFullReplacement( const TreeNode & node ) const;
+  OptionalString HasFullReplacement(const TreeNode& node) const;
 
   // Returns the property value for a full replacement from the maps
-  Property::Value GetFullReplacement( const std::string& replacementString ) const;
-
+  Property::Value GetFullReplacement(const std::string& replacementString) const;
 };
 
 } // namespace Internal
index 0265ff6..a99e17b 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_BUILDER_STYLE_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,9 +17,9 @@
  * 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>
+#include <dali/public-api/object/ref-object.h>
 
 namespace Dali
 {
@@ -27,7 +27,6 @@ namespace Toolkit
 {
 namespace Internal
 {
-
 class Style;
 typedef IntrusivePtr<Style> StylePtr;
 
@@ -57,8 +56,8 @@ public:
    * @param[in] handle The handle to apply the visuals to
    * @param[in] instancedProperties The maps from which to get instanced properties
    */
-  void ApplyVisualsAndPropertiesRecursively( Handle handle,
-                                             const Dictionary<Property::Map>& instancedProperties ) const;
+  void ApplyVisualsAndPropertiesRecursively(Handle                           handle,
+                                            const Dictionary<Property::Map>& instancedProperties) const;
 
   /**
    * Apply the visuals of the style to the control pointed at by
@@ -67,8 +66,8 @@ public:
    * @param[in] handle The handle to apply the visuals to
    * @param[in] instancedProperties The maps from which to get instanced properties
    */
-  void ApplyVisuals( Handle handle,
-                     const Dictionary<Property::Map>& instancedProperties ) const;
+  void ApplyVisuals(Handle                           handle,
+                    const Dictionary<Property::Map>& instancedProperties) const;
 
   /**
    * Apply the properties from the visualMaps and the instancedProperties
@@ -78,18 +77,18 @@ public:
    * @param[in] visualMaps The visual maps from which to get the styled properties
    * @param[in] instancedProperties The maps from which to get instanced properties
    */
-  static void ApplyVisuals( Handle handle,
-                            const Dictionary<Property::Map>& visualMaps,
-                            const Dictionary<Property::Map>& instancedProperties );
+  static void ApplyVisuals(Handle                           handle,
+                           const Dictionary<Property::Map>& visualMaps,
+                           const Dictionary<Property::Map>& instancedProperties);
 
   /**
    * Apply the properties from the visualMap and optional instancedProperties
    * to the control pointed at by handle.
    */
-  static void ApplyVisual( Handle handle,
-                           const std::string& visualName,
-                           const Property::Map& visualMap,
-                           const Property::Map* instancedProperties );
+  static void ApplyVisual(Handle               handle,
+                          const std::string&   visualName,
+                          const Property::Map& visualMap,
+                          const Property::Map* instancedProperties);
 
   /**
    * Apply the properties of the style to the control pointed at by
@@ -97,7 +96,7 @@ public:
    *
    * @param[in] handle The handle to apply the properties to
    */
-  void ApplyProperties( Handle handle ) const;
+  void ApplyProperties(Handle handle) const;
 
 protected:
   /**
@@ -112,24 +111,23 @@ protected:
 
 private:
   // Not implemented
-  DALI_INTERNAL Style( const Style& rhs );
+  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<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;
+  Property::Map             properties;
+  Property::Array           transitions;
+  Toolkit::TransitionData   entryTransition;
+  Toolkit::TransitionData   exitTransition;
 };
 
-} // Internal
-} // Toolkit
-} // Dali
-
+} // namespace Internal
+} // namespace Toolkit
+} // namespace Dali
 
 #endif //DALI_TOOLKIT_INTERNAL_BUILDER_STYLE_H
index cc9e98b..0852497 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_SCRIPT_TREE_NODE_MANIPULATOR_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics 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,9 +19,9 @@
  */
 
 // EXTERNAL INCLUDES
-#include <utility> // pair
-#include <iterator>
 #include <cstring>
+#include <iterator>
+#include <utility> // pair
 
 #include <dali-toolkit/public-api/dali-toolkit-common.h>
 #include <dali/public-api/common/vector-wrapper.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-typedef std::vector<char> VectorChar;
+typedef std::vector<char>    VectorChar;
 typedef VectorChar::iterator VectorCharIter;
 
 /*
@@ -92,7 +90,7 @@ public:
    * @param child The child to add
    * @return the added child
    */
-  TreeNode *AddChild(TreeNode *child);
+  TreeNode* AddChild(TreeNode* child);
 
   /*
    * Change the type of the Node
@@ -100,13 +98,13 @@ public:
    *     the children are removed
    * @param type The new type
    */
-  void SetType( TreeNode::NodeType type);
+  void SetType(TreeNode::NodeType type);
 
   /*
    * Set the name of the node
    * @param name The name to set
    */
-  void SetName( const char* name );
+  void SetName(const char* name);
 
   /*
    * Set the substituion flag
@@ -114,7 +112,7 @@ public:
    * in the tree.
    * @param on The state
    */
-  void SetSubstitution( bool on );
+  void SetSubstitution(bool on);
 
   /*
    * Get the nodes type
@@ -132,25 +130,25 @@ public:
    * Set the node as a string value
    * @param string The string value
    */
-  void SetString( const char* string );
+  void SetString(const char* string);
 
   /*
    * Set the node as an integer value
    * @param i The integer
    */
-  void SetInteger( int i );
+  void SetInteger(int i);
 
   /*
    * Set the node as an float value
    * @param f The float
    */
-  void SetFloat( float f );
+  void SetFloat(float f);
 
   /*
    * Set the node as an boolean value
    * @param b The boolean
    */
-  void SetBoolean( bool b );
+  void SetBoolean(bool b);
 
   /*
    * Get the nodes parent
@@ -171,7 +169,7 @@ public:
   void Write(std::ostream& output, int indent) const;
 
 private:
-  TreeNode *mNode;
+  TreeNodemNode;
 
   /*
    * Move the nodes strings to the buffer
@@ -191,8 +189,7 @@ private:
   /*
    * Do write to string stream
    */
-  void DoWrite(const TreeNode *value, std::ostream& output, int level, int ident, bool groupChildren) const;
-
+  void DoWrite(const TreeNode* value, std::ostream& output, int level, int ident, bool groupChildren) const;
 };
 
 /*
@@ -200,7 +197,7 @@ private:
  */
 struct CollectNodes
 {
-  CollectNodes() {};
+  CollectNodes(){};
 
   /*
    * Call operator to add nodes to the list
@@ -212,7 +209,7 @@ struct CollectNodes
   }
 
   typedef std::vector<const TreeNode*> VectorNodes;
-  typedef VectorNodes::iterator iterator;
+  typedef VectorNodes::iterator        iterator;
 
   VectorNodes nodes; ///< List of collected nodes
 };
@@ -220,19 +217,18 @@ struct CollectNodes
 /*
  * Depth first walk of nodes applying given operation (unary_function)
  */
-template <typename Operation>
-void DepthFirst( TreeNode* node, Operation& operation)
+template<typename Operation>
+void DepthFirst(TreeNode* node, Operation& operation)
 {
   DALI_ASSERT_DEBUG(node && "Operation on NULL JSON node");
 
   for(TreeNode::ConstIterator iter = node->CBegin(); iter != node->CEnd(); ++iter)
   {
     // iterator access is const for external api but were modifying
-    DepthFirst( const_cast<TreeNode*>(&((*iter).second)), operation);
+    DepthFirst(const_cast<TreeNode*>(&((*iter).second)), operation);
   }
 
   operation(node);
-
 }
 
 /*
@@ -251,8 +247,7 @@ const TreeNode* FindIt(std::string_view childName, const TreeNode* tree);
  * @param sentinel The buffer sentinel
  * @return The start of the given buffer
  */
-char *CopyString( const char *fromString, VectorCharIter& iter, const VectorCharIter& sentinel);
-
+char* CopyString(const char* fromString, VectorCharIter& iter, const VectorCharIter& sentinel);
 
 } // namespace Internal
 
index 64d352a..1b2db48 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_ALIGNMENT_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/devel-api/controls/alignment/alignment.h>
 #include <dali-toolkit/internal/controls/control/control-data-impl.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 class Alignment;
 
 namespace Internal
 {
-
 /**
  * Alignment is a control to position and resize actors inside other container actors.
  * @see Dali::Toolkit::Alignment for more details.
@@ -41,18 +38,17 @@ namespace Internal
 class Alignment : public Control
 {
 public:
-
   /**
    * Create an initialized Alignment.
    * @param type Type of alignment.
    * @return A handle to a newly allocated Dali resource.
    */
-  static Toolkit::Alignment New( Toolkit::Alignment::Type horizontal, Toolkit::Alignment::Type vertical );
+  static Toolkit::Alignment New(Toolkit::Alignment::Type horizontal, Toolkit::Alignment::Type vertical);
 
   /**
    * @copydoc Dali::Toolkit::Alignment::SetAlignmentType()
    */
-  void SetAlignmentType( Toolkit::Alignment::Type type );
+  void SetAlignmentType(Toolkit::Alignment::Type type);
 
   /**
    * @copydoc Dali::Toolkit::Alignment::GetAlignmentType()
@@ -62,7 +58,7 @@ public:
   /**
    * @copydoc Dali::Toolkit::Alignment::SetScaling()
    */
-  void SetScaling( Toolkit::Alignment::Scaling scaling );
+  void SetScaling(Toolkit::Alignment::Scaling scaling);
 
   /**
    * @copydoc Dali::Toolkit::Alignment::GetScaling()
@@ -72,16 +68,14 @@ public:
   /**
    * @copydoc Dali::Toolkit::Alignment::SetPadding()
    */
-  void SetPadding( const Toolkit::Alignment::Padding& padding );
+  void SetPadding(const Toolkit::Alignment::Padding& padding);
 
   /**
    * @copydoc Dali::Toolkit::Alignment::GetPadding()
    */
   const Toolkit::Alignment::Padding& GetPadding() const;
 
-
 private: // From Control
-
   /**
    * @copydoc Control::OnInitialize()
    */
@@ -90,15 +84,14 @@ private: // From Control
   /**
    * @copydoc Control::OnRelayout()
    */
-  void OnRelayout( const Vector2& size, RelayoutContainer& container ) override;
+  void OnRelayout(const Vector2& size, RelayoutContainer& container) override;
 
 private:
-
   /**
    * Constructor.
    * It initializes Alignment members.
    */
-  Alignment( Toolkit::Alignment::Type horizontal, Toolkit::Alignment::Type vertical );
+  Alignment(Toolkit::Alignment::Type horizontal, Toolkit::Alignment::Type vertical);
 
   /**
    * A reference counted object may only be deleted by calling Unreference()
@@ -106,7 +99,6 @@ private:
   virtual ~Alignment();
 
 private:
-
   // Undefined
   Alignment(const Alignment&);
   Alignment& operator=(const Alignment&);
@@ -120,25 +112,24 @@ private:
 
 } // namespace Internal
 
-
 // Helpers for public-api forwarding methods
 
-inline Toolkit::Internal::Alignment& GetImpl( Toolkit::Alignment& alignment )
+inline Toolkit::Internal::Alignment& GetImpl(Toolkit::Alignment& alignment)
 {
-  DALI_ASSERT_ALWAYS( alignment );
+  DALI_ASSERT_ALWAYS(alignment);
 
   Dali::RefObject& handle = alignment.GetImplementation();
 
-  return static_cast<Toolkit::Internal::Alignment&>( handle );
+  return static_cast<Toolkit::Internal::Alignment&>(handle);
 }
 
-inline const Toolkit::Internal::Alignment& GetImpl( const Toolkit::Alignment& alignment )
+inline const Toolkit::Internal::Alignment& GetImpl(const Toolkit::Alignment& alignment)
 {
-  DALI_ASSERT_ALWAYS( alignment );
+  DALI_ASSERT_ALWAYS(alignment);
 
   const Dali::RefObject& handle = alignment.GetImplementation();
 
-  return static_cast<const Toolkit::Internal::Alignment&>( handle );
+  return static_cast<const Toolkit::Internal::Alignment&>(handle);
 }
 
 } // namespace Toolkit
index 09732e0..06f2e15 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_BLOOM_VIEW_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <sstream>
-#include <cmath>
 #include <dali/public-api/actors/camera-actor.h>
 #include <dali/public-api/render-tasks/render-task.h>
 #include <dali/public-api/rendering/frame-buffer.h>
+#include <cmath>
+#include <sstream>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali-toolkit/devel-api/controls/bloom-view/bloom-view.h>
 #include <dali-toolkit/devel-api/controls/gaussian-blur-view/gaussian-blur-view.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/public-api/controls/image-view/image-view.h>
-#include <dali-toolkit/devel-api/controls/bloom-view/bloom-view.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 class BloomView;
 
 namespace Internal
 {
-
 /**
  * BloomEffect implementation class
  */
@@ -56,8 +53,7 @@ public:
   /**
    * @copydoc Dali::Toolkit::BloomView::BloomView
    */
-  BloomView(const unsigned int numSamples, const float blurBellCurveWidth, const Pixel::Format renderTargetPixelFormat,
-                   const float downsampleWidthScale, const float downsampleHeightScale);
+  BloomView(const unsigned int numSamples, const float blurBellCurveWidth, const Pixel::Format renderTargetPixelFormat, const float downsampleWidthScale, const float downsampleHeightScale);
 
   /**
    * @copydoc Dali::Toolkit::BloomView::~BloomView
@@ -68,32 +64,48 @@ public:
    * @copydoc Dali::Toolkit::BloomView::New
    */
   static Dali::Toolkit::BloomView New();
-  static Dali::Toolkit::BloomView New( const unsigned int numSamples, const float blurBellCurveWidth, const Pixel::Format renderTargetPixelFormat,
-                                              const float downsampleWidthScale, const float downsampleHeightScale);
-  void Activate();
-  void Deactivate();
-
-  Property::Index GetBloomThresholdPropertyIndex() const {return mBloomThresholdPropertyIndex;}
-  Property::Index GetBlurStrengthPropertyIndex() const {return mBlurStrengthPropertyIndex;}
-  Property::Index GetBloomIntensityPropertyIndex() const {return mBloomIntensityPropertyIndex;}
-  Property::Index GetBloomSaturationPropertyIndex() const {return mBloomSaturationPropertyIndex;}
-  Property::Index GetImageIntensityPropertyIndex() const {return mImageIntensityPropertyIndex;}
-  Property::Index GetImageSaturationPropertyIndex() const {return mImageSaturationPropertyIndex;}
+  static Dali::Toolkit::BloomView New(const unsigned int numSamples, const float blurBellCurveWidth, const Pixel::Format renderTargetPixelFormat, const float downsampleWidthScale, const float downsampleHeightScale);
+  void                            Activate();
+  void                            Deactivate();
+
+  Property::Index GetBloomThresholdPropertyIndex() const
+  {
+    return mBloomThresholdPropertyIndex;
+  }
+  Property::Index GetBlurStrengthPropertyIndex() const
+  {
+    return mBlurStrengthPropertyIndex;
+  }
+  Property::Index GetBloomIntensityPropertyIndex() const
+  {
+    return mBloomIntensityPropertyIndex;
+  }
+  Property::Index GetBloomSaturationPropertyIndex() const
+  {
+    return mBloomSaturationPropertyIndex;
+  }
+  Property::Index GetImageIntensityPropertyIndex() const
+  {
+    return mImageIntensityPropertyIndex;
+  }
+  Property::Index GetImageSaturationPropertyIndex() const
+  {
+    return mImageSaturationPropertyIndex;
+  }
 
 private:
-
   void OnInitialize() override;
   void OnSizeSet(const Vector3& targetSize) override;
 
   /**
    * @copydoc Control::OnChildAdd()
    */
-  void OnChildAdd( Actor& child ) override;
+  void OnChildAdd(Actor& child) override;
 
   /**
    * @copydoc Control::OnChildRemove()
    */
-  void OnChildRemove( Actor& child ) override;
+  void OnChildRemove(Actor& child) override;
 
   void AllocateResources();
   void CreateRenderTasks();
@@ -101,11 +113,10 @@ private:
 
   void SetupProperties();
 
-
   /////////////////////////////////////////////////////////////
-  unsigned int mBlurNumSamples;   // number of blur samples in each of horiz/vert directions
-  float mBlurBellCurveWidth;      // constant used when calculating the gaussian weights
-  Pixel::Format mPixelFormat;     // pixel format used by render targets
+  unsigned int  mBlurNumSamples;     // number of blur samples in each of horiz/vert directions
+  float         mBlurBellCurveWidth; // constant used when calculating the gaussian weights
+  Pixel::Format mPixelFormat;        // pixel format used by render targets
 
   /////////////////////////////////////////////////////////////
   // downsampling is used for the separated blur passes to get increased blur with the same number of samples and also to make rendering quicker
@@ -114,7 +125,6 @@ private:
   float mDownsampledWidth;
   float mDownsampledHeight;
 
-
   /////////////////////////////////////////////////////////////
   // for checking if we need to reallocate render targets
   Vector2 mTargetSize;
@@ -134,13 +144,13 @@ private:
   /////////////////////////////////////////////////////////////
   // for rendering all user added children to offscreen target
   FrameBuffer mRenderTargetForRenderingChildren;
-  RenderTask mRenderChildrenTask;
+  RenderTask  mRenderChildrenTask;
 
   /////////////////////////////////////////////////////////////
   // for extracting bright parts of image to an offscreen target
   FrameBuffer mBloomExtractTarget; // for rendering bright parts of image into separate texture, also used as target for gaussian blur
-  RenderTask mBloomExtractTask;
-  Actor mBloomExtractActor;
+  RenderTask  mBloomExtractTask;
+  Actor       mBloomExtractActor;
 
   /////////////////////////////////////////////////////////////
   // for blurring extracted bloom
@@ -155,7 +165,7 @@ private:
   /////////////////////////////////////////////////////////////
   // for holding blurred result
   FrameBuffer mOutputRenderTarget;
-  Actor mTargetActor;
+  Actor       mTargetActor;
 
   /////////////////////////////////////////////////////////////
   // Properties for setting by user, e.g. by animations
@@ -166,28 +176,27 @@ private:
   Property::Index mImageIntensityPropertyIndex;
   Property::Index mImageSaturationPropertyIndex;
 
-  bool mActivated:1;
+  bool mActivated : 1;
 
 private:
-
   // Undefined copy constructor.
-  BloomView( const BloomView& );
+  BloomView(const BloomView&);
 
   // Undefined assignment operator.
-  BloomView& operator=( const BloomView& );
+  BloomView& operator=(const BloomView&);
 };
 
 } // namespace Internal
 
 // Helpers for public-api forwarding methods
-inline Toolkit::Internal::BloomView& GetImpl( Toolkit::BloomView& obj )
+inline Toolkit::Internal::BloomView& GetImpl(Toolkit::BloomView& obj)
 {
   DALI_ASSERT_ALWAYS(obj);
   Dali::RefObject& handle = obj.GetImplementation();
   return static_cast<Toolkit::Internal::BloomView&>(handle);
 }
 
-inline const Toolkit::Internal::BloomView& GetImpl( const Toolkit::BloomView& obj )
+inline const Toolkit::Internal::BloomView& GetImpl(const Toolkit::BloomView& obj)
 {
   DALI_ASSERT_ALWAYS(obj);
   const Dali::RefObject& handle = obj.GetImplementation();
index 4f4a3e5..2c15531 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_BUBBLE_EFFECT_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <sstream>
-#include <dali/public-api/rendering/shader.h>
 #include <dali-toolkit/internal/graphics/builtin-shader-extern-gen.h>
+#include <dali/public-api/rendering/shader.h>
+#include <sstream>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * Create the shader to be used by the renderer
  * @param[in] numberOfBubble How many groups of uniforms are used to control the bubble movement.
  * @return A handle to the newly created shader.
  */
-inline Shader CreateBubbleShader( unsigned int numBubble )
+inline Shader CreateBubbleShader(unsigned int numBubble)
 {
   std::ostringstream vertexShaderStringStream;
-  vertexShaderStringStream << "#define NUMBER_OF_BUBBLE "<< numBubble << "\n"
+  vertexShaderStringStream << "#define NUMBER_OF_BUBBLE " << numBubble << "\n"
                            << SHADER_BUBBLE_EFFECT_VERT;
-  Shader shader = Shader::New( vertexShaderStringStream.str(), SHADER_BUBBLE_EFFECT_FRAG );
+  Shader shader = Shader::New(vertexShaderStringStream.str(), SHADER_BUBBLE_EFFECT_FRAG);
 
   return shader;
 }
index 30ccbbf..df0c0f7 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_BUBBLE_EMITTER_IMPL_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/actors/camera-actor.h>
 #include <dali/devel-api/common/stage.h>
-#include <dali/public-api/rendering/frame-buffer.h>
+#include <dali/public-api/actors/camera-actor.h>
 #include <dali/public-api/render-tasks/render-task.h>
+#include <dali/public-api/rendering/frame-buffer.h>
 #include <dali/public-api/rendering/geometry.h>
 #include <dali/public-api/rendering/renderer.h>
 #include <dali/public-api/rendering/sampler.h>
 #include <dali/public-api/rendering/vertex-buffer.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/devel-api/controls/bubble-effect/bubble-emitter.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class BubbleRenderer;
 
 /**
@@ -50,7 +47,6 @@ class BubbleRenderer;
 class BubbleEmitter : public Control
 {
 public:
-
   /**
    * Destructor
    */
@@ -59,10 +55,10 @@ public:
   /**
    * @copydoc Toolkit::BubbleEmitter::New
    */
-  static Toolkit::BubbleEmitter New( const Vector2& winSize,
-                                     Texture shapeTexture,
-                                     unsigned int maximumNumberOfBubble,
-                                     const Vector2& bubbleSizeRange );
+  static Toolkit::BubbleEmitter New(const Vector2& winSize,
+                                    Texture        shapeTexture,
+                                    unsigned int   maximumNumberOfBubble,
+                                    const Vector2& bubbleSizeRange);
 
   /**
    * @copydoc Toolkit::BubbleEmitter::GetRootActor
@@ -72,27 +68,27 @@ public:
   /**
    * @copydoc Toolkit::BubbleEmitter::SetBackground
    */
-  void SetBackground( Texture bgTexture, const Vector3& hsvDelta );
+  void SetBackground(Texture bgTexture, const Vector3& hsvDelta);
 
   /**
    * @copydoc Toolkit::BubbleEmitter::SetShape
    */
-  void SetBubbleShape( Texture shapeTexture );
+  void SetBubbleShape(Texture shapeTexture);
 
   /**
    * @copydoc Toolkit::BubbleEmiter::SetBubbleScale
    */
-  void SetBubbleScale( float scale );
+  void SetBubbleScale(float scale);
 
   /**
    * @copydoc Toolkit::BubbleEmitter::SetBubbleDensity
    */
-  void SetBubbleDensity( unsigned int density );
+  void SetBubbleDensity(unsigned int density);
 
   /**
    * @copydoc Toolkit::BubbleEmitter::EmitBubble
    */
-  void EmitBubble( Animation& animation, const Vector2& emitPosition, const Vector2& direction, const Vector2& displacement );
+  void EmitBubble(Animation& animation, const Vector2& emitPosition, const Vector2& direction, const Vector2& displacement);
 
   /**
    * @copydoc Toolkit::BubbleEmitter::Restore
@@ -100,7 +96,6 @@ public:
   void Restore();
 
 private:
-
   /**
    * Construct a new BubbleEmitter object.
    * @param[in] movementArea The size of the bubble moving area
@@ -108,10 +103,10 @@ private:
    * @param[in] maximumNumberOfBubble The maximum number of bubble needed.
    * @param[in] bubbleSizeRange The size range of the bubbles; x component is the minimal size, and y component is the maximum size.
    */
-  BubbleEmitter( const Vector2& movementArea,
-                 Texture shapeTexture,
-                 unsigned int maximumNumberOfBubble,
-                 const Vector2& bubbleSizeRange );
+  BubbleEmitter(const Vector2& movementArea,
+                Texture        shapeTexture,
+                unsigned int   maximumNumberOfBubble,
+                const Vector2& bubbleSizeRange);
 
   /**
    * This method is called after the CubeTransitionEffect has been initialized.
@@ -124,7 +119,7 @@ private:
    * @param[in] numOfPatch The triangle number in the mesh is 2*numOfPatch; two triangles for each bubble.
    * @return The mesh geometry.
    */
-  Geometry CreateGeometry( unsigned int numOfPatch );
+  Geometry CreateGeometry(unsigned int numOfPatch);
 
   /**
    * Callback function of the finished signal of off-screen render task.
@@ -145,35 +140,32 @@ private:
    * @param[in] direction The direction used to constrain the bubble to move in an adjacent direction around it.
    * @param[in] displacement The displacement used to bound the moving distance of the bubble.
    */
-  void SetBubbleParameter( BubbleRenderer& bubbleRenderer, unsigned int curUniform,
-                           const Vector2& emitPosition, const Vector2& direction, const Vector2& displacement );
+  void SetBubbleParameter(BubbleRenderer& bubbleRenderer, unsigned int curUniform, const Vector2& emitPosition, const Vector2& direction, const Vector2& displacement);
 
 private:
-
-  Actor                       mBubbleRoot;          ///<The bubble root actor. Need to add it to stage to get the bubbles rendered.
-  Texture                     mShapeTexture;        ///< The alpha channnel of this texture defines the bubble shape.
-  Texture                     mBackgroundTexture;   ///< The original background texture
-  Texture                     mEffectTexture;       ///< Texture which stores the adjusted color of the background image.The bubbles pick color from this image.
-  FrameBuffer                 mFrameBuffer;         ///< FrameBuffer used for offscreen rendering
-  CameraActor                 mCameraActor;         ///< The render task views the scene from the perspective of this actor.
-
-  Geometry                    mMeshGeometry;         ///< The mesh geometry which contains the vertices and indices data
-  TextureSet                  mTextureSet;           ///< The texture set which controls the bubble display
-  std::vector<BubbleRenderer> mBubbleRenderers;      ///< The BubbleRenderer vector, its size is mNumShader.
-
-  Vector2                     mMovementArea;        ///< The size of the bubble moving area, usually the same size as the background.
-  Vector2                     mBubbleSizeRange;     ///< The size range of the bubbles; x component is the low bound, and y component is the up bound.
-  Vector3                     mHSVDelta;            ///< The HSV difference used to adjust the background image color.
-
-  unsigned int                mNumBubblePerRenderer;   ///< How many bubbles for each BubbleRenderer.
-  unsigned int                mNumRenderer;            ///< How many BubbleRenderers are used.
-  unsigned int                mDensity;             ///< How many bubbles will emit at each time, they are controlled by same uniforms in the shader.
-  unsigned int                mTotalNumOfBubble;    ///< mNumBubblePerShader*mNumShader.
-  unsigned int                mCurrentBubble;       ///< Keep track of the index for the newly emitted bubble
-  unsigned int                mRandomSeed;          ///< Seed to generate random number.
-
-  bool                        mRenderTaskRunning;   ///< If the background render task is currently running
-
+  Actor       mBubbleRoot;        ///<The bubble root actor. Need to add it to stage to get the bubbles rendered.
+  Texture     mShapeTexture;      ///< The alpha channnel of this texture defines the bubble shape.
+  Texture     mBackgroundTexture; ///< The original background texture
+  Texture     mEffectTexture;     ///< Texture which stores the adjusted color of the background image.The bubbles pick color from this image.
+  FrameBuffer mFrameBuffer;       ///< FrameBuffer used for offscreen rendering
+  CameraActor mCameraActor;       ///< The render task views the scene from the perspective of this actor.
+
+  Geometry                    mMeshGeometry;    ///< The mesh geometry which contains the vertices and indices data
+  TextureSet                  mTextureSet;      ///< The texture set which controls the bubble display
+  std::vector<BubbleRenderer> mBubbleRenderers; ///< The BubbleRenderer vector, its size is mNumShader.
+
+  Vector2 mMovementArea;    ///< The size of the bubble moving area, usually the same size as the background.
+  Vector2 mBubbleSizeRange; ///< The size range of the bubbles; x component is the low bound, and y component is the up bound.
+  Vector3 mHSVDelta;        ///< The HSV difference used to adjust the background image color.
+
+  unsigned int mNumBubblePerRenderer; ///< How many bubbles for each BubbleRenderer.
+  unsigned int mNumRenderer;          ///< How many BubbleRenderers are used.
+  unsigned int mDensity;              ///< How many bubbles will emit at each time, they are controlled by same uniforms in the shader.
+  unsigned int mTotalNumOfBubble;     ///< mNumBubblePerShader*mNumShader.
+  unsigned int mCurrentBubble;        ///< Keep track of the index for the newly emitted bubble
+  unsigned int mRandomSeed;           ///< Seed to generate random number.
+
+  bool mRenderTaskRunning; ///< If the background render task is currently running
 };
 
 } // namespace Internal
index a1ae6a6..0a12fa7 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_BUBBLE_RENDERER_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * BubbleRenderer renders a group of bubbles.Each bubble can be moved separately.
  * Its custom shader achieves similar effect of particle system by applying on a specially created mesh
@@ -41,7 +38,6 @@ namespace Internal
 class BubbleRenderer
 {
 public:
-
   /**
    * Constructor   *
    * @return A newly allocated object.
@@ -51,7 +47,9 @@ public:
   /**
    * @brief Destructor
    */
-  ~BubbleRenderer(){}
+  ~BubbleRenderer()
+  {
+  }
 
   /**
    * Prepare for the rendering: create the renderer, and register properties
@@ -65,7 +63,7 @@ public:
    * @param[in] textureSet The texture set to be used by the renderer
    * @param[in] shader The shader set to be used by the renderer
    */
-  void Initialize( unsigned int numberOfBubble, const Vector2& movementArea, Geometry geometry, TextureSet textureSet, Shader shader  );
+  void Initialize(unsigned int numberOfBubble, const Vector2& movementArea, Geometry geometry, TextureSet textureSet, Shader shader);
 
   /**
    * Return the mesh actor which is used to display the bubbles
@@ -76,14 +74,14 @@ public:
    * Sets the geometry to be used by the renderer
    * @param[in] geometry The geometry to be used by the renderer
    */
-  void SetGeometry( Geometry geometry );
+  void SetGeometry(Geometry geometry);
 
   /**
    * Set the start and end positions of the index-th bubble's movement.
    * @param[in] index Indicate which bubble these properties are applied on.
    * @param[in] startAndEndPosition The start and the end position of movement.
    */
-  void SetStartAndEndPosition( unsigned int index, const Vector4& startAndEndPosition );
+  void SetStartAndEndPosition(unsigned int index, const Vector4& startAndEndPosition);
 
   /**
    * Set the movement completed percentage of the index-th bubble.
@@ -93,26 +91,26 @@ public:
    * @param[in] index Indicate which bubble this property is applied on.
    * @param[in] percentage Set the percentage property value ( between zero and one ).
    */
-  void SetPercentage( unsigned int index, float percentage );
+  void SetPercentage(unsigned int index, float percentage);
 
   /**
    * Set the gravity applied to the y direction, which makes the bubbles no longer moving on a straight line.
    * @param[in] gravity The gravity on the y direction.
    */
-  void SetGravity( float gravity );
+  void SetGravity(float gravity);
 
   /**
    * Set the scale factor applied to the bubbles
    * @param[in] scale The scale factor applied on all bubbles.
    */
-  void SetDynamicScale( float scale );
+  void SetDynamicScale(float scale);
 
   /**
    * Get the idx-th percentage property.
    * @param[in] idx The percentage property index.
    * @return the idx-th percentage property.
    */
-  Property GetPercentageProperty( unsigned int idx );
+  Property GetPercentageProperty(unsigned int idx);
 
   /**
    * Reset the uniform values to default.
@@ -120,8 +118,7 @@ public:
   void ResetProperties();
 
 private:
-
-  Renderer     mRenderer;
+  Renderer mRenderer;
 
   //properties mapped as uniforms
   std::vector<Property::Index> mIndicesOffset;             ///< Indices of the properties mapping to uniform array 'uOffset'
index ffcce3a..3f1afb8 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_COLOR_ADJUSTER_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/object/property-map.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/visuals/visual-properties.h>
 #include <dali-toolkit/internal/graphics/builtin-shader-extern-gen.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
-inline void SetColorAdjusterProperties( Actor& actor, const Vector3& hsvDelta, bool ignoreAlpha = false )
+inline void SetColorAdjusterProperties(Actor& actor, const Vector3& hsvDelta, bool ignoreAlpha = false)
 {
-  actor.RegisterProperty( "uHSVDelta", hsvDelta );
-  actor.RegisterProperty( "uIgnoreAlpha", ignoreAlpha ? 1.f : 0.f );
+  actor.RegisterProperty("uHSVDelta", hsvDelta);
+  actor.RegisterProperty("uIgnoreAlpha", ignoreAlpha ? 1.f : 0.f);
 }
 
 /**
@@ -51,10 +48,10 @@ inline void SetColorAdjusterProperties( Actor& actor, const Vector3& hsvDelta, b
 inline Property::Map CreateColorAdjuster()
 {
   Property::Map customShader;
-  customShader[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = SHADER_BUBBLE_EFFECT_COLOR_ADJUSTER_FRAG.data();
+  customShader[Toolkit::Visual::Shader::Property::FRAGMENT_SHADER] = SHADER_BUBBLE_EFFECT_COLOR_ADJUSTER_FRAG.data();
 
   Property::Map map;
-  map[ Toolkit::Visual::Property::SHADER ] = customShader;
+  map[Toolkit::Visual::Property::SHADER] = customShader;
 
   return map;
 }
index ebe34e0..315e4c5 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_BUTTON_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/animation/animation.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/visual-factory/visual-base.h>
 #include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
-#include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali-toolkit/devel-api/visual-factory/visual-base.h>
 #include <dali-toolkit/internal/controls/control/control-data-impl.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 class Button;
 
 namespace Internal
 {
-
 /**
  * @copydoc Toolkit::Button
  *
@@ -53,27 +50,24 @@ namespace Internal
  */
 class Button : public Control
 {
-
 public:
-
   /**
    * Enum describing the position the text label can be in relation to the control (and foreground/icon)
    */
   enum Align
   {
-    BEGIN,  // At the start of the control before the foreground/icon
-    END,    // At the end of the control after the foreground/icon
-    TOP,    // At the top of the control above the foreground/icon
-    BOTTOM  // At the bottom of the control below the foreground/icon
+    BEGIN, // At the start of the control before the foreground/icon
+    END,   // At the end of the control after the foreground/icon
+    TOP,   // At the top of the control above the foreground/icon
+    BOTTOM // At the bottom of the control below the foreground/icon
   };
 
 public:
-
   /**
    * @brief Sets the button as \e disabled.
    * @param[in] disabled Disabled property
    */
-  void SetDisabled( bool disabled );
+  void SetDisabled(bool disabled);
 
   /**
    * @brief Returns if the button is disabled.
@@ -85,31 +79,31 @@ public:
    * @brief Sets the \e autorepeating property.
    * @param[in] autoRepeating \e autorepeating property
    */
-  void SetAutoRepeating( bool autoRepeating );
+  void SetAutoRepeating(bool autoRepeating);
 
   /**
    * @brief Sets the initial autorepeating delay.
    * @param[in] initialAutoRepeatingDelay in seconds
    */
-  void SetInitialAutoRepeatingDelay( float initialAutoRepeatingDelay );
+  void SetInitialAutoRepeatingDelay(float initialAutoRepeatingDelay);
 
   /**
    * @brief Sets the next autorepeating delay.
    * @param[in] nextAutoRepeatingDelay in seconds
    */
-  void SetNextAutoRepeatingDelay( float nextAutoRepeatingDelay );
+  void SetNextAutoRepeatingDelay(float nextAutoRepeatingDelay);
 
   /**
    * @brief Sets the \e togglable property.
    * @param[in] togglable Togglable property
    */
-  void SetTogglableButton( bool togglable );
+  void SetTogglableButton(bool togglable);
 
   /**
    * @brief Sets the button as selected or unselected.
    * @param[in] selected Selected property
    */
-  void SetSelected( bool selected );
+  void SetSelected(bool selected);
 
   /**
    * @brief Returns if the selected property is set and the button is togglable.
@@ -124,7 +118,7 @@ public:
    * @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 after merging inMap with existing maps
    */
-  void MergeWithExistingLabelProperties( const Property::Map& inMap, Property::Map& outMap );
+  void MergeWithExistingLabelProperties(const Property::Map& inMap, Property::Map& outMap);
 
   /**
    * Performs actions as requested using the action name.
@@ -133,20 +127,19 @@ public:
    * @param[in] attributes The attributes with which to perfrom this action.
    * @return true if action has been accepted by this control
    */
-  static bool DoAction( BaseObject* object, const std::string& actionName, const Property::Map& attributes );
+  static bool DoAction(BaseObject* object, const std::string& actionName, const Property::Map& attributes);
 
 public:
-
   /**
    * Button's state
    */
   enum State
   {
-    UNSELECTED_STATE,              ///< The button is unselected.
-    SELECTED_STATE,                ///< The button is selected.
-    DISABLED_UNSELECTED_STATE,     ///< The button is disabled and unselected.
-    DISABLED_SELECTED_STATE,       ///< The button is disabled and selected.
-    STATE_COUNT,                   ///< Number of States
+    UNSELECTED_STATE,          ///< The button is unselected.
+    SELECTED_STATE,            ///< The button is selected.
+    DISABLED_UNSELECTED_STATE, ///< The button is disabled and unselected.
+    DISABLED_SELECTED_STATE,   ///< The button is disabled and selected.
+    STATE_COUNT,               ///< Number of States
   };
 
   /**
@@ -176,16 +169,15 @@ public:
   };
 
 protected:
-
   /**
    * Button press state which is not the same as the actual button's state.
    * For example An UNSELECTED button can be DEPRESSED, but until released, the actual button state doesn't change to SELECTED
    */
   enum PressState
   {
-    DEPRESSED,                           ///< The button is up.
-    UNPRESSED,                           ///< The button is down.
-    TOGGLE_DEPRESSED,                    ///< The button has been pressed down and will stay depressed when released.
+    DEPRESSED,        ///< The button is up.
+    UNPRESSED,        ///< The button is down.
+    TOGGLE_DEPRESSED, ///< The button has been pressed down and will stay depressed when released.
   };
 
   /**
@@ -213,13 +205,12 @@ protected:
   Actor GetSelectedImage();
 
 private:
-
   /**
    * Perform the click action to click the button.
    * @param[in] attributes The attributes to perfrom this action.
    * @return true if this control can perform action.
    */
-  bool DoClickAction( const Property::Map& attributes );
+  bool DoClickAction(const Property::Map& attributes);
 
   /**
    * This method is called when the button is a Toggle button and released
@@ -243,25 +234,32 @@ private:
   /**
    * This method is called when the \e selected property is changed.
    */
-  virtual void OnStateChange( State newState ){}
+  virtual void OnStateChange(State newState)
+  {
+  }
 
   /**
    * This method is called when the \e disabled property is changed.
    */
-  virtual void OnDisabled() {}
+  virtual void OnDisabled()
+  {
+  }
 
   /**
    * This method is called when the button is pressed.
    */
-  virtual void OnPressed() {}
+  virtual void OnPressed()
+  {
+  }
 
   /**
    * This method is called when the button is released.
    */
-  virtual void OnReleased() {}
+  virtual void OnReleased()
+  {
+  }
 
 public:
-
   /**
    * @copydoc Dali::Toolkit::PushButton::PressedSignal()
    */
@@ -291,7 +289,7 @@ public:
    * @return True if the signal was connected.
    * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
    */
-  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
+  static bool DoConnectSignal(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor);
 
   // Properties
 
@@ -301,7 +299,7 @@ public:
    * @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 );
+  static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value);
 
   /**
    * Called to retrieve a property of an object of this type.
@@ -309,10 +307,9 @@ public:
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index propertyIndex );
+  static Property::Value GetProperty(BaseObject* object, Property::Index propertyIndex);
 
 protected: // From Control
-
   /**
    * @copydoc Toolkit::Control::OnInitialize()
    * @note If overridden by deriving button classes, then an up-call to Button::OnInitialize MUST be made at the start.
@@ -338,7 +335,7 @@ protected: // From Control
   /**
    * @copydoc Toolkit::Control::OnSceneConnection()
    */
-  void OnSceneConnection( int depth ) override;
+  void OnSceneConnection(int depth) override;
 
   /**
    * @copydoc Toolkit::Control::GetNaturalSize
@@ -348,22 +345,21 @@ protected: // From Control
   /**
    * @copydoc Toolkit::Control::OnSetResizePolicy
    */
-  void OnSetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension ) override;
+  void OnSetResizePolicy(ResizePolicy::Type policy, Dimension::Type dimension) override;
 
   /**
    * @copydoc Toolkit::Control::OnRelayout
    */
-  void OnRelayout( const Vector2& size, RelayoutContainer& container ) override;
+  void OnRelayout(const Vector2& size, RelayoutContainer& container) override;
 
 private:
-
   /**
    * @brief Handler for touch data
    * @param[in]  actor  The touched actor.
    * @param[in]  touch  The touch info.
    * @return true, if consumed, false otherwise.
    */
-  bool OnTouch( Actor actor, const TouchEvent& touch );
+  bool OnTouch(Actor actor, const TouchEvent& touch);
 
   /**
    * Handler for tap events.
@@ -379,7 +375,7 @@ private:
    * Sets up the autorepeating timer.
    * @param[in] delay The delay time in seconds.
    */
-  void SetUpTimer( float delay );
+  void SetUpTimer(float delay);
 
   /**
    * Button has been pressed
@@ -407,13 +403,13 @@ private:
    *  @param[in] requestedState check if can transition to this state
    *  @return bool true if state change valid
    */
-  bool ValidateState( State requestedState );
+  bool ValidateState(State requestedState);
 
   /**
    * Changes the button state when an action occurs on it
    * @param[in] requestedState the state to change to
    */
-  void ChangeState( State requestedState );
+  void ChangeState(State requestedState);
 
   /**
    * This method is called when the button is released.
@@ -421,12 +417,11 @@ private:
   void Released();
 
 protected:
-
   /**
    * Set Text Label Padding
    * @param[in] padding BEGIN END BOTTOM TOP
    */
-  void SetLabelPadding( const Padding& padding );
+  void SetLabelPadding(const Padding& padding);
 
   /**
    * Get Text Label padding
@@ -438,7 +433,7 @@ protected:
    * Set Foreground/icon Padding
    * @param[in] padding BEGIN END BOTTOM TOP
    */
-  void SetForegroundPadding( const Padding& padding);
+  void SetForegroundPadding(const Padding& padding);
 
   /**
    * Get Foreground padding
@@ -452,7 +447,7 @@ protected:
    * @param[in] value the value to set on the component
    * @param[in] visualDepth the depth of the visual if overlapping another
    */
-  void CreateVisualsForComponent( Property::Index index, const Property::Value& value, const int visualDepth );
+  void CreateVisualsForComponent(Property::Index index, const Property::Value& value, const int visualDepth);
 
   /**
    * @brief Get the Property map for the given Visual
@@ -460,7 +455,7 @@ protected:
    * @param[out] retreivedMap the property map used to construct the required visual
    * @return bool success flag, true if visual found
    */
-  bool GetPropertyMapForVisual( Property::Index visualIndex, Property::Map& retreivedMap ) const;
+  bool GetPropertyMapForVisual(Property::Index visualIndex, Property::Map& retreivedMap) const;
   /**
    * Returns the animation to be used for transition, creating the animation if needed.
    * @return The initialised transition animation.
@@ -471,7 +466,7 @@ protected:
    * @brief Set the position of the label relative to foreground/icon, if both present
    * @param[in] labelAlignment given alignment setting
    */
-  void SetLabelAlignment( Align labelAlignment);
+  void SetLabelAlignment(Align labelAlignment);
 
   /**
    * @brief Get set alignment of label in relation to foreground/icon
@@ -485,62 +480,59 @@ protected:
    * define the required behaviour.
    * Can decide to only remove specified visuals via index
    */
-  virtual void OnButtonVisualRemoval( Property::Index visualIndex );
-
+  virtual void OnButtonVisualRemoval(Property::Index visualIndex);
 
 private:
-
   /**
    * Removes the visual from the button and prepares it to be transitioned out
    * @param[in] visualIndex the visual to remove
    */
-  void RemoveVisual( Property::Index visualIndex );
+  void RemoveVisual(Property::Index visualIndex);
 
   /**
    * Adds the required visual to the button.
    * @param[in] visualIndex The Property index of the visual required
    */
-  void SelectRequiredVisual( Property::Index visualIndex );
+  void SelectRequiredVisual(Property::Index visualIndex);
 
   // Undefined
-  Button( const Button& );
+  Button(const Button&);
 
   // Undefined
-  Button& operator = ( const Button& );
+  Button& operator=(const Button&);
 
 private:
-
   // Signals
-  Toolkit::Button::ButtonSignalType mPressedSignal;           ///< Signal emitted when the button is pressed.
-  Toolkit::Button::ButtonSignalType mReleasedSignal;          ///< Signal emitted when the button is released.
-  Toolkit::Button::ButtonSignalType mClickedSignal;           ///< Signal emitted when the button is clicked.
-  Toolkit::Button::ButtonSignalType mStateChangedSignal;      ///< Signal emitted when the button's state is changed.
+  Toolkit::Button::ButtonSignalType mPressedSignal;      ///< Signal emitted when the button is pressed.
+  Toolkit::Button::ButtonSignalType mReleasedSignal;     ///< Signal emitted when the button is released.
+  Toolkit::Button::ButtonSignalType mClickedSignal;      ///< Signal emitted when the button is clicked.
+  Toolkit::Button::ButtonSignalType mStateChangedSignal; ///< Signal emitted when the button's state is changed.
 
-  Timer            mAutoRepeatingTimer;
+  Timer mAutoRepeatingTimer;
 
-  Actor            mLabel;                      ///< Stores the button text label.
-  Padding          mLabelPadding;               ///< The padding around the label (if present).
-  Padding          mForegroundPadding;          ///< The padding around the foreground/icon visual (if present).
+  Actor   mLabel;             ///< Stores the button text label.
+  Padding mLabelPadding;      ///< The padding around the label (if present).
+  Padding mForegroundPadding; ///< The padding around the foreground/icon visual (if present).
 
-  Align            mTextLabelAlignment;           ///< Position of text label in relation to foreground/icon when both are present.
+  Align mTextLabelAlignment; ///< Position of text label in relation to foreground/icon when both are present.
 
   TapGestureDetector mTapDetector;
 
-  bool             mAutoRepeating;              ///< Stores the autorepeating property.
-  bool             mTogglableButton;            ///< Stores the togglable property as a flag.
-  bool             mTextStringSetFlag;          ///< Stores if text has been set. Required in relayout but don't want to calculate there.
+  bool mAutoRepeating;     ///< Stores the autorepeating property.
+  bool mTogglableButton;   ///< Stores the togglable property as a flag.
+  bool mTextStringSetFlag; ///< Stores if text has been set. Required in relayout but don't want to calculate there.
 
-  float            mInitialAutoRepeatingDelay;  ///< Stores the initial autorepeating delay in seconds.
-  float            mNextAutoRepeatingDelay;     ///< Stores the next autorepeating delay in seconds.
+  float mInitialAutoRepeatingDelay; ///< Stores the initial autorepeating delay in seconds.
+  float mNextAutoRepeatingDelay;    ///< Stores the next autorepeating delay in seconds.
 
-  float            mAnimationTime;
+  float mAnimationTime;
 
-  PressState       mButtonPressedState;         ///< In relation to the button being pressed/released
-  State            mButtonState;
-  State            mPreviousButtonState;        ///< During a transition between two states, this stores the previous state so Visuals can be removed.
+  PressState mButtonPressedState; ///< In relation to the button being pressed/released
+  State      mButtonState;
+  State      mPreviousButtonState; ///< During a transition between two states, this stores the previous state so Visuals can be removed.
 
   // Actions
-  bool             mClickActionPerforming;      ///< Used to manage signal emissions during action
+  bool mClickActionPerforming; ///< Used to manage signal emissions during action
 
 protected:
   struct AccessibleImpl : public Control::Impl::AccessibleImpl
@@ -548,8 +540,8 @@ protected:
     using Control::Impl::AccessibleImpl::AccessibleImpl;
 
     Dali::Accessibility::States CalculateStates() override;
-    std::string GetNameRaw() override;
-    Property::Index GetNamePropertyIndex() override;
+    std::string                 GetNameRaw() override;
+    Property::Index             GetNamePropertyIndex() override;
   };
 };
 
@@ -557,22 +549,22 @@ protected:
 
 // Helpers for public-api forwarding methods
 
-inline Toolkit::Internal::Button& GetImplementation( Toolkit::Button& button )
+inline Toolkit::Internal::Button& GetImplementation(Toolkit::Button& button)
 {
-  DALI_ASSERT_ALWAYS( button );
+  DALI_ASSERT_ALWAYS(button);
 
   Dali::RefObject& handle = button.GetImplementation();
 
-  return static_cast<Toolkit::Internal::Button&>( handle );
+  return static_cast<Toolkit::Internal::Button&>(handle);
 }
 
-inline const Toolkit::Internal::Button& GetImplementation( const Toolkit::Button& button )
+inline const Toolkit::Internal::Button& GetImplementation(const Toolkit::Button& button)
 {
-  DALI_ASSERT_ALWAYS( button );
+  DALI_ASSERT_ALWAYS(button);
 
   const Dali::RefObject& handle = button.GetImplementation();
 
-  return static_cast<const Toolkit::Internal::Button&>( handle );
+  return static_cast<const Toolkit::Internal::Button&>(handle);
 }
 
 } // namespace Toolkit
index 531b53b..ffae507 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_CHECK_BOX_BUTTON_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * CheckBoxButton implementation class.
  *
@@ -43,7 +40,6 @@ namespace Internal
 class CheckBoxButton : public Button
 {
 public:
-
   /**
    * Create a new CheckBoxButton.
    * @return A smart-pointer to the newly allocated CheckBoxButton.
@@ -51,7 +47,6 @@ public:
   static Dali::Toolkit::CheckBoxButton New();
 
 private:
-
   /**
    * Construct a new CheckBoxButton.
    */
@@ -63,20 +58,18 @@ private:
   virtual ~CheckBoxButton();
 
 private: // From Button
-
-
   /**
    * @copydoc Toolkit::Internal::Button::OnInitialize
    */
   void OnInitialize() override;
 
 private:
-
   // Undefined
-  CheckBoxButton( const CheckBoxButton& );
+  CheckBoxButton(const CheckBoxButton&);
 
   // Undefined
-  CheckBoxButton& operator=( const CheckBoxButton& );
+  CheckBoxButton& operator=(const CheckBoxButton&);
+
 protected:
   struct AccessibleImpl : public Button::AccessibleImpl
   {
@@ -84,29 +77,29 @@ protected:
 
     Dali::Accessibility::States CalculateStates() override;
   };
-  void OnStateChange( State newState ) override;
+  void OnStateChange(State newState) override;
 };
 
 } // namespace Internal
 
 // Helpers for public-api forwarding methods
 
-inline Toolkit::Internal::CheckBoxButton& GetImplementation( Toolkit::CheckBoxButton& button )
+inline Toolkit::Internal::CheckBoxButton& GetImplementation(Toolkit::CheckBoxButton& button)
 {
-  DALI_ASSERT_ALWAYS( button );
+  DALI_ASSERT_ALWAYS(button);
 
   Dali::RefObject& handle = button.GetImplementation();
 
-  return static_cast<Toolkit::Internal::CheckBoxButton&>( handle );
+  return static_cast<Toolkit::Internal::CheckBoxButton&>(handle);
 }
 
-inline const Toolkit::Internal::CheckBoxButton& GetImplementation( const Toolkit::CheckBoxButton& button )
+inline const Toolkit::Internal::CheckBoxButton& GetImplementation(const Toolkit::CheckBoxButton& button)
 {
-  DALI_ASSERT_ALWAYS( button );
+  DALI_ASSERT_ALWAYS(button);
 
   const Dali::RefObject& handle = button.GetImplementation();
 
-  return static_cast<const Toolkit::Internal::CheckBoxButton&>( handle );
+  return static_cast<const Toolkit::Internal::CheckBoxButton&>(handle);
 }
 
 } // namespace Toolkit
index 1db13d5..6300fe2 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_PUSH_BUTTON_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * PushButton implementation class.
  *
@@ -42,7 +39,6 @@ namespace Internal
 class PushButton : public Button
 {
 public:
-
   /**
    * Create a new PushButton.
    * @return A smart-pointer to the newly allocated PushButton.
@@ -50,7 +46,6 @@ public:
   static Dali::Toolkit::PushButton New();
 
 protected:
-
   /**
    * Construct a new PushButton.
    */
@@ -62,7 +57,6 @@ protected:
   virtual ~PushButton();
 
 public:
-
   // Properties
 
   /**
@@ -83,7 +77,7 @@ public:
    * @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 );
+  static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value);
 
   /**
    * Called to retrieve a property of an object of this type.
@@ -91,23 +85,21 @@ public:
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index propertyIndex );
+  static Property::Value GetProperty(BaseObject* object, Property::Index propertyIndex);
 
 private: // From Button
-
   /**
    * @copydoc Toolkit::Internal::Button::OnInitialize
    */
   void OnInitialize() override;
 
 private:
-
   /**
    * @brief Sets the alignment mode to use to align the icon to the label.
    *
    * @param[in] iconAlignment The alignment mode to use
    */
-  void SetIconAlignment( const PushButton::IconAlignment iconAlignment );
+  void SetIconAlignment(const PushButton::IconAlignment iconAlignment);
 
   /**
    * @brief Gets the alignment mode used to align the icon to the label.
@@ -117,16 +109,14 @@ private:
   const PushButton::IconAlignment GetIconAlignment() const;
 
 private:
-
   // Undefined
-  PushButton( const PushButton& );
+  PushButton(const PushButton&);
 
   // Undefined
-  PushButton& operator=( const PushButton& );
+  PushButton& operator=(const PushButton&);
 
 private:
-
-  IconAlignment  mIconAlignment;                 ///< The alignment of the icon against the label.
+  IconAlignment mIconAlignment; ///< The alignment of the icon against the label.
 
 protected:
   struct AccessibleImpl : public Button::AccessibleImpl
@@ -135,29 +125,29 @@ protected:
 
     Dali::Accessibility::States CalculateStates() override;
   };
-  void OnStateChange( State newState ) override;
+  void OnStateChange(State newState) override;
 };
 
 } // namespace Internal
 
 // Helpers for public-api forwarding methods
 
-inline Toolkit::Internal::PushButton& GetImplementation( Toolkit::PushButton& button )
+inline Toolkit::Internal::PushButton& GetImplementation(Toolkit::PushButton& button)
 {
-  DALI_ASSERT_ALWAYS( button );
+  DALI_ASSERT_ALWAYS(button);
 
   Dali::RefObject& handle = button.GetImplementation();
 
-  return static_cast<Toolkit::Internal::PushButton&>( handle );
+  return static_cast<Toolkit::Internal::PushButton&>(handle);
 }
 
-inline const Toolkit::Internal::PushButton& GetImplementation( const Toolkit::PushButton& button )
+inline const Toolkit::Internal::PushButton& GetImplementation(const Toolkit::PushButton& button)
 {
-  DALI_ASSERT_ALWAYS( button );
+  DALI_ASSERT_ALWAYS(button);
 
   const Dali::RefObject& handle = button.GetImplementation();
 
-  return static_cast<const Toolkit::Internal::PushButton&>( handle );
+  return static_cast<const Toolkit::Internal::PushButton&>(handle);
 }
 
 } // namespace Toolkit
index 075f8bd..b172750 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_RADIO_BUTTON_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -22,8 +22,8 @@
 #include <dali/public-api/common/dali-vector.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/buttons/radio-button.h>
 #include <dali-toolkit/devel-api/controls/table-view/table-view.h>
+#include <dali-toolkit/public-api/controls/buttons/radio-button.h>
 #include "button-impl.h"
 
 namespace Dali
@@ -32,16 +32,14 @@ namespace Toolkit
 {
 namespace Internal
 {
-
 /**
  * RadioButton implementation class.
  *
  * \sa Dali::Toolkit::RadioButton
  */
-class RadioButton: public Button
+class RadioButton : public Button
 {
 public:
-
   /**
    * Create a new RadioButton.
    *
@@ -50,7 +48,6 @@ public:
   static Dali::Toolkit::RadioButton New();
 
 private:
-
   /**
    * Construct a new RadioButton.
    */
@@ -62,7 +59,6 @@ private:
   virtual ~RadioButton();
 
 private: // From Button
-
   /**
    * @copydoc Toolkit::Internal::Button::OnInitialize
    */
@@ -71,7 +67,7 @@ private: // From Button
   /**
    * @copydoc Toolkit::Internal::Button::OnStateChange
    */
-  void OnStateChange( State newState ) override;
+  void OnStateChange(State newState) override;
 
   /**
    * @copydoc Toolkit::Internal::Button::OnToggleReleased
@@ -79,12 +75,11 @@ private: // From Button
   bool OnToggleReleased() override;
 
 private:
-
   // Undefined
-  RadioButton( const RadioButton& origin );
+  RadioButton(const RadioButton& origin);
 
   // Undefined
-  RadioButton& operator=( const RadioButton& origin );
+  RadioButton& operator=(const RadioButton& origin);
 
 protected:
   struct AccessibleImpl : public Button::AccessibleImpl
@@ -105,7 +100,7 @@ inline Toolkit::Internal::RadioButton& GetImplementation(Toolkit::RadioButton& b
 
   Dali::RefObject& handle = button.GetImplementation();
 
-  return static_cast<Toolkit::Internal::RadioButton&> (handle);
+  return static_cast<Toolkit::Internal::RadioButton&>(handle);
 }
 
 inline const Toolkit::Internal::RadioButton& GetImplementation(const Toolkit::RadioButton& button)
@@ -114,7 +109,7 @@ inline const Toolkit::Internal::RadioButton& GetImplementation(const Toolkit::Ra
 
   const Dali::RefObject& handle = button.GetImplementation();
 
-  return static_cast<const Toolkit::Internal::RadioButton&> (handle);
+  return static_cast<const Toolkit::Internal::RadioButton&>(handle);
 }
 
 } // namespace Toolkit
index a3bb83a..322285b 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_TOGGLE_BUTTON_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics 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,9 +20,8 @@
 
 // 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>
-
+#include <dali/public-api/object/property-value.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/controls/buttons/toggle-button.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * ToggleButton implementation class.
  *
@@ -45,7 +41,6 @@ namespace Internal
 class ToggleButton : public Button
 {
 public:
-
   /**
    * Create a new ToggleButton.
    * @return A smart-pointer to the newly allocated ToggleButton.
@@ -53,7 +48,6 @@ public:
   static Dali::Toolkit::ToggleButton New();
 
 protected:
-
   /**
    * Construct a new ToggleButton.
    */
@@ -65,14 +59,13 @@ protected:
   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 );
+  static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value);
 
   /**
    * Called to retrieve a property of an object of this type.
@@ -80,22 +73,21 @@ public:
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index propertyIndex );
+  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 );
+  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 );
+  void SetToggleStates(const Property::Array& states);
 
   /**
    * Called to retrieve toggle states.
@@ -107,7 +99,7 @@ private:
    * 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 );
+  void SetToggleTooltips(std::vector<std::string>& tips);
 
   /**
    * Called to retrieve toggle tips.
@@ -127,10 +119,9 @@ private:
    * @param[in] index The index of visual to relayout.
    * @param[in] size The size of control.
    */
-  void RelayoutVisual( Property::Index index, const Vector2& size );
+  void RelayoutVisual(Property::Index index, const Vector2& size);
 
 private: // From Button
-
   /**
    * @copydoc Toolkit::Internal::Button::OnInitialize
    */
@@ -139,7 +130,7 @@ private: // From Button
   /**
    * @copydoc Toolkit::Internal::Button::OnRelayout
    */
-  void OnRelayout( const Vector2& size, RelayoutContainer& container ) override;
+  void OnRelayout(const Vector2& size, RelayoutContainer& container) override;
 
   /**
    * This method is called when the button is pressed.
@@ -147,54 +138,52 @@ private: // From Button
   void OnPressed() override;
 
 private:
-
   // Undefined
-  ToggleButton( const ToggleButton& );
+  ToggleButton(const ToggleButton&);
 
   // Undefined
-  ToggleButton& operator=( const ToggleButton& );
+  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.
+  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.
 protected:
   struct AccessibleImpl : public Button::AccessibleImpl
   {
     using Button::AccessibleImpl::AccessibleImpl;
 
     Dali::Accessibility::States CalculateStates() override;
-    std::string GetDescriptionRaw() override;
-    Property::Index GetDescriptionPropertyIndex() override;
+    std::string                 GetDescriptionRaw() override;
+    Property::Index             GetDescriptionPropertyIndex() override;
   };
-  void OnStateChange( State newState ) override;
+  void OnStateChange(State newState) override;
 };
 
 } // namespace Internal
 
 // Helpers for public-api forwarding methods
 
-inline Toolkit::Internal::ToggleButton& GetImplementation( Toolkit::ToggleButton& button )
+inline Toolkit::Internal::ToggleButton& GetImplementation(Toolkit::ToggleButton& button)
 {
-  DALI_ASSERT_ALWAYS( button );
+  DALI_ASSERT_ALWAYS(button);
 
   Dali::RefObject& handle = button.GetImplementation();
 
-  return static_cast<Toolkit::Internal::ToggleButton&>( handle );
+  return static_cast<Toolkit::Internal::ToggleButton&>(handle);
 }
 
-inline const Toolkit::Internal::ToggleButton& GetImplementation( const Toolkit::ToggleButton& button )
+inline const Toolkit::Internal::ToggleButton& GetImplementation(const Toolkit::ToggleButton& button)
 {
-  DALI_ASSERT_ALWAYS( button );
+  DALI_ASSERT_ALWAYS(button);
 
   const Dali::RefObject& handle = button.GetImplementation();
 
-  return static_cast<const Toolkit::Internal::ToggleButton&>( handle );
+  return static_cast<const Toolkit::Internal::ToggleButton&>(handle);
 }
 
 } // namespace Toolkit
old mode 100755 (executable)
new mode 100644 (file)
index aa16060..d944114
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_CONTROL_DATA_IMPL_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/object/type-registry.h>
-#include <dali/public-api/object/property-notification.h>
 #include <dali-toolkit/devel-api/controls/control-devel.h>
 #include <dali/devel-api/adaptor-framework/accessibility.h>
+#include <dali/public-api/object/property-notification.h>
+#include <dali/public-api/object/type-registry.h>
 #include <string>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/internal/visuals/visual-event-observer.h>
-#include <dali-toolkit/public-api/controls/control-impl.h>
-#include <dali/devel-api/common/owner-container.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-base.h>
 #include <dali-toolkit/internal/builder/dictionary.h>
 #include <dali-toolkit/internal/builder/style.h>
 #include <dali-toolkit/internal/controls/tooltip/tooltip.h>
+#include <dali-toolkit/internal/visuals/visual-event-observer.h>
 #include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/public-api/visuals/visual-properties.h>
 #include <dali/devel-api/common/owner-container.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
- /**
+/**
   * Struct used to store Visual within the control, index is a unique key for each visual.
   */
 struct RegisteredVisual
 {
-  Property::Index index;
+  Property::Index       index;
   Toolkit::Visual::Base visual;
-  bool enabled : 1;
-  bool pending : 1;
-
-  RegisteredVisual( Property::Index aIndex, Toolkit::Visual::Base &aVisual, bool aEnabled, bool aPendingReplacement )
-  : index(aIndex), visual(aVisual), enabled(aEnabled), pending( aPendingReplacement )
+  bool                  enabled : 1;
+  bool                  pending : 1;
+
+  RegisteredVisual(Property::Index aIndex, Toolkit::Visual::Base& aVisual, bool aEnabled, bool aPendingReplacement)
+  : index(aIndex),
+    visual(aVisual),
+    enabled(aEnabled),
+    pending(aPendingReplacement)
   {
   }
 };
 
-typedef Dali::OwnerContainer< RegisteredVisual* > RegisteredVisualContainer;
-
+typedef Dali::OwnerContainer<RegisteredVisual*> RegisteredVisualContainer;
 
 /**
  * @brief Holds the Implementation for the internal control class
  */
 class Control::Impl : public ConnectionTracker, public Visual::EventObserver
 {
-
 public:
-
   /**
    * @brief Retrieves the implementation of the internal control class.
    * @param[in] internalControl A ref to the control whose internal implementation is required
    * @return The internal implementation
    */
-  static Control::Impl& Get( Internal::Control& internalControl );
+  static Control::Impl& Get(Internal::Control& internalControl);
 
   /**
    * @copydoc Get( Internal::Control& )
    */
-  static const Control::Impl& Get( const Internal::Control& internalControl );
+  static const Control::Impl& Get(const Internal::Control& internalControl);
 
   /**
    * @brief Constructor.
    * @param[in] controlImpl The control which owns this implementation
    */
-  Impl( Control& controlImpl );
+  Impl(Control& controlImpl);
 
   /**
    * @brief Destructor.
@@ -131,7 +126,7 @@ public:
    * @param[in] object The visual whose resources are ready
    * @note Overriding method in Visual::EventObserver.
    */
-  void ResourceReady( Visual::Base& object ) override;
+  void ResourceReady(Visual::Base& object) override;
 
   /**
    * @brief Called when an event occurs.
@@ -139,64 +134,64 @@ public:
    * @param[in] signalId The signal to emit. See Visual to find supported signals
    * @note Overriding method in Visual::EventObserver.
    */
-  void NotifyVisualEvent( Visual::Base& object, Property::Index signalId ) override;
+  void NotifyVisualEvent(Visual::Base& object, Property::Index signalId) override;
 
   /**
    * @copydoc Dali::Toolkit::DevelControl::RegisterVisual()
    */
-  void RegisterVisual( Property::Index index, Toolkit::Visual::Base& visual );
+  void RegisterVisual(Property::Index index, Toolkit::Visual::Base& visual);
 
   /**
    * @copydoc Dali::Toolkit::DevelControl::RegisterVisual()
    */
-  void RegisterVisual( Property::Index index, Toolkit::Visual::Base& visual, int depthIndex );
+  void RegisterVisual(Property::Index index, Toolkit::Visual::Base& visual, int depthIndex);
 
   /**
    * @copydoc Dali::Toolkit::DevelControl::RegisterVisual()
    */
-  void RegisterVisual( Property::Index index, Toolkit::Visual::Base& visual, bool enabled );
+  void RegisterVisual(Property::Index index, Toolkit::Visual::Base& visual, bool enabled);
 
   /**
    * @copydoc Dali::Toolkit::DevelControl::RegisterVisual()
    */
-  void RegisterVisual( Property::Index index, Toolkit::Visual::Base& visual, bool enabled, int depthIndex );
+  void RegisterVisual(Property::Index index, Toolkit::Visual::Base& visual, bool enabled, int depthIndex);
 
   /**
    * @copydoc Dali::Toolkit::DevelControl::UnregisterVisual()
    */
-  void UnregisterVisual( Property::Index index );
+  void UnregisterVisual(Property::Index index);
 
   /**
    * @copydoc Dali::Toolkit::DevelControl::GetVisual()
    */
-  Toolkit::Visual::Base GetVisual( Property::Index index ) const;
+  Toolkit::Visual::Base GetVisual(Property::Index index) const;
 
   /**
    * @copydoc Dali::Toolkit::DevelControl::EnableVisual()
    */
-  void EnableVisual( Property::Index index, bool enable );
+  void EnableVisual(Property::Index index, bool enable);
 
   /**
    * @copydoc Dali::Toolkit::DevelControl::IsVisualEnabled()
    */
-  bool IsVisualEnabled( Property::Index index ) const;
+  bool IsVisualEnabled(Property::Index index) const;
 
   /**
    * @brief Stops observing the given visual.
    * @param[in] visual The visual to stop observing
    */
-  void StopObservingVisual( Toolkit::Visual::Base& visual );
+  void StopObservingVisual(Toolkit::Visual::Base& visual);
 
   /**
    * @brief Starts observing the given visual.
    * @param[in] visual The visual to start observing
    */
-  void StartObservingVisual( Toolkit::Visual::Base& visual);
+  void StartObservingVisual(Toolkit::Visual::Base& visual);
 
   /**
    * @copydoc Dali::Toolkit::DevelControl::GetVisualResourceStatus()
    */
-  Toolkit::Visual::ResourceStatus GetVisualResourceStatus( Property::Index index ) const;
+  Toolkit::Visual::ResourceStatus GetVisualResourceStatus(Property::Index index) const;
 
   /**
    * @param[in,out] animation Handle to existing animation, or an empty handle that
@@ -204,19 +199,19 @@ public:
    * @param[in] transitionData The transition data describing the animation
    * @param[in] createAnimation True if the animation should be created
    */
-  void AddTransitions( Dali::Animation& animation,
-                       const Toolkit::TransitionData& transitionData,
-                       bool createAnimation = false );
+  void AddTransitions(Dali::Animation&               animation,
+                      const Toolkit::TransitionData& transitionData,
+                      bool                           createAnimation = false);
 
   /**
    * @copydoc Dali::Toolkit::DevelControl::CreateTransition()
    */
-  Dali::Animation CreateTransition( const Toolkit::TransitionData& transitionData );
+  Dali::Animation CreateTransition(const Toolkit::TransitionData& transitionData);
 
   /**
    * @copydoc Dali::Toolkit::DevelControl::DoAction()
    */
-  void DoAction( Dali::Property::Index visualIndex, Dali::Property::Index actionId, const Dali::Property::Value attributes );
+  void DoAction(Dali::Property::Index visualIndex, Dali::Property::Index actionId, const Dali::Property::Value attributes);
 
   /**
    * @brief Function used to set control properties.
@@ -224,7 +219,7 @@ public:
    * @param[in] index The index of the property to set
    * @param[in] value The value of the property to set
    */
-  static void SetProperty( BaseObject* object, Property::Index index, const Property::Value& value );
+  static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value);
 
   /**
    * @brief Function used to retrieve the value of control properties.
@@ -232,21 +227,21 @@ public:
    * @param[in] index The index of the property to get
    * @return The value of the property
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index index );
+  static Property::Value GetProperty(BaseObject* object, Property::Index index);
 
   /**
    * @brief Sets the state of the control.
    * @param[in] newState The state to set
    * @param[in] withTransitions Whether to show a transition when changing to the new state
    */
-  void SetState( DevelControl::State newState, bool withTransitions=true );
+  void SetState(DevelControl::State newState, bool withTransitions = true);
 
   /**
    * @brief Sets the sub-state of the control.
    * @param[in] newState The sub-state to set
    * @param[in] withTransitions Whether to show a transition when changing to the new sub-state
    */
-  void SetSubState( const std::string& subStateName, bool withTransitions=true );
+  void SetSubState(const std::string& subStateName, bool withTransitions = true);
 
   /**
    * @brief Replaces visuals and properties from the old state to the new state.
@@ -254,28 +249,28 @@ public:
    * @param[in] newState The new state
    * @param[in] subState The current sub state
    */
-  void ReplaceStateVisualsAndProperties( const StylePtr oldState, const StylePtr newState, const std::string& subState );
+  void ReplaceStateVisualsAndProperties(const StylePtr oldState, const StylePtr newState, const std::string& subState);
 
   /**
    * @brief Removes a visual from the control's container.
    * @param[in] visuals The container of visuals
    * @param[in] visualName The name of the visual to remove
    */
-  void RemoveVisual( RegisteredVisualContainer& visuals, const std::string& visualName );
+  void RemoveVisual(RegisteredVisualContainer& visuals, const std::string& visualName);
 
   /**
    * @brief Removes several visuals from the control's container.
    * @param[in] visuals The container of visuals
    * @param[in] removeVisuals The visuals to remove
    */
-  void RemoveVisuals( RegisteredVisualContainer& visuals, DictionaryKeys& removeVisuals );
+  void RemoveVisuals(RegisteredVisualContainer& visuals, DictionaryKeys& removeVisuals);
 
   /**
    * @brief Copies the visual properties that are specific to the control instance into the instancedProperties container.
    * @param[in] visuals The control's visual container
    * @param[out] instancedProperties The instanced properties are added to this container
    */
-  void CopyInstancedProperties( RegisteredVisualContainer& visuals, Dictionary<Property::Map>& instancedProperties );
+  void CopyInstancedProperties(RegisteredVisualContainer& visuals, Dictionary<Property::Map>& instancedProperties);
 
   /**
    * @brief On state change, ensures visuals are moved or created appropriately.
@@ -287,7 +282,7 @@ public:
    * @param[in] stateVisualsToChange The visuals to change
    * @param[in] instancedProperties The instanced properties @see CopyInstancedProperties
    */
-  void RecreateChangedVisuals( Dictionary<Property::Map>& stateVisualsToChange, Dictionary<Property::Map>& instancedProperties );
+  void RecreateChangedVisuals(Dictionary<Property::Map>& stateVisualsToChange, Dictionary<Property::Map>& instancedProperties);
 
   /**
    * @brief Whether the resource is ready
@@ -304,7 +299,7 @@ public:
    * @brief Sets the margin.
    * @param[in] margin Margin is a collections of extent ( start, end, top, bottom )
    */
-  void SetMargin( Extents margin );
+  void SetMargin(Extents margin);
 
   /**
    * @brief Returns the value of margin
@@ -316,7 +311,7 @@ public:
    * @brief Sets the padding.
    * @param[in] padding Padding is a collections of extent ( start, end, top, bottom ).
    */
-  void SetPadding( Extents padding );
+  void SetPadding(Extents padding);
 
   /**
    * @brief Returns the value of padding
@@ -328,14 +323,14 @@ public:
    * @brief Set the input method context.
    * @param[in] inputMethodContext The input method context.
    */
-  void SetInputMethodContext( InputMethodContext& inputMethodContext );
+  void SetInputMethodContext(InputMethodContext& inputMethodContext);
 
   /**
    * @brief Filter an key event.
    * @param[in] event The key to be filtered.
    * @return True if the key handled, otherwise false.
    */
-  bool FilterKeyEvent( const KeyEvent& event );
+  bool FilterKeyEvent(const KeyEvent& event);
 
   /**
    * @brief Adds accessibility attribute
@@ -345,8 +340,8 @@ public:
    * Attribute is added if not existed previously or updated
    * if existed.
    */
-  void AppendAccessibilityAttribute( const std::string& key,
-                                  const std::string value );
+  void AppendAccessibilityAttribute(const std::string& key,
+                                    const std::string  value);
 
   /**
    * @brief Removes accessibility attribute
@@ -354,7 +349,7 @@ public:
    *
    * Function does nothing if attribute doesn't exist.
    */
-  void RemoveAccessibilityAttribute( const std::string& key );
+  void RemoveAccessibilityAttribute(const std::string& key);
 
   /**
    * @brief Removes all accessibility attributes
@@ -368,7 +363,7 @@ public:
    * This function sets, which part of object will be read out
    * by screen-reader.
    */
-  void SetAccessibilityReadingInfoType( const Dali::Accessibility::ReadingInfoTypes types );
+  void SetAccessibilityReadingInfoType(const Dali::Accessibility::ReadingInfoTypes types);
 
   /**
    * @brief Gets currently active reading info type attributes
@@ -397,7 +392,6 @@ public:
   Dali::Property GetVisualProperty(Dali::Property::Index index, Dali::Property::Key visualPropertyKey);
 
 private:
-
   /**
    * Used as an alternative to boolean so that it is obvious whether a visual is enabled/disabled.
    */
@@ -406,7 +400,7 @@ private:
     enum Type
     {
       DISABLED = 0, ///< Visual disabled.
-      ENABLED = 1   ///< Visual enabled.
+      ENABLED  = 1  ///< Visual enabled.
     };
   };
 
@@ -418,7 +412,7 @@ private:
     enum Type
     {
       NOT_SET = 0, ///< Visual depth value not set by caller.
-      SET = 1      ///< Visual depth value set by caller.
+      SET     = 1  ///< Visual depth value set by caller.
     };
   };
 
@@ -433,7 +427,7 @@ private:
    * @note Registering a visual with an index that already has a registered visual will replace it. The replacement will
    *       occur once the replacement visual is ready (loaded).
    */
-  void RegisterVisual( Property::Index index, Toolkit::Visual::Base& visual, VisualState::Type enabled, DepthIndexValue::Type depthIndexValueSet, int depthIndex = 0 );
+  void RegisterVisual(Property::Index index, Toolkit::Visual::Base& visual, VisualState::Type enabled, DepthIndexValue::Type depthIndexValueSet, int depthIndex = 0);
 
   /**
    * @brief Emits the resource ready signal.
@@ -446,76 +440,74 @@ private:
   void OnIdleCallback();
 
 public:
-
-  Control& mControlImpl;
+  Control&            mControlImpl;
   DevelControl::State mState;
-  std::string mSubStateName;
-  Property::Map mAccessibilityAttributes;
-
-  int mLeftFocusableActorId;       ///< Actor ID of Left focusable control.
-  int mRightFocusableActorId;      ///< Actor ID of Right focusable control.
-  int mUpFocusableActorId;         ///< Actor ID of Up focusable control.
-  int mDownFocusableActorId;       ///< Actor ID of Down focusable control.
-
-  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
-  Vector3* mStartingPinchScale;           ///< The scale when a pinch gesture starts, TODO: consider removing this
-  Extents mMargin;                        ///< The margin values
-  Extents mPadding;                       ///< The padding values
-  Toolkit::Control::KeyEventSignalType mKeyEventSignal;
-  Toolkit::Control::KeyInputFocusSignalType mKeyInputFocusGainedSignal;
-  Toolkit::Control::KeyInputFocusSignalType mKeyInputFocusLostSignal;
-  Toolkit::Control::ResourceReadySignalType mResourceReadySignal;
-  DevelControl::VisualEventSignalType mVisualEventSignal;
-  Toolkit::DevelControl::AccessibilityActivateSignalType mAccessibilityActivateSignal;
-  Toolkit::DevelControl::AccessibilityReadingSkippedSignalType mAccessibilityReadingSkippedSignal;
-  Toolkit::DevelControl::AccessibilityReadingPausedSignalType mAccessibilityReadingPausedSignal;
-  Toolkit::DevelControl::AccessibilityReadingResumedSignalType mAccessibilityReadingResumedSignal;
+  std::string         mSubStateName;
+  Property::Map       mAccessibilityAttributes;
+
+  int mLeftFocusableActorId;  ///< Actor ID of Left focusable control.
+  int mRightFocusableActorId; ///< Actor ID of Right focusable control.
+  int mUpFocusableActorId;    ///< Actor ID of Up focusable control.
+  int mDownFocusableActorId;  ///< Actor ID of Down focusable control.
+
+  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
+  Vector3*                                                       mStartingPinchScale; ///< The scale when a pinch gesture starts, TODO: consider removing this
+  Extents                                                        mMargin;             ///< The margin values
+  Extents                                                        mPadding;            ///< The padding values
+  Toolkit::Control::KeyEventSignalType                           mKeyEventSignal;
+  Toolkit::Control::KeyInputFocusSignalType                      mKeyInputFocusGainedSignal;
+  Toolkit::Control::KeyInputFocusSignalType                      mKeyInputFocusLostSignal;
+  Toolkit::Control::ResourceReadySignalType                      mResourceReadySignal;
+  DevelControl::VisualEventSignalType                            mVisualEventSignal;
+  Toolkit::DevelControl::AccessibilityActivateSignalType         mAccessibilityActivateSignal;
+  Toolkit::DevelControl::AccessibilityReadingSkippedSignalType   mAccessibilityReadingSkippedSignal;
+  Toolkit::DevelControl::AccessibilityReadingPausedSignalType    mAccessibilityReadingPausedSignal;
+  Toolkit::DevelControl::AccessibilityReadingResumedSignalType   mAccessibilityReadingResumedSignal;
   Toolkit::DevelControl::AccessibilityReadingCancelledSignalType mAccessibilityReadingCancelledSignal;
-  Toolkit::DevelControl::AccessibilityReadingStoppedSignalType mAccessibilityReadingStoppedSignal;
+  Toolkit::DevelControl::AccessibilityReadingStoppedSignalType   mAccessibilityReadingStoppedSignal;
 
-  Toolkit::DevelControl::AccessibilityGetNameSignalType mAccessibilityGetNameSignal;
+  Toolkit::DevelControl::AccessibilityGetNameSignalType        mAccessibilityGetNameSignal;
   Toolkit::DevelControl::AccessibilityGetDescriptionSignalType mAccessibilityGetDescriptionSignal;
-  Toolkit::DevelControl::AccessibilityDoGestureSignalType mAccessibilityDoGestureSignal;
+  Toolkit::DevelControl::AccessibilityDoGestureSignalType      mAccessibilityDoGestureSignal;
 
   std::string mAccessibilityName;
-  bool mAccessibilityNameSet = false;
+  bool        mAccessibilityNameSet = false;
 
   std::string mAccessibilityDescription;
-  bool mAccessibilityDescriptionSet = false;
+  bool        mAccessibilityDescriptionSet = false;
 
   std::string mAccessibilityTranslationDomain;
-  bool mAccessibilityTranslationDomainSet = false;
+  bool        mAccessibilityTranslationDomainSet = false;
 
-  bool mAccessibilityHighlightable = false;
+  bool mAccessibilityHighlightable    = false;
   bool mAccessibilityHighlightableSet = false;
 
   Dali::Accessibility::Role mAccessibilityRole = Dali::Accessibility::Role::UNKNOWN;
 
   std::vector<std::vector<Accessibility::Address>> mAccessibilityRelations;
-  bool mAccessibilityAnimated = false;
+  bool                                             mAccessibilityAnimated = false;
 
   // Gesture Detection
-  PinchGestureDetector mPinchGestureDetector;
-  PanGestureDetector mPanGestureDetector;
-  TapGestureDetector mTapGestureDetector;
+  PinchGestureDetector     mPinchGestureDetector;
+  PanGestureDetector       mPanGestureDetector;
+  TapGestureDetector       mTapGestureDetector;
   LongPressGestureDetector mLongPressGestureDetector;
 
   // Tooltip
   TooltipPtr mTooltip;
 
   InputMethodContext mInputMethodContext;
-  CallbackBase* mIdleCallback;             ///< The idle callback to emit the resource ready signal.
+  CallbackBase*      mIdleCallback; ///< The idle callback to emit the resource ready signal.
 
-  ControlBehaviour mFlags : CONTROL_BEHAVIOUR_FLAG_COUNT;    ///< Flags passed in from constructor.
-  bool mIsKeyboardNavigationSupported :1;  ///< Stores whether keyboard navigation is supported by the control.
-  bool mIsKeyboardFocusGroup :1;           ///< Stores whether the control is a focus group.
-  bool mIsEmittingResourceReadySignal :1;  ///< True during ResourceReady().
-  bool mNeedToEmitResourceReady :1;        ///< True if need to emit the resource ready signal again.
-
-  RegisteredVisualContainer mRemoveVisuals;         ///< List of visuals that are being replaced by another visual once ready
+  ControlBehaviour mFlags : CONTROL_BEHAVIOUR_FLAG_COUNT; ///< Flags passed in from constructor.
+  bool             mIsKeyboardNavigationSupported : 1;    ///< Stores whether keyboard navigation is supported by the control.
+  bool             mIsKeyboardFocusGroup : 1;             ///< Stores whether the control is a focus group.
+  bool             mIsEmittingResourceReadySignal : 1;    ///< True during ResourceReady().
+  bool             mNeedToEmitResourceReady : 1;          ///< True if need to emit the resource ready signal again.
 
+  RegisteredVisualContainer mRemoveVisuals; ///< List of visuals that are being replaced by another visual once ready
 
   // Properties - these need to be members of Internal::Control::Impl as they access private methods/data of Internal::Control and Internal::Control::Impl.
   static const PropertyRegistration PROPERTY_1;
@@ -546,8 +538,8 @@ public:
    * @param  actor Actor object
    * @return       handle to Accessible object
    */
-  static Dali::Accessibility::Accessible *GetAccessibilityObject(Dali::Actor actor);
-  Dali::Accessibility::Accessible *GetAccessibilityObject();
+  static Dali::Accessibility::AccessibleGetAccessibilityObject(Dali::Actor actor);
+  Dali::Accessibility::Accessible*        GetAccessibilityObject();
 
   void AccessibilityRegister();
   void AccessibilityDeregister();
@@ -558,55 +550,54 @@ public:
                           public virtual Dali::Accessibility::Action
   {
     Dali::Actor self;
-    bool modal = false, root = false;
+    bool        modal = false, root = false;
 
     AccessibleImpl(Dali::Actor self, Dali::Accessibility::Role role, bool modal = false);
 
-    std::string GetName() override;
-    virtual std::string GetNameRaw();
-    std::string GetDescription() override;
-    virtual std::string GetDescriptionRaw();
-    Dali::Accessibility::Accessible* GetParent() override;
-    size_t GetChildCount() override;
-    Dali::Accessibility::Accessible* GetChildAtIndex( size_t index ) override;
-    size_t GetIndexInParent() override;
-    Dali::Accessibility::Role GetRole() override;
-    Dali::Accessibility::States GetStates() override;
-    Dali::Accessibility::Attributes GetAttributes() override;
-    Dali::Rect<> GetExtents( Dali::Accessibility::CoordType ctype ) override;
+    std::string                         GetName() override;
+    virtual std::string                 GetNameRaw();
+    std::string                         GetDescription() override;
+    virtual std::string                 GetDescriptionRaw();
+    Dali::Accessibility::Accessible*    GetParent() override;
+    size_t                              GetChildCount() override;
+    Dali::Accessibility::Accessible*    GetChildAtIndex(size_t index) override;
+    size_t                              GetIndexInParent() override;
+    Dali::Accessibility::Role           GetRole() override;
+    Dali::Accessibility::States         GetStates() override;
+    Dali::Accessibility::Attributes     GetAttributes() override;
+    Dali::Rect<>                        GetExtents(Dali::Accessibility::CoordType ctype) override;
     Dali::Accessibility::ComponentLayer GetLayer() override;
-    int16_t GetMdiZOrder() override;
-    bool GrabFocus() override;
-    double GetAlpha() override;
-    bool GrabHighlight() override;
-    bool ClearHighlight() override;
-
-    std::string GetActionName( size_t index ) override;
-    std::string GetLocalizedActionName( size_t index ) override;
-    std::string GetActionDescription( size_t index ) override;
-    size_t GetActionCount() override;
-    std::string GetActionKeyBinding(size_t index) override;
-    bool DoAction(size_t index) override;
-    bool DoAction(const std::string& name) override;
-    bool DoGesture(const Dali::Accessibility::GestureInfo &gestureInfo) override;
+    int16_t                             GetMdiZOrder() override;
+    bool                                GrabFocus() override;
+    double                              GetAlpha() override;
+    bool                                GrabHighlight() override;
+    bool                                ClearHighlight() override;
+
+    std::string                                GetActionName(size_t index) override;
+    std::string                                GetLocalizedActionName(size_t index) override;
+    std::string                                GetActionDescription(size_t index) override;
+    size_t                                     GetActionCount() override;
+    std::string                                GetActionKeyBinding(size_t index) override;
+    bool                                       DoAction(size_t index) override;
+    bool                                       DoAction(const std::string& name) override;
+    bool                                       DoGesture(const Dali::Accessibility::GestureInfo& gestureInfo) override;
     std::vector<Dali::Accessibility::Relation> GetRelationSet() override;
 
     virtual Dali::Accessibility::States CalculateStates();
-    virtual void EnsureChildVisible(Actor child);
-    virtual void EnsureSelfVisible();
-    virtual Property::Index GetNamePropertyIndex();
-    virtual Property::Index GetDescriptionPropertyIndex();
+    virtual void                        EnsureChildVisible(Actor child);
+    virtual void                        EnsureSelfVisible();
+    virtual Property::Index             GetNamePropertyIndex();
+    virtual Property::Index             GetDescriptionPropertyIndex();
   };
 
-  std::function< std::unique_ptr< Dali::Accessibility::Accessible >( Actor ) > accessibilityConstructor;
-  std::unique_ptr< Dali::Accessibility::Accessible > accessibilityObject;
-  Dali::PropertyNotification accessibilityNotificationPosition, accessibilityNotificationSize, accessibilityNotificationCulled;
-  bool accessibilityNotificationSet = false;
-  static void PositionOrSizeChangedCallback( PropertyNotification& );
-  static void CulledChangedCallback( PropertyNotification& );
+  std::function<std::unique_ptr<Dali::Accessibility::Accessible>(Actor)> accessibilityConstructor;
+  std::unique_ptr<Dali::Accessibility::Accessible>                       accessibilityObject;
+  Dali::PropertyNotification                                             accessibilityNotificationPosition, accessibilityNotificationSize, accessibilityNotificationCulled;
+  bool                                                                   accessibilityNotificationSet = false;
+  static void                                                            PositionOrSizeChangedCallback(PropertyNotification&);
+  static void                                                            CulledChangedCallback(PropertyNotification&);
 };
 
-
 } // namespace Internal
 
 } // namespace Toolkit
index c889ff4..85a3f74 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_TOOLKIT_INTERNAL_CONTROL_DEBUG_H
 #define DALI_TOOLKIT_INTERNAL_CONTROL_DEBUG_H
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,8 +18,8 @@
 
 #if defined(DEBUG_ENABLED)
 
-#include <dali/public-api/object/handle.h>
 #include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali/public-api/object/handle.h>
 #include <iostream>
 #include <string>
 
@@ -29,24 +29,23 @@ namespace Toolkit
 {
 namespace Internal
 {
-
 /**
  * Convert properties of handle into JSON output, separated into 'normal' and 'child' properties.
  * @param[in] ouputStream the output stream to write to
  * @param[in] handle The handle of the object from which to retrieve properties
  * @return The output stream
  */
-std::ostream& DumpProperties( std::ostream& outputStream, Handle handle );
+std::ostream& DumpProperties(std::ostream& outputStream, Handle handle);
 
 /**
  * Dumps control internals, visuals and properties to a string in JSON format
  */
-std::string DumpControl( const Internal::Control& control );
+std::string DumpControl(const Internal::Control& control);
 
 /**
  * Dumps actor internals and properties to a string in JSON format
  */
-std::string DumpActor( Actor actor );
+std::string DumpActor(Actor actor);
 
 /**
  * Dumps actor hierarchy from a given root, but expands Control output to encompass Control internals.
@@ -54,7 +53,7 @@ std::string DumpActor( Actor actor );
  * @param[in] ouputStream the output stream to write to
  * @param[in] root The root actor
  */
-void DumpControlHierarchy( std::ostream& outputStream, Actor rootActor );
+void DumpControlHierarchy(std::ostream& outputStream, Actor rootActor);
 
 } // namespace Internal
 
index de14bb6..59f55bf 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_CONTROL_RENDERERS_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,8 +17,8 @@
  * limitations under the License.
  */
 
-#include <dali/dali.h>
 #include <dali-toolkit/internal/graphics/builtin-shader-extern-gen.h>
+#include <dali/dali.h>
 
 namespace Dali
 {
@@ -26,7 +26,6 @@ namespace Toolkit
 {
 namespace Internal
 {
-
 #define BASIC_VERTEX_SOURCE SHADER_CONTROL_RENDERERS_VERT
 #define BASIC_FRAGMENT_SOURCE SHADER_CONTROL_RENDERERS_FRAG
 
@@ -36,7 +35,7 @@ namespace Internal
  * @param[in] fragmentSrc The custom fragment shader.
  * @return A newly created renderer.
  */
-Dali::Renderer CreateRenderer( std::string_view vertexSrc, std::string_view fragmentSrc );
+Dali::Renderer CreateRenderer(std::string_view vertexSrc, std::string_view fragmentSrc);
 
 /**
  * Helper method for rendering an image with custom shader.
@@ -45,21 +44,21 @@ Dali::Renderer CreateRenderer( std::string_view vertexSrc, std::string_view frag
  * @param[in] gridSize The number of grid sub-divisions required.
  * @return A newly created renderer.
  */
-Dali::Renderer CreateRenderer( std::string_view vertexSrc, std::string_view fragmentSrc, Dali::Shader::Hint::Value hints, Dali::Uint16Pair gridSize );
+Dali::Renderer CreateRenderer(std::string_view vertexSrc, std::string_view fragmentSrc, Dali::Shader::Hint::Value hints, Dali::Uint16Pair gridSize);
 
 /**
  * Helper method for setting the first texture passed to a renderer.
  * @param[in] renderer The renderer using the texture.
  * @param[in] texture The texture to set.
  */
-void SetRendererTexture( Dali::Renderer renderer, Dali::Texture texture );
+void SetRendererTexture(Dali::Renderer renderer, Dali::Texture texture);
 
 /**
  * Helper method for setting the first texture passed to a renderer.
  * @param[in] renderer The renderer using the texture.
  * @param[in] framebuffer A frame buffer color texture attached.
  */
-void SetRendererTexture( Dali::Renderer renderer, Dali::FrameBuffer frameBuffer );
+void SetRendererTexture(Dali::Renderer renderer, Dali::FrameBuffer frameBuffer);
 
 } // namespace Internal
 } // namespace Toolkit
index 6abeb20..2550f85 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_EFFECTS_VIEW_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class GaussianBlurView;
 class ImageFilter;
 
@@ -63,9 +60,8 @@ public:
   virtual ~EffectsView();
 
 public:
-
   /// @copydoc Dali::Toolkit::EffectsView::SetType
-  void SetType( Toolkit::EffectsView::EffectType type );
+  void SetType(Toolkit::EffectsView::EffectType type);
 
   /// @copydoc Dali::Toolkit::EffectsView::GetType
   Toolkit::EffectsView::EffectType GetType() const;
@@ -74,13 +70,13 @@ public:
   void Refresh();
 
   /// @copydoc Dali::Toolkit::EffectsView::SetRefreshOnDemand
-  void SetRefreshOnDemand( bool onDemand );
+  void SetRefreshOnDemand(bool onDemand);
 
   /// @copydoc Dali::Toolkit::EffectsView::SetPixelFormat
-  void SetPixelFormat( Pixel::Format pixelFormat );
+  void SetPixelFormat(Pixel::Format pixelFormat);
 
   /// @copydoc Dali::Toolkit::EffectsView::SetBackgroundColor(const Vector4&)
-  void SetBackgroundColor( const Vector4& color );
+  void SetBackgroundColor(const Vector4& color);
 
   /// @copydoc Dali::Toolkit::GaussianBlurView::GetBackgroundColor
   Vector4 GetBackgroundColor() const;
@@ -89,7 +85,7 @@ public:
    * Set the effect size which decides the size of filter kernel.
    * @param[in] effectSize The effect size.
    */
-  void SetEffectSize( int effectSize );
+  void SetEffectSize(int effectSize);
 
   /**
    * Get the effect size.
@@ -104,8 +100,7 @@ public:
    * @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 );
-
+  static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value);
 
   /**
    * Called to retrieve a property of an object of this type.
@@ -113,10 +108,9 @@ public:
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index propertyIndex );
+  static Property::Value GetProperty(BaseObject* object, Property::Index propertyIndex);
 
 private: // From Control
-
   /**
    * @copydoc Toolkit::Internal::Control::OnInitialize()
    */
@@ -125,12 +119,12 @@ private: // From Control
   /**
    * @copydoc CustomActorImpl::OnSizeSet( const Vector3& targetSize )
    */
-  void OnSizeSet( const Vector3& targetSize ) override;
+  void OnSizeSet(const Vector3& targetSize) override;
 
   /**
    * @copydoc Toolkit::Internal::Control::OnSceneConnection
    */
-  void OnSceneConnection( int depth ) override;
+  void OnSceneConnection(int depth) override;
 
   /**
    * @copydoc Toolkit::Internal::Control::OnSceneDisconnection
@@ -140,15 +134,14 @@ private: // From Control
   /**
    * @copydoc Toolkit::Internal::Control::OnChildAdd
    */
-  void OnChildAdd( Actor& child ) override;
+  void OnChildAdd(Actor& child) override;
 
   /**
    * @copydoc Toolkit::Internal::Control::OnChildRemove
    */
-  void OnChildRemove( Actor& child ) override;
+  void OnChildRemove(Actor& child) override;
 
 private:
-
   /**
    * Enable the effect when the control is set on stage
    */
@@ -195,22 +188,20 @@ private:
   void RemoveFilters();
 
 private:
-
   // Undefined
-  EffectsView( const EffectsView& );
+  EffectsView(const EffectsView&);
 
   // Undefined
-  EffectsView& operator = ( const EffectsView& );
+  EffectsView& operator=(const EffectsView&);
 
 private: // attributes/properties
-
   /////////////////////////////////////////////////////////////
   // for rendering all user added children to offscreen target
-  FrameBuffer           mFrameBufferForChildren;
-  Renderer              mRendererForChildren;
-  RenderTask            mRenderTaskForChildren;
-  CameraActor           mCameraForChildren;
-  Actor                 mChildrenRoot; // for creating a subtree for all user added child actors
+  FrameBuffer mFrameBufferForChildren;
+  Renderer    mRendererForChildren;
+  RenderTask  mRenderTaskForChildren;
+  CameraActor mCameraForChildren;
+  Actor       mChildrenRoot; // for creating a subtree for all user added child actors
 
   /////////////////////////////////////////////////////////////
   // background fill color
@@ -222,8 +213,8 @@ private: // attributes/properties
   Vector2 mLastSize;
   /////////////////////////////////////////////////////////////
   // post blur image
-  FrameBuffer           mFrameBufferPostFilter;
-  Renderer              mRendererPostFilter;
+  FrameBuffer mFrameBufferPostFilter;
+  Renderer    mRendererPostFilter;
 
   Vector<ImageFilter*> mFilters;
 
@@ -233,33 +224,32 @@ private: // attributes/properties
 
   /////////////////////////////////////////////////////////////
   Toolkit::EffectsView::EffectType mEffectType;
-  Pixel::Format mPixelFormat;     ///< pixel format used by render targets
+  Pixel::Format                    mPixelFormat; ///< pixel format used by render targets
 
-  bool mEnabled:1;
-  bool mRefreshOnDemand:1;
+  bool mEnabled : 1;
+  bool mRefreshOnDemand : 1;
 }; // class EffectsView
 
 } // namespace Internal
 
-
 // Helpers for public-api forwarding methods
 
-inline Toolkit::Internal::EffectsView& GetImpl( Toolkit::EffectsView& effectsView )
+inline Toolkit::Internal::EffectsView& GetImpl(Toolkit::EffectsView& effectsView)
 {
-  DALI_ASSERT_ALWAYS( effectsView );
+  DALI_ASSERT_ALWAYS(effectsView);
 
   Dali::RefObject& handle = effectsView.GetImplementation();
 
-  return static_cast<Toolkit::Internal::EffectsView&>( handle );
+  return static_cast<Toolkit::Internal::EffectsView&>(handle);
 }
 
-inline const Toolkit::Internal::EffectsView& GetImpl( const Toolkit::EffectsView& effectsView )
+inline const Toolkit::Internal::EffectsView& GetImpl(const Toolkit::EffectsView& effectsView)
 {
-  DALI_ASSERT_ALWAYS( effectsView );
+  DALI_ASSERT_ALWAYS(effectsView);
 
   const Dali::RefObject& handle = effectsView.GetImplementation();
 
-  return static_cast<const Toolkit::Internal::EffectsView&>( handle );
+  return static_cast<const Toolkit::Internal::EffectsView&>(handle);
 }
 
 } // namespace Toolkit
old mode 100755 (executable)
new mode 100644 (file)
index cef0e94..ab57f61
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_FLEX_CONTAINER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * FlexContainer is a custom control for laying out actors in a Flexbox layout
  * @see Dali::Toolkit:FlexContainer for more details
@@ -42,20 +39,18 @@ namespace Internal
 class FlexContainer : public Control
 {
 public:
-
   /**
    * The structure to store the style properties and layout information of flex item
    */
   struct FlexItemNode
   {
-    WeakHandle< Dali::Actor > actor;      ///< Actor handle of the flex item
-    YGNodeRef node;                     ///< The style properties and layout information
+    WeakHandle<Dali::Actor> actor; ///< Actor handle of the flex item
+    YGNodeRef               node;  ///< The style properties and layout information
   };
 
-  typedef std::vector< FlexItemNode > FlexItemNodeContainer;
+  typedef std::vector<FlexItemNode> FlexItemNodeContainer;
 
 public:
-
   /**
    * Construct a new FlexContainer.
    */
@@ -155,7 +150,7 @@ public:
    * @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 );
+  static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value);
 
   /**
    * Called to retrieve a property of an object of this type.
@@ -163,10 +158,9 @@ public:
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index index );
+  static Property::Value GetProperty(BaseObject* object, Property::Index index);
 
 private: // From Control
-
   /**
    * @copydoc Control::OnInitialize()
    */
@@ -175,42 +169,41 @@ private: // From Control
   /**
    * @copydoc Control::OnChildAdd(Actor& child)
    */
-  void OnChildAdd( Actor& child ) override;
+  void OnChildAdd(Actor& child) override;
 
   /**
    * @copydoc Control::OnChildRemove(Actor& child)
    */
-  void OnChildRemove( Actor& child ) override;
+  void OnChildRemove(Actor& child) override;
 
   /**
    * @copydoc Control::OnRelayout
    */
-  void OnRelayout( const Vector2& size, RelayoutContainer& container ) override;
+  void OnRelayout(const Vector2& size, RelayoutContainer& container) override;
 
   /**
    * @copydoc Control::RelayoutDependentOnChildren()
    */
-  bool RelayoutDependentOnChildren( Dimension::Type dimension = Dimension::ALL_DIMENSIONS ) override;
+  bool RelayoutDependentOnChildren(Dimension::Type dimension = Dimension::ALL_DIMENSIONS) override;
 
   /**
    * @copydoc Control::GetNextKeyboardFocusableActor
    */
-  Actor GetNextKeyboardFocusableActor( Actor currentFocusedActor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled ) override;
+  Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled) override;
 
   /**
    * @copydoc CustomActorImpl::OnSizeSet( const Vector3& size )
    */
-  void OnSizeSet( const Vector3& size ) override;
+  void OnSizeSet(const Vector3& size) override;
 
   /**
   * @copydoc OnLayoutDirectionChanged( Dali::Actor actor, Dali::LayoutDirection::Type type )
   * @param[in] actor The actor whose layoutDirection is changed.
   * @param[in] type  The layoutDirection.
   */
-  void OnLayoutDirectionChanged( Dali::Actor actor, Dali::LayoutDirection::Type type );
+  void OnLayoutDirectionChanged(Dali::Actor actor, Dali::LayoutDirection::Type type);
 
 private: // Implementation
-
   /**
    * Calculate the layout properties of all the children
    */
@@ -227,29 +220,27 @@ private: // Implementation
   virtual ~FlexContainer();
 
 private:
-
   // Undefined copy constructor and assignment operators
   FlexContainer(const FlexContainer&);
   FlexContainer& operator=(const FlexContainer& rhs);
 
-private: // Data
-
-  FlexItemNode mRootNode;                    ///< Style properties and layout information of flex container
-  FlexItemNodeContainer mChildrenNodes;      ///< Style properties and layout information of flex items in the container
+private:                                // Data
+  FlexItemNode          mRootNode;      ///< Style properties and layout information of flex container
+  FlexItemNodeContainer mChildrenNodes; ///< Style properties and layout information of flex items in the container
 
-  Toolkit::FlexContainer::ContentDirection mContentDirection;        ///< The content direction of the container
-  Toolkit::FlexContainer::FlexDirection mFlexDirection;              ///< The flex direction of the container
-  Toolkit::FlexContainer::WrapType mFlexWrap;                        ///< The wrap type of the container
-  Toolkit::FlexContainer::Justification mJustifyContent;             ///< The alignment of flex items in the container on the main-axis
-  Toolkit::FlexContainer::Alignment mAlignItems;                     ///< The alignment of flex items in the container on the cross-axis
-  Toolkit::FlexContainer::Alignment mAlignContent;                   ///< The alignment of flex lines in the container on the cross-axis
+  Toolkit::FlexContainer::ContentDirection mContentDirection; ///< The content direction of the container
+  Toolkit::FlexContainer::FlexDirection    mFlexDirection;    ///< The flex direction of the container
+  Toolkit::FlexContainer::WrapType         mFlexWrap;         ///< The wrap type of the container
+  Toolkit::FlexContainer::Justification    mJustifyContent;   ///< The alignment of flex items in the container on the main-axis
+  Toolkit::FlexContainer::Alignment        mAlignItems;       ///< The alignment of flex items in the container on the cross-axis
+  Toolkit::FlexContainer::Alignment        mAlignContent;     ///< The alignment of flex lines in the container on the cross-axis
 };
 
 } // namespace Internal
 
 // Helpers for public-api forwarding methods
 
-inline Toolkit::Internal::FlexContainer& GetImpl( Toolkit::FlexContainer& flexContainer )
+inline Toolkit::Internal::FlexContainer& GetImpl(Toolkit::FlexContainer& flexContainer)
 {
   DALI_ASSERT_ALWAYS(flexContainer);
 
@@ -258,7 +249,7 @@ inline Toolkit::Internal::FlexContainer& GetImpl( Toolkit::FlexContainer& flexCo
   return static_cast<Toolkit::Internal::FlexContainer&>(handle);
 }
 
-inline const Toolkit::Internal::FlexContainer& GetImpl( const Toolkit::FlexContainer& flexContainer )
+inline const Toolkit::Internal::FlexContainer& GetImpl(const Toolkit::FlexContainer& flexContainer)
 {
   DALI_ASSERT_ALWAYS(flexContainer);
 
index a1e7d50..31fac62 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_GAUSSIAN_BLUR_EFFECT_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <sstream>
-#include <cmath>
 #include <dali/public-api/object/property-map.h>
+#include <cmath>
+#include <sstream>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/devel-api/controls/gaussian-blur-view/gaussian-blur-view.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/public-api/controls/image-view/image-view.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 class GaussianBlurView;
 
 namespace Internal
 {
-
 /**
  * GaussianBlurView implementation class
  */
 class GaussianBlurView : public Control
 {
 public:
-
   /**
    * @copydoc Dali::Toolkit::GaussianBlurView::GaussianBlurView
    */
@@ -54,9 +50,7 @@ public:
   /**
    * @copydoc Dali::Toolkit::GaussianBlurView::GaussianBlurView
    */
-  GaussianBlurView(const unsigned int numSamples, const float blurBellCurveWidth, const Pixel::Format renderTargetPixelFormat,
-                   const float downsampleWidthScale, const float downsampleHeightScale,
-                   bool blurUserImage);
+  GaussianBlurView(const unsigned int numSamples, const float blurBellCurveWidth, const Pixel::Format renderTargetPixelFormat, const float downsampleWidthScale, const float downsampleHeightScale, bool blurUserImage);
 
   /**
    * @copydoc Dali::Toolkit::GaussianBlurView::~GaussianBlurView
@@ -67,9 +61,7 @@ public:
    * @copydoc Dali::Toolkit::GaussianBlurView::New
    */
   static Dali::Toolkit::GaussianBlurView New();
-  static Dali::Toolkit::GaussianBlurView New( const unsigned int numSamples, const float blurBellCurveWidth, const Pixel::Format renderTargetPixelFormat,
-                                              const float downsampleWidthScale, const float downsampleHeightScale,
-                                              bool blurUserImage);
+  static Dali::Toolkit::GaussianBlurView New(const unsigned int numSamples, const float blurBellCurveWidth, const Pixel::Format renderTargetPixelFormat, const float downsampleWidthScale, const float downsampleHeightScale, bool blurUserImage);
 
   void Activate();
   void ActivateOnce();
@@ -77,47 +69,49 @@ public:
 
   void SetUserImageAndOutputRenderTarget(Texture inputImage, FrameBuffer outputRenderTarget);
 
-  Property::Index GetBlurStrengthPropertyIndex() const {return mBlurStrengthPropertyIndex;}
+  Property::Index GetBlurStrengthPropertyIndex() const
+  {
+    return mBlurStrengthPropertyIndex;
+  }
   FrameBuffer GetBlurredRenderTarget() const;
 
   /// @copydoc Dali::Toolkit::GaussianBlurView::SetBackgroundColor(const Vector4&)
-  void SetBackgroundColor( const Vector4& color );
+  void SetBackgroundColor(const Vector4& color);
 
   /// @copydoc Dali::Toolkit::GaussianBlurView::GetBackgroundColor
   Vector4 GetBackgroundColor() const;
 
-  void AllocateResources();
-  void CreateRenderTasks();
-  void RemoveRenderTasks();
+  void                                                     AllocateResources();
+  void                                                     CreateRenderTasks();
+  void                                                     RemoveRenderTasks();
   Dali::Toolkit::GaussianBlurView::GaussianBlurViewSignal& FinishedSignal();
 
 private:
-
   void OnInitialize() override;
   void OnSizeSet(const Vector3& targetSize) override;
 
   /**
    * @copydoc Control::OnChildAdd()
    */
-  void OnChildAdd( Actor& child ) override;
+  void OnChildAdd(Actor& child) override;
 
   /**
    * @copydoc Control::OnChildRemove()
    */
-  void OnChildRemove( Actor& child ) override;
+  void OnChildRemove(Actor& child) override;
 
-  void SetBlurBellCurveWidth(float blurBellCurveWidth);
-  float CalcGaussianWeight(float x);
-  void SetShaderConstants();
-  std::string GetSampleOffsetsPropertyName( unsigned int index ) const;
-  std::string GetSampleWeightsPropertyName( unsigned int index ) const;
+  void        SetBlurBellCurveWidth(float blurBellCurveWidth);
+  float       CalcGaussianWeight(float x);
+  void        SetShaderConstants();
+  std::string GetSampleOffsetsPropertyName(unsigned int index) const;
+  std::string GetSampleWeightsPropertyName(unsigned int index) const;
 
   void OnRenderTaskFinished(Dali::RenderTask& renderTask);
 
   /////////////////////////////////////////////////////////////
-  unsigned int mNumSamples;       // number of blur samples in each of horiz/vert directions
-  float mBlurBellCurveWidth;      // constant used when calculating the gaussian weights
-  Pixel::Format mPixelFormat;     // pixel format used by render targets
+  unsigned int  mNumSamples;         // number of blur samples in each of horiz/vert directions
+  float         mBlurBellCurveWidth; // constant used when calculating the gaussian weights
+  Pixel::Format mPixelFormat;        // pixel format used by render targets
 
   /////////////////////////////////////////////////////////////
   // downsampling is used for the separated blur passes to get increased blur with the same number of samples and also to make rendering quicker
@@ -128,11 +122,11 @@ private:
 
   /////////////////////////////////////////////////////////////
   // if this is set to true, we blur a user supplied image rather than rendering and blurring children
-  bool mBlurUserImage:1;
+  bool mBlurUserImage : 1;
 
   /////////////////////////////////////////////////////////////
   // if this is set to true, set the render tasks to refresh once
-  bool mRenderOnce:1;
+  bool mRenderOnce : 1;
 
   /////////////////////////////////////////////////////////////
   // background fill color
@@ -157,7 +151,7 @@ private:
   /////////////////////////////////////////////////////////////
   // for rendering all user added children to offscreen target
   FrameBuffer mRenderTargetForRenderingChildren;
-  RenderTask mRenderChildrenTask;
+  RenderTask  mRenderChildrenTask;
 
   /////////////////////////////////////////////////////////////
   // for rendering separated blur passes to offscreen targets
@@ -172,7 +166,7 @@ private:
 
   /////////////////////////////////////////////////////////////
   // for compositing blur and children renders to offscreen target
-  Actor mCompositingActor;
+  Actor      mCompositingActor;
   RenderTask mCompositeTask;
 
   /////////////////////////////////////////////////////////////
@@ -185,40 +179,38 @@ private:
 
   /////////////////////////////////////////////////////////////
   // User can specify image to blur and output target, so we can use GaussianBlurView for arbitrary blur processes
-  Texture mUserInputImage;
+  Texture     mUserInputImage;
   FrameBuffer mUserOutputRenderTarget;
 
   Dali::Toolkit::GaussianBlurView::GaussianBlurViewSignal mFinishedSignal; ///< Signal emitted when blur has completed.
 
-  bool mActivated:1;
-private:
+  bool mActivated : 1;
 
+private:
   // Undefined copy constructor.
-  GaussianBlurView( const GaussianBlurView& );
+  GaussianBlurView(const GaussianBlurView&);
 
   // Undefined assignment operator.
-  GaussianBlurView& operator=( const GaussianBlurView& );
+  GaussianBlurView& operator=(const GaussianBlurView&);
 };
 
 } // namespace Internal
 
-
 // Helpers for public-api forwarding methods
-inline Toolkit::Internal::GaussianBlurView& GetImpl( Toolkit::GaussianBlurView& obj )
+inline Toolkit::Internal::GaussianBlurView& GetImpl(Toolkit::GaussianBlurView& obj)
 {
   DALI_ASSERT_ALWAYS(obj);
   Dali::RefObject& handle = obj.GetImplementation();
   return static_cast<Toolkit::Internal::GaussianBlurView&>(handle);
 }
 
-inline const Toolkit::Internal::GaussianBlurView& GetImpl( const Toolkit::GaussianBlurView& obj )
+inline const Toolkit::Internal::GaussianBlurView& GetImpl(const Toolkit::GaussianBlurView& obj)
 {
   DALI_ASSERT_ALWAYS(obj);
   const Dali::RefObject& handle = obj.GetImplementation();
   return static_cast<const Toolkit::Internal::GaussianBlurView&>(handle);
 }
 
-
 } // namespace Toolkit
 
 } // namespace Dali
index 2881175..90dc192 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_IMAGE_VIEW_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 class ImageView;
 
 namespace Internal
@@ -39,7 +37,6 @@ namespace Internal
 class ImageView : public Control
 {
 protected:
-
   /**
    * Construct a new ImageView.
    */
@@ -63,19 +60,19 @@ public:
    * If the handle is empty, ImageView will display nothing
    * @param[in] map The Dali::Property::Map to use for to display.
    */
-  void SetImage( const Dali::Property::Map& map );
+  void SetImage(const Dali::Property::Map& map);
 
   /**
    * @copydoc Dali::Toolkit::SetImage
    */
-  void SetImage( const std::string& imageUrl, ImageDimensions size );
+  void SetImage(const std::string& imageUrl, ImageDimensions size);
 
   /**
    * @brief Set whether the Pre-multiplied Alpha Blending is required
    *
    * @param[in] preMultipled whether alpha is pre-multiplied.
    */
-  void EnablePreMultipliedAlpha( bool preMultipled );
+  void EnablePreMultipliedAlpha(bool preMultipled);
 
   /**
    * @brief Query whether alpha is pre-multiplied.
@@ -91,7 +88,7 @@ public:
    * @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 );
+  static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value);
 
   /**
    * Called to retrieve a property of an object of this type.
@@ -99,7 +96,7 @@ public:
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index propertyIndex );
+  static Property::Value GetProperty(BaseObject* object, Property::Index propertyIndex);
 
   /**
    * @brief Set the depth index of this image renderer
@@ -108,10 +105,9 @@ public:
    *
    * @param[in] depthIndex The depth index of this renderer
    */
-  void SetDepthIndex( int depthIndex );
+  void SetDepthIndex(int depthIndex);
 
 private: // From Control
-
   /**
    * @copydoc Toolkit::Control::OnInitialize
    */
@@ -125,25 +121,24 @@ private: // From Control
   /**
    * @copydoc Toolkit::Control::GetHeightForWidth()
    */
-  float GetHeightForWidth( float width ) override;
+  float GetHeightForWidth(float width) override;
 
   /**
    * @copydoc Toolkit::Control::GetWidthForHeight()
    */
-  float GetWidthForHeight( float height ) override;
+  float GetWidthForHeight(float height) override;
 
   /**
    * @copydoc Toolkit::Control::OnRelayout()
    */
-  void OnRelayout( const Vector2& size, RelayoutContainer& container ) override;
+  void OnRelayout(const Vector2& size, RelayoutContainer& container) override;
 
 private:
-
   /**
    * @brief Callback for ResourceReadySignal
    * param[in] control signal prototype
    */
-  void OnResourceReady( Toolkit::Control control );
+  void OnResourceReady(Toolkit::Control control);
 
   /**
    * @brief Set TransformMap for fittingMode
@@ -153,7 +148,7 @@ private:
    * param[in] fittingMode The mode for fitting image
    * param[in] transformMap  The map for fitting image
    */
-  void SetTransformMapForFittingMode ( Vector2 finalSize, Vector2 textureSize, Vector2 offset, Visual::FittingMode fittingMode, Property::Map& transformMap );
+  void SetTransformMapForFittingMode(Vector2 finalSize, Vector2 textureSize, Vector2 offset, Visual::FittingMode fittingMode, Property::Map& transformMap);
 
   /**
    * @brief Apply fittingMode
@@ -163,36 +158,36 @@ private:
    * param[in] zeroPadding whether padding is zero
    * param[in] transformMap  The map for fitting image
    */
-  void ApplyFittingMode( Vector2 finalSize, Vector2 textureSize, Vector2 offset, bool zeroPadding , Property::Map& transformMap);
+  void ApplyFittingMode(Vector2 finalSize, Vector2 textureSize, Vector2 offset, bool zeroPadding, Property::Map& transformMap);
 
 private:
   // Undefined
-  ImageView( const ImageView& );
-  ImageView& operator=( const ImageView& );
+  ImageView(const ImageView&);
+  ImageView& operator=(const ImageView&);
 
 private:
-  Toolkit::Visual::Base  mVisual;
+  Toolkit::Visual::Base mVisual;
 
-  std::string      mUrl;          ///< the url for the image if the image came from a URL, empty otherwise
-  Property::Map    mPropertyMap;  ///< the Property::Map if the image came from a Property::Map, empty otherwise
-  Property::Map    mShaderMap;    ///< the Property::Map if the custom shader is set, empty otherwise
-  ImageDimensions  mImageSize;    ///< the image size
+  std::string     mUrl;         ///< the url for the image if the image came from a URL, empty otherwise
+  Property::Map   mPropertyMap; ///< the Property::Map if the image came from a Property::Map, empty otherwise
+  Property::Map   mShaderMap;   ///< the Property::Map if the custom shader is set, empty otherwise
+  ImageDimensions mImageSize;   ///< the image size
 
-  bool mImageVisualPaddingSetByTransform :1; //< Flag to indicate Padding was set using a transform.
-  bool mImageViewPixelAreaSetByFittingMode:1; //< Flag to indicate pixel area was set by fitting Mode
+  bool mImageVisualPaddingSetByTransform : 1;   //< Flag to indicate Padding was set using a transform.
+  bool mImageViewPixelAreaSetByFittingMode : 1; //< Flag to indicate pixel area was set by fitting Mode
 };
 
 } // namespace Internal
 
 // Helpers for public-api forwarding methods
-inline Toolkit::Internal::ImageView& GetImpl( Toolkit::ImageView& obj )
+inline Toolkit::Internal::ImageView& GetImpl(Toolkit::ImageView& obj)
 {
   DALI_ASSERT_ALWAYS(obj);
   Dali::RefObject& handle = obj.GetImplementation();
   return static_cast<Toolkit::Internal::ImageView&>(handle);
 }
 
-inline const Toolkit::Internal::ImageView& GetImpl( const Toolkit::ImageView& obj )
+inline const Toolkit::Internal::ImageView& GetImpl(const Toolkit::ImageView& obj)
 {
   DALI_ASSERT_ALWAYS(obj);
   const Dali::RefObject& handle = obj.GetImplementation();
index b4d7b0f..7cf6940 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_MAGNIFIER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/render-tasks/render-task.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/devel-api/controls/magnifier/magnifier.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class Magnifier;
 
-typedef IntrusivePtr<Magnifier>    MagnifierPtr;
+typedef IntrusivePtr<Magnifier> MagnifierPtr;
 
 /**
  * @copydoc Toolkit::Magnifier
@@ -46,7 +43,6 @@ typedef IntrusivePtr<Magnifier>    MagnifierPtr;
 class Magnifier : public Control
 {
 public:
-
   /**
    * Create a new Magnifier.
    * @return A public handle to the newly allocated Magnifier.
@@ -54,7 +50,6 @@ public:
   static Dali::Toolkit::Magnifier New();
 
 public:
-
   /**
    * @copydoc Toolkit::ImageView::SetSourceActor
    */
@@ -101,7 +96,7 @@ public:
    * @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 );
+  static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value);
 
   /**
    * Called to retrieve a property of an object of this type.
@@ -109,10 +104,9 @@ public:
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index index );
+  static Property::Value GetProperty(BaseObject* object, Property::Index index);
 
 protected:
-
   /**
    * Construct a new Magnifier.
    */
@@ -129,18 +123,15 @@ protected:
   virtual ~Magnifier();
 
 private:
-
   /**
    * Initializes the render task required to render contents.
    */
   void InitializeRenderTask();
 
 private:
-
   void OnSizeSet(const Vector3& targetSize) override;
 
 private:
-
   // Undefined
   Magnifier(const Magnifier&);
 
@@ -148,14 +139,13 @@ private:
   Magnifier& operator=(const Magnifier& rhs);
 
 private:
-
-  RenderTask mTask;                             ///< Render Task to render the source actor contents.
-  CameraActor mCameraActor;                     ///< CameraActor attached to RenderTask
-  Actor mFrame;                                 ///< The Magnifier Frame
-  Actor mSourceActor;                           ///< Source Delegate Actor represents the source position to read.
-  float mDefaultCameraDistance;                 ///< Default RenderTask's camera distance from target.
-  Vector3 mActorSize;                           ///< The Actor size
-  float mMagnificationFactor;                   ///< Magnification factor 1.0f is default. same as content.
+  RenderTask  mTask;                  ///< Render Task to render the source actor contents.
+  CameraActor mCameraActor;           ///< CameraActor attached to RenderTask
+  Actor       mFrame;                 ///< The Magnifier Frame
+  Actor       mSourceActor;           ///< Source Delegate Actor represents the source position to read.
+  float       mDefaultCameraDistance; ///< Default RenderTask's camera distance from target.
+  Vector3     mActorSize;             ///< The Actor size
+  float       mMagnificationFactor;   ///< Magnification factor 1.0f is default. same as content.
 };
 
 } // namespace Internal
index cb0c22b..e16f0d0 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_MODEL3D_VIEW_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/rendering/renderer.h>
 
 // INTERNAL INCLUDES
+#include <dali-toolkit/internal/controls/model3d-view/obj-loader.h>
 #include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/public-api/controls/model3d-view/model3d-view.h>
-#include <dali-toolkit/internal/controls/model3d-view/obj-loader.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 class Model3dView;
 
 namespace Internal
@@ -45,7 +43,6 @@ namespace Internal
 class Model3dView : public Control
 {
 public:
-
   /**
    * @brief Create a new Model3dView.
    *
@@ -62,7 +59,7 @@ public:
    * @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 );
+  static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value);
 
   /**
    * @brief Called to retrieve a property of an object of this type.
@@ -71,12 +68,12 @@ public:
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index index );
+  static Property::Value GetProperty(BaseObject* object, Property::Index index);
 
   /**
    * @copydoc Control::OnRelayout
    */
-  void OnRelayout( const Vector2& size, RelayoutContainer& container ) override;
+  void OnRelayout(const Vector2& size, RelayoutContainer& container) override;
 
   /**
    * @brief Called to load both geometry (.obj) and material (.mtl) files
@@ -85,7 +82,6 @@ public:
   void Load();
 
 protected:
-
   /**
    * @brief Construct a new Model3dView.
    */
@@ -97,7 +93,6 @@ protected:
   virtual ~Model3dView();
 
 private:
-
   /**
    * @copydoc Toolkit::Control::OnInitialize()
    */
@@ -106,10 +101,9 @@ private:
   /**
    * @copydoc CustomActorImpl::OnSceneConnection()
    */
-  void OnSceneConnection( int depth ) override;
+  void OnSceneConnection(int depth) override;
 
 private:
-
   /**
    * @brief Load geometry (.obj) from file
    */
@@ -145,27 +139,25 @@ private:
    */
   void UpdateShaderUniforms();
 
-
   /*
    * @brief Given a specific shader type, find out which properties are necessary for it.
    *
    * @param[in] illuminationType The type of shader we intend to use.
    * @return A bitmask of the properties we require to be loaded to use the given shader.
    */
-  int GetShaderProperties( Toolkit::Model3dView::IlluminationType illuminationType );
-
+  int GetShaderProperties(Toolkit::Model3dView::IlluminationType illuminationType);
 
   ObjLoader mObjLoader;
 
   //Properties
-  std::string mObjUrl;
-  std::string mTextureSetUrl;
-  std::string mImagesUrl;
-  std::string mTexture0Url;
-  std::string mTexture1Url;
-  std::string mTexture2Url;
-  Vector3 mLightPosition;
-  float mCameraFOV;
+  std::string                            mObjUrl;
+  std::string                            mTextureSetUrl;
+  std::string                            mImagesUrl;
+  std::string                            mTexture0Url;
+  std::string                            mTexture1Url;
+  std::string                            mTexture2Url;
+  Vector3                                mLightPosition;
+  float                                  mCameraFOV;
   Toolkit::Model3dView::IlluminationType mIlluminationType;
 
   //Size
@@ -174,23 +166,23 @@ private:
   Vector3 mSceneSize;
 
   //Render members
-  Shader mShader;
+  Shader     mShader;
   TextureSet mTextureSet;
-  Geometry mMesh;
-  Renderer mRenderer;
+  Geometry   mMesh;
+  Renderer   mRenderer;
 };
 
 } // namespace Internal
 
 // Helpers for public-api forwarding methods
-inline Toolkit::Internal::Model3dView& GetImpl( Toolkit::Model3dView& obj )
+inline Toolkit::Internal::Model3dView& GetImpl(Toolkit::Model3dView& obj)
 {
   DALI_ASSERT_ALWAYS(obj);
   Dali::RefObject& handle = obj.GetImplementation();
   return static_cast<Toolkit::Internal::Model3dView&>(handle);
 }
 
-inline const Toolkit::Internal::Model3dView& GetImpl( const Toolkit::Model3dView& obj )
+inline const Toolkit::Internal::Model3dView& GetImpl(const Toolkit::Model3dView& obj)
 {
   DALI_ASSERT_ALWAYS(obj);
   const Dali::RefObject& handle = obj.GetImplementation();
index 78de233..0f7019f 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_OBJ_LOADER_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 class ObjLoader;
 
 namespace Internal
@@ -35,7 +33,6 @@ namespace Internal
 class ObjLoader
 {
 public:
-
   struct TriIndex
   {
     int pointIndex[3];
@@ -46,11 +43,14 @@ public:
   struct Vertex
   {
     Vertex()
-    {}
+    {
+    }
 
-    Vertex( const Vector3& position, const Vector3& normal, const Vector2& textureCoord )
-    : position( position ), normal( normal )
-    {}
+    Vertex(const Vector3& position, const Vector3& normal, const Vector2& textureCoord)
+    : position(position),
+      normal(normal)
+    {
+    }
 
     Vector3 position;
     Vector3 normal;
@@ -59,11 +59,14 @@ public:
   struct VertexExt
   {
     VertexExt()
-    {}
+    {
+    }
 
-    VertexExt( const Vector3& tangent, const Vector3& binormal )
-    : tangent( tangent), bitangent( binormal )
-    {}
+    VertexExt(const Vector3& tangent, const Vector3& binormal)
+    : tangent(tangent),
+      bitangent(binormal)
+    {
+    }
 
     Vector3 tangent;
     Vector3 bitangent;
@@ -73,19 +76,19 @@ public:
   {
     void Init()
     {
-      pointMin = Vector3( std::numeric_limits<float>::max(), std::numeric_limits<float>::max(), std::numeric_limits<float>::max() );
-      pointMax = Vector3( std::numeric_limits<float>::min(), std::numeric_limits<float>::min(), std::numeric_limits<float>::min() );
+      pointMin = Vector3(std::numeric_limits<float>::max(), std::numeric_limits<float>::max(), std::numeric_limits<float>::max());
+      pointMax = Vector3(std::numeric_limits<float>::min(), std::numeric_limits<float>::min(), std::numeric_limits<float>::min());
     }
 
-    void ConsiderNewPointInVolume( const Vector3& position )
+    void ConsiderNewPointInVolume(const Vector3& position)
     {
-      pointMin.x = std::min( position.x, pointMin.x );
-      pointMin.y = std::min( position.y, pointMin.y );
-      pointMin.z = std::min( position.z, pointMin.z );
+      pointMin.x = std::min(position.x, pointMin.x);
+      pointMin.y = std::min(position.y, pointMin.y);
+      pointMin.z = std::min(position.z, pointMin.z);
 
-      pointMax.x = std::max( position.x, pointMax.x );
-      pointMax.y = std::max( position.y, pointMax.y );
-      pointMax.z = std::max( position.z, pointMax.z );
+      pointMax.x = std::max(position.x, pointMax.x);
+      pointMax.y = std::max(position.y, pointMax.y);
+      pointMax.z = std::max(position.z, pointMax.z);
     }
 
     Vector3 pointMin;
@@ -96,35 +99,33 @@ public:
   enum ObjectProperties
   {
     TEXTURE_COORDINATES = 1 << 0,
-    TANGENTS = 1 << 1,
-    BINORMALS = 1 << 2
+    TANGENTS            = 1 << 1,
+    BINORMALS           = 1 << 2
   };
 
   ObjLoader();
   virtual ~ObjLoader();
 
-  bool      IsSceneLoaded();
-  bool      IsMaterialLoaded();
+  bool IsSceneLoaded();
+  bool IsMaterialLoaded();
 
-  bool      LoadObject( char* objBuffer, std::streampos fileSize );
+  bool LoadObject(char* objBuffer, std::streampos fileSize);
 
-  void      LoadMaterial( char* objBuffer, std::streampos fileSize, std::string& diffuseTextureUrl,
-                          std::string& normalTextureUrl, std::string& glossTextureUrl );
+  void LoadMaterial(char* objBuffer, std::streampos fileSize, std::string& diffuseTextureUrl, std::string& normalTextureUrl, std::string& glossTextureUrl);
 
-  Geometry  CreateGeometry( int objectProperties, bool useSoftNormals );
+  Geometry CreateGeometry(int objectProperties, bool useSoftNormals);
 
-  Vector3   GetCenter();
-  Vector3   GetSize();
+  Vector3 GetCenter();
+  Vector3 GetSize();
 
-  void      ClearArrays();
+  void ClearArrays();
 
-  bool      IsTexturePresent();
-  bool      IsDiffuseMapPresent();
-  bool      IsNormalMapPresent();
-  bool      IsSpecularMapPresent();
+  bool IsTexturePresent();
+  bool IsDiffuseMapPresent();
+  bool IsNormalMapPresent();
+  bool IsSpecularMapPresent();
 
 private:
-
   BoundingVolume mSceneAABB;
 
   bool mSceneLoaded;
@@ -153,9 +154,9 @@ private:
    * @param[in, out] triangles The triangles that form the faces. The normals of each triangle will be updated.
    * @param[in, out] normals The normals to be calculated.
    */
-  void CalculateHardFaceNormals( const Dali::Vector<Vector3>& vertices,
-                                 Dali::Vector<TriIndex>& triangles,
-                                 Dali::Vector<Vector3>& normals );
+  void CalculateHardFaceNormals(const Dali::Vector<Vector3>& vertices,
+                                Dali::Vector<TriIndex>&      triangles,
+                                Dali::Vector<Vector3>&       normals);
 
   /**
    * @brief Calculates smoothed normals for each point.
@@ -166,9 +167,9 @@ private:
    * @param[in, out] triangles The triangles that form the faces. The normals of each triangle will be updated.
    * @param[in, out] normals The normals to be calculated.
    */
-  void CalculateSoftFaceNormals( const Dali::Vector<Vector3>& vertices,
-                                 Dali::Vector<TriIndex>& triangles,
-                                 Dali::Vector<Vector3>& normals );
+  void CalculateSoftFaceNormals(const Dali::Vector<Vector3>& vertices,
+                                Dali::Vector<TriIndex>&      triangles,
+                                Dali::Vector<Vector3>&       normals);
 
   /**
    * @brief Calculates tangents and bitangents for each point of the object.
@@ -177,7 +178,7 @@ private:
    */
   void CalculateTangentFrame();
 
-  void CenterAndScale( bool center, Dali::Vector<Vector3>& points );
+  void CenterAndScale(bool center, Dali::Vector<Vector3>& points);
 
   /**
    * @brief Using the data loaded from the file, create arrays of data to be used in creating the geometry.
@@ -188,23 +189,17 @@ private:
    * @param[in] indices Indices of corresponding values to match triangles to their respective data.
    * @param[in] useSoftNormals Indicates whether we should average the normals at each point to smooth the surface or not.
    */
-  void CreateGeometryArray( Dali::Vector<Vertex> & vertices,
-                            Dali::Vector<Vector2> & textures,
-                            Dali::Vector<VertexExt> & verticesExt,
-                            Dali::Vector<unsigned short> & indices,
-                            bool useSoftNormals );
-
+  void CreateGeometryArray(Dali::Vector<Vertex>&         vertices,
+                           Dali::Vector<Vector2>&        textures,
+                           Dali::Vector<VertexExt>&      verticesExt,
+                           Dali::Vector<unsigned short>& indices,
+                           bool                          useSoftNormals);
 };
 
-
-
 } // namespace Internal
 
 } // namespace Toolkit
 
 } // namespace Dali
 
-
-
-
 #endif // DALI_TOOLKIT_INTERNAL_OBJ_LOADER_H
index 820499a..95bbd12 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_NAVIGATION_CONTROL_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <list>
 #include <dali/public-api/actors/layer.h>
+#include <list>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/devel-api/controls/navigation-view/navigation-view.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 class NavigationView;
 
 namespace Internal
 {
-
 class NavigationBar;
 
 /**
@@ -48,7 +45,6 @@ class NavigationBar;
 class NavigationView : public Control
 {
 public:
-
   /**
    * Create an initialized NavigationView.
    * @return A handle to a newly allocated Dali resource
@@ -58,7 +54,7 @@ public:
   /**
    * @copydoc Dali::Toolkit::NavigationView::Push()
    */
-  void Push( Actor& actor );
+  void Push(Actor& actor);
 
   /**
    * @copydoc Dali::Toolkit::NavigationView::Pop()
@@ -74,9 +70,7 @@ public:
    */
   //static bool DoAction( BaseObject* object, const std::string& actionName, const Property::Map& properties );
 
-
 private: // override functions from Control
-
   /**
    * @copydoc Constrol::OnInitialize
    */
@@ -85,7 +79,7 @@ private: // override functions from Control
   /**
    * @copydoc Control::OnSceneConnection( int depth  )
    */
-  void OnSceneConnection( int depth ) override;
+  void OnSceneConnection(int depth) override;
 
   /**
    * @copydoc Control::OnRelayout()
@@ -93,7 +87,6 @@ private: // override functions from Control
   //virtual void OnRelayout( const Vector2& size, RelayoutContainer& container );
 
 protected:
-
   /**
    * Constructor.
    * It initializes the NavigationView members
@@ -106,7 +99,6 @@ protected:
   virtual ~NavigationView();
 
 private:
-
   // Undefined
   NavigationView(const NavigationView&);
 
@@ -114,30 +106,29 @@ private:
   NavigationView& operator=(const NavigationView& rhs);
 
 private:
-
-  std::vector< Actor >         mContentStack;
+  std::vector<Actor> mContentStack;
 };
 
 } // namespace Internal
 
 // Helpers for public-api forwarding methods
 
-inline Toolkit::Internal::NavigationView& GetImpl( Toolkit::NavigationView& navigationView )
+inline Toolkit::Internal::NavigationView& GetImpl(Toolkit::NavigationView& navigationView)
 {
-  DALI_ASSERT_ALWAYS( navigationView );
+  DALI_ASSERT_ALWAYS(navigationView);
 
   Dali::RefObject& handle = navigationView.GetImplementation();
 
-  return static_cast<Toolkit::Internal::NavigationView&>( handle );
+  return static_cast<Toolkit::Internal::NavigationView&>(handle);
 }
 
-inline const Toolkit::Internal::NavigationView& GetImpl( const Toolkit::NavigationView& navigationView )
+inline const Toolkit::Internal::NavigationView& GetImpl(const Toolkit::NavigationView& navigationView)
 {
-  DALI_ASSERT_ALWAYS( navigationView );
+  DALI_ASSERT_ALWAYS(navigationView);
 
   const Dali::RefObject& handle = navigationView.GetImplementation();
 
-  return static_cast<const Toolkit::Internal::NavigationView&>( handle );
+  return static_cast<const Toolkit::Internal::NavigationView&>(handle);
 }
 
 } // namespace Toolkit
index 023e527..e5e95f8 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_PAGE_TURN_BOOK_SPINE_EFFECT_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/visuals/visual-properties.h>
 #include <dali-toolkit/internal/graphics/builtin-shader-extern-gen.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * @brief Creates a new PageTurnBookSpineEffect
  * This is an assisting effect of PageTurnEffect to display a book spine on _static_ pages, and also to flip the image horizontally when needed.
@@ -55,10 +52,10 @@ inline Property::Map CreatePageTurnBookSpineEffect()
 
   Property::Map customShader;
 
-  customShader[ Toolkit::Visual::Shader::Property::VERTEX_SHADER ] = SHADER_PAGE_TURN_BOOK_SPINE_EFFECT_VERT.data();
-  customShader[ Toolkit::Visual::Shader::Property::FRAGMENT_SHADER ] = SHADER_PAGE_TURN_BOOK_SPINE_EFFECT_FRAG.data();
+  customShader[Toolkit::Visual::Shader::Property::VERTEX_SHADER]   = SHADER_PAGE_TURN_BOOK_SPINE_EFFECT_VERT.data();
+  customShader[Toolkit::Visual::Shader::Property::FRAGMENT_SHADER] = SHADER_PAGE_TURN_BOOK_SPINE_EFFECT_FRAG.data();
 
-  map[ Toolkit::Visual::Property::SHADER ] = customShader;
+  map[Toolkit::Visual::Property::SHADER] = customShader;
   return map;
 }
 
index fba77c5..2f0a47e 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_PAGE_TURN_EFFECT_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
-
 /**
  * @brief Re-applies PageTurnEffect internal constraints
  * The internal constraint uses the OriginalCenter property and the CURRENT_CENTER Property
@@ -41,7 +37,7 @@ namespace Internal
  * @param[in] actor The page turn actor to which internal constraints should be re-applied
  * @param[in] pageHeight The page height.
  */
-void PageTurnApplyInternalConstraint( Actor& actor, float pageHeight );
+void PageTurnApplyInternalConstraint(Actor& actor, float pageHeight);
 
 /**
  * @brief Create a new PageTurnEffect
index c0c5d13..fbd29a0 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_PAGE_TURN_LANDSCAPE_VIEW_IMPL_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class PageTurnLandscapeView : public PageTurnView
 {
 public:
-
   /**
    * @copydoc Toolkit::PageTurnLandscapeView::New( PageFactory&, const Vector2& )
    */
-  static Toolkit::PageTurnLandscapeView New( PageFactory& pageFactory, const Vector2& viewPageSize );
+  static Toolkit::PageTurnLandscapeView New(PageFactory& pageFactory, const Vector2& viewPageSize);
 
 protected:
   /**
@@ -47,7 +43,7 @@ protected:
    * @param[in] pageFactory The factory which provides image to PageTurnView as the page content.
    * @param[in] viewPageSize The size of the page
    */
-  PageTurnLandscapeView( PageFactory& pageFactory, const Vector2& viewPageSize );
+  PageTurnLandscapeView(PageFactory& pageFactory, const Vector2& viewPageSize);
 
   /**
    * A reference counted object may only be deleted by calling Unreference()
@@ -55,7 +51,6 @@ protected:
   virtual ~PageTurnLandscapeView();
 
 protected: // From PageTurnView
-
   /**
    * @copydoc PageTurnView::OnPageTurnViewInitialize
    */
@@ -64,26 +59,24 @@ protected: // From PageTurnView
   /**
    * @copydoc PageTurnView::OnAddPage
    */
-  void OnAddPage( Actor newPage, bool isLeftSide ) override;
+  void OnAddPage(Actor newPage, bool isLeftSide) override;
 
   /**
    * @copydoc PageTurnView::SetPanPosition
    */
-  Vector2 SetPanPosition( const Vector2& gesturePosition ) override;
+  Vector2 SetPanPosition(const Vector2& gesturePosition) override;
 
   /**
    * @copydoc PageTurnView::SetPanActor
    */
-  void SetPanActor( const Vector2& panPosition ) override;
+  void SetPanActor(const Vector2& panPosition) override;
 
 private:
-
   //Undefined
-  PageTurnLandscapeView( const PageTurnLandscapeView& );
+  PageTurnLandscapeView(const PageTurnLandscapeView&);
 
   //undefined
   PageTurnLandscapeView& operator=(const PageTurnLandscapeView& rhs);
-
 };
 
 } // namespace Internal
index 358ad76..598b682 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_PAGE_TURN_PORTRAIT_VIEW_IMPL_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * Implementation class of the PageTurnView in portrait mode
  */
 class PageTurnPortraitView : public PageTurnView
 {
 public:
-
   /**
    * @copydoc Toolkit::PageTurnPortraitView::New( PageFactory&, const Vector2& )
    */
-  static Toolkit::PageTurnPortraitView New( PageFactory& pageFactory, const Vector2& viewPageSize );
+  static Toolkit::PageTurnPortraitView New(PageFactory& pageFactory, const Vector2& viewPageSize);
 
 protected:
-
   /**
    * Constructor.
    * It initializes the PageTurnPortraitView members
    * @param[in] pageFactory The factory which provides image to PageTurnView as the page content.
    * @param[in] viewPageSize The size of the page
    */
-  PageTurnPortraitView( PageFactory& pageFactory, const Vector2& viewPageSize );
+  PageTurnPortraitView(PageFactory& pageFactory, const Vector2& viewPageSize);
 
   /**
    * A reference counted object may only be deleted by calling Unreference()
@@ -59,7 +54,6 @@ protected:
   virtual ~PageTurnPortraitView();
 
 protected: // From PageTurnView
-
   /**
    * @copydoc PageTurnView::OnPageTurnViewInitialize
    */
@@ -68,38 +62,35 @@ protected: // From PageTurnView
   /**
    * @copydoc PageTurnView::SetPanPosition
    */
-  Vector2 SetPanPosition( const Vector2& gesturePosition ) override;
+  Vector2 SetPanPosition(const Vector2& gesturePosition) override;
 
   /**
    * @copydoc PageTurnView::SetPanActor
    */
-  void SetPanActor( const Vector2& panPosition ) override;
+  void SetPanActor(const Vector2& panPosition) override;
 
   /**
    * @copydoc PageTurnView::OnPossibleOutwardsFlick
    */
-  void OnPossibleOutwardsFlick( const Vector2& panPosition, float gestureSpeed ) override;
+  void OnPossibleOutwardsFlick(const Vector2& panPosition, float gestureSpeed) override;
 
   /**
    * @copydoc PageTurnView::OnTurnedOver
    */
-  void OnTurnedOver( Actor actor, bool isLeftSide ) override;
+  void OnTurnedOver(Actor actor, bool isLeftSide) override;
 
 private:
-
   /**
    * @copydoc PageTurnView::TurnedOver
    */
-  void TurnedOverBackwards( Animation& animation );
+  void TurnedOverBackwards(Animation& animation);
 
 private:
-
   //Undefined
-  PageTurnPortraitView( const PageTurnPortraitView& );
+  PageTurnPortraitView(const PageTurnPortraitView&);
 
   //undefined
   PageTurnPortraitView& operator=(const PageTurnPortraitView& rhs);
-
 };
 
 } // namespace Internal
index 7023daf..82f865a 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_PAGE_TURN_VIEW_IMPL_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/rendering/renderer.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control-impl.h>
-#include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-view.h>
 #include <dali-toolkit/devel-api/controls/page-turn-view/page-factory.h>
+#include <dali-toolkit/devel-api/controls/page-turn-view/page-turn-view.h>
 #include <dali-toolkit/devel-api/controls/shadow-view/shadow-view.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class PageTurnView : public Control
 {
 protected:
-
   /**
    * The book page class
    */
@@ -60,7 +56,7 @@ protected:
      * Set the page texture content
      * @param[in] texture The content of the page.
      */
-    void SetTexture( Texture texture );
+    void SetTexture(Texture texture);
 
     /**
      * Apply an effect onto the page actor.
@@ -90,40 +86,38 @@ protected:
      * Set the pan center property
      * @param[in] value The property value
      */
-    void SetPanCenter( const Vector2& value );
+    void SetPanCenter(const Vector2& value);
 
     /**
      * Set the original center property to be used by shader
      * @param[in] value The property value
      */
-    void SetOriginalCenter( const Vector2& value );
+    void SetOriginalCenter(const Vector2& value);
 
     /**
      * Set the current center property to be used by shader
      * @param[in] value The property value
      */
-    void SetCurrentCenter( const Vector2& value );
-
-    Actor actor;                              ///< The page actor
-    Shader shader;                            ///< The shader used by the actor
-    TextureSet textureSet;                    ///< The set of textures used by the actor
-    Renderer renderer;                        ///< The renderer of the actor
-    bool isTurnBack;                          ///< The turning direction
-    Property::Index propertyPanDisplacement;  ///< The horizontal displacement of the pan
-    Property::Index propertyPanCenter;        ///< The current pan position
-    Property::Index propertyOriginalCenter;   ///< The original center to be used by the shader
-    Property::Index propertyCurrentCenter;    ///< The current center to be used by the shader
-    Property::Index propertyTurnDirection;    ///< The turning direction property
+    void SetCurrentCenter(const Vector2& value);
+
+    Actor           actor;                   ///< The page actor
+    Shader          shader;                  ///< The shader used by the actor
+    TextureSet      textureSet;              ///< The set of textures used by the actor
+    Renderer        renderer;                ///< The renderer of the actor
+    bool            isTurnBack;              ///< The turning direction
+    Property::Index propertyPanDisplacement; ///< The horizontal displacement of the pan
+    Property::Index propertyPanCenter;       ///< The current pan position
+    Property::Index propertyOriginalCenter;  ///< The original center to be used by the shader
+    Property::Index propertyCurrentCenter;   ///< The current center to be used by the shader
+    Property::Index propertyTurnDirection;   ///< The turning direction property
   };
 
-
 protected:
-
   /**
    * Constructor.
    * It initializes the PageTurnView members
    */
-  PageTurnView( PageFactory& pageFactory, const Vector2& viewPageSize );
+  PageTurnView(PageFactory& pageFactory, const Vector2& viewPageSize);
 
   /**
    * A reference counted object may only be deleted by calling Unreference()
@@ -131,12 +125,11 @@ protected:
   virtual ~PageTurnView();
 
 public:
-
   /**
    * Set the page size
    * @param[in] viewPageSize The size of pages
    */
-  void SetPageSize( const Vector2& viewPageSize );
+  void SetPageSize(const Vector2& viewPageSize);
 
   /**
    * Retrieve the page size.
@@ -150,7 +143,7 @@ public:
    * The top-left quarter of this ellipse is used to calculate spine normal for simulating shadow.
    * @param [in] spineShadowParameter The major&minor ellipse radius for the simulated spine shadow.
    */
-  void SetSpineShadowParameter( const Vector2& spineShadowParameter );
+  void SetSpineShadowParameter(const Vector2& spineShadowParameter);
 
   /**
    * Retrieve the spine shadow parameter of the shader effects.
@@ -162,7 +155,7 @@ public:
    * Jump to a given page.
    * @param[in] pageId The new current page id.
    */
-  void GoToPage( unsigned int pageId );
+  void GoToPage(unsigned int pageId);
 
   /**
    * Retrieve the id of the current Page.
@@ -171,27 +164,26 @@ public:
   unsigned int GetCurrentPage();
 
 protected:
-
   /**
    * This method gets a page from the factory and add to the control
    * to keep NUMBER_OF_CACHED_PAGES_EACH_SIDE pages available in each side
    * @param[in] pageIndex The index of the page to be added
    */
-  void AddPage( int pageIndex );
+  void AddPage(int pageIndex);
 
   /**
    * This method removes a page from the control
    * to keep only NUMBER_OF_CACHED_PAGES_EACH_SIDE pages available in each side
    * @param[in] pageIndex The index of the page to be removed
    */
-  void RemovePage( int pageIndex );
+  void RemovePage(int pageIndex);
 
   /**
    * This method updates the actor and animation states after one page is turned over
    * This method is a callback, connected when receiving the finished signal of a page turning over animation.
    * @param [in] the page turning over animation handle
    */
-  void TurnedOver( Animation& animation );
+  void TurnedOver(Animation& animation);
 
   /**
    * This method organize the depth of the pages on stage
@@ -200,15 +192,14 @@ protected:
   void OrganizePageDepth();
 
 private:
-
   /**
    * Create shader from a property map.
    * @param[in] shaderMap The shader property map;
    * @return The created shader.
    */
-  Shader CreateShader( const Property::Map& shaderMap );
+  Shader CreateShader(const Property::Map& shaderMap);
 
- /**
 /**
   * Set up the shadow view control to cast shadow
   */
   void SetupShadowView();
@@ -217,27 +208,27 @@ private:
    * This method defines the processes when the pan started, gets called by OnPan( .. )
    * @param[in] gesturePosition The current touch position in local page actor coordinates.
    */
-  void PanStarted( const Vector2& gesturePosition );
+  void PanStarted(const Vector2& gesturePosition);
 
   /**
    * This method defines the processes when the pan continuing, gets called by OnPan( .. )
    * @param[in] gesturePosition The current touch position in local page actor coordinates.
    */
-  void PanContinuing( const Vector2& gesturePosition );
+  void PanContinuing(const Vector2& gesturePosition);
 
   /**
    * This method defines the processes when the pan finished, gets called by OnPanGesture( .. )
    * @param[in] gesturePosition The current touch position in local page actor coordinates.
    * @param[in] gestureSpeed The speed of the pan ( in pixels per millisecond )
    */
-  void PanFinished( const Vector2& gesturePosition, float gestureSpeed );
+  void PanFinished(const Vector2& gesturePosition, float gestureSpeed);
 
   /**
    * This method updates the actor and the animation states after one page is slidden back instead of turned over
    * This method is a callback, connected when receiving the finished signal of a page sliding back animation.
    * @param [in] the page sliding back animation handle
    */
-  void SliddenBack( Animation& animation );
+  void SliddenBack(Animation& animation);
 
   /**
    * Stop the page turning animation and contraint.
@@ -246,11 +237,10 @@ private:
   void StopTurning();
 
 private: // from Control
-
   /**
    * @copydoc Toolkit::Control::OnPan
    */
-  void OnPan( const PanGesture& gesture ) override;
+  void OnPan(const PanGesture& gesture) override;
 
   /**
    * @copydoc Toolkit::Control::OnInitialize
@@ -260,7 +250,7 @@ private: // from Control
   /**
    * @copydoc CustomActorImpl::OnSceneConnection()
    */
-  void OnSceneConnection( int depth ) override;
+  void OnSceneConnection(int depth) override;
 
   /**
    * @copydoc CustomActorImpl::OnSceneDisconnection()
@@ -268,7 +258,6 @@ private: // from Control
   void OnSceneDisconnection() override;
 
 private: // implemented differently by PageTurnLandscapeView and PageTurnPortraitView
-
   /**
    * This method is called after the pageTurnView initialization.
    * To set the size of the control size and the parent origin of turning page layer
@@ -282,7 +271,9 @@ private: // implemented differently by PageTurnLandscapeView and PageTurnPortrai
    * @param[in] newPage The added page actor
    * @param[in] isLeftSide Which side the new page is added to
    */
-  virtual void OnAddPage( Actor newPage, bool isLeftSide ) { }
+  virtual void OnAddPage(Actor newPage, bool isLeftSide)
+  {
+  }
 
   /**
    * This method is called when pan started or continuing
@@ -291,14 +282,14 @@ private: // implemented differently by PageTurnLandscapeView and PageTurnPortrai
    * @param[in] gesturePosition The pan position in the control coordinate
    * @return The pan position in the page actor local coordinate
    */
-  virtual Vector2 SetPanPosition( const Vector2& gesturePosition ) = 0;
+  virtual Vector2 SetPanPosition(const Vector2& gesturePosition) = 0;
 
   /**
    * This method is called when pan started to determined which page is panned given the pan position in control coordinate
    * Implemented in subclasses to provide specific behaviour.
    * @param[in] gesturePosition The pan position in the control coordinate
    */
-  virtual void SetPanActor( const Vector2& panPosition ) = 0;
+  virtual void SetPanActor(const Vector2& panPosition) = 0;
 
   /**
    * This method is called when pan finished to detect outwards flick
@@ -307,7 +298,9 @@ private: // implemented differently by PageTurnLandscapeView and PageTurnPortrai
    * @param[in] panPosition The pan position in the page actor local coordinate
    * @param[in] gestureSpeed The speed of the pan gesture( in pixels per millisecond )
    */
-  virtual void OnPossibleOutwardsFlick( const Vector2& panPosition, float gestureSpeed ) { }
+  virtual void OnPossibleOutwardsFlick(const Vector2& panPosition, float gestureSpeed)
+  {
+  }
 
   /**
    * This method is called when page is turned over
@@ -315,10 +308,11 @@ private: // implemented differently by PageTurnLandscapeView and PageTurnPortrai
    * @param[in] actor The page actor
    * @param[in] isLeftSide Which side the page is turned to
    */
-  virtual void OnTurnedOver( Actor actor, bool isLeftSide ) { }
+  virtual void OnTurnedOver(Actor actor, bool isLeftSide)
+  {
+  }
 
 public: //signal and property
-
   /**
    * @copydoc Toolkit::PageTurnView::PageTurnStartedSignal()
    */
@@ -348,9 +342,9 @@ public: //signal and property
     * @return True if the signal was connected.
     * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
     */
-  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
+  static bool DoConnectSignal(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor);
 
-   // Properties
+  // Properties
 
   /**
    * Called when a property of an object of this type is set.
@@ -358,7 +352,7 @@ public: //signal and property
    * @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 );
+  static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value);
 
   /**
    * Called to retrieve a property of an object of this type.
@@ -366,71 +360,68 @@ public: //signal and property
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index index );
+  static Property::Value GetProperty(BaseObject* object, Property::Index index);
 
 private:
-
   //Undefined
-  PageTurnView( const PageTurnView& );
+  PageTurnView(const PageTurnView&);
 
   //undefined
   PageTurnView& operator=(const PageTurnView& rhs);
 
 protected:
-
-  Layer                          mTurningPageLayer;        ///< The layer for the turning page, to avoid possible depth conflict
-  Toolkit::ShadowView            mShadowView;              ///< The shadow view control for shadow casting
-  Actor                          mShadowPlaneBackground;   ///< The plane for the shadow to cast on
-  Actor                          mPointLight;              ///< The point light used for shadow casting
-
-  PageFactory* const             mPageFactory;             ///< The factory which provides the page actors
-  Shader                         mTurnEffectShader;        ///< The group of PageTurnEffects
-  Shader                         mSpineEffectShader;       ///< The book spine shader effect
-  Geometry                       mGeometry;                ///< The grid geometry for pages
-
-  std::vector<Page>              mPages;                   ///< The vector of pages on stage
-  std::map<Animation,int>        mAnimationPageIdPair;     ///< The map to keep track which page actor is the animation act on
-
-  Vector2                        mPageSize;                ///< The page size
-  Vector2                        mControlSize;             ///< The size of the control, it is decided by the page size, the SetSize from application can not change it
-  Vector2                        mSpineShadowParameter;    ///< The spine shadow parameter for all the above shader effects
-  Vector2                        mOriginalCenter;          ///< The original center set to the PageTurnEffect
-  Vector2                        mCurrentCenter;           ///< The current center set to the PageTurnEffect
-  Vector2                        mPressDownPosition;       ///< The first press down position of the pan gesture
-
-  float                          mDistanceUpCorner;        ///< The distance between the original center of PageTurnEffect and the top-left corner of the page
-  float                          mDistanceBottomCorner;    ///< The distance between the original center of PageTurnEffect and the bottom-left corner of the page
-  float                          mPanDisplacement;         ///< The displacement of the pan after the constrains are applied
-
-  int                            mTotalPageCount;          ///< The total number of pages provided by the page factory
-  int                            mCurrentPageIndex;        ///< The index of the current page, between 0 ~ mTotalPageCount-1
-  int                            mTurningPageIndex;        ///< The index of the turning page
-  int                            mIndex;                   ///< The index to keep track which PanDisplacementProperty, CurrentCenterProperty is used for the current panning page
-  int                            mSlidingCount;            ///< The boolean vector to keep track whether there are animating pages sliding back
-  int                            mAnimatingCount;          ///< The boolean vector to keep track which PageTurnEffect, PanDisplacementProperty, CurrentCenterProperty is available for using
-
-  bool                           mConstraints;             ///< The boolean to keep track the constrains are applied or not
-  bool                           mPress;                   ///< The boolean to keep track the state of the pageTurnEffect is activated or not
-  bool                           mPageUpdated;             ///< The boolean to keep track whether is page is updated after any turning activity
-
-  Toolkit::PageTurnView::PageTurnSignal   mPageTurnStartedSignal;   ///< The signal to notify that a page has started turning
-  Toolkit::PageTurnView::PageTurnSignal   mPageTurnFinishedSignal;  ///< The signal to notify that a page has finished turning
-  Toolkit::PageTurnView::PagePanSignal    mPagePanStartedSignal;    ///< The signal to notify that a page has started panning
-  Toolkit::PageTurnView::PagePanSignal    mPagePanFinishedSignal;   ///< The signal to notify that a page has finished panning
-
-  static const char * const PROPERTY_TEXTURE_WIDTH;     ///< The uniform name of texture width
-  static const char * const PROPERTY_ORIGINAL_CENTER;   ///< The property name of original center, which is used to constrain the uniforms
-  static const char * const PROPERTY_CURRENT_CENTER;    ///< The property name of current center, which is used to constrain the uniforms
-
-  static const int               MAXIMUM_TURNING_NUM;                  ///< How many pages are allowed to animating in the same time
-  static const int               NUMBER_OF_CACHED_PAGES_EACH_SIDE;     ///< The maximum number of pages kept, (MAXIMUM_ANIMATION_NUM+1) pages for each side
-  static const int               NUMBER_OF_CACHED_PAGES;               ///< The maximum number of pages kept, (MAXIMUM_ANIMATION_NUM+1)*2 pages in total
-  static const float             STATIC_PAGE_INTERVAL_DISTANCE;        ///< The depth interval between stacked pages (static pages)
+  Layer               mTurningPageLayer;      ///< The layer for the turning page, to avoid possible depth conflict
+  Toolkit::ShadowView mShadowView;            ///< The shadow view control for shadow casting
+  Actor               mShadowPlaneBackground; ///< The plane for the shadow to cast on
+  Actor               mPointLight;            ///< The point light used for shadow casting
+
+  PageFactory* const mPageFactory;       ///< The factory which provides the page actors
+  Shader             mTurnEffectShader;  ///< The group of PageTurnEffects
+  Shader             mSpineEffectShader; ///< The book spine shader effect
+  Geometry           mGeometry;          ///< The grid geometry for pages
+
+  std::vector<Page>        mPages;               ///< The vector of pages on stage
+  std::map<Animation, int> mAnimationPageIdPair; ///< The map to keep track which page actor is the animation act on
+
+  Vector2 mPageSize;             ///< The page size
+  Vector2 mControlSize;          ///< The size of the control, it is decided by the page size, the SetSize from application can not change it
+  Vector2 mSpineShadowParameter; ///< The spine shadow parameter for all the above shader effects
+  Vector2 mOriginalCenter;       ///< The original center set to the PageTurnEffect
+  Vector2 mCurrentCenter;        ///< The current center set to the PageTurnEffect
+  Vector2 mPressDownPosition;    ///< The first press down position of the pan gesture
+
+  float mDistanceUpCorner;     ///< The distance between the original center of PageTurnEffect and the top-left corner of the page
+  float mDistanceBottomCorner; ///< The distance between the original center of PageTurnEffect and the bottom-left corner of the page
+  float mPanDisplacement;      ///< The displacement of the pan after the constrains are applied
+
+  int mTotalPageCount;   ///< The total number of pages provided by the page factory
+  int mCurrentPageIndex; ///< The index of the current page, between 0 ~ mTotalPageCount-1
+  int mTurningPageIndex; ///< The index of the turning page
+  int mIndex;            ///< The index to keep track which PanDisplacementProperty, CurrentCenterProperty is used for the current panning page
+  int mSlidingCount;     ///< The boolean vector to keep track whether there are animating pages sliding back
+  int mAnimatingCount;   ///< The boolean vector to keep track which PageTurnEffect, PanDisplacementProperty, CurrentCenterProperty is available for using
+
+  bool mConstraints; ///< The boolean to keep track the constrains are applied or not
+  bool mPress;       ///< The boolean to keep track the state of the pageTurnEffect is activated or not
+  bool mPageUpdated; ///< The boolean to keep track whether is page is updated after any turning activity
+
+  Toolkit::PageTurnView::PageTurnSignal mPageTurnStartedSignal;  ///< The signal to notify that a page has started turning
+  Toolkit::PageTurnView::PageTurnSignal mPageTurnFinishedSignal; ///< The signal to notify that a page has finished turning
+  Toolkit::PageTurnView::PagePanSignal  mPagePanStartedSignal;   ///< The signal to notify that a page has started panning
+  Toolkit::PageTurnView::PagePanSignal  mPagePanFinishedSignal;  ///< The signal to notify that a page has finished panning
+
+  static const char* const PROPERTY_TEXTURE_WIDTH;   ///< The uniform name of texture width
+  static const char* const PROPERTY_ORIGINAL_CENTER; ///< The property name of original center, which is used to constrain the uniforms
+  static const char* const PROPERTY_CURRENT_CENTER;  ///< The property name of current center, which is used to constrain the uniforms
+
+  static const int   MAXIMUM_TURNING_NUM;              ///< How many pages are allowed to animating in the same time
+  static const int   NUMBER_OF_CACHED_PAGES_EACH_SIDE; ///< The maximum number of pages kept, (MAXIMUM_ANIMATION_NUM+1) pages for each side
+  static const int   NUMBER_OF_CACHED_PAGES;           ///< The maximum number of pages kept, (MAXIMUM_ANIMATION_NUM+1)*2 pages in total
+  static const float STATIC_PAGE_INTERVAL_DISTANCE;    ///< The depth interval between stacked pages (static pages)
 };
 
 } // namespace Internal
 
-
 // Helpers for public-api forwarding methods
 
 inline Toolkit::Internal::PageTurnView& GetImplementation(Toolkit::PageTurnView& pub)
index 4db8bd1..ecdfab9 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_CONFIRMATION_POPUP_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/signals/signal-delegate.h>
 #include <dali/public-api/animation/animation.h>
 #include <dali/public-api/common/dali-vector.h>
-#include <dali/devel-api/signals/signal-delegate.h>
 
 // INTERNAL INCLUDES
-#include "popup-impl.h"
 #include <dali-toolkit/devel-api/controls/popup/confirmation-popup.h>
+#include "popup-impl.h"
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 #define MAXIMUM_NUMBER_OF_CONTROLS 2
 
 /**
@@ -46,7 +43,6 @@ namespace Internal
 class ConfirmationPopup : public Dali::Toolkit::Internal::Popup
 {
 public:
-
   /**
    * Create a new ConfirmationPopup.
    * @return A smart-pointer to the newly allocated ConfirmationPopup.
@@ -54,7 +50,6 @@ public:
   static Dali::Toolkit::ConfirmationPopup New();
 
 protected:
-
   /**
    * Construct a new ConfirmationPopup.
    */
@@ -66,14 +61,13 @@ protected:
   virtual ~ConfirmationPopup();
 
 public:
-
   /**
    * Called when a property of an object of this type is set.
    * @param[in] object The object whose property is set.
    * @param[in] propertyIndex The property index.
    * @param[in] value The new property value.
    */
-  static void SetProperty( BaseObject* object, Property::Index propertyIndex, const Property::Value& value );
+  static void SetProperty(BaseObject* object, Property::Index propertyIndex, const Property::Value& value);
 
   /**
    * Called to retrieve a property of an object of this type.
@@ -81,7 +75,7 @@ public:
    * @param[in] propertyIndex The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index propertyIndex );
+  static Property::Value GetProperty(BaseObject* object, Property::Index propertyIndex);
 
   /**
    * Connects a callback function with the object's signals.
@@ -92,24 +86,22 @@ public:
    * @return True if the signal was connected.
    * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
    */
-  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
+  static bool DoConnectSignal(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor);
 
 private:
-
   /**
    * This type houses a list of dynamically created signals.
    */
-  typedef std::vector< std::pair< std::string, SignalDelegate* > > SignalContainerType;
+  typedef std::vector<std::pair<std::string, SignalDelegate*> > SignalContainerType;
 
 private:
-
   /**
    * Sets the name of the signal to connect to within the specified actor.
    *
    * @param[in] controlNumber The index of the control.
    * @param[in] signalName The name of the signal to connect to.
    */
-  void SetControlSignalName( const unsigned int controlNumber, const std::string& signalName );
+  void SetControlSignalName(const unsigned int controlNumber, const std::string& signalName);
 
   /**
    * Gets the name of the signal to connect to within the specified actor.
@@ -117,57 +109,52 @@ private:
    * @param[in] controlNumber The index of the control.
    * @return The name of the signal to connect to.
    */
-  std::string GetControlSignalName( unsigned int controlNumber ) const;
+  std::string GetControlSignalName(unsigned int controlNumber) const;
 
   /**
    * @copydoc Control::GetControlSignal()
    */
-  SignalDelegate* GetControlSignal( const std::string& signalName );
+  SignalDelegate* GetControlSignal(const std::string& signalName);
 
 private:
-
   // Undefined
-  ConfirmationPopup( const ConfirmationPopup& );
+  ConfirmationPopup(const ConfirmationPopup&);
 
   // Undefined
-  ConfirmationPopup& operator=( const ConfirmationPopup& );
+  ConfirmationPopup& operator=(const ConfirmationPopup&);
 
 private:
-
   // Properties:
 
-  std::string mControlSignalNames[ MAXIMUM_NUMBER_OF_CONTROLS ]; ///< Stores the names of the signals to connect to per control.
+  std::string mControlSignalNames[MAXIMUM_NUMBER_OF_CONTROLS]; ///< Stores the names of the signals to connect to per control.
 
   // Internal variables:
 
-  SignalContainerType mControlSignals;                           ///< Stores the dynamically created signals.
-
+  SignalContainerType mControlSignals; ///< Stores the dynamically created signals.
 };
 
 } // namespace Internal
 
-
 // Helpers for public-api forwarding methods
 
-inline Toolkit::Internal::ConfirmationPopup& GetDerivedImplementation( Toolkit::ConfirmationPopup& popup )
+inline Toolkit::Internal::ConfirmationPopup& GetDerivedImplementation(Toolkit::ConfirmationPopup& popup)
 {
-  DALI_ASSERT_ALWAYS( popup );
+  DALI_ASSERT_ALWAYS(popup);
 
   Dali::RefObject& handle = popup.GetImplementation();
 
-  return static_cast<Toolkit::Internal::ConfirmationPopup&>( handle );
+  return static_cast<Toolkit::Internal::ConfirmationPopup&>(handle);
 }
 
-inline const Toolkit::Internal::ConfirmationPopup& GetDerivedImplementation( const Toolkit::ConfirmationPopup& popup )
+inline const Toolkit::Internal::ConfirmationPopup& GetDerivedImplementation(const Toolkit::ConfirmationPopup& popup)
 {
-  DALI_ASSERT_ALWAYS( popup );
+  DALI_ASSERT_ALWAYS(popup);
 
   const Dali::RefObject& handle = popup.GetImplementation();
 
-  return static_cast<const Toolkit::Internal::ConfirmationPopup&>( handle );
+  return static_cast<const Toolkit::Internal::ConfirmationPopup&>(handle);
 }
 
-
 } // namespace Toolkit
 
 } // namespace Dali
index e9dffef..5d9eae3 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_POPUP_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/animation/animation-data.h>
 #include <dali/public-api/actors/layer.h>
 #include <dali/public-api/adaptor-framework/timer.h>
 #include <dali/public-api/animation/animation.h>
-#include <dali/devel-api/animation/animation-data.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control-impl.h>
-#include <dali-toolkit/devel-api/controls/table-view/table-view.h>
 #include <dali-toolkit/devel-api/controls/popup/popup.h>
+#include <dali-toolkit/devel-api/controls/table-view/table-view.h>
 #include <dali-toolkit/internal/controls/control/control-data-impl.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class Popup;
 
-typedef IntrusivePtr< Popup > PopupPtr;
+typedef IntrusivePtr<Popup> PopupPtr;
 
 /**
  * @copydoc Toolkit::Popup
@@ -49,7 +46,6 @@ typedef IntrusivePtr< Popup > PopupPtr;
 class Popup : public Control
 {
 public:
-
   /**
    * Create a new Popup.
    * @return A public handle to the newly allocated Popup.
@@ -57,11 +53,10 @@ public:
   static Dali::Toolkit::Popup New();
 
 public:
-
   /**
    * @copydoc Toolkit::Popup::SetPopupBackgroundImage
    */
-  void SetPopupBackgroundImage( Actor image );
+  void SetPopupBackgroundImage(Actor image);
 
   /**
    * @copydoc Toolkit::Popup::GetPopupBackgroundImage
@@ -71,7 +66,7 @@ public:
   /**
    * @copydoc Toolkit::Popup::SetTitle( Actor titleActor )
    */
-  void SetTitle( Actor titleActor );
+  void SetTitle(Actor titleActor);
 
   /**
    * @copydoc Toolkit::Popup::GetTitle
@@ -81,7 +76,7 @@ public:
   /**
    * @copydoc Toolkit::Popup::SetContent
    */
-  void SetContent( Actor content );
+  void SetContent(Actor content);
 
   /**
    * @copydoc Toolkit::Popup::GetContent
@@ -91,7 +86,7 @@ public:
   /**
    * @copydoc Toolkit::Popup::SetFooter
    */
-  void SetFooter( Actor control );
+  void SetFooter(Actor control);
 
   /**
    * @copydoc Toolkit::Popup::GetFooter
@@ -101,7 +96,7 @@ public:
   /**
    * @copydoc Toolkit::Popup::SetDisplayState
    */
-  void SetDisplayState( Toolkit::Popup::DisplayState displayState );
+  void SetDisplayState(Toolkit::Popup::DisplayState displayState);
 
   /**
    * @copydoc Toolkit::Popup::GetDisplayState
@@ -111,7 +106,7 @@ public:
   /**
    * @copydoc Toolkit::Popup::SetTailVisibility
    */
-  void SetTailVisibility( bool visible );
+  void SetTailVisibility(bool visible);
 
   /**
    * @copydoc Toolkit::Popup::IsTailVisible
@@ -121,7 +116,7 @@ public:
   /**
    * @copydoc Toolkit::Popup::SetTailPosition
    */
-  void SetTailPosition( Vector3 position );
+  void SetTailPosition(Vector3 position);
 
   /**
    * @copydoc Toolkit::Popup::GetTailPosition
@@ -131,7 +126,7 @@ public:
   /**
    * @copydoc Toolkit::Popup::SetContextualMode
    */
-  void SetContextualMode( Toolkit::Popup::ContextualMode mode );
+  void SetContextualMode(Toolkit::Popup::ContextualMode mode);
 
   /**
    * @copydoc Toolkit::Popup::GetContextualMode
@@ -141,7 +136,7 @@ public:
   /**
    * @copydoc Toolkit::Popup::SetAnimationDuration
    */
-  void SetAnimationDuration( float duration );
+  void SetAnimationDuration(float duration);
 
   /**
    * @copydoc Toolkit::Popup::GetAnimationDuration
@@ -151,7 +146,7 @@ public:
   /**
    * @copydoc Toolkit::Popup::SetAnimationMode
    */
-  void SetAnimationMode( Toolkit::Popup::AnimationMode animationMode );
+  void SetAnimationMode(Toolkit::Popup::AnimationMode animationMode);
 
   /**
    * @copydoc Toolkit::Popup::GetAnimationMode
@@ -161,7 +156,7 @@ public:
   /**
    * @copydoc Toolkit::Popup::SetAutoHideDelay
    */
-  void SetAutoHideDelay( int delay );
+  void SetAutoHideDelay(int delay);
 
   /**
    * @copydoc Toolkit::Popup::GetAutoHideDelay
@@ -171,7 +166,7 @@ public:
   /**
    * @copydoc Toolkit::Popup::SetBackingEnabled
    */
-  void SetBackingEnabled( bool enabled );
+  void SetBackingEnabled(bool enabled);
 
   /**
    * @copydoc Toolkit::Popup::IsBackingEnabled
@@ -181,7 +176,7 @@ public:
   /**
    * @copydoc Toolkit::Popup::SetBackingColor
    */
-  void SetBackingColor( Vector4 color );
+  void SetBackingColor(Vector4 color);
 
   /**
    * @copydoc Toolkit::Popup::GetBackingColor
@@ -191,7 +186,7 @@ public:
   /**
    * @copydoc Toolkit::Popup::SetTailUpImage
    */
-  void SetTailUpImage( std::string image );
+  void SetTailUpImage(std::string image);
 
   /**
    * @copydoc Toolkit::Popup::GetTailUpImage
@@ -201,7 +196,7 @@ public:
   /**
    * @copydoc Toolkit::Popup::SetTailDownImage
    */
-  void SetTailDownImage( std::string image );
+  void SetTailDownImage(std::string image);
 
   /**
    * @copydoc Toolkit::Popup::GetTailDownImage
@@ -211,7 +206,7 @@ public:
   /**
    * @copydoc Toolkit::Popup::SetTailLeftImage
    */
-  void SetTailLeftImage( std::string image );
+  void SetTailLeftImage(std::string image);
 
   /**
    * @copydoc Toolkit::Popup::GetTailLeftImage
@@ -221,7 +216,7 @@ public:
   /**
    * @copydoc Toolkit::Popup::SetTailRightImage
    */
-  void SetTailRightImage( std::string image );
+  void SetTailRightImage(std::string image);
 
   /**
    * @copydoc Toolkit::Popup::GetTailRightImage
@@ -234,7 +229,7 @@ public:
    * @param[in] propertyIndex The property index.
    * @param[in] value The new property value.
    */
-  static void SetProperty( BaseObject* object, Property::Index propertyIndex, const Property::Value& value );
+  static void SetProperty(BaseObject* object, Property::Index propertyIndex, const Property::Value& value);
 
   /**
    * Called to retrieve a property of an object of this type.
@@ -242,14 +237,14 @@ public:
    * @param[in] propertyIndex The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index propertyIndex );
+  static Property::Value GetProperty(BaseObject* object, Property::Index propertyIndex);
 
 protected:
   struct AccessibleImpl : public Control::Impl::AccessibleImpl
   {
     using Control::Impl::AccessibleImpl::AccessibleImpl;
 
-    std::string GetNameRaw() override;
+    std::string                 GetNameRaw() override;
     Dali::Accessibility::States CalculateStates() override;
   };
 
@@ -264,7 +259,6 @@ protected:
   virtual ~Popup();
 
 private:
-
   /**
    * @brief Creates the layout of the popup, to be done just before showing for the first time.
    * Also calls OnLayoutSetup() to allow derived classes to perform layout at this stage.
@@ -282,7 +276,7 @@ private:
    * If contextual mode is not enabled, this method has no effect.
    * @param[in] size The Popups current size (can be accessed from within the OnRelayout() method).
    */
-  void LayoutContext( const Vector2& size );
+  void LayoutContext(const Vector2& size);
 
   /**
    * @brief All transition-in animation setup and layout is done here.
@@ -299,7 +293,7 @@ private:
    * @param[in] transitionIn True to perform a transition-in, false for transition out.
    * @param[in] instantaneous Optional - If set to true will override the duration to provide an instant animation.
    */
-  void StartTransitionAnimation( bool transitionIn, bool instantaneous = false );
+  void StartTransitionAnimation(bool transitionIn, bool instantaneous = false);
 
   /**
    * @brief Invoked once a display state change has completed.
@@ -330,7 +324,7 @@ private:
    *
    * @param[in] enabled Set to true to make the popup touch-transparent.
    */
-  void SetTouchTransparent( bool enabled );
+  void SetTouchTransparent(bool enabled);
 
   /**
    * @brief Returns if the popup allows touch events to pass through or not.
@@ -345,7 +339,7 @@ private:
    *
    * @param[in] map A Property::Map containing a description of an animation
    */
-  void SetEntryAnimationData( const Property::Map& map );
+  void SetEntryAnimationData(const Property::Map& map);
 
   /**
    * @brief Allows the popup exit animation to be setup from a Property::Map that could
@@ -353,7 +347,7 @@ private:
    *
    * @param[in] map A Property::Map containing a description of an animation
    */
-  void SetExitAnimationData( const Property::Map& map );
+  void SetExitAnimationData(const Property::Map& map);
 
   /**
    * @briefs Updates the popup background's position and size.
@@ -361,7 +355,6 @@ private:
   void UpdateBackgroundPositionAndSize();
 
 public: // Signals
-
   /**
    * @copydoc Dali::Toolkit::Popup::OutsideTouchedSignal()
    */
@@ -396,15 +389,14 @@ public: // Signals
    * @return True if the signal was connected.
    * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
    */
-  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
+  static bool DoConnectSignal(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor);
 
 private:
-
   /**
    * Signal occurs when the State animation (transition from hide <-> show) finishes.
    * @param[in] source The animation that just finished.
    */
-  void OnDisplayChangeAnimationFinished( Animation& source );
+  void OnDisplayChangeAnimationFinished(Animation& source);
 
   /**
    * Signal occurs when the dimmed backing for the Popup is touched.
@@ -428,7 +420,7 @@ private:
    * @param[in] touch The Touch Data.
    * @return Whether to consume event or not.
    */
-  bool OnDialogTouched( Actor actor, const TouchEvent& touch );
+  bool OnDialogTouched(Actor actor, const TouchEvent& touch);
 
   /**
    * @copydoc Toolkit::Control::OnInitialize()
@@ -440,28 +432,30 @@ private:
    * Normally due to a change in contents.
    * Note: This is only done when the popup is shown.
    */
-  virtual void OnLayoutSetup() {}
+  virtual void OnLayoutSetup()
+  {
+  }
 
   /**
    * Called when the popup is directly or indirectly parented to the stage.
    */
-  void OnSceneConnection( int depth ) override;
+  void OnSceneConnection(int depth) override;
 
   /**
    * From Control; called after a child has been added to the owning actor.
    * @param[in] child The child which has been added.
    */
-  void OnChildAdd( Actor& child ) override;
+  void OnChildAdd(Actor& child) override;
 
   /**
    * @copydoc Control::OnRelayOut()
    */
-  void OnRelayout( const Vector2& size, RelayoutContainer& container ) override;
+  void OnRelayout(const Vector2& size, RelayoutContainer& container) override;
 
   /**
    * @copydoc Control::OnSetResizePolicy()
    */
-  void OnSetResizePolicy( ResizePolicy::Type policy, Dimension::Type dimension ) override;
+  void OnSetResizePolicy(ResizePolicy::Type policy, Dimension::Type dimension) override;
 
   /**
    * @copydoc Control::GetNaturalSize()
@@ -471,25 +465,24 @@ private:
   /**
    * @copydoc Control::GetHeightForWidth()
    */
-  float GetHeightForWidth( float width ) override;
+  float GetHeightForWidth(float width) override;
 
   /**
    * @copydoc Control::GetWidthForHeight()
    */
-  float GetWidthForHeight( float height ) override;
+  float GetWidthForHeight(float height) override;
 
   /**
    * @copydoc Control::OnKeyEvent()
    */
-  bool OnKeyEvent( const KeyEvent& event ) override;
+  bool OnKeyEvent(const KeyEvent& event) override;
 
   /**
    * @copydoc Control::GetNextKeyboardFocusableActor()
    */
-  Actor GetNextKeyboardFocusableActor( Actor currentFocusedActor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled );
+  Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled);
 
 private:
-
   /**
    * Recursively add any focusable actors or layout containers to the provided vector.
    * Include the top level actor if it is a layout container.
@@ -497,7 +490,7 @@ private:
    * @param[in]     parent          The actor to start from
    * @param[in/out] focusableActors The vector to add focusable actors to
    */
-  void AddFocusableChildren( Actor parent, std::vector< Actor >& focusableActors );
+  void AddFocusableChildren(Actor parent, std::vector<Actor>& focusableActors);
 
   /**
    * Recursively add any focusable actors or layout containers to the provided vector.
@@ -505,7 +498,7 @@ private:
    * @param[in]     parent          The actor to start from
    * @param[in/out] focusableActors The vector to add focusable actors to
    */
-  void AddFocusableChildrenRecursive( Actor parent, std::vector< Actor >& focusableActors );
+  void AddFocusableChildrenRecursive(Actor parent, std::vector<Actor>& focusableActors);
 
   /**
    * Sets up the touch signals connections as required.
@@ -514,7 +507,6 @@ private:
   void SetupTouch();
 
 private:
-
   // Undefined.
   Popup(const Popup&);
 
@@ -522,73 +514,72 @@ private:
   Popup& operator=(const Popup& rhs);
 
 private:
-
   Toolkit::Popup::TouchedOutsideSignalType     mTouchedOutsideSignal;
   Toolkit::Popup::DisplayStateChangeSignalType mShowingSignal;
   Toolkit::Popup::DisplayStateChangeSignalType mShownSignal;
   Toolkit::Popup::DisplayStateChangeSignalType mHidingSignal;
   Toolkit::Popup::DisplayStateChangeSignalType mHiddenSignal;
 
-  Layer mLayer;                                      ///< Popup Layer (i.e. Dim backing and PopupBg reside in this).
-  Toolkit::TableView mPopupLayout;                   ///< Popup Background (i.e. dialog reside in this).
-  Toolkit::Control mBacking;                         ///< Backing actor (dim effect).
-  Actor mPreviousFocusedActor;                       ///< Store the previous focused actor to restore the focus when popup hide.
-  Actor mTailImage;                                  ///< Stores the tail image.
-  Actor mPopupContainer;                             ///< This actor is used to house the background image and the main popup layout.
-  Animation mAnimation;                              ///< The current animation in use used to manage display state changing.
-  bool mAlterAddedChild;                             ///< Flag used to control whether children are reparented or not.
-  bool mLayoutDirty;                                 ///< Set to true whenever any property that would require a layout update is modified.
-  Timer mAutoHideTimer;                              ///< Used to perform an auto-hide of the popup if desired.
-  bool mTouchTransparent;                            ///< Allows all events to pass through the popup.
+  Layer              mLayer;                ///< Popup Layer (i.e. Dim backing and PopupBg reside in this).
+  Toolkit::TableView mPopupLayout;          ///< Popup Background (i.e. dialog reside in this).
+  Toolkit::Control   mBacking;              ///< Backing actor (dim effect).
+  Actor              mPreviousFocusedActor; ///< Store the previous focused actor to restore the focus when popup hide.
+  Actor              mTailImage;            ///< Stores the tail image.
+  Actor              mPopupContainer;       ///< This actor is used to house the background image and the main popup layout.
+  Animation          mAnimation;            ///< The current animation in use used to manage display state changing.
+  bool               mAlterAddedChild;      ///< Flag used to control whether children are reparented or not.
+  bool               mLayoutDirty;          ///< Set to true whenever any property that would require a layout update is modified.
+  Timer              mAutoHideTimer;        ///< Used to perform an auto-hide of the popup if desired.
+  bool               mTouchTransparent;     ///< Allows all events to pass through the popup.
 
   // Main Content related properties:
-  Actor mTitle;                                      ///< Stores the text title.
-  Actor mContent;                                    ///< Stores the unselected content.
-  Actor mFooter;                                     ///< Stores the footer content (typically controls).
+  Actor mTitle;   ///< Stores the text title.
+  Actor mContent; ///< Stores the unselected content.
+  Actor mFooter;  ///< Stores the footer content (typically controls).
 
   // Display related properties.
-  Toolkit::Popup::DisplayState mDisplayState;        ///< The current display state of the popup.
-  bool mTailVisible;                                 ///< True if the popup tail should be visible.
-  Vector3 mTailPosition;                             ///< The position of the tail.
-  Toolkit::Popup::ContextualMode mContextualMode;    ///< Allows the popup to be layed out adjacent to its parent in different directions.
-  float mAnimationDuration;                          ///< The duration of the transition in and out animations.
-  Toolkit::Popup::AnimationMode mAnimationMode;      ///< The animation to use to transition in and out.
-  Dali::AnimationData mEntryAnimationData;           ///< Stores description data that can be used for generating a custom entry animation.
-  Dali::AnimationData mExitAnimationData;            ///< Stores description data that can be used for generating a custom exit animation.
-  unsigned int mAutoHideDelay;                       ///< If set, will auto-hide the popup after a specified amount of time.
+  Toolkit::Popup::DisplayState   mDisplayState;       ///< The current display state of the popup.
+  bool                           mTailVisible;        ///< True if the popup tail should be visible.
+  Vector3                        mTailPosition;       ///< The position of the tail.
+  Toolkit::Popup::ContextualMode mContextualMode;     ///< Allows the popup to be layed out adjacent to its parent in different directions.
+  float                          mAnimationDuration;  ///< The duration of the transition in and out animations.
+  Toolkit::Popup::AnimationMode  mAnimationMode;      ///< The animation to use to transition in and out.
+  Dali::AnimationData            mEntryAnimationData; ///< Stores description data that can be used for generating a custom entry animation.
+  Dali::AnimationData            mExitAnimationData;  ///< Stores description data that can be used for generating a custom exit animation.
+  unsigned int                   mAutoHideDelay;      ///< If set, will auto-hide the popup after a specified amount of time.
 
   // Style related properties:
-  bool mBackingEnabled;                              ///< True if a dimmed backing will be used.
-  Vector4 mBackingColor;                             ///< The color of the backing.
-  Actor mPopupBackgroundImage;                       ///< Stores the background image.
-  Rect<int> mBackgroundBorder;                       ///< Background border.
-  float mMargin;                                     ///< Internal margin for popup contents.
-  std::string mTailUpImage;                          ///< Image used for the tail for the up direction.
-  std::string mTailDownImage;                        ///< Image used for the tail for the down direction.
-  std::string mTailLeftImage;                        ///< Image used for the tail for the left direction.
-  std::string mTailRightImage;                       ///< Image used for the tail for the right direction.
+  bool        mBackingEnabled;       ///< True if a dimmed backing will be used.
+  Vector4     mBackingColor;         ///< The color of the backing.
+  Actor       mPopupBackgroundImage; ///< Stores the background image.
+  Rect<int>   mBackgroundBorder;     ///< Background border.
+  float       mMargin;               ///< Internal margin for popup contents.
+  std::string mTailUpImage;          ///< Image used for the tail for the up direction.
+  std::string mTailDownImage;        ///< Image used for the tail for the down direction.
+  std::string mTailLeftImage;        ///< Image used for the tail for the left direction.
+  std::string mTailRightImage;       ///< Image used for the tail for the right direction.
 };
 
 } // namespace Internal
 
 // Helpers for public-api forwarding methods
 
-inline Toolkit::Internal::Popup& GetImpl( Toolkit::Popup& publicObject )
+inline Toolkit::Internal::Popup& GetImpl(Toolkit::Popup& publicObject)
 {
-  DALI_ASSERT_ALWAYS( publicObject );
+  DALI_ASSERT_ALWAYS(publicObject);
 
   Dali::RefObject& handle = publicObject.GetImplementation();
 
-  return static_cast<Toolkit::Internal::Popup&>( handle );
+  return static_cast<Toolkit::Internal::Popup&>(handle);
 }
 
-inline const Toolkit::Internal::Popup& GetImpl( const Toolkit::Popup& publicObject )
+inline const Toolkit::Internal::Popup& GetImpl(const Toolkit::Popup& publicObject)
 {
-  DALI_ASSERT_ALWAYS( publicObject );
+  DALI_ASSERT_ALWAYS(publicObject);
 
   const Dali::RefObject& handle = publicObject.GetImplementation();
 
-  return static_cast<const Toolkit::Internal::Popup&>( handle );
+  return static_cast<const Toolkit::Internal::Popup&>(handle);
 }
 
 } // namespace Toolkit
index 8d33e02..f806926 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_PROGRESS_BAR_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control-impl.h>
-#include <dali/public-api/animation/animation.h>
-#include <dali-toolkit/public-api/controls/progress-bar/progress-bar.h>
 #include <dali-toolkit/devel-api/controls/progress-bar/progress-bar-devel.h>
 #include <dali-toolkit/devel-api/visual-factory/transition-data.h>
 #include <dali-toolkit/internal/controls/control/control-data-impl.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali-toolkit/public-api/controls/progress-bar/progress-bar.h>
+#include <dali/public-api/animation/animation.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class ProgressBar;
 
-typedef Dali::IntrusivePtr< ProgressBar > ProgressBarPtr;
+typedef Dali::IntrusivePtr<ProgressBar> ProgressBarPtr;
 
 /**
  * @copydoc Toolkit::ProgressBar
@@ -45,16 +42,14 @@ typedef Dali::IntrusivePtr< ProgressBar > ProgressBarPtr;
 class ProgressBar : public Control
 {
 public:
-
   /**
    * Create a new ProgressBar with predefined style.
    * @param[in] progressBarStyle A style value that determines the shape of the progress bar.
    * @return A public handle to the newly allocated ProgressBar.
    */
-  static Dali::Toolkit::ProgressBar New( DevelProgressBar::Style progressBarStyle = DevelProgressBar::Style::LINEAR );
+  static Dali::Toolkit::ProgressBar New(DevelProgressBar::Style progressBarStyle = DevelProgressBar::Style::LINEAR);
 
 public:
-
   // Properties
 
   /**
@@ -62,7 +57,7 @@ public:
    *
    * @param[in] value The value to set. Will be clamped to [lowerBound .. upperBound]
    */
-  void SetProgressValue( float value );
+  void SetProgressValue(float value);
 
   /**
    * Get the value of the ProgressBar
@@ -76,7 +71,7 @@ public:
    *
    * @param[in] value The secondary progress value to set. Will be clamped to [lowerBound .. upperBound]
    */
-  void SetSecondaryProgressValue( float value );
+  void SetSecondaryProgressValue(float value);
 
   /**
    * Get the secondary progress value of the ProgressBar
@@ -90,7 +85,7 @@ public:
    *
    * @param[in] value The value to set.
    */
-  void SetIndeterminate( bool value );
+  void SetIndeterminate(bool value);
 
   /**
    * Get the indeterminate state value of the ProgressBar
@@ -104,7 +99,7 @@ public:
    *
    * @param[in] Transition data map to set.
    */
-  void SetIndeterminateVisualTransition( Property::Map transtion );
+  void SetIndeterminateVisualTransition(Property::Map transtion);
 
   /**
    * Get the indeterminate visual transition data map of the ProgressBar
@@ -126,7 +121,6 @@ public:
    */
   Toolkit::ProgressBar::ValueChangedSignalType& ValueChangedSignal();
 
-
   /**
    * Connects a callback function with the object's signals.
    * @param[in] object The object providing the signal.
@@ -136,8 +130,7 @@ public:
    * @return True if the signal was connected.
    * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
    */
-  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName,
-                               FunctorDelegate* functor );
+  static bool DoConnectSignal(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor);
 
   // Properties
 
@@ -147,7 +140,7 @@ public:
    * @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 );
+  static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value);
 
   /**
    * Called to retrieve a property of an object of this type.
@@ -155,10 +148,9 @@ public:
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index propertyIndex );
+  static Property::Value GetProperty(BaseObject* object, Property::Index propertyIndex);
 
 protected:
-
   /**
    * Construct a new ProgressBar.
    */
@@ -172,7 +164,7 @@ protected:
   /**
    * @copydoc CustomActorImpl::OnRelayout()
    */
-  void OnRelayout( const Vector2& size, RelayoutContainer& container ) override;
+  void OnRelayout(const Vector2& size, RelayoutContainer& container) override;
 
   /**
    * @copydoc CustomActorImpl::GetNaturalSize()
@@ -180,7 +172,6 @@ protected:
   Vector3 GetNaturalSize() override;
 
 private:
-
   /**
    * Domain is a from/to pair
    */
@@ -192,14 +183,14 @@ private:
     Domain()
     {
     }
-    Domain( Vector2 fromVal, Vector2 toVal )
-        : from( fromVal ), to( toVal )
+    Domain(Vector2 fromVal, Vector2 toVal)
+    : from(fromVal),
+      to(toVal)
     {
     }
   };
 
 private:
-
   /**
    * @copydoc Toolkit::Control::OnInitialize()
    */
@@ -211,65 +202,63 @@ private:
    * @param[in] currentSize The current size of the ProgressBar
    * @return The range as a domain pair
    */
-  Domain CalcDomain( const Vector2& currentSize );
+  Domain CalcDomain(const Vector2& currentSize);
 
   /**
    * Set indeterminate visual transition animation
    */
-  void SetIndeterminateVisualTransition( Toolkit::TransitionData transtion );
+  void SetIndeterminateVisualTransition(Toolkit::TransitionData transtion);
 
   /**
    * Convert value to transition data
    */
-  Toolkit::TransitionData ConvertPropertyToTransition( const Property::Value& value );
+  Toolkit::TransitionData ConvertPropertyToTransition(const Property::Value& value);
 
   /**
    * Update progress bar label when progress value is changed
    */
-  void CreateVisualsForComponent( Property::Index index, const Property::Value& value, const int visualDepth );
+  void CreateVisualsForComponent(Property::Index index, const Property::Value& value, const int visualDepth);
 
   /**
    * Update progress bar label when progress value is changed
    */
-  bool GetPropertyMapForVisual( Property::Index visualIndex, Property::Map& retreivedMap ) const;
+  bool GetPropertyMapForVisual(Property::Index visualIndex, Property::Map& retreivedMap) const;
 
   /**
    * Apply progress value to visual
    */
-  void ApplyProgressToVisual( float progress, Property::Index index, int depth );
+  void ApplyProgressToVisual(float progress, Property::Index index, int depth);
 
   /**
    * Apply progress value to visual transform
    */
-  void ApplyProgressToVisualTransform( float progress, Vector2 trackSize, Property::Index index );
+  void ApplyProgressToVisualTransform(float progress, Vector2 trackSize, Property::Index index);
 
   /**
    * Check if we should start animating
    */
-  void OnSceneConnection( int depth ) override;
+  void OnSceneConnection(int depth) override;
 
 private:
-
   // Undefined
-  ProgressBar( const ProgressBar& );
+  ProgressBar(const ProgressBar&);
 
   // Undefined
-  ProgressBar& operator=( const ProgressBar& rhs );
+  ProgressBar& operator=(const ProgressBar& rhs);
 
 private:
+  Domain mDomain; ///< Current domain of the handle
 
-  Domain mDomain;                                                     ///< Current domain of the handle
-
-  Animation mIndeterminateVisualAni;                                  ///< Animation for indetrminate visual. Transition animation.
-  Toolkit::ProgressBar::ValueChangedSignalType mValueChangedSignal;   ///< Signal emitted when the value is changed
+  Animation                                    mIndeterminateVisualAni; ///< Animation for indetrminate visual. Transition animation.
+  Toolkit::ProgressBar::ValueChangedSignalType mValueChangedSignal;     ///< Signal emitted when the value is changed
 
-  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
-  Property::Map mTrackVisualMap;                                      ///< To backup visual properties when switching determinate/indeterminate.
-  Property::Map mProgressVisualMap;                                   ///< To backup visual properties when switching determinate/indeterminate.
-  Property::Map mSecondaryProgressVisualMap;                          ///< To backup visual properties when switching determinate/indeterminate.
+  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
+  Property::Map           mTrackVisualMap;                ///< To backup visual properties when switching determinate/indeterminate.
+  Property::Map           mProgressVisualMap;             ///< To backup visual properties when switching determinate/indeterminate.
+  Property::Map           mSecondaryProgressVisualMap;    ///< To backup visual properties when switching determinate/indeterminate.
 
 protected:
   struct AccessibleImpl : public Control::Impl::AccessibleImpl,
@@ -279,7 +268,7 @@ protected:
     double GetMinimum() override;
     double GetCurrent() override;
     double GetMaximum() override;
-    bool SetCurrent( double ) override;
+    bool   SetCurrent(double) override;
     double GetMinimumIncrement() override;
   };
 };
@@ -288,22 +277,22 @@ protected:
 
 // Helpers for public-api forwarding methods
 
-inline Toolkit::Internal::ProgressBar& GetImpl( Toolkit::ProgressBar& pub )
+inline Toolkit::Internal::ProgressBar& GetImpl(Toolkit::ProgressBar& pub)
 {
-  DALI_ASSERT_ALWAYS( pub );
+  DALI_ASSERT_ALWAYS(pub);
 
   Dali::RefObject& handle = pub.GetImplementation();
 
-  return static_cast< Toolkit::Internal::ProgressBar& >( handle );
+  return static_cast<Toolkit::Internal::ProgressBar&>(handle);
 }
 
-inline const Toolkit::Internal::ProgressBar& GetImpl( const Toolkit::ProgressBar& pub )
+inline const Toolkit::Internal::ProgressBar& GetImpl(const Toolkit::ProgressBar& pub)
 {
-  DALI_ASSERT_ALWAYS( pub );
+  DALI_ASSERT_ALWAYS(pub);
 
   const Dali::RefObject& handle = pub.GetImplementation();
 
-  return static_cast< const Toolkit::Internal::ProgressBar& >( handle );
+  return static_cast<const Toolkit::Internal::ProgressBar&>(handle);
 }
 
 } // namespace Toolkit
index 42ee4dd..7303324 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_GLTF_LOADER_H\r
 \r
 /*\r
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.\r
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.\r
  *\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
@@ -20,9 +20,9 @@
 \r
 // EXTERNAL INCLUDES\r
 #include <dali/public-api/actors/layer.h>\r
+#include <dali/public-api/animation/animation.h>\r
 #include <dali/public-api/rendering/renderer.h>\r
 #include <dali/public-api/rendering/shader.h>\r
-#include <dali/public-api/animation/animation.h>\r
 \r
 // INTERNAL INCLUDES\r
 #include <dali-toolkit/devel-api/builder/json-parser.h>\r
@@ -32,16 +32,12 @@ using namespace Dali;
 \r
 namespace Dali\r
 {\r
-\r
 namespace Toolkit\r
 {\r
-\r
 namespace Internal\r
 {\r
-\r
 namespace Gltf\r
 {\r
-\r
 enum ShaderType\r
 {\r
   NO_TEXTURE_SHADER,\r
@@ -114,9 +110,9 @@ enum ShaderType
 struct BufferInfo\r
 {\r
   BufferInfo()\r
-    : byteLength( -1 ),\r
-    uri( "" ),\r
-    name( "" )\r
+  : byteLength(-1),\r
+    uri(""),\r
+    name("")\r
   {\r
   }\r
 \r
@@ -124,7 +120,7 @@ struct BufferInfo
   {\r
   }\r
 \r
-  int32_t byteLength;\r
+  int32_t     byteLength;\r
   std::string uri;\r
   std::string name;\r
 };\r
@@ -132,12 +128,12 @@ struct BufferInfo
 struct BufferViewInfo\r
 {\r
   BufferViewInfo()\r
-    : buffer( -1 ),\r
-    byteOffset( 0 ),\r
-    byteLength( 0 ),\r
-    byteStride( 0 ),\r
-    target( 0 ),\r
-    name( "" )\r
+  : buffer(-1),\r
+    byteOffset(0),\r
+    byteLength(0),\r
+    byteStride(0),\r
+    target(0),\r
+    name("")\r
   {\r
   }\r
 \r
@@ -145,19 +141,19 @@ struct BufferViewInfo
   {\r
   }\r
 \r
-  int32_t buffer;\r
-  int32_t byteOffset;\r
-  int32_t byteLength;\r
-  int32_t byteStride;\r
-  int32_t target;\r
+  int32_t     buffer;\r
+  int32_t     byteOffset;\r
+  int32_t     byteLength;\r
+  int32_t     byteStride;\r
+  int32_t     target;\r
   std::string name;\r
 };\r
 \r
 struct TextureInfo\r
 {\r
   TextureInfo()\r
-    : sourceIdx( -1 ),\r
-    samplerIdx( -1 )\r
+  : sourceIdx(-1),\r
+    samplerIdx(-1)\r
   {\r
   }\r
 \r
@@ -171,9 +167,9 @@ struct TextureInfo
 struct PbrTextureInfo\r
 {\r
   PbrTextureInfo()\r
-    : index( -1 ),\r
-    texCoord( 0 ),\r
-    value( 0.0 )\r
+  : index(-1),\r
+    texCoord(0),\r
+    value(0.0)\r
   {\r
   }\r
   ~PbrTextureInfo()\r
@@ -182,20 +178,20 @@ struct PbrTextureInfo
 \r
   int32_t index;\r
   int32_t texCoord;\r
-  float value;\r
+  float   value;\r
 };\r
 \r
 struct MaterialInfo\r
 {\r
   MaterialInfo()\r
-    : baseColorFactor( 1, 1, 1, 1 ),\r
-    metallicFactor( 1.0 ),\r
-    roughnessFactor( 1.0 ),\r
-    emissiveFactor( 0.0, 0.0, 0.0 ),\r
-    alphaMode( "OPAQUE" ),\r
-    alphaCutoff( 0.5 ),\r
-    doubleSided( false ),\r
-    name( "" )\r
+  : baseColorFactor(1, 1, 1, 1),\r
+    metallicFactor(1.0),\r
+    roughnessFactor(1.0),\r
+    emissiveFactor(0.0, 0.0, 0.0),\r
+    alphaMode("OPAQUE"),\r
+    alphaCutoff(0.5),\r
+    doubleSided(false),\r
+    name("")\r
   {\r
   }\r
 \r
@@ -203,13 +199,13 @@ struct MaterialInfo
   {\r
   }\r
 \r
-  Vector4 baseColorFactor;\r
-  float metallicFactor;\r
-  float roughnessFactor;\r
-  Vector3 emissiveFactor;\r
+  Vector4     baseColorFactor;\r
+  float       metallicFactor;\r
+  float       roughnessFactor;\r
+  Vector3     emissiveFactor;\r
   std::string alphaMode;\r
-  float alphaCutoff;\r
-  bool doubleSided;\r
+  float       alphaCutoff;\r
+  bool        doubleSided;\r
 \r
   PbrTextureInfo baseColorTexture;\r
   PbrTextureInfo metallicRoughnessTexture;\r
@@ -224,15 +220,15 @@ struct MaterialInfo
 struct AccessorInfo\r
 {\r
   AccessorInfo()\r
-    : bufferView( -1 ),\r
-    byteOffset( 0 ),\r
-    componentType( -1 ),\r
-    normalized( false ),\r
-    count( 0 ),\r
-    type( "" ),\r
-    max( 0 ),\r
-    min( 0 ),\r
-    name( "" )\r
+  : bufferView(-1),\r
+    byteOffset(0),\r
+    componentType(-1),\r
+    normalized(false),\r
+    count(0),\r
+    type(""),\r
+    max(0),\r
+    min(0),\r
+    name("")\r
   {\r
   }\r
 \r
@@ -240,14 +236,14 @@ struct AccessorInfo
   {\r
   }\r
 \r
-  int32_t bufferView;\r
-  int32_t byteOffset;\r
-  int32_t componentType;\r
-  bool normalized;\r
-  int32_t count;\r
+  int32_t     bufferView;\r
+  int32_t     byteOffset;\r
+  int32_t     componentType;\r
+  bool        normalized;\r
+  int32_t     count;\r
   std::string type;\r
-  int32_t max;\r
-  int32_t min;\r
+  int32_t     max;\r
+  int32_t     min;\r
   std::string name;\r
   //need to add max, min\r
 };\r
@@ -255,9 +251,9 @@ struct AccessorInfo
 struct Attribute\r
 {\r
   Attribute()\r
-    : POSITION( -1 ),\r
-    NORMAL( -1 ),\r
-    TANGENT( -1 )\r
+  : POSITION(-1),\r
+    NORMAL(-1),\r
+    TANGENT(-1)\r
   {\r
   }\r
 \r
@@ -276,16 +272,16 @@ struct Attribute
 struct MeshInfo\r
 {\r
   MeshInfo()\r
-    : indicesIdx( -1 ),\r
-    materialsIdx( -1 ),\r
-    mode( 4 )\r
+  : indicesIdx(-1),\r
+    materialsIdx(-1),\r
+    mode(4)\r
   {\r
   }\r
 \r
   ~MeshInfo()\r
   {\r
   }\r
-  Geometry geometry;\r
+  Geometry    geometry;\r
   std::string name;\r
 \r
   int32_t indicesIdx;\r
@@ -302,9 +298,9 @@ struct MeshInfo
 struct AnimationChannelInfo\r
 {\r
   AnimationChannelInfo()\r
-    : sampler( -1 ),\r
-    targetNode( -1 ),\r
-    path( "" )\r
+  : sampler(-1),\r
+    targetNode(-1),\r
+    path("")\r
   {\r
   }\r
 \r
@@ -312,18 +308,17 @@ struct AnimationChannelInfo
   {\r
   }\r
 \r
-  int32_t sampler;\r
-  int32_t targetNode;\r
+  int32_t     sampler;\r
+  int32_t     targetNode;\r
   std::string path;\r
-\r
 };\r
 \r
 struct AnimationSamplerInfo\r
 {\r
   AnimationSamplerInfo()\r
-    : input( -1 ),\r
-    output( -1 ),\r
-    interpolation( "" )\r
+  : input(-1),\r
+    output(-1),\r
+    interpolation("")\r
   {\r
   }\r
 \r
@@ -331,15 +326,15 @@ struct AnimationSamplerInfo
   {\r
   }\r
 \r
-  int32_t input;\r
-  int32_t output;\r
+  int32_t     input;\r
+  int32_t     output;\r
   std::string interpolation;\r
 };\r
 \r
 struct AnimationInfo\r
 {\r
   AnimationInfo()\r
-    : name( "" )\r
+  : name("")\r
   {\r
   }\r
 \r
@@ -347,7 +342,7 @@ struct AnimationInfo
   {\r
   }\r
 \r
-  std::string name;\r
+  std::string                       name;\r
   std::vector<AnimationChannelInfo> channelArray;\r
   std::vector<AnimationSamplerInfo> samplerArray;\r
 };\r
@@ -355,10 +350,10 @@ struct AnimationInfo
 struct OrthographicInfo\r
 {\r
   OrthographicInfo()\r
-    : xmag( 0.0f ),\r
-    ymag( 0.0f ),\r
-    zfar( 0.0f ),\r
-    znear( 0.0f )\r
+  : xmag(0.0f),\r
+    ymag(0.0f),\r
+    zfar(0.0f),\r
+    znear(0.0f)\r
   {\r
   }\r
 \r
@@ -375,10 +370,10 @@ struct OrthographicInfo
 struct PerspectiveInfo\r
 {\r
   PerspectiveInfo()\r
-    : aspectRatio( 0.0f ),\r
-    yfov( 0.0f ),\r
-    zfar( 0.0f ),\r
-    znear( 0.0f )\r
+  : aspectRatio(0.0f),\r
+    yfov(0.0f),\r
+    zfar(0.0f),\r
+    znear(0.0f)\r
   {\r
   }\r
 \r
@@ -395,8 +390,8 @@ struct PerspectiveInfo
 struct CameraInfo\r
 {\r
   CameraInfo()\r
-    : name( "" ),\r
-    type( "" )\r
+  : name(""),\r
+    type("")\r
   {\r
   }\r
 \r
@@ -404,10 +399,10 @@ struct CameraInfo
   {\r
   }\r
 \r
-  std::string name;\r
-  std::string type;\r
+  std::string      name;\r
+  std::string      type;\r
   OrthographicInfo orthographic;\r
-  PerspectiveInfo perspective;\r
+  PerspectiveInfo  perspective;\r
 };\r
 \r
 /**\r
@@ -425,7 +420,6 @@ struct CameraInfo
 class Loader\r
 {\r
 public:\r
-\r
   /**\r
    * @brief Create an uninitialized Loader.\r
    */\r
@@ -442,55 +436,55 @@ public:
    * @param[in] scene3dView Scene3dView data loaded from file.\r
    * @return true if scene is successfully loaded\r
    */\r
-  bool LoadScene( const std::string& filePath, Internal::Scene3dView& scene3dView );\r
+  bool LoadScene(const std::string& filePath, Internal::Scene3dView& scene3dView);\r
 \r
 private:\r
-  bool ParseGltf( const std::string& filePath );\r
+  bool ParseGltf(const std::string& filePath);\r
   bool LoadAssets();\r
 \r
-  bool CreateScene( Internal::Scene3dView& scene3dView );\r
+  bool CreateScene(Internal::Scene3dView& scene3dView);\r
 \r
-  void LoadCamera( Scene3dView& scene3dView );\r
-  bool LoadOrthoGraphic( const TreeNode& camera, CameraInfo& cameraInfo );\r
-  bool LoadPerspective( const TreeNode& camera, CameraInfo& cameraInfo );\r
+  void LoadCamera(Scene3dView& scene3dView);\r
+  bool LoadOrthoGraphic(const TreeNode& camera, CameraInfo& cameraInfo);\r
+  bool LoadPerspective(const TreeNode& camera, CameraInfo& cameraInfo);\r
 \r
-  bool LoadSceneNodes( Scene3dView& scene3dView );\r
-  Actor AddNode( Scene3dView& scene3dView, uint32_t index );\r
-  void SetActorCache( Actor& actor, uint32_t index );\r
-  bool SetTextureAndSampler( TextureSet& textureSet, int32_t textureIdx, std::string& toShader, std::string shader, int32_t& addIdx );\r
+  bool  LoadSceneNodes(Scene3dView& scene3dView);\r
+  Actor AddNode(Scene3dView& scene3dView, uint32_t index);\r
+  void  SetActorCache(Actor& actor, uint32_t index);\r
+  bool  SetTextureAndSampler(TextureSet& textureSet, int32_t textureIdx, std::string& toShader, std::string shader, int32_t& addIdx);\r
 \r
-  bool LoadAnimation( Scene3dView& scene3dView );\r
-  bool LoadAnimationChannels( const TreeNode& animation, AnimationInfo& animationInfo );\r
-  bool LoadAnimationSamplers( const TreeNode& animation, AnimationInfo& animationInfo );\r
+  bool LoadAnimation(Scene3dView& scene3dView);\r
+  bool LoadAnimationChannels(const TreeNode& animation, AnimationInfo& animationInfo);\r
+  bool LoadAnimationSamplers(const TreeNode& animation, AnimationInfo& animationInfo);\r
 \r
 private:\r
   Dali::Toolkit::JsonParser mParser;\r
-  const TreeNode* mNodes;\r
-  const TreeNode* mRoot;\r
+  const TreeNode*           mNodes;\r
+  const TreeNode*           mRoot;\r
 \r
   std::string mPath;\r
 \r
   std::vector<Actor> mActorCache;\r
-  Shader mShaderCache[ShaderType::SHADER_TYPE_MAX + 1];\r
+  Shader             mShaderCache[ShaderType::SHADER_TYPE_MAX + 1];\r
 \r
-  std::vector<BufferInfo> mBufferArray;\r
+  std::vector<BufferInfo>     mBufferArray;\r
   std::vector<BufferViewInfo> mBufferViewArray;\r
-  std::vector<AccessorInfo> mAccessorArray;\r
+  std::vector<AccessorInfo>   mAccessorArray;\r
 \r
-  std::vector<MeshInfo> mMeshArray;\r
+  std::vector<MeshInfo>     mMeshArray;\r
   std::vector<MaterialInfo> mMaterialArray;\r
-  std::vector<TextureInfo> mTextureArray;\r
+  std::vector<TextureInfo>  mTextureArray;\r
 \r
   std::vector<Texture> mSourceArray;\r
   std::vector<Sampler> mSamplerArray;\r
 };\r
 \r
-}//namespace Gltf\r
+} //namespace Gltf\r
 \r
-}//namespace Internal\r
+} //namespace Internal\r
 \r
-}//namespace Toolkit\r
+} //namespace Toolkit\r
 \r
-}//namespace Dali\r
+} //namespace Dali\r
 \r
 #endif // DALI_TOOLKIT_INTERNAL_GLTF_LOADER_H\r
index afe95fd..6dbe859 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_SCENE3D_VIEW_H\r
 \r
 /*\r
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.\r
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.\r
  *\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
  */\r
 \r
 // EXTERNAL INCLUDES\r
-#include <cstring>\r
+#include <dali/devel-api/adaptor-framework/file-loader.h>\r
+#include <dali/devel-api/adaptor-framework/image-loading.h>\r
 #include <dali/public-api/object/base-object.h>\r
 #include <dali/public-api/rendering/shader.h>\r
-#include <dali/devel-api/adaptor-framework/image-loading.h>\r
-#include <dali/devel-api/adaptor-framework/file-loader.h>\r
+#include <cstring>\r
 \r
 // INTERNAL INCLUDES\r
-#include <dali-toolkit/public-api/controls/control-impl.h>\r
 #include <dali-toolkit/devel-api/controls/scene3d-view/scene3d-view.h>\r
 #include <dali-toolkit/internal/controls/scene3d-view/gltf-loader.h>\r
+#include <dali-toolkit/public-api/controls/control-impl.h>\r
 \r
 namespace Dali\r
 {\r
-\r
 namespace Toolkit\r
 {\r
-\r
 class Scene3dView;\r
 \r
 namespace Internal\r
 {\r
-\r
 namespace Gltf\r
 {\r
-\r
 class Loader;\r
 \r
 }\r
@@ -54,15 +50,13 @@ class Loader;
 class Scene3dView : public Control\r
 {\r
 public:\r
-\r
   enum CubeType\r
   {\r
-    CROSS_HORIZONTAL = 0,                 // Cross horizontal style cube map\r
-    ARRAY_HORIZONTAL,                     // array horizontal style cube map\r
+    CROSS_HORIZONTAL = 0, // Cross horizontal style cube map\r
+    ARRAY_HORIZONTAL,     // array horizontal style cube map\r
     NONE\r
   };\r
 \r
-\r
   /**\r
    * @copydoc Dali::Toolkit::Scene3dView::Scene3dView\r
    */\r
@@ -76,12 +70,12 @@ public:
   /**\r
    * @copydoc Dali::Toolkit::Scene3dView::New( const std::string& filePath )\r
    */\r
-  static Dali::Toolkit::Scene3dView New( const std::string& filePath );\r
+  static Dali::Toolkit::Scene3dView New(const std::string& filePath);\r
 \r
   /**\r
    * @copydoc Dali::Toolkit::Scene3dView::New( const std::string& filePath, const std::string& diffuseTexturePath, const std::string& specularTexturePath, Vector4 scaleFactor )\r
    */\r
-  static Dali::Toolkit::Scene3dView New( const std::string& filePath, const std::string& diffuseTexturePath, const std::string& specularTexturePath, Vector4 scaleFactor );\r
+  static Dali::Toolkit::Scene3dView New(const std::string& filePath, const std::string& diffuseTexturePath, const std::string& specularTexturePath, Vector4 scaleFactor);\r
 \r
   /**\r
    * @copydoc Dali::Toolkit::Scene3dView::CreateScene()\r
@@ -96,7 +90,7 @@ public:
   /**\r
    * @copydoc Dali::Toolkit::Scene3dView::PlayAnimation()\r
    */\r
-  bool PlayAnimation( uint32_t index );\r
+  bool PlayAnimation(uint32_t index);\r
 \r
   /**\r
    * @copydoc Dali::Toolkit::Scene3dView::PlayAnimations()\r
@@ -106,7 +100,7 @@ public:
   /**\r
    * @copydoc Dali::Toolkit::Scene3dView::SetLight( Toolkit::Scene3dView::LightType type, Vector3 lightVector, Vector3 lightColor )\r
    */\r
-  bool SetLight( Toolkit::Scene3dView::LightType type, Vector3 lightVector, Vector3 lightColor );\r
+  bool SetLight(Toolkit::Scene3dView::LightType type, Vector3 lightVector, Vector3 lightColor);\r
 \r
   /**\r
    * @brief Set default CameraActor specified in the each scene format specification.\r
@@ -115,24 +109,24 @@ public:
    * near clipping plane = 0.1,\r
    * and camera position = Vector3( 0.0, 0.0, 0.0 ).\r
    */\r
-  bool SetDefaultCamera( const Dali::Camera::Type type = Dali::Camera::LOOK_AT_TARGET, const float nearPlane = 0.1, const Vector3 cameraPosition = Vector3( 0.0, 0.0, 0.0 ) );\r
+  bool SetDefaultCamera(const Dali::Camera::Type type = Dali::Camera::LOOK_AT_TARGET, const float nearPlane = 0.1, const Vector3 cameraPosition = Vector3(0.0, 0.0, 0.0));\r
 \r
   /**\r
    * @brief Add CameraActor loaded from scene format file.\r
    */\r
-  void AddCamera( CameraActor cameraActor );\r
+  void AddCamera(CameraActor cameraActor);\r
 \r
   /**\r
    * @brief Add Animation loaded from scene format file.\r
    */\r
-  void AddAnimation( Animation animation );\r
+  void AddAnimation(Animation animation);\r
 \r
   /**\r
    * @brief Add new Shader.\r
    * Actors can share same Shader if they use same properties.\r
    * If a property changes in a shader, then the property of all actors that use the shader change.\r
    */\r
-  void AddShader( Shader shader );\r
+  void AddShader(Shader shader);\r
 \r
   /**\r
    * @brief Get Root Actor.\r
@@ -152,7 +146,7 @@ public:
   /**\r
    * @copydoc Dali::Toolkit::Scene3dView::GetCamera( uint32_t cameraIndex )\r
    */\r
-  CameraActor GetCamera( uint32_t cameraIndex );\r
+  CameraActor GetCamera(uint32_t cameraIndex);\r
 \r
   /**\r
    * @brief Get light type.\r
@@ -196,81 +190,79 @@ private:
    * @brief Get Cropped image buffer.\r
    * For each direction, Offset + faceSize must be width or height or less then them.\r
    */\r
-  uint8_t* GetCroppedBuffer( uint8_t* sourceBuffer, uint32_t bytesPerPixel, uint32_t width, uint32_t height, uint32_t xOffset, uint32_t yOffset, uint32_t xFaceSize, uint32_t yFaceSize );\r
+  uint8_t* GetCroppedBuffer(uint8_t* sourceBuffer, uint32_t bytesPerPixel, uint32_t width, uint32_t height, uint32_t xOffset, uint32_t yOffset, uint32_t xFaceSize, uint32_t yFaceSize);\r
 \r
   /**\r
    * @brief Upload cube map texture.\r
    */\r
-  void UploadTextureFace( Texture& texture, Devel::PixelBuffer pixelBuffer, uint32_t faceIndex );\r
+  void UploadTextureFace(Texture& texture, Devel::PixelBuffer pixelBuffer, uint32_t faceIndex);\r
 \r
   /**\r
    * @brief Set diffuse and specular cube map textures.\r
    */\r
-  void SetCubeMap( const std::string& diffuseTexturePath, const std::string& specularTexturePath, Vector4 scaleFactor = Vector4( 1.0, 1.0, 1.0, 1.0 ) );\r
+  void SetCubeMap(const std::string& diffuseTexturePath, const std::string& specularTexturePath, Vector4 scaleFactor = Vector4(1.0, 1.0, 1.0, 1.0));\r
 \r
   virtual void OnInitialize();\r
 \r
-\r
   /**\r
    * @brief Load 2D texture.\r
    * @param[in] imageUrl Image URL of the texture.\r
    * @param[in] generateMipmaps If generateMipmaps is true, then generate mipmap of this texture.\r
    * @return Texture loaded from imageUrl.\r
    */\r
-  Texture LoadTexture( const char *imageUrl, bool generateMipmaps );\r
+  Texture LoadTexture(const char* imageUrl, bool generateMipmaps);\r
 \r
 private:\r
-  Actor mRoot; // Root actor that contains scene graph\r
+  Actor       mRoot;     // Root actor that contains scene graph\r
   std::string mFilePath; // Full file path of scene file\r
 \r
   std::vector<Shader> mShaderArray; // Shader Array to change properties of scene such as lighting.\r
 \r
   std::vector<CameraActor> mCameraActorArray; // CameraActer array loaded from scene format file.\r
-  CameraActor mDefaultCamera; // Default CameraActor for the empty mCameraActorArray.\r
+  CameraActor              mDefaultCamera;    // Default CameraActor for the empty mCameraActorArray.\r
 \r
   std::vector<Animation> mAnimationArray; // Animation array loaded from scene format file.\r
 \r
-  Toolkit::Scene3dView::LightType mLightType; // Light type\r
-  Vector3 mLightVector; // Light position when mLightType is LightType::POINT_LIGHT\r
-                        // Light direction when mLightType is LightType::DIRECTIONAL_LIGHT\r
-  Vector3 mLightColor; // Light color\r
+  Toolkit::Scene3dView::LightType mLightType;   // Light type\r
+  Vector3                         mLightVector; // Light position when mLightType is LightType::POINT_LIGHT\r
+                                                // Light direction when mLightType is LightType::DIRECTIONAL_LIGHT\r
+  Vector3 mLightColor;                          // Light color\r
 \r
-  Vector4 mIBLScaleFactor; // IBL scaling factor for the IBL rendering\r
-  Texture mBRDFTexture; // BRDF texture for the PBR rendering\r
+  Vector4 mIBLScaleFactor;  // IBL scaling factor for the IBL rendering\r
+  Texture mBRDFTexture;     // BRDF texture for the PBR rendering\r
   Texture mSpecularTexture; // Specular cube map texture\r
-  Texture mDiffuseTexture; // Diffuse cube map texture\r
+  Texture mDiffuseTexture;  // Diffuse cube map texture\r
 \r
 private:\r
-\r
   // Undefined copy constructor.\r
-  Scene3dView( const Scene3dView& );\r
+  Scene3dView(const Scene3dView&);\r
 \r
   // Undefined assignment operator.\r
-  Scene3dView& operator=( const Scene3dView& );\r
+  Scene3dView& operator=(const Scene3dView&);\r
 };\r
 \r
 } // namespace Internal\r
 \r
-  // Helpers for public-api forwarding methods\r
-inline const Internal::Scene3dView& GetImpl( const Toolkit::Scene3dView& scene3dView )\r
+// Helpers for public-api forwarding methods\r
+inline const Internal::Scene3dView& GetImpl(const Toolkit::Scene3dView& scene3dView)\r
 {\r
-  DALI_ASSERT_ALWAYS( scene3dView && "Scene3dView handle is empty" );\r
+  DALI_ASSERT_ALWAYS(scene3dView && "Scene3dView handle is empty");\r
   const Dali::RefObject& handle = scene3dView.GetImplementation();\r
 \r
-  return static_cast<const Toolkit::Internal::Scene3dView&>( handle );\r
+  return static_cast<const Toolkit::Internal::Scene3dView&>(handle);\r
 }\r
 \r
-inline Internal::Scene3dView& GetImpl( Toolkit::Scene3dView& scene3dView )\r
+inline Internal::Scene3dView& GetImpl(Toolkit::Scene3dView& scene3dView)\r
 {\r
-  DALI_ASSERT_ALWAYS( scene3dView && "Scene3dView handle is empty" );\r
+  DALI_ASSERT_ALWAYS(scene3dView && "Scene3dView handle is empty");\r
 \r
   Dali::RefObject& handle = scene3dView.GetImplementation();\r
 \r
-  return static_cast<Toolkit::Internal::Scene3dView&>( handle );\r
+  return static_cast<Toolkit::Internal::Scene3dView&>(handle);\r
 }\r
 \r
-}//namespace Toolkit\r
+} //namespace Toolkit\r
 \r
-}//namespace Dali\r
+} //namespace Dali\r
 \r
 #endif // DALI_TOOLKIT_INTERNAL_SCENE3D_VIEW_H\r
index 9bfe909..be77d6c 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_SCROLL_BAR_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/adaptor-framework/timer.h>
-#include <dali/public-api/animation/constraint.h>
 #include <dali/public-api/animation/animation.h>
+#include <dali/public-api/animation/constraint.h>
 #include <dali/public-api/common/dali-vector.h>
 #include <dali/public-api/object/property-notification.h>
 #include <dali/public-api/object/weak-handle.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/devel-api/controls/scroll-bar/scroll-bar.h>
 #include <dali-toolkit/internal/controls/control/control-data-impl.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class ScrollBar;
 
 typedef IntrusivePtr<ScrollBar> ScrollBarPtr;
@@ -50,15 +47,12 @@ typedef IntrusivePtr<ScrollBar> ScrollBarPtr;
  */
 class ScrollBar : public Control
 {
-
 public:
-
   // Signals
-  typedef Toolkit::ScrollBar::PanFinishedSignalType PanFinishedSignalType;
+  typedef Toolkit::ScrollBar::PanFinishedSignalType                   PanFinishedSignalType;
   typedef Toolkit::ScrollBar::ScrollPositionIntervalReachedSignalType ScrollPositionIntervalReachedSignalType;
 
 public:
-
   /**
    * @copydoc Toolkit::ScrollBar::New()
    */
@@ -67,12 +61,12 @@ public:
   /**
    * @copydoc Toolkit::ScrollBar::SetScrollPropertySource()
    */
-  void SetScrollPropertySource( Handle handle, Property::Index propertyScrollPosition, Property::Index propertyMinScrollPosition, Property::Index propertyMaxScrollPosition, Property::Index propertyScrollContentSize );
+  void SetScrollPropertySource(Handle handle, Property::Index propertyScrollPosition, Property::Index propertyMinScrollPosition, Property::Index propertyMaxScrollPosition, Property::Index propertyScrollContentSize);
 
   /**
    * @copydoc Toolkit::ScrollBar::SetScrollIndicator()
    */
-  void SetScrollIndicator( Actor indicator );
+  void SetScrollIndicator(Actor indicator);
 
   /**
    * @copydoc Toolkit::ScrollBar::GetScrollIndicator()
@@ -82,7 +76,7 @@ public:
   /**
    * @copydoc Toolkit::ScrollBar::SetScrollPositionIntervals()
    */
-  void SetScrollPositionIntervals( const Dali::Vector<float>& positions );
+  void SetScrollPositionIntervals(const Dali::Vector<float>& positions);
 
   /**
    * @copydoc Toolkit::ScrollBar::GetScrollPositionIntervals()
@@ -92,7 +86,7 @@ public:
   /**
    * @copydoc Toolkit::ScrollBar::SetScrollDirection()
    */
-  void SetScrollDirection( Toolkit::ScrollBar::Direction direction );
+  void SetScrollDirection(Toolkit::ScrollBar::Direction direction);
 
   /**
    * @copydoc Toolkit::ScrollBar::GetScrollDirection()
@@ -102,7 +96,7 @@ public:
   /**
    * @copydoc Toolkit::ScrollBar::SetIndicatorHeightPolicy()
    */
-  void SetIndicatorHeightPolicy( Toolkit::ScrollBar::IndicatorHeightPolicy policy );
+  void SetIndicatorHeightPolicy(Toolkit::ScrollBar::IndicatorHeightPolicy policy);
 
   /**
    * @copydoc Toolkit::ScrollBar::GetIndicatorHeightPolicy()
@@ -112,7 +106,7 @@ public:
   /**
    * @copydoc Toolkit::ScrollBar::SetIndicatorFixedHeight()
    */
-  void SetIndicatorFixedHeight( float height );
+  void SetIndicatorFixedHeight(float height);
 
   /**
    * @copydoc Toolkit::ScrollBar::GetIndicatorFixedHeight()
@@ -122,7 +116,7 @@ public:
   /**
    * @copydoc Toolkit::ScrollBar::SetIndicatorShowDuration()
    */
-  void SetIndicatorShowDuration( float durationSeconds );
+  void SetIndicatorShowDuration(float durationSeconds);
 
   /**
    * @copydoc Toolkit::ScrollBar::GetIndicatorShowDuration()
@@ -132,7 +126,7 @@ public:
   /**
    * @copydoc Toolkit::ScrollBar::SetIndicatorHideDuration()
    */
-  void SetIndicatorHideDuration( float durationSeconds );
+  void SetIndicatorHideDuration(float durationSeconds);
 
   /**
    * @copydoc Toolkit::ScrollBar::GetIndicatorHideDuration()
@@ -154,23 +148,23 @@ public:
    */
   void ShowTransientIndicator();
 
- /**
 /**
   * @copydoc Toolkit::ScrollBar::PanFinishedSignal()
   */
- PanFinishedSignalType& PanFinishedSignal()
- {
-   return mPanFinishedSignal;
- }
 PanFinishedSignalType& PanFinishedSignal()
 {
+    return mPanFinishedSignal;
 }
 
- /**
 /**
   * @copydoc Toolkit::ScrollBar::ScrollPositionIntervalReachedSignal()
   */
- ScrollPositionIntervalReachedSignalType& ScrollPositionIntervalReachedSignal()
- {
-   return mScrollPositionIntervalReachedSignal;
- }
 ScrollPositionIntervalReachedSignalType& ScrollPositionIntervalReachedSignal()
 {
+    return mScrollPositionIntervalReachedSignal;
 }
 
- /**
 /**
   * Connects a callback function with the object's signals.
   * @param[in] object The object providing the signal.
   * @param[in] tracker Used to disconnect the signal.
@@ -179,37 +173,36 @@ public:
   * @return True if the signal was connected.
   * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
   */
static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
 static bool DoConnectSignal(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor);
 
- // Properties
 // Properties
 
- /**
 /**
   * 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 );
 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 index );
 static Property::Value GetProperty(BaseObject* object, Property::Index index);
 
- /**
 /**
   * Performs actions as requested using the action name.
   * @param[in] object The object on which to perform the action.
   * @param[in] actionName The action to perform.
   * @param[in] attributes The attributes with which to perfrom this action.
   * @return true if action has been accepted by this control
   */
static bool DoAction( BaseObject* object, const std::string& actionName, const Property::Map& attributes );
 static bool DoAction(BaseObject* object, const std::string& actionName, const Property::Map& attributes);
 
 private: // from Control
-
   /**
    * @copydoc Toolkit::Control::OnInitialize
    */
@@ -218,15 +211,14 @@ private: // from Control
   /**
    * @copydoc Toolkit::Control::OnPan
    */
-  void OnPan( const PanGesture& gesture ) override;
+  void OnPan(const PanGesture& gesture) override;
 
   /**
    * @copydoc CustomActorImpl::OnSizeSet( const Vector3& size )
    */
-  void OnSizeSet( const Vector3& size ) override;
+  void OnSizeSet(const Vector3& size) override;
 
 private:
-
   /**
    * Create the default indicator actor.
    */
@@ -264,12 +256,11 @@ private:
   void OnIndicatorHeightPolicyPropertySet(Property::Value propertyValue);
 
 private:
-
   /**
    * Constructor.
    * It initializes ScrollBar members.
    */
-  ScrollBar( Toolkit::ScrollBar::Direction direction );
+  ScrollBar(Toolkit::ScrollBar::Direction direction);
 
   /**
    * A reference counted object may only be deleted by calling Unreference()
@@ -277,49 +268,48 @@ private:
   virtual ~ScrollBar();
 
 private:
+  Actor     mIndicator;          ///< Image of scroll indicator.
+  float     mIndicatorShowAlpha; ///< The alpha value when the indicator is fully shown
+  Animation mAnimation;          ///< Scroll indicator Show/Hide Animation.
 
-  Actor mIndicator;                                                  ///< Image of scroll indicator.
-  float mIndicatorShowAlpha;                                         ///< The alpha value when the indicator is fully shown
-  Animation mAnimation;                                              ///< Scroll indicator Show/Hide Animation.
-
-  Toolkit::ScrollBar::Direction mDirection;                          ///< The direction of scroll bar (vertical or horizontal)
+  Toolkit::ScrollBar::Direction mDirection; ///< The direction of scroll bar (vertical or horizontal)
 
-  WeakHandle<Handle> mScrollableObject;                              ///< Object to be scrolled
+  WeakHandle<Handle> mScrollableObject; ///< Object to be scrolled
 
-  Property::Index mPropertyScrollPosition = 0;                       ///< Index of scroll position property owned by the object to be scrolled
-  Property::Index mPropertyMinScrollPosition = 0;                    ///< Index of minimum scroll position property owned by the object to be scrolled
-  Property::Index mPropertyMaxScrollPosition = 1;                    ///< Index of maximum scroll position property owned by the object to be scrolled
-  Property::Index mPropertyScrollContentSize;                        ///< Index of scroll content size property owned by the object to be scrolled
+  Property::Index mPropertyScrollPosition    = 0; ///< Index of scroll position property owned by the object to be scrolled
+  Property::Index mPropertyMinScrollPosition = 0; ///< Index of minimum scroll position property owned by the object to be scrolled
+  Property::Index mPropertyMaxScrollPosition = 1; ///< Index of maximum scroll position property owned by the object to be scrolled
+  Property::Index mPropertyScrollContentSize;     ///< Index of scroll content size property owned by the object to be scrolled
 
-  float mIndicatorShowDuration;                                      ///< The duration of scroll indicator show animation
-  float mIndicatorHideDuration;                                      ///< The duration of scroll indicator hide animation
-  float mTransientIndicatorDuration;                                 ///< The duration before hiding transient indicator
+  float mIndicatorShowDuration;      ///< The duration of scroll indicator show animation
+  float mIndicatorHideDuration;      ///< The duration of scroll indicator hide animation
+  float mTransientIndicatorDuration; ///< The duration before hiding transient indicator
 
-  float mScrollStart;                                                ///< Scroll Start position (start of drag)
-  Vector2 mGestureDisplacement;                                      ///< Gesture Displacement.
+  float   mScrollStart;         ///< Scroll Start position (start of drag)
+  Vector2 mGestureDisplacement; ///< Gesture Displacement.
 
-  float mCurrentScrollPosition;                                      ///< The current scroll position updated by the pan gesture
+  float mCurrentScrollPosition; ///< The current scroll position updated by the pan gesture
 
   Toolkit::ScrollBar::IndicatorHeightPolicy mIndicatorHeightPolicy;  ///< The height policy of scroll indicator (variable or fixed)
-  float mIndicatorFixedHeight;                                       ///< The fixed height of scroll indicator
-  float mIndicatorMinimumHeight;                                     ///< The minimum height for a variable size indicator
-  float mIndicatorStartPadding;                                      ///< The padding at the start of the indicator
-  float mIndicatorEndPadding;                                        ///< The padding at the end of the indicator
+  float                                     mIndicatorFixedHeight;   ///< The fixed height of scroll indicator
+  float                                     mIndicatorMinimumHeight; ///< The minimum height for a variable size indicator
+  float                                     mIndicatorStartPadding;  ///< The padding at the start of the indicator
+  float                                     mIndicatorEndPadding;    ///< The padding at the end of the indicator
 
-  Timer mContractDelayTimer;                                         ///< Timer guarantee contract delay time.
-  Timer mPanProcessTimer;                                            ///< The timer to process the pan gesture after the gesture is started.
+  Timer mContractDelayTimer; ///< Timer guarantee contract delay time.
+  Timer mPanProcessTimer;    ///< The timer to process the pan gesture after the gesture is started.
 
-  Dali::Vector<float> mScrollPositionIntervals;                      ///< List of values to receive notification for when the current scroll position goes above or below them
-  PropertyNotification mPositionNotification;                        ///< Stores the property notification used for scroll position changes
+  Dali::Vector<float>  mScrollPositionIntervals; ///< List of values to receive notification for when the current scroll position goes above or below them
+  PropertyNotification mPositionNotification;    ///< Stores the property notification used for scroll position changes
 
-  PanFinishedSignalType mPanFinishedSignal;
+  PanFinishedSignalType                   mPanFinishedSignal;
   ScrollPositionIntervalReachedSignalType mScrollPositionIntervalReachedSignal;
 
   Constraint mIndicatorPositionConstraint;
   Constraint mIndicatorSizeConstraint;
 
-  bool mIsPanning                 : 1;                               ///< Whether the scroll bar is being panned.
-  bool mIndicatorFirstShow        : 1;                               ///< True if the indicator has never been shown
+  bool mIsPanning : 1;          ///< Whether the scroll bar is being panned.
+  bool mIndicatorFirstShow : 1; ///< True if the indicator has never been shown
 
 protected:
   struct AccessibleImpl : public Control::Impl::AccessibleImpl,
@@ -329,7 +319,7 @@ protected:
     double GetMinimum() override;
     double GetCurrent() override;
     double GetMaximum() override;
-    bool SetCurrent( double ) override;
+    bool   SetCurrent(double) override;
     double GetMinimumIncrement() override;
   };
 };
index 5e33a83..58a19a7 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_BOUNCING_EFFECT_ACTOR_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * @brief Creates a Dali::Actor to display the bouncing effect for overshoot
  *
@@ -57,7 +54,7 @@ namespace Internal
  * @param[out] bouncePropertyIndex The property index which controls the bouncing
  * @return The actor which displays the bouncing effect
  */
-Actor CreateBouncingEffectActor( Property::Index& bouncePropertyIndex);
+Actor CreateBouncingEffectActor(Property::Index& bouncePropertyIndex);
 
 } // namespace Internal
 
@@ -65,5 +62,4 @@ Actor CreateBouncingEffectActor( Property::Index& bouncePropertyIndex);
 
 } // namespace Dali
 
-
 #endif // DALI_TOOLKIT_INTERNAL_BOUNCING_EFFECT_ACTOR_H
old mode 100755 (executable)
new mode 100644 (file)
index 83917fb..0f9f263
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_DEPTH_LAYOUT_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h>
 
-
-
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class DepthLayout;
 
 typedef IntrusivePtr<DepthLayout> DepthLayoutPtr;
@@ -42,7 +37,6 @@ typedef IntrusivePtr<DepthLayout> DepthLayoutPtr;
 class DepthLayout : public ItemLayout
 {
 public:
-
   /**
    * Create a new spiral layout
    */
@@ -167,7 +161,6 @@ public:
   int GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled) override;
 
 private:
-
   /**
    * @copydoc ItemLayout::GetMinimumLayoutPosition()
    */
@@ -196,7 +189,7 @@ private:
   /**
    * @copydoc ItemLayout::GetDefaultItemSize()
    */
-  void GetDefaultItemSize( unsigned int itemId, const Vector3& layoutSize, Vector3& itemSize ) const override;
+  void GetDefaultItemSize(unsigned int itemId, const Vector3& layoutSize, Vector3& itemSize) const override;
 
   /**
    * @copydoc ItemLayout::GetScrollDirection()
@@ -206,30 +199,27 @@ private:
   /**
    * @copydoc ItemLayout::ApplyConstraints()
    */
-  void ApplyConstraints( Actor& actor, const int itemId, const Vector3& layoutSize, const Actor& itemViewActor ) override;
+  void ApplyConstraints(Actor& actor, const int itemId, const Vector3& layoutSize, const Actor& itemViewActor) override;
 
   /**
    * @copydoc ItemLayout::GetItemPosition()
    */
-  Vector3 GetItemPosition( int itemID, float currentLayoutPosition, const Vector3& layoutSize ) const override;
+  Vector3 GetItemPosition(int itemID, float currentLayoutPosition, const Vector3& layoutSize) const override;
 
 protected:
-
   /**
    * Protected constructor; see also DepthLayout::New()
    */
   DepthLayout();
 
 private:
-
   // Undefined
-  DepthLayout( const DepthLayout& depthLayout );
+  DepthLayout(const DepthLayout& depthLayout);
 
   // Undefined
-  DepthLayout& operator=( const DepthLayout& depthLayout );
+  DepthLayout& operator=(const DepthLayout& depthLayout);
 
 private:
-
   struct Impl;
   Impl* mImpl;
 };
old mode 100755 (executable)
new mode 100644 (file)
index 92ca3c9..8317395
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_GRID_LAYOUT_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 #include <dali-toolkit/public-api/dali-toolkit-common.h>
 
-
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class GridLayout;
 
 typedef IntrusivePtr<GridLayout> GridLayoutPtr; ///< Pointer to a Dali::Toolkit::GridLayout object
@@ -44,7 +40,6 @@ typedef IntrusivePtr<GridLayout> GridLayoutPtr; ///< Pointer to a Dali::Toolkit:
 class GridLayout : public ItemLayout
 {
 public:
-
   /**
    * @brief Create a new grid layout.
    */
@@ -211,7 +206,6 @@ public:
   int GetNextFocusItemID(int itemID, int maxItems, Dali::Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled) override;
 
 private:
-
   /**
    * @copydoc ItemLayout::GetMinimumLayoutPosition()
    */
@@ -240,7 +234,7 @@ private:
   /**
    * @copydoc ItemLayout::GetDefaultItemSize()
    */
-  void GetDefaultItemSize( unsigned int itemId, const Vector3& layoutSize, Vector3& itemSize ) const override;
+  void GetDefaultItemSize(unsigned int itemId, const Vector3& layoutSize, Vector3& itemSize) const override;
 
   /**
    * @copydoc ItemLayout::GetScrollDirection()
@@ -250,30 +244,27 @@ private:
   /**
    * @copydoc ItemLayout::ApplyConstraints()
    */
-  void ApplyConstraints( Actor& actor, const int itemId, const Vector3& layoutSize, const Actor& itemViewActor ) override;
+  void ApplyConstraints(Actor& actor, const int itemId, const Vector3& layoutSize, const Actor& itemViewActor) override;
 
   /**
    * @copydoc ItemLayout::GetItemPosition()
    */
-  Vector3 GetItemPosition( int itemID, float currentLayoutPosition, const Vector3& layoutSize ) const override;
+  Vector3 GetItemPosition(int itemID, float currentLayoutPosition, const Vector3& layoutSize) const override;
 
 protected:
-
   /**
    * @brief Protected constructor; see also GridLayout::New().
    */
   GridLayout();
 
 private:
-
   // Undefined
-  GridLayout( const GridLayout& itemLayout );
+  GridLayout(const GridLayout& itemLayout);
 
   // Undefined
-  GridLayout& operator=( const GridLayout& rhs );
+  GridLayout& operator=(const GridLayout& rhs);
 
 private:
-
   struct Impl;
   Impl* mImpl;
 };
old mode 100755 (executable)
new mode 100644 (file)
index 0af85fc..9b3d656
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_ITEM_VIEW_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 // EXTERNAL INCLUDES
 #include <dali/public-api/adaptor-framework/timer.h>
 #include <dali/public-api/animation/animation.h>
-#include <dali/public-api/object/property-notification.h>
-#include <dali/public-api/object/property-map.h>
 #include <dali/public-api/object/property-array.h>
+#include <dali/public-api/object/property-map.h>
+#include <dali/public-api/object/property-notification.h>
 
 // INTERNAL INCLUDES
+#include <dali-toolkit/internal/controls/scrollable/scrollable-impl.h>
 #include <dali-toolkit/public-api/controls/control-impl.h>
-#include <dali-toolkit/public-api/controls/scrollable/item-view/item-view.h>
-#include <dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h>
 #include <dali-toolkit/public-api/controls/image-view/image-view.h>
-#include <dali-toolkit/internal/controls/scrollable/scrollable-impl.h>
+#include <dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h>
+#include <dali-toolkit/public-api/controls/scrollable/item-view/item-view.h>
 #include <dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class ItemView;
 
 typedef IntrusivePtr<ItemView> ItemViewPtr;
@@ -54,12 +51,10 @@ typedef IntrusivePtr<ItemView> ItemViewPtr;
 class ItemView : public Scrollable
 {
 public:
-
   // Signals
   typedef Toolkit::ItemView::LayoutActivatedSignalType LayoutActivatedSignalType;
 
 public:
-
   /**
    * Create a new ItemView.
    * @param[in] factory The factory which provides ItemView with items.
@@ -240,12 +235,12 @@ public:
   /**
    * @copydoc Toolkit::Internal::Scrollable::SetOvershootSize
    */
-  void SetOvershootSize( const Vector2& size );
+  void SetOvershootSize(const Vector2& size);
 
   /**
    * @copydoc Toolkit::Internal::Scrollable::SetOvershootEffectColor
    */
-  void SetOvershootEffectColor( const Vector4& color );
+  void SetOvershootEffectColor(const Vector4& color);
 
   /**
    * @brief Set whether to enable automatic refresh or not. When refresh is disabled,
@@ -269,7 +264,7 @@ public:
   /**
    * @copydoc Toolkit::ItemView::SetItemsParentOrigin
    */
-  void SetItemsParentOrigin( const Vector3& parentOrigin );
+  void SetItemsParentOrigin(const Vector3& parentOrigin);
 
   /**
    * @copydoc Toolkit::ItemView::GetItemsParentOrigin
@@ -279,7 +274,7 @@ public:
   /**
    * @copydoc Toolkit::ItemView::SetItemsAnchorPoint
    */
-  void SetItemsAnchorPoint( const Vector3& anchorPoint );
+  void SetItemsAnchorPoint(const Vector3& anchorPoint);
 
   /**
    * @copydoc Toolkit::ItemView::GetItemsAnchorPoint
@@ -308,7 +303,7 @@ public:
    * @return True if the signal was connected.
    * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
    */
-  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
+  static bool DoConnectSignal(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor);
 
   //properties
 
@@ -318,7 +313,7 @@ public:
    * @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 );
+  static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value);
 
   /**
    * Called to retrieve a property of an object of this type.
@@ -326,7 +321,7 @@ public:
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index index );
+  static Property::Value GetProperty(BaseObject* object, Property::Index index);
 
   /**
    * Performs actions as requested using the action name.
@@ -335,7 +330,7 @@ public:
    * @param[in] attributes The attributes with which to perfrom this action.
    * @return true if action has been accepted by this control
    */
-  static bool DoAction( BaseObject* object, const std::string& actionName, const Property::Map& attributes );
+  static bool DoAction(BaseObject* object, const std::string& actionName, const Property::Map& attributes);
 
   /**
    * Helper for DoAction( ACTION_STOP_SCROLLING ).
@@ -346,10 +341,9 @@ public:
    * Helper for DoAction( ACTION_ENABLE/DISABLE_REFRESH_NOTIFICATIONS ).
    * @param[in] enabled Whether to disable refresh notifications or not.
    */
-  void SetRefreshNotificationEnabled( bool enabled );
+  void SetRefreshNotificationEnabled(bool enabled);
 
 private:
-
   /**
    * Get all the layouts used in the ItemView.
    * @return The layout array
@@ -360,51 +354,50 @@ private:
    * Set all the layouts. that will be used in the ItemView.
    * @param[in] layouts The layouts used in the itemView.
    */
-  void SetLayoutArray( const Property::Array& layouts );
+  void SetLayoutArray(const Property::Array& layouts);
 
   /**
    * Remove an Actor if found in the ItemPool.
    * @param[in] itemId The item to remove.
    * @return True if the remaining actors were reordered.
    */
-  bool RemoveActor( unsigned int itemId );
+  bool RemoveActor(unsigned int itemId);
 
   /**
    * Remove any Actors outside a given range.
    * @param[in] @param[in] range The range of required items.
    */
-  void RemoveActorsOutsideRange( ItemRange range );
+  void RemoveActorsOutsideRange(ItemRange range);
 
   /**
    * Add a range of Actors, if they are not already in the ItemPool.
    * @param[in] range The range of Item IDs to associate with the new actors.
    * @param[in] layoutSize The layout-size.
    */
-  void AddActorsWithinRange( ItemRange range, const Vector3& layoutSize );
+  void AddActorsWithinRange(ItemRange range, const Vector3& layoutSize);
 
   /**
    * Add a new Actor, if not already in the ItemPool.
    * @param[in] item The ID for the new item.
    * @param[in] layoutSize The layout-size.
    */
-  void AddNewActor( ItemId item, const Vector3& layoutSize );
+  void AddNewActor(ItemId item, const Vector3& layoutSize);
 
   /**
    * Apply the constraints etc. that are required for ItemView children.
    * @param[in] item The item to setup.
    * @param[in] layoutSize The layout-size.
    */
-  void SetupActor( Item item, const Vector3& layoutSize );
+  void SetupActor(Item item, const Vector3& layoutSize);
 
   /**
    * Remove the Actor from the ItemPool and notify the ItemFactory the actor has been released by ItemView.
    * @param[in] item The ID for the item to be released.
    * @param[in] actor The actor to be removed from ItemView.
    */
-  void ReleaseActor( ItemId item, Actor actor );
+  void ReleaseActor(ItemId item, Actor actor);
 
 private: // From CustomActorImpl
-
   /**
    * From CustomActorImpl; called after a child has been added to the owning actor.
    * @param[in] child The child which has been added.
@@ -420,7 +413,6 @@ private: // From CustomActorImpl
   bool OnWheelEvent(Actor actor, const WheelEvent& event);
 
 private: // From Control
-
   /**
    * @copydoc Toolkit::Control::OnInitialize()
    */
@@ -461,7 +453,6 @@ protected:
   virtual ~ItemView();
 
 private:
-
   // Undefined
   ItemView(const ItemView&);
 
@@ -519,14 +510,14 @@ private:
    * @param[in] touch The touch information.
    * @return True if the event should be consumed.
    */
-  bool OnTouch( Actor actor, const TouchEvent& touch );
+  bool OnTouch(Actor actor, const TouchEvent& touch);
 
   /**
    * Called upon pan gesture event.
    *
    * @param[in] gesture The gesture event.
    */
-  void OnPan( const PanGesture& pan );
+  void OnPan(const PanGesture& pan);
 
   /**
    * Helper to handle anchoring animations.
@@ -568,7 +559,7 @@ private:
   /**
    * @copydoc Toolkit::Internal::Scrollable::EnableScrollOvershoot
    */
-  void EnableScrollOvershoot( bool enable ) override;
+  void EnableScrollOvershoot(bool enable) override;
 
   /**
    * Helper to calculate the scroll overshoot according to the pan gesture displacement.
@@ -613,44 +604,43 @@ private:
   void OnRefreshNotification(PropertyNotification& source);
 
 private:
-
   Property::Array mlayoutArray;
 
-  ItemContainer mItemPool;
-  ItemFactory& mItemFactory;
-  std::vector< ItemLayoutPtr > mLayouts;            ///< Container of Dali::Toolkit::ItemLayout objects
-  Actor mOvershootOverlay;                          ///< The overlay actor for overshoot effect
-  Animation mResizeAnimation;
-  Animation mScrollAnimation;
-  Animation mScrollOvershootAnimation;
-  Timer mWheelEventFinishedTimer;                   ///< The timer to determine whether there is no wheel event received for a certain period of time.
-  PropertyNotification mRefreshNotification;        ///< Stores the property notification used for item view refresh
-  LayoutActivatedSignalType mLayoutActivatedSignal;
-  Vector3 mActiveLayoutTargetSize;
-  Vector3 mItemsParentOrigin;
-  Vector3 mItemsAnchorPoint;
-  Vector2 mTotalPanDisplacement;
-  ItemLayout* mActiveLayout;
+  ItemContainer              mItemPool;
+  ItemFactory&               mItemFactory;
+  std::vector<ItemLayoutPtr> mLayouts;          ///< Container of Dali::Toolkit::ItemLayout objects
+  Actor                      mOvershootOverlay; ///< The overlay actor for overshoot effect
+  Animation                  mResizeAnimation;
+  Animation                  mScrollAnimation;
+  Animation                  mScrollOvershootAnimation;
+  Timer                      mWheelEventFinishedTimer; ///< The timer to determine whether there is no wheel event received for a certain period of time.
+  PropertyNotification       mRefreshNotification;     ///< Stores the property notification used for item view refresh
+  LayoutActivatedSignalType  mLayoutActivatedSignal;
+  Vector3                    mActiveLayoutTargetSize;
+  Vector3                    mItemsParentOrigin;
+  Vector3                    mItemsAnchorPoint;
+  Vector2                    mTotalPanDisplacement;
+  ItemLayout*                mActiveLayout;
 
   float mAnchoringDuration;
-  float mRefreshIntervalLayoutPositions;            ///< Refresh item view when the layout position changes by this interval in both positive and negative directions.
+  float mRefreshIntervalLayoutPositions; ///< Refresh item view when the layout position changes by this interval in both positive and negative directions.
   float mMinimumSwipeSpeed;
   float mMinimumSwipeDistance;
-  float mWheelScrollDistanceStep;                   ///< The step of scroll distance in actor coordinates for each wheel event received.
+  float mWheelScrollDistanceStep; ///< The step of scroll distance in actor coordinates for each wheel event received.
   float mScrollDistance;
   float mScrollSpeed;
   float mScrollOvershoot;
 
-  GestureState mGestureState            : 8;
-  bool mAnimatingOvershootOn            : 1;        ///< Whether we are currently animating overshoot to 1.0f/-1.0f (on) or to 0.0f (off)
-  bool mAnimateOvershootOff             : 1;        ///< Whether we are currently animating overshoot to 1.0f/-1.0f (on) or to 0.0f (off)
-  bool mAnchoringEnabled                : 1;
-  bool mRefreshOrderHint                : 1;        ///< True if scrolling towards the last item
-  bool mIsFlicking                      : 1;
-  bool mAddingItems                     : 1;
-  bool mRefreshEnabled                  : 1;        ///< Whether to refresh the cache automatically
-  bool mRefreshNotificationEnabled      : 1;        ///< Whether to disable refresh notifications or not.
-  bool mInAnimation                     : 1;        ///< Keeps track of whether an animation is controlling the overshoot property.
+  GestureState mGestureState : 8;
+  bool         mAnimatingOvershootOn : 1; ///< Whether we are currently animating overshoot to 1.0f/-1.0f (on) or to 0.0f (off)
+  bool         mAnimateOvershootOff : 1;  ///< Whether we are currently animating overshoot to 1.0f/-1.0f (on) or to 0.0f (off)
+  bool         mAnchoringEnabled : 1;
+  bool         mRefreshOrderHint : 1; ///< True if scrolling towards the last item
+  bool         mIsFlicking : 1;
+  bool         mAddingItems : 1;
+  bool         mRefreshEnabled : 1;             ///< Whether to refresh the cache automatically
+  bool         mRefreshNotificationEnabled : 1; ///< Whether to disable refresh notifications or not.
+  bool         mInAnimation : 1;                ///< Keeps track of whether an animation is controlling the overshoot property.
 };
 
 } // namespace Internal
old mode 100755 (executable)
new mode 100644 (file)
index 7143c19..803aec4
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_SPIRAL_LAYOUT_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 #include <dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h>
 
-
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class SpiralLayout;
 
 typedef IntrusivePtr<SpiralLayout> SpiralLayoutPtr;
@@ -42,7 +38,6 @@ typedef IntrusivePtr<SpiralLayout> SpiralLayoutPtr;
 class SpiralLayout : public ItemLayout
 {
 public:
-
   /**
    * Create a new spiral layout
    */
@@ -139,7 +134,6 @@ public:
   float GetClosestOnScreenLayoutPosition(int itemID, float currentLayoutPosition, const Vector3& layoutSize) override;
 
 private:
-
   /**
    * @copydoc ItemLayout::GetMinimumLayoutPosition()
    */
@@ -168,7 +162,7 @@ private:
   /**
    * @copydoc ItemLayout::GetDefaultItemSize()
    */
-  void GetDefaultItemSize( unsigned int itemId, const Vector3& layoutSize, Vector3& itemSize ) const override;
+  void GetDefaultItemSize(unsigned int itemId, const Vector3& layoutSize, Vector3& itemSize) const override;
 
   /**
    * @copydoc ItemLayout::GetScrollDirection()
@@ -178,30 +172,27 @@ private:
   /**
    * @copydoc ItemLayout::ApplyConstraints()
    */
-  void ApplyConstraints( Actor& actor, const int itemId, const Vector3& layoutSize, const Actor& itemViewActor ) override;
+  void ApplyConstraints(Actor& actor, const int itemId, const Vector3& layoutSize, const Actor& itemViewActor) override;
 
   /**
    * @copydoc ItemLayout::GetItemPosition()
    */
-  Vector3 GetItemPosition( int itemID, float currentLayoutPosition, const Vector3& layoutSize ) const override;
+  Vector3 GetItemPosition(int itemID, float currentLayoutPosition, const Vector3& layoutSize) const override;
 
 protected:
-
   /**
    * Protected constructor; see also SpiralLayout::New()
    */
   SpiralLayout();
 
 private:
-
   // Undefined
-  SpiralLayout( const SpiralLayout& spiralLayout );
+  SpiralLayout(const SpiralLayout& spiralLayout);
 
   // Undefined
-  SpiralLayout& operator=( const SpiralLayout& spiralLayout );
+  SpiralLayout& operator=(const SpiralLayout& spiralLayout);
 
 private:
-
   struct Impl;
   Impl* mImpl;
 };
index 9780e78..a64b6a5 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_SCROLL_BASE_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 // EXTERNAL INCLUDES
 // TODO - Replace list with dali-vector.h
-#include <list>
 #include <dali/public-api/animation/constraint.h>
+#include <list>
 
 // INTERNAL INCLUDES
 
-#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h>
 #include <dali-toolkit/internal/controls/scrollable/scrollable-impl.h>
+#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class ScrollBase;
 
-typedef IntrusivePtr<Actor>         ActorPtr;
-typedef std::list<Constraint>               ConstraintStack;
+typedef IntrusivePtr<Actor>   ActorPtr;
+typedef std::list<Constraint> ConstraintStack;
 
 /**
  * ScrollBase represents a set of properties (time, position
@@ -49,7 +46,6 @@ typedef std::list<Constraint>               ConstraintStack;
 class ScrollBase : public Scrollable
 {
 public:
-
   struct ActorInfo : public Dali::RefObject
   {
     /**
@@ -78,9 +74,9 @@ public:
      */
     void ApplyConstraint(Constraint constraint)
     {
-      Constraint clone = constraint.Clone( mActor );
+      Constraint clone = constraint.Clone(mActor);
       clone.Apply();
-      mConstraints.push_back( clone );
+      mConstraints.push_back(clone);
     }
 
     /**
@@ -90,26 +86,25 @@ public:
      */
     void RemoveConstraints()
     {
-      std::vector<Constraint>::iterator it = mConstraints.begin();
+      std::vector<Constraint>::iterator it  = mConstraints.begin();
       std::vector<Constraint>::iterator end = mConstraints.end();
-      for(;it!=end;++it)
+      for(; it != end; ++it)
       {
         it->Remove();
       }
       mConstraints.clear();
     }
 
-    Actor mActor;                                     ///< The Actor that this ActorInfo represents.
-    std::vector<Constraint> mConstraints;       ///< A list keeping track of constraints applied to the actor via this delegate.
+    Actor                   mActor;       ///< The Actor that this ActorInfo represents.
+    std::vector<Constraint> mConstraints; ///< A list keeping track of constraints applied to the actor via this delegate.
   };
 
-  typedef IntrusivePtr<ActorInfo> ActorInfoPtr;
-  typedef std::vector<ActorInfoPtr> ActorInfoContainer;
-  typedef ActorInfoContainer::iterator ActorInfoIter;
+  typedef IntrusivePtr<ActorInfo>            ActorInfoPtr;
+  typedef std::vector<ActorInfoPtr>          ActorInfoContainer;
+  typedef ActorInfoContainer::iterator       ActorInfoIter;
   typedef ActorInfoContainer::const_iterator ActorInfoConstIter;
 
 public:
-
   /**
    * Sets the delay in seconds.
    * This delay affects the animation timing for all
@@ -133,13 +128,12 @@ public:
   }
 
 public:
-
   /**
    * Sets ScrollBase Parent
    *
    * @param[in] parent The parent that this ScrollBase belongs to.
    */
-  void SetParent(ScrollBase *parent);
+  void SetParent(ScrollBaseparent);
 
   /**
    * Bind Actor to this scroll view/group.
@@ -181,11 +175,9 @@ public:
   void RemoveConstraintsFromBoundActors();
 
 protected:
-
   static const char* const SCROLL_DOMAIN_OFFSET_PROPERTY_NAME;
 
 protected:
-
   /**
    * Removed default costructor.
    */
@@ -196,18 +188,15 @@ protected:
    *
    * @param[in] behaviourFlags Flags to enable
    */
-  ScrollBase( ControlBehaviour behaviourFlags );
+  ScrollBase(ControlBehaviour behaviourFlags);
 
 protected:
-
-  ScrollBase *mParent;                              ///< Pointer to ScrollBase parent, if exists.
+  ScrollBase* mParent; ///< Pointer to ScrollBase parent, if exists.
 
 private:
-
-  float mDelay;                             ///< delay in seconds.
-  ConstraintStack mConstraintStack;         ///< The list of constraints to apply to any actors
-  ActorInfoContainer mBoundActors;          ///< The list of actors that have been bound to this ScrollBase.
-
+  float              mDelay;           ///< delay in seconds.
+  ConstraintStack    mConstraintStack; ///< The list of constraints to apply to any actors
+  ActorInfoContainer mBoundActors;     ///< The list of actors that have been bound to this ScrollBase.
 };
 
 } // namespace Internal
index a3b5292..cef3063 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_SCROLL_OVERSHOOT_INDICATOR_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
 class Scrollable;
 class ScrollOvershootEffect;
 class ScrollOvershootEffectGradient;
 class ScrollOvershootEffectRipple;
-typedef IntrusivePtr<ScrollOvershootEffect> ScrollOvershootEffectPtr;
+typedef IntrusivePtr<ScrollOvershootEffect>         ScrollOvershootEffectPtr;
 typedef IntrusivePtr<ScrollOvershootEffectGradient> ScrollOvershootEffectGradientPtr;
-typedef IntrusivePtr<ScrollOvershootEffectRipple> ScrollOvershootEffectRipplePtr;
+typedef IntrusivePtr<ScrollOvershootEffectRipple>   ScrollOvershootEffectRipplePtr;
 
 struct ScrollOvershootIndicator : public Dali::RefObject
 {
 public:
-
   /**
    * ScrollOvershootIndicator constructor.
    */
@@ -86,11 +83,11 @@ public:
    * Set the color of the overshoot effect.
    * @parm[in] color The color of the overshoot effect
    */
-  void SetOvershootEffectColor( const Vector4& color );
+  void SetOvershootEffectColor(const Vector4& color);
 
 private:
-  ScrollOvershootEffectPtr mEffectX;                      ///< effect used for x-axis/horizontal display
-  ScrollOvershootEffectPtr mEffectY;                      ///< effect used for y-axis/vertical display
+  ScrollOvershootEffectPtr mEffectX; ///< effect used for x-axis/horizontal display
+  ScrollOvershootEffectPtr mEffectY; ///< effect used for y-axis/vertical display
 };
 
 /**
@@ -105,12 +102,14 @@ public:
    *
    * @param[in] vertical whether this effect is a vertical or horizontal one
    */
-  ScrollOvershootEffect( bool vertical );
+  ScrollOvershootEffect(bool vertical);
 
   /**
    * Virtual destructor
    */
-  virtual ~ScrollOvershootEffect() {}
+  virtual ~ScrollOvershootEffect()
+  {
+  }
 
   /**
    * Returns if this is a vertical or horizontal overhoot effect
@@ -131,7 +130,7 @@ public:
    *
    * @param[in] scrollable the scrollable object to remove this effect from
    */
-  virtual void Remove( Scrollable& scrollable ) = 0;
+  virtual void Remove(Scrollable& scrollable) = 0;
 
   /**
    * Resets this overshoot effect
@@ -141,12 +140,14 @@ public:
   /**
    * Sets up property notifications for overshoot values
    */
-  virtual void UpdatePropertyNotifications() {}
+  virtual void UpdatePropertyNotifications()
+  {
+  }
 
   /**
    * @copydoc ScrollOvershootIndicator::SetOvershootEffectColor()
    */
-  virtual void SetOvershootEffectColor( const Vector4& color ) = 0;
+  virtual void SetOvershootEffectColor(const Vector4& color) = 0;
 
   /**
    * Sets shader overshoot value, either immediately of by animating over time
@@ -157,7 +158,7 @@ public:
   virtual void SetOvershoot(float amount, bool animate = true) = 0;
 
 private:
-  bool mVertical;                      ///< whether this is a vertical/horizontal effect
+  bool mVertical; ///< whether this is a vertical/horizontal effect
 };
 
 /**
@@ -168,19 +169,18 @@ struct ScrollOvershootEffectRipple : public ScrollOvershootEffect, public Connec
 {
   enum AnimationState
   {
-    AnimatingIn  = 0x01,  ///< animating overshoot to 0
-    AnimatingOut = 0x02,  ///< animating overshoot to negative (overshoot image displays in +ve area of screen)
-    AnimateBack  = 0x04,  ///< indicates that we need to animate overshoot back to zero immediately after it has finished animating in
+    AnimatingIn  = 0x01, ///< animating overshoot to 0
+    AnimatingOut = 0x02, ///< animating overshoot to negative (overshoot image displays in +ve area of screen)
+    AnimateBack  = 0x04, ///< indicates that we need to animate overshoot back to zero immediately after it has finished animating in
   };
 
 public:
-
   /**
    * Create a new gradient overshoot effect, passing in whether it is vertical or horizontal
    *
    * @param[in] vertical Whether this indicator is vertical or horizontal
    */
-  ScrollOvershootEffectRipple( bool vertical, Scrollable& scrollable );
+  ScrollOvershootEffectRipple(bool vertical, Scrollable& scrollable);
 
   /**
    * @copydoc ScrollOvershootEffect::Apply
@@ -190,7 +190,7 @@ public:
   /**
    * @copydoc ScrollOvershootEffect::Remove
    */
-  void Remove( Scrollable& scrollable ) override;
+  void Remove(Scrollable& scrollable) override;
 
   /**
    * @copydoc ScrollOvershootEffect::Reset
@@ -205,7 +205,7 @@ public:
   /**
    * @copydoc ScrollOvershootEffect::SetOvershootEffectColor()
    */
-  void SetOvershootEffectColor( const Vector4& color );
+  void SetOvershootEffectColor(const Vector4& color);
 
   /**
    * Updates the vibility of the overshoot image as well as updating its size, position and rotation
@@ -213,7 +213,7 @@ public:
    *
    * @param[in] visible Whether to set the image visible or not
    */
-  void UpdateVisibility( bool visible );
+  void UpdateVisibility(bool visible);
 
   /**
    * Informs overshoot effect to update image position and to animate effect overshoot value for a
@@ -241,19 +241,19 @@ public:
    * @param[in] vertical whether to create a vertical(true) or horizontal effect
    * @return a pointer to the new effect
    */
-  static ScrollOvershootEffectRipplePtr New( bool vertical, Scrollable& scrollable );
+  static ScrollOvershootEffectRipplePtr New(bool vertical, Scrollable& scrollable);
 
 private:
-  Actor                 mOvershootOverlay;             ///< the actor which displays the overshoot effect
-  Scrollable&           mAttachedScrollView;           ///< the actor that this indicator has been attached to
-  Animation             mScrollOvershootAnimation;     ///< overshoot animation
-  PropertyNotification  mOvershootIncreaseNotification;///< notification used to inform as overshoot increases
-  PropertyNotification  mOvershootDecreaseNotification;///< notification used to inform as overshoot decreases
-  Property::Index       mOvershootProperty;            ///< index of the overshoot property in the scrollable actor
-  Property::Index       mEffectOvershootProperty;      ///< index of the effect's overshoot property
-  float                 mOvershoot;                    ///< last overshoot value as detected by notifications
-  Vector2               mOvershootSize;                ///< The size of the overshoot effect
-  unsigned short        mAnimationStateFlags;          ///< contains flags indicating the current state of the overshoot animation
+  Actor                mOvershootOverlay;              ///< the actor which displays the overshoot effect
+  Scrollable&          mAttachedScrollView;            ///< the actor that this indicator has been attached to
+  Animation            mScrollOvershootAnimation;      ///< overshoot animation
+  PropertyNotification mOvershootIncreaseNotification; ///< notification used to inform as overshoot increases
+  PropertyNotification mOvershootDecreaseNotification; ///< notification used to inform as overshoot decreases
+  Property::Index      mOvershootProperty;             ///< index of the overshoot property in the scrollable actor
+  Property::Index      mEffectOvershootProperty;       ///< index of the effect's overshoot property
+  float                mOvershoot;                     ///< last overshoot value as detected by notifications
+  Vector2              mOvershootSize;                 ///< The size of the overshoot effect
+  unsigned short       mAnimationStateFlags;           ///< contains flags indicating the current state of the overshoot animation
 };
 
 } // namespace Internal
index 603d8b2..dd26266 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_EFFECT_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/signals/connection-tracker.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h>
 #include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h>
+#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h>
 
 namespace Dali
 {
-
 class Animation;
 
 namespace Toolkit
 {
-
 class ScrollView;
 
 namespace Internal
 {
-
 class ScrollViewEffect;
 
 /**
@@ -46,9 +43,7 @@ class ScrollViewEffect;
  */
 class ScrollViewEffect : public Dali::BaseObject, public ConnectionTracker
 {
-
 public:
-
   ScrollViewEffect();
 
   /**
@@ -68,7 +63,6 @@ public:
   void Detach(Toolkit::ScrollView& scrollView);
 
 public:
-
   /**
    * Called upon Attaching of effect to a scrollView instance.
    *
@@ -88,7 +82,6 @@ public:
   virtual void OnDetach(Toolkit::ScrollView& scrollView) = 0;
 
 protected:
-
   /**
    * Returns the ScrollView handle that this effect is
    * attached to.
@@ -99,16 +92,13 @@ protected:
   Toolkit::ScrollView GetScrollView();
 
 protected:
-
   /**
    * A reference counted object may only be deleted by calling Unreference()
    */
   virtual ~ScrollViewEffect();
 
 private:
-
-  Toolkit::Internal::ScrollView *mScrollViewImpl; ///< Attached ScrollView instance (pointer to implementation)
-
+  Toolkit::Internal::ScrollView* mScrollViewImpl; ///< Attached ScrollView instance (pointer to implementation)
 };
 
 } // namespace Internal
index 8724033..11ff969 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/object/weak-handle.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/devel-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/control-impl.h>
 #include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-effect.h>
+#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class ScrollView;
-typedef IntrusivePtr<ScrollView>    ScrollViewPtr;
+typedef IntrusivePtr<ScrollView> ScrollViewPtr;
 
 class ScrollInternalConstraints;
-typedef IntrusivePtr<ScrollInternalConstraints>    ScrollInternalConstraintsPtr;
+typedef IntrusivePtr<ScrollInternalConstraints> ScrollInternalConstraintsPtr;
 
 class ScrollOvershootIndicator;
 typedef IntrusivePtr<ScrollOvershootIndicator> ScrollOvershootIndicatorPtr;
@@ -55,20 +52,19 @@ typedef IntrusivePtr<ScrollOvershootIndicator> ScrollOvershootIndicatorPtr;
 class ScrollView : public ScrollBase
 {
 public:
-
   /**
    * FindDirection specifies how searching is conducted within the Find... routines.
    */
   enum FindDirection
   {
-    None = -3,        ///< Includes none within the search query.
-    All = -2,         ///< Includes all within the search query.
-    Left = -1,        ///< Includes only those not right !(>)
-    Right = 1,        ///< Includes only those right (>)
-    Up = -1,          ///< Includes only those not below  !(>)
-    Down = 1,         ///< Includes only those below (>)
-    Out = -1,         ///< Includes only those not infront  !(>)
-    In = 1            ///< Includes only those infront (>)
+    None  = -3, ///< Includes none within the search query.
+    All   = -2, ///< Includes all within the search query.
+    Left  = -1, ///< Includes only those not right !(>)
+    Right = 1,  ///< Includes only those right (>)
+    Up    = -1, ///< Includes only those not below  !(>)
+    Down  = 1,  ///< Includes only those below (>)
+    Out   = -1, ///< Includes only those not infront  !(>)
+    In    = 1   ///< Includes only those infront (>)
   };
 
   enum LockAxis
@@ -87,18 +83,16 @@ public:
     SnappingInternalY  = 0x08, ///< snapping mPropertyY back to mPropertyPreScroll y value to remove y overshoot over time
   };
 
-  static const unsigned int SCROLL_X_STATE_MASK = AnimatingInternalX | SnappingInternalX;
-  static const unsigned int SCROLL_Y_STATE_MASK = AnimatingInternalY | SnappingInternalY;
+  static const unsigned int SCROLL_X_STATE_MASK    = AnimatingInternalX | SnappingInternalX;
+  static const unsigned int SCROLL_Y_STATE_MASK    = AnimatingInternalY | SnappingInternalY;
   static const unsigned int SCROLL_ANIMATION_FLAGS = AnimatingInternalX | AnimatingInternalY;
-  static const unsigned int SNAP_ANIMATION_FLAGS = SnappingInternalX | SnappingInternalY;
+  static const unsigned int SNAP_ANIMATION_FLAGS   = SnappingInternalX | SnappingInternalY;
 
 private:
-
   typedef std::vector<Dali::Toolkit::ScrollViewEffect> ScrollViewEffectContainer; ///< Container of Dali::Toolkit::ScrollViewEffect
-  typedef ScrollViewEffectContainer::iterator ScrollViewEffectIter; ///< Iterator for Dali::Toolkit::ScrollViewEffectContainer
+  typedef ScrollViewEffectContainer::iterator          ScrollViewEffectIter;      ///< Iterator for Dali::Toolkit::ScrollViewEffectContainer
 
 public:
-
   /**
    * Create a new ScrollView.
    * @return A public handle to the newly allocated ScrollView.
@@ -106,7 +100,6 @@ public:
   static Dali::Toolkit::ScrollView New();
 
 public:
-
   /**
    * @copydoc Toolkit::ScrollView::GetScrollSnapAlphaFunction
    */
@@ -323,7 +316,7 @@ public:
   /**
    * @copydoc Toolkit::ScrollView::SetMinimumDistanceForFlick
    */
-  void SetMinimumDistanceForFlick( const Vector2& distance );
+  void SetMinimumDistanceForFlick(const Vector2& distance);
 
   /**
    * @copydoc Toolkit::ScrollView::GetMinimumSpeedForFlick
@@ -333,7 +326,7 @@ public:
   /**
    * @copydoc Toolkit::ScrollView::SetMinimumSpeedForFlick
    */
-  void SetMinimumSpeedForFlick( float speed );
+  void SetMinimumSpeedForFlick(float speed);
 
   /**
    * @copydoc Toolkit::ScrollView::GetMaxFlickSpeed
@@ -369,18 +362,18 @@ public:
    * @copydoc ScrollTo(const Vector2&)
    */
   void TransformTo(const Vector2& position,
-                   DirectionBias horizontalBias = DIRECTION_BIAS_NONE, DirectionBias verticalBias = DIRECTION_BIAS_NONE);
+                   DirectionBias  horizontalBias = DIRECTION_BIAS_NONE,
+                   DirectionBias  verticalBias   = DIRECTION_BIAS_NONE);
 
   /**
    * @copydoc ScrollTo(const Vector2&, float, AlhpaFunction, DirectionBias, DirectionBias)
    */
-  void TransformTo(const Vector2& position, float duration, AlphaFunction alpha,
-                   DirectionBias horizontalBias = DIRECTION_BIAS_NONE, DirectionBias verticalBias = DIRECTION_BIAS_NONE);
+  void TransformTo(const Vector2& position, float duration, AlphaFunction alpha, DirectionBias horizontalBias = DIRECTION_BIAS_NONE, DirectionBias verticalBias = DIRECTION_BIAS_NONE);
 
   /**
    * @copydoc Toolkit::ScrollView::ScrollTo(const Vector2 &position)
    */
-  void ScrollTo(const Vector2 &position);
+  void ScrollTo(const Vector2position);
 
   /**
    * @copydoc Toolkit::Scrollable::ScrollTo(const Vector2& position, float duration)
@@ -395,14 +388,12 @@ public:
   /**
    * @copydoc Toolkit::ScrollView::ScrollTo(const Vector2 &position, float duration, DirectionBias horizontalBias, DirectionBias verticalBias)
    */
-  void ScrollTo(const Vector2& position, float duration,
-                DirectionBias horizontalBias, DirectionBias verticalBias);
+  void ScrollTo(const Vector2& position, float duration, DirectionBias horizontalBias, DirectionBias verticalBias);
 
   /**
    * @copydoc Toolkit::ScrollView::ScrollTo(const Vector2 &position, float duration, AlphaFunction alpha, DirectionBias horizontalBias, DirectionBias verticalBias)
    */
-  void ScrollTo(const Vector2& position, float duration, AlphaFunction alpha,
-                DirectionBias horizontalBias, DirectionBias verticalBias);
+  void ScrollTo(const Vector2& position, float duration, AlphaFunction alpha, DirectionBias horizontalBias, DirectionBias verticalBias);
 
   /**
    * @copydoc Toolkit::ScrollView::ScrollTo(unsigned int page)
@@ -417,29 +408,29 @@ public:
   /**
    * @copydoc Toolkit::ScrollView::ScrollTo(Actor& actor)
    */
-  void ScrollTo(Actor &actor);
+  void ScrollTo(Actoractor);
 
   /**
    * @copydoc Toolkit::ScrollView::ScrollTo(Actor& actor, float duration)
    */
-  void ScrollTo(Actor &actor, float duration);
+  void ScrollTo(Actoractor, float duration);
 
   /**
    * @copydoc Toolkit::ScrollView::SetScrollingDirection()
    */
-  void SetScrollingDirection( Radian direction, Radian threshold );
+  void SetScrollingDirection(Radian direction, Radian threshold);
 
   /**
    * @copydoc Toolkit::ScrollView::RemoveScrollingDirection()
    */
-  void RemoveScrollingDirection( Radian angle );
+  void RemoveScrollingDirection(Radian angle);
 
   /**
     * Finds the closest Actor to the current center of the ScrollView.
     *
     * @return A handle to the actor if found, or an empty handle if not.
     */
-   Actor FindClosestActor();
+  Actor FindClosestActor();
 
   /**
    * Finds the closest Actor to position in ScrollView
@@ -480,10 +471,7 @@ public:
    * @param[in] verticalBias (optional) Whether to bias animation to top or bottom (or no biasing)
    * @return True if animation necessary and taking place to reach desired transform.
    */
-  bool AnimateTo(const Vector2& position, const Vector2& positionDuration,
-                             AlphaFunction alpha, bool findShortcuts = true,
-                             DirectionBias horizontalBias = DIRECTION_BIAS_NONE, DirectionBias verticalBias = DIRECTION_BIAS_NONE,
-                             SnapType snapType = SNAP);
+  bool AnimateTo(const Vector2& position, const Vector2& positionDuration, AlphaFunction alpha, bool findShortcuts = true, DirectionBias horizontalBias = DIRECTION_BIAS_NONE, DirectionBias verticalBias = DIRECTION_BIAS_NONE, SnapType snapType = SNAP);
 
   /**
    * @copydoc Toolkit::Scrollable::AddOverlay()
@@ -498,12 +486,12 @@ public:
   /**
    * @copydoc Toolkit::Internal::Scrollable::SetOvershootSize
    */
-  void SetOvershootSize( const Vector2& size );
+  void SetOvershootSize(const Vector2& size);
 
   /**
    * @copydoc Toolkit::Internal::Scrollable::SetOvershootEffectColor
    */
-  void SetOvershootEffectColor( const Vector4& color );
+  void SetOvershootEffectColor(const Vector4& color);
 
   //properties
 
@@ -513,7 +501,7 @@ public:
    * @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 );
+  static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value);
 
   /**
    * Called to retrieve a property of an object of this type.
@@ -521,10 +509,9 @@ public:
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index index );
+  static Property::Value GetProperty(BaseObject* object, Property::Index index);
 
 public: //Signals
-
   /**
    * @copydoc Dali::Toolkit::ScrollView::SnapStartedSignal()
    */
@@ -539,10 +526,9 @@ public: //Signals
    * @return True if the signal was connected.
    * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
    */
-  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
+  static bool DoConnectSignal(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor);
 
 private: // private overridden functions from CustomActorImpl and Controls
-
   /**
    * @copydoc Dali::CustomActorImpl::OnSizeAnimation(Animation&, const Vector3&)
    */
@@ -551,7 +537,7 @@ private: // private overridden functions from CustomActorImpl and Controls
   /**
    * @copydoc CustomActorImpl::OnSizeSet(const Vector3&)
    */
-  void OnSizeSet( const Vector3& size ) override;
+  void OnSizeSet(const Vector3& size) override;
 
   /**
    * From CustomActorImpl; called after a child has been added to the owning actor.
@@ -581,7 +567,7 @@ private: // private overridden functions from CustomActorImpl and Controls
   /**
    * @copydoc CustomActorImpl::OnSceneConnection()
    */
-  void OnSceneConnection( int depth ) override;
+  void OnSceneConnection(int depth) override;
 
   /**
    * @copydoc CustomActorImpl::OnSceneDisconnection()
@@ -599,7 +585,6 @@ private: // private overridden functions from CustomActorImpl and Controls
   void EnableScrollOvershoot(bool enable) override;
 
 private:
-
   /**
    * Called after a touchSignal is received by the owning actor.
    *
@@ -609,7 +594,7 @@ private:
    * @param[in] touch The touch information.
    * @return True if the event should be consumed.
    */
-  bool OnTouch( Actor actor, const TouchEvent& touch );
+  bool OnTouch(Actor actor, const TouchEvent& touch);
 
   /**
    * Start a timer which calls OnTouchDownTimeout()
@@ -656,7 +641,7 @@ private:
    * @param[in] duration The time in seconds for animation
    * @param[in] alpha The alpha function to use for animating
    */
-  void AnimateInternalXTo( float position, float duration, AlphaFunction alpha );
+  void AnimateInternalXTo(float position, float duration, AlphaFunction alpha);
 
   /**
    * Animates the internal y property to the given value
@@ -665,34 +650,34 @@ private:
    * @param[in] duration The time in seconds for animation
    * @param[in] alpha The alpha function to use for animating
    */
-  void AnimateInternalYTo( float position, float duration, AlphaFunction alpha );
+  void AnimateInternalYTo(float position, float duration, AlphaFunction alpha);
 
   /**
    * Called whenever a snap animation on the x-axis has completed
    * @param[in] source the Animation instance that has completed.
    */
-  void OnScrollAnimationFinished( Animation& source );
+  void OnScrollAnimationFinished(Animation& source);
 
   /**
    * Called when either the X or Y internal scroll positions have finished snapping back to SCROLL_PRE_POSITION
    *
    * @param[in] source the Animation instance that has completed.
    */
-  void OnSnapInternalPositionFinished( Animation& source );
+  void OnSnapInternalPositionFinished(Animation& source);
 
   /**
    * Called whenever a snap animation on the x-axis has completed and we need to snap pre scroll
    * position to our clamped position
    * @param[in] position The x position to snap pre scroll property to
    */
-  void SnapInternalXTo( float position );
+  void SnapInternalXTo(float position);
 
   /**
    * Called whenever a snap animation on the y-axis has completed and we need to snap pre scroll
    * position to our clamped position
    * @param[in] position The y position to snap pre scroll property to
    */
-  void SnapInternalYTo( float position );
+  void SnapInternalYTo(float position);
 
   /**
    * This is called internally whenever the Scroll Rulers are
@@ -718,7 +703,7 @@ private:
    *
    * @param[in] gesture The gesture event.
    */
-  void OnPan( const PanGesture& pan);
+  void OnPan(const PanGesture& pan);
 
   /**
    * Extension of the above gestures.
@@ -768,7 +753,7 @@ private:
    * @param[in,out] position The position you wish to clamp
    * @param[out] clamped The results of the clamping.
    */
-  void ClampPosition(Vector2& position, ClampState2D &clamped) const;
+  void ClampPosition(Vector2& position, ClampState2Dclamped) const;
 
   /**
    * Wraps position within the domain set up by X/Y Rulers
@@ -819,7 +804,6 @@ protected:
   virtual ~ScrollView();
 
 private:
-
   /**
    * Searches this ScrollView, and attempts to Unbind
    * systematically this Actor from the ScrollView attached.
@@ -858,7 +842,7 @@ private:
   /**
    * Checks if the property notifications are active and adds them if not
    */
-  void SetScrollUpdateNotification( bool enabled );
+  void SetScrollUpdateNotification(bool enabled);
 
   /**
    * Refresh the ScrollView (used when animating to update application developer of changes)
@@ -871,10 +855,9 @@ private:
    * @param[in] scrollModeMap A map defining the characteristics of X and Y scrolling
    * using either FixedRuler or DefaultRuler.
    */
-  void SetScrollMode( const Property::Map& scrollModeMap );
+  void SetScrollMode(const Property::Map& scrollModeMap);
 
 private:
-
   // Undefined
   ScrollView(const ScrollView&);
 
@@ -882,19 +865,18 @@ private:
   ScrollView& operator=(const ScrollView& rhs);
 
 private:
+  unsigned long mTouchDownTime; ///< The touch down time
 
-  unsigned long mTouchDownTime;         ///< The touch down time
+  int     mGestureStackDepth; ///< How many gestures are currently occuring.
+  Vector2 mPanStartPosition;  ///< Where the pan gesture's touch down occured
+  Vector2 mPanDelta;          ///< Amount currently panned.
 
-  int mGestureStackDepth;               ///< How many gestures are currently occuring.
-  Vector2 mPanStartPosition;            ///< Where the pan gesture's touch down occured
-  Vector2 mPanDelta;                    ///< Amount currently panned.
-
-  unsigned int mScrollStateFlags;       ///< flags indicating current state of scrolling
+  unsigned int mScrollStateFlags; ///< flags indicating current state of scrolling
   // Scroll delegate pre and post position properties...
-  Vector2 mScrollPrePosition;           ///< Wrapped scroll position, but not clamped
-  Vector2 mScrollPostPosition;          ///< Wrapped and clamped, this is the final scroll position used
-  Vector2 mScrollTargetPosition;        ///< Final target position for an animated scroll
-  Vector2 mDomainOffset;                ///< Domain offset (this keeps track of the domain boundaries that scroll positions traverses)
+  Vector2 mScrollPrePosition;    ///< Wrapped scroll position, but not clamped
+  Vector2 mScrollPostPosition;   ///< Wrapped and clamped, this is the final scroll position used
+  Vector2 mScrollTargetPosition; ///< Final target position for an animated scroll
+  Vector2 mDomainOffset;         ///< Domain offset (this keeps track of the domain boundaries that scroll positions traverses)
 
   // Rulers for each axes...
   RulerPtr mRulerX;
@@ -904,42 +886,41 @@ private:
   Vector2 mMinScroll;
   Vector2 mMaxScroll;
 
-  Animation mInternalXAnimation;        ///< Animates mPropertyX to a snap position or application requested scroll position
-  Animation mInternalYAnimation;        ///< Animates mPropertyY to a snap position or application requested scroll position
-
+  Animation mInternalXAnimation; ///< Animates mPropertyX to a snap position or application requested scroll position
+  Animation mInternalYAnimation; ///< Animates mPropertyY to a snap position or application requested scroll position
 
-  Vector2 mLastVelocity;                ///< Record the last velocity from PanGesture (Finish event doesn't have correct velocity)
+  Vector2  mLastVelocity; ///< Record the last velocity from PanGesture (Finish event doesn't have correct velocity)
   LockAxis mLockAxis;
 
-  Timer mTouchDownTimer;                ///< Used to interrupt snap-animation. This cannot be done in OnTouch without breaking fast flick behavior.
+  Timer mTouchDownTimer; ///< Used to interrupt snap-animation. This cannot be done in OnTouch without breaking fast flick behavior.
 
-  float mScrollUpdateDistance;          ///< Distance for scrolling to travel for the scroll update notifications
+  float                      mScrollUpdateDistance;      ///< Distance for scrolling to travel for the scroll update notifications
   Dali::PropertyNotification mScrollXUpdateNotification; ///< scroll x position update notification
   Dali::PropertyNotification mScrollYUpdateNotification; ///< scroll y position update notification
 
-  Actor mInternalActor;                 ///< Internal actor (we keep internal actors in here e.g. scrollbars, so we can ignore it in searches)
+  Actor mInternalActor; ///< Internal actor (we keep internal actors in here e.g. scrollbars, so we can ignore it in searches)
 
-  ScrollViewEffectContainer mEffects;   ///< Container keeping track of all the applied effects.
+  ScrollViewEffectContainer mEffects; ///< Container keeping track of all the applied effects.
 
-  Vector2   mMaxOvershoot;                      ///< Number of scrollable pixels that will take overshoot from 0.0f to 1.0f
-  Vector2   mUserMaxOvershoot;                  ///< Set by user, allows overriding of default max overshoot for the scroll indicator
-  float     mSnapOvershootDuration;             ///< Duration for overshoot snapping back to Vector2::ZERO
-  AlphaFunction mSnapOvershootAlphaFunction;    ///< AlphaFunction to be used for this overshoot.
+  Vector2       mMaxOvershoot;               ///< Number of scrollable pixels that will take overshoot from 0.0f to 1.0f
+  Vector2       mUserMaxOvershoot;           ///< Set by user, allows overriding of default max overshoot for the scroll indicator
+  float         mSnapOvershootDuration;      ///< Duration for overshoot snapping back to Vector2::ZERO
+  AlphaFunction mSnapOvershootAlphaFunction; ///< AlphaFunction to be used for this overshoot.
 
-  float mSnapDuration;                          ///< Time for the snap animation to take (in seconds).
-  AlphaFunction mSnapAlphaFunction;             ///< AlphaFunction to be used for the Snap Animation.
+  float         mSnapDuration;      ///< Time for the snap animation to take (in seconds).
+  AlphaFunction mSnapAlphaFunction; ///< AlphaFunction to be used for the Snap Animation.
 
-  Vector2 mMinFlickDistance;                      ///< Minimum pan distance required for a flick
-  float mFlickSpeedThreshold;                   ///< Minimum pan speed required for a flick in pixels/ms
-  float mFlickDuration;                         ///< Time for the flick animation to take (in seconds).
-  AlphaFunction mFlickAlphaFunction;            ///< AlphaFunction to be used for the Flick Animation.
+  Vector2       mMinFlickDistance;    ///< Minimum pan distance required for a flick
+  float         mFlickSpeedThreshold; ///< Minimum pan speed required for a flick in pixels/ms
+  float         mFlickDuration;       ///< Time for the flick animation to take (in seconds).
+  AlphaFunction mFlickAlphaFunction;  ///< AlphaFunction to be used for the Flick Animation.
 
-  float mAxisAutoLockGradient;                  ///< Axis Auto-lock gradient threshold. Above this gradient and it will lock scrolling to closest axis.
-  float mFrictionCoefficient;                   ///< Friction coefficient. Amount of friction to apply to free panning flick animation. in stage.lengths/sec
-  float mFlickSpeedCoefficient;                 ///< Flick velocity coefficient. Input touch velocity is multiplied by this.
-  float mMaxFlickSpeed;                         ///< Maximum flick speed. Maximum speed of flick in stage.lengths/sec.
+  float mAxisAutoLockGradient;  ///< Axis Auto-lock gradient threshold. Above this gradient and it will lock scrolling to closest axis.
+  float mFrictionCoefficient;   ///< Friction coefficient. Amount of friction to apply to free panning flick animation. in stage.lengths/sec
+  float mFlickSpeedCoefficient; ///< Flick velocity coefficient. Input touch velocity is multiplied by this.
+  float mMaxFlickSpeed;         ///< Maximum flick speed. Maximum speed of flick in stage.lengths/sec.
 
-  Vector2 mWheelScrollDistanceStep;        ///< The step of scroll distance in actor coordinates in X and Y axes for each wheel event received.
+  Vector2 mWheelScrollDistanceStep; ///< The step of scroll distance in actor coordinates in X and Y axes for each wheel event received.
 
   //ScrollInternalConstraintsPtr mScrollInternalConstraints;
   Constraint mScrollMainInternalPrePositionConstraint;
@@ -952,26 +933,26 @@ private:
   Constraint mScrollMainInternalDomainConstraint;
   Constraint mScrollMainInternalPrePositionMaxConstraint;
 
-  ScrollOvershootIndicatorPtr mOvershootIndicator;
+  ScrollOvershootIndicatorPtr    mOvershootIndicator;
   WeakHandle<Toolkit::ScrollBar> mScrollBar;
 
   Toolkit::ScrollView::SnapStartedSignalType mSnapStartedSignal;
 
-  bool mInAccessibilityPan:1;             ///< With AccessibilityPan its easier to move between snap positions
-  bool mScrolling:1;                      ///< Flag indicating whether the scroll view is being scrolled (by user or animation)
-  bool mScrollInterrupted:1;              ///< Flag set for when a down event interrupts a scroll
-  bool mPanning:1;                        ///< Whether scroll view is currently panning or not
-  bool mSensitive:1;                      ///< Scroll Sensitivity Flag.
-  bool mTouchDownTimeoutReached:1;        ///< Indicates when down event timeout occured without corresponding up event (touch still down)
-  bool mActorAutoSnapEnabled:1;           ///< Whether to automatically snap to closest actor.
-  bool mAutoResizeContainerEnabled:1;     ///< Whether to automatically resize container (affects RulerDomain's on X/Y axes)
-  bool mWrapMode:1;                       ///< Whether to wrap contents based on container size.
-  bool mAxisAutoLock:1;                   ///< Whether to automatically lock axis when panning.
-  bool mAlterChild:1;                     ///< Internal flag to control behavior of OnChildAdd/OnChildRemove when Adding internal Actors.
-  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
+  bool mInAccessibilityPan : 1;         ///< With AccessibilityPan its easier to move between snap positions
+  bool mScrolling : 1;                  ///< Flag indicating whether the scroll view is being scrolled (by user or animation)
+  bool mScrollInterrupted : 1;          ///< Flag set for when a down event interrupts a scroll
+  bool mPanning : 1;                    ///< Whether scroll view is currently panning or not
+  bool mSensitive : 1;                  ///< Scroll Sensitivity Flag.
+  bool mTouchDownTimeoutReached : 1;    ///< Indicates when down event timeout occured without corresponding up event (touch still down)
+  bool mActorAutoSnapEnabled : 1;       ///< Whether to automatically snap to closest actor.
+  bool mAutoResizeContainerEnabled : 1; ///< Whether to automatically resize container (affects RulerDomain's on X/Y axes)
+  bool mWrapMode : 1;                   ///< Whether to wrap contents based on container size.
+  bool mAxisAutoLock : 1;               ///< Whether to automatically lock axis when panning.
+  bool mAlterChild : 1;                 ///< Internal flag to control behavior of OnChildAdd/OnChildRemove when Adding internal Actors.
+  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 ecd3f2a..ec87fa5 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_SCROLL_VIEW_PAGE_PATH_EFFECT_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics 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,8 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/animation/linear-constrainer.h>
 #include <dali/devel-api/animation/path-constrainer.h>
+#include <dali/public-api/animation/linear-constrainer.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-effect-impl.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * @copydoc Toolkit::ScrollViewPagePathEffect
  */
 class ScrollViewPagePathEffect : public ScrollViewEffect
 {
-
 public:
-
   /**
    * Constructor
    * @param[in] path Pages will follow this path
@@ -51,41 +46,37 @@ public:
    * @param[in] viewPageSize size of a page in the scrollview
    * @param[in] pageCount total number of pages in the scrollview
    */
-  ScrollViewPagePathEffect(Path path, const Vector3& forward, Dali::Property::Index inputPropertyIndex, const Vector3& viewPageSize, unsigned int pageCount );
+  ScrollViewPagePathEffect(Path path, const Vector3& forward, Dali::Property::Index inputPropertyIndex, const Vector3& viewPageSize, unsigned int pageCount);
 
 public:
-
   /**
    * @copydoc ScrollViewEffect::ApplyToActor
    */
-  void ApplyToPage( Actor child, unsigned int pageOrder );
+  void ApplyToPage(Actor child, unsigned int pageOrder);
 
 public:
-
   /**
    * @copydoc ScrollViewEffect::OnAttach
    */
-  void OnAttach( Toolkit::ScrollView& scrollView ) override;
+  void OnAttach(Toolkit::ScrollView& scrollView) override;
 
   /**
    * @copydoc ScrollViewEffect::OnDetach
    */
-  void OnDetach( Toolkit::ScrollView& scrollView ) override;
+  void OnDetach(Toolkit::ScrollView& scrollView) override;
 
 protected:
-
   /**
    * A reference counted object may only be deleted by calling Unreference()
    */
   virtual ~ScrollViewPagePathEffect();
 
 private:
-
-  Vector3               mPageSize;            ///< The logical page size for the 3D effect.
-  PathConstrainer       mPathConstrainer;     ///< PathConstrainer used to constraint position and orientation
-  LinearConstrainer     mLinearConstrainer;   ///< LinearConstrainer used to constraint opacity
-  Dali::Property::Index mInputPropertyIndex;  ///< Index of the property in the scrollview used as the parameter for the path
-  unsigned int          mPageCount;           ///< Total number of pages (Needed for wrapping)
+  Vector3               mPageSize;           ///< The logical page size for the 3D effect.
+  PathConstrainer       mPathConstrainer;    ///< PathConstrainer used to constraint position and orientation
+  LinearConstrainer     mLinearConstrainer;  ///< LinearConstrainer used to constraint opacity
+  Dali::Property::Index mInputPropertyIndex; ///< Index of the property in the scrollview used as the parameter for the path
+  unsigned int          mPageCount;          ///< Total number of pages (Needed for wrapping)
 };
 
 } // namespace Internal
index 9967fde..73ff256 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_SCROLLABLE_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/animation/alpha-function.h>
 
 // INTERNAL INCLUDES
+#include <dali-toolkit/internal/controls/control/control-data-impl.h>
 #include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/public-api/controls/scrollable/scrollable.h>
-#include <dali-toolkit/internal/controls/control/control-data-impl.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class Scrollable;
 typedef IntrusivePtr<Scrollable> ScrollablePtr;
 
@@ -44,7 +41,6 @@ typedef IntrusivePtr<Scrollable> ScrollablePtr;
 class Scrollable : public Control
 {
 public:
-
   /**
    * @copydoc Dali::Toolkit::Scrollable::IsOvershootEnabled
    */
@@ -84,13 +80,13 @@ public:
    * @param[in] position The position to scroll to.
    * @param[in] duration The duration of the animation in seconds
    */
-  virtual void ScrollTo(const Vector2 &position, float duration) = 0;
+  virtual void ScrollTo(const Vector2position, float duration) = 0;
 
   /**
    * Set the color of the overshoot effect.
    * @parm[in] color The color of the overshoot effect
    */
-  virtual void SetOvershootEffectColor( const Vector4& color ) = 0;
+  virtual void SetOvershootEffectColor(const Vector4& color) = 0;
 
   /**
    * Retrieve the color of the overshoot effect.
@@ -101,7 +97,7 @@ public:
   /**
    * @copydoc Dali::Toolkit::Scrollable::SetOvershootAnimationSpeed(float pixelsPerSecond)
    */
-  void SetOvershootAnimationSpeed( float pixelsPerSecond );
+  void SetOvershootAnimationSpeed(float pixelsPerSecond);
 
   /**
    * @copydoc Dali::Toolkit::Scrollable::GetOvershootAnimationSpeed()
@@ -117,7 +113,7 @@ public:
    * Set the size of the overshoot effect.
    * @parm[in] size The size of the overshoot effect
    */
-  virtual void SetOvershootSize( const Vector2& size ) = 0;
+  virtual void SetOvershootSize(const Vector2& size) = 0;
 
 protected: // From Control
   struct AccessibleImpl : public Control::Impl::AccessibleImpl
@@ -133,16 +129,16 @@ protected: // From Control
   virtual void OnInitialize() override;
 
 private:
-
   /**
    * Temporary function to override EnableScrollOvershoot functionality for overshoot
    * Only ScrollView needs to override this as HQ has not requested disable functionality in ItemView
    * @param[in] enable true to enable, false to disable overshoot indicator
    */
-  virtual void EnableScrollOvershoot(bool enable) {}
+  virtual void EnableScrollOvershoot(bool enable)
+  {
+  }
 
 public: //Signals
-
   /**
    * @copydoc Dali::Toolkit::Scrollable::ScrollStartedSignal()
    */
@@ -167,7 +163,7 @@ public: //Signals
    * @return True if the signal was connected.
    * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
    */
-  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
+  static bool DoConnectSignal(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor);
 
   //properties
 
@@ -177,7 +173,7 @@ public: //Signals
    * @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 );
+  static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value);
 
   /**
    * Called to retrieve a property of an object of this type.
@@ -185,10 +181,9 @@ public: //Signals
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index index );
+  static Property::Value GetProperty(BaseObject* object, Property::Index index);
 
 protected:
-
   /**
    * Removed default constructor.
    */
@@ -199,7 +194,7 @@ protected:
    *
    * @param[in] behaviourFlags Flags to enable
    */
-  Scrollable( ControlBehaviour behaviourFlags );
+  Scrollable(ControlBehaviour behaviourFlags);
 
   /**
    * A reference counted object may only be deleted by calling Unreference()
@@ -207,7 +202,6 @@ protected:
   virtual ~Scrollable();
 
 private:
-
   /**
    * Gets position property.
    *
@@ -216,7 +210,6 @@ private:
   Vector2 GetPropertyPosition() const;
 
 private:
-
   // Undefined
   Scrollable(const Scrollable&);
 
@@ -224,20 +217,18 @@ private:
   Scrollable& operator=(const Scrollable& rhs);
 
 protected:
-
-  Vector4         mOvershootEffectColor;    ///<The color of the overshoot bouncing effect
-  float           mOvershootAnimationSpeed; ///<The speed of the overshoot animation (pixels per second)
-  Vector2         mOvershootSize;           ///<The size of the overshoot effect
+  Vector4 mOvershootEffectColor;    ///<The color of the overshoot bouncing effect
+  float   mOvershootAnimationSpeed; ///<The speed of the overshoot animation (pixels per second)
+  Vector2 mOvershootSize;           ///<The size of the overshoot effect
 
   Dali::AlphaFunction::BuiltinFunction mScrollToAlphaFunction; ///< The ScrollTo() animations use this
 
-  Toolkit::Scrollable::ScrollStartedSignalType mScrollStartedSignal;
-  Toolkit::Scrollable::ScrollUpdatedSignalType mScrollUpdatedSignal;
+  Toolkit::Scrollable::ScrollStartedSignalType   mScrollStartedSignal;
+  Toolkit::Scrollable::ScrollUpdatedSignalType   mScrollUpdatedSignal;
   Toolkit::Scrollable::ScrollCompletedSignalType mScrollCompletedSignal;
 
 private:
-
-  bool mOvershootEnabled:1;
+  bool mOvershootEnabled : 1;
 };
 
 } // namespace Internal
index 65516c3..c0de0e4 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_SHADOW_VIEW_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <sstream>
-#include <cmath>
 #include <dali/public-api/actors/camera-actor.h>
 #include <dali/public-api/animation/constraints.h>
-#include <dali/public-api/render-tasks/render-task.h>
 #include <dali/public-api/object/property-map.h>
+#include <dali/public-api/render-tasks/render-task.h>
+#include <cmath>
+#include <sstream>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/controls/shadow-view/shadow-view.h>
-#include <dali-toolkit/public-api/controls/image-view/image-view.h>
-#include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/internal/filters/blur-two-pass-filter.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali-toolkit/public-api/controls/image-view/image-view.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 class ShadowView;
 
 namespace Internal
 {
-
 /**
  * ShadowView implementation class
  */
 class ShadowView : public Control
 {
 public:
-
   /**
    * @copydoc Dali::Toolkit::ShadowView::ShadowView
    */
@@ -103,28 +99,33 @@ public:
   /**
    * @copydoc Dali::Toolkit::ShadowView::GetBlurStrengthPropertyIndex()
    */
-  Property::Index GetBlurStrengthPropertyIndex() const {return mBlurStrengthPropertyIndex;}
+  Property::Index GetBlurStrengthPropertyIndex() const
+  {
+    return mBlurStrengthPropertyIndex;
+  }
 
   /**
    * @copydoc Dali::Toolkit::ShadowView::GetShadowColorPropertyIndex()
    */
-  Property::Index GetShadowColorPropertyIndex() const {return mShadowColorPropertyIndex;}
+  Property::Index GetShadowColorPropertyIndex() const
+  {
+    return mShadowColorPropertyIndex;
+  }
 
   void SetShaderConstants();
 
 private:
-
   void OnInitialize() override;
 
   /**
    * @copydoc Control::OnChildAdd()
    */
-  void OnChildAdd( Actor& child ) override;
+  void OnChildAdd(Actor& child) override;
 
   /**
    * @copydoc Control::OnChildRemove()
    */
-  void OnChildRemove( Actor& child ) override;
+  void OnChildRemove(Actor& child) override;
 
   /**
    * Constrain the camera actor to the position of the point light, pointing
@@ -137,62 +138,59 @@ private:
   void CreateBlurFilter();
 
 private:
-  Actor mShadowPlane; // Shadow renders into this actor
+  Actor mShadowPlane;   // Shadow renders into this actor
   Actor mShadowPlaneBg; // mShadowPlane renders directly in front of this actor
-  Actor mPointLight;  // Shadow is cast from this point light
+  Actor mPointLight;    // Shadow is cast from this point light
 
   /////////////////////////////////////////////////////////////
-  FrameBuffer mSceneFromLightRenderTarget;  // for rendering normal scene seen from light to texture instead of the screen
+  FrameBuffer mSceneFromLightRenderTarget; // for rendering normal scene seen from light to texture instead of the screen
 
   FrameBuffer mOutputFrameBuffer;
 
-  Actor mChildrenRoot; // Subtree for all user added child actors that should be rendered normally
-  Actor mBlurRootActor; // Root actor for blur filter processing
+  Actor      mChildrenRoot;  // Subtree for all user added child actors that should be rendered normally
+  Actor      mBlurRootActor; // Root actor for blur filter processing
   RenderTask mRenderSceneTask;
 
   CameraActor mCameraActor; // Constrained to same position as mPointLight and pointing at mShadowPlane
 
-  Property::Map mShadowVisualMap;
+  Property::Map     mShadowVisualMap;
   BlurTwoPassFilter mBlurFilter;
 
-  Vector4 mCachedShadowColor;                               ///< Cached Shadow color.
-  Vector4 mCachedBackgroundColor;                           ///< Cached Shadow background color (same as shadow color but with alpha at 0.0)
+  Vector4 mCachedShadowColor;     ///< Cached Shadow color.
+  Vector4 mCachedBackgroundColor; ///< Cached Shadow background color (same as shadow color but with alpha at 0.0)
 
   /////////////////////////////////////////////////////////////
   // Properties that can be animated
   Property::Index mBlurStrengthPropertyIndex;
   Property::Index mShadowColorPropertyIndex;
-  float mDownsampleWidthScale;
-  float mDownsampleHeightScale;
+  float           mDownsampleWidthScale;
+  float           mDownsampleHeightScale;
 
 private:
-
   // Undefined copy constructor.
-  ShadowView( const ShadowView& );
+  ShadowView(const ShadowView&);
 
   // Undefined assignment operator.
-  ShadowView& operator=( const ShadowView& );
+  ShadowView& operator=(const ShadowView&);
 };
 
 } // namespace Internal
 
-
 // Helpers for public-api forwarding methods
-inline Toolkit::Internal::ShadowView& GetImpl( Toolkit::ShadowView& obj )
+inline Toolkit::Internal::ShadowView& GetImpl(Toolkit::ShadowView& obj)
 {
   DALI_ASSERT_ALWAYS(obj);
   Dali::RefObject& handle = obj.GetImplementation();
   return static_cast<Toolkit::Internal::ShadowView&>(handle);
 }
 
-inline const Toolkit::Internal::ShadowView& GetImpl( const Toolkit::ShadowView& obj )
+inline const Toolkit::Internal::ShadowView& GetImpl(const Toolkit::ShadowView& obj)
 {
   DALI_ASSERT_ALWAYS(obj);
   const Dali::RefObject& handle = obj.GetImplementation();
   return static_cast<const Toolkit::Internal::ShadowView&>(handle);
 }
 
-
 } // namespace Toolkit
 
 } // namespace Dali
index c078271..6e2a324 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_SLIDER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/object/property-map.h>
 
 // INTERNAL INCLUDES
+#include <dali-toolkit/internal/controls/control/control-data-impl.h>
 #include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali-toolkit/public-api/controls/image-view/image-view.h>
 #include <dali-toolkit/public-api/controls/slider/slider.h>
 #include <dali-toolkit/public-api/controls/text-controls/text-label.h>
-#include <dali-toolkit/public-api/controls/image-view/image-view.h>
-#include <dali-toolkit/internal/controls/control/control-data-impl.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 class Button;
 
 namespace Internal
 {
-
 class Slider;
 
-typedef Dali::IntrusivePtr< Slider > SliderPtr;
+typedef Dali::IntrusivePtr<Slider> SliderPtr;
 
 /**
  * @copydoc Toolkit::Slider
@@ -51,7 +48,6 @@ typedef Dali::IntrusivePtr< Slider > SliderPtr;
 class Slider : public Control
 {
 public:
-
   typedef Property::Array MarkList;
 
   /**
@@ -62,7 +58,6 @@ public:
   static Dali::Toolkit::Slider New();
 
 public:
-
   // Properties
 
   /**
@@ -70,7 +65,7 @@ public:
    *
    * @param[in] marks The list of marks to set
    */
-  void SetMarks( const MarkList& marks );
+  void SetMarks(const MarkList& marks);
 
   /**
    * Get the list of marks
@@ -84,7 +79,7 @@ public:
    *
    * @param[in] snap Flag to snap to marks or not
    */
-  void SetSnapToMarks( bool snap );
+  void SetSnapToMarks(bool snap);
 
   /**
    * Return if snap to marks is set or not
@@ -98,7 +93,7 @@ public:
    *
    * @param[in] value The value to set. Will be clamped to [lowerBound .. upperBound]
    */
-  void SetValue( float value );
+  void SetValue(float value);
 
   /**
    * Get the value of the slider
@@ -112,7 +107,7 @@ public:
    *
    * @param[in] region The hit region
    */
-  void SetHitRegion( const Vector2& region );
+  void SetHitRegion(const Vector2& region);
 
   /**
    * Get hit region
@@ -126,7 +121,7 @@ public:
    *
    * @param[in] region The track region
    */
-  void SetTrackRegion( const Vector2& region );
+  void SetTrackRegion(const Vector2& region);
 
   /**
    * Get the track region
@@ -140,7 +135,7 @@ public:
    *
    * @param[in] color The disabled color.
    */
-  void SetDisabledColor( const Vector4& color );
+  void SetDisabledColor(const Vector4& color);
 
   /**
    * @brief Get disabled color
@@ -154,7 +149,7 @@ public:
    *
    * @param[in] precision The number of decimal places to use for printing numbers
    */
-  void SetValuePrecision( int precision );
+  void SetValuePrecision(int precision);
 
   /**
    * Get value precision
@@ -168,7 +163,7 @@ public:
    *
    * @param[in] showPopup The show popup flag
    */
-  void SetShowPopup( bool showPopup );
+  void SetShowPopup(bool showPopup);
 
   /**
    * Get show value in popup
@@ -182,7 +177,7 @@ public:
    *
    * @param[in] showValue The show value flag
    */
-  void SetShowValue( bool showValue );
+  void SetShowValue(bool showValue);
 
   /**
    * Get show value on handle
@@ -196,7 +191,7 @@ public:
    *
    * param[in] enabled Set the enabled flag
    */
-  void SetEnabled( bool enabled );
+  void SetEnabled(bool enabled);
 
   /**
    * Return if enabled or not
@@ -213,7 +208,7 @@ public:
    *
    * @param[in] tolerance The percentage of width for which to snap
    */
-  void SetMarkTolerance( float tolerance );
+  void SetMarkTolerance(float tolerance);
 
   /**
    * Return the mark tolerance
@@ -249,8 +244,7 @@ public:
    * @return True if the signal was connected.
    * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
    */
-  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName,
-                               FunctorDelegate* functor );
+  static bool DoConnectSignal(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor);
 
   // Properties
 
@@ -260,7 +254,7 @@ public:
    * @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 );
+  static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value);
 
   /**
    * Called to retrieve a property of an object of this type.
@@ -268,10 +262,9 @@ public:
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index propertyIndex );
+  static Property::Value GetProperty(BaseObject* object, Property::Index propertyIndex);
 
 protected:
-
   /**
    * Construct a new Slider.
    */
@@ -285,11 +278,9 @@ protected:
   /**
    * @copydoc CustomActorImpl::OnRelayout
    */
-  void OnRelayout( const Vector2& size, RelayoutContainer& container ) override;
-
+  void OnRelayout(const Vector2& size, RelayoutContainer& container) override;
 
 private:
-
   /**
    * Domain is a from/to pair
    */
@@ -301,8 +292,9 @@ private:
     Domain()
     {
     }
-    Domain( Vector2 fromVal, Vector2 toVal )
-        : from( fromVal ), to( toVal )
+    Domain(Vector2 fromVal, Vector2 toVal)
+    : from(fromVal),
+      to(toVal)
     {
     }
   };
@@ -319,7 +311,6 @@ private:
   };
 
 private:
-
   /**
    * @copydoc Toolkit::Control::OnInitialize()
    */
@@ -332,7 +323,7 @@ private:
    * @param[in] touch The touch info
    * @return If touch is handled or not
    */
-  bool OnTouch( Actor actor, const TouchEvent& touch );
+  bool OnTouch(Actor actor, const TouchEvent& touch);
 
   /**
    * Pan gesture event
@@ -340,7 +331,7 @@ private:
    * @param[in] actor The actor the event is raised for
    * @param[in] gesture The pan event info
    */
-  void OnPan( Actor actor, const PanGesture& gesture );
+  void OnPan(Actor actor, const PanGesture& gesture);
 
   /**
    * Map a position onto a domain and return the result as a percentage
@@ -348,7 +339,7 @@ private:
    * @param[in] point The point to map onto the domain
    * @return The result as a percentage [0..1]
    */
-  float MapPercentage( const Vector2& point );
+  float MapPercentage(const Vector2& point);
 
   /**
    * Map a value in the range to a percentage
@@ -356,7 +347,7 @@ private:
    * @param[in] point The value in range [lowerBound..upperBound]
    * @return The result as a percentage [0..1]
    */
-  float MapValuePercentage( float value );
+  float MapValuePercentage(float value);
 
   /**
    * Convert a point in local hit space into domain space
@@ -364,7 +355,7 @@ private:
    * @param[in] x The x position to convert
    * @return The x position in domain space
    */
-  float HitSpaceToDomain( float x );
+  float HitSpaceToDomain(float x);
 
   /**
    * Map a percentage onto the slider's bounds
@@ -374,7 +365,7 @@ private:
    * @param[in] upperBound The upper bound to map onto
    * @return The value of percent mapped from lowerBound to upperBound
    */
-  float MapBounds( float percent, float lowerBound, float upperBound );
+  float MapBounds(float percent, float lowerBound, float upperBound);
 
   /**
    * Get the range of the valid values the slider handle can move between
@@ -382,7 +373,7 @@ private:
    * @param[in] currentSize The current size of the slider
    * @return The range as a domain pair
    */
-  Domain CalcDomain( const Vector2& currentSize );
+  Domain CalcDomain(const Vector2& currentSize);
 
   /**
    * Create the hit region
@@ -465,7 +456,7 @@ private:
    *
    * @param[in] value The value to display in the popup
    */
-  void DisplayPopup( float value );
+  void DisplayPopup(float value);
 
   /**
    * If there are marks present, filter the incoming percent based on snapping to any nearby marks
@@ -473,7 +464,7 @@ private:
    * @param[in] value The incoming value on the slider to filter
    * @return The filtered percentage snapped to any nearby marks
    */
-  float MarkFilter( float value );
+  float MarkFilter(float value);
 
   /**
    * If there are marks present, snap the incoming percent to the nearest mark
@@ -481,7 +472,7 @@ private:
    * @param[in] value The incoming value on the slider to snap
    * @return The filtered percentage snapped to the nearest mark
    */
-  float SnapToMark( float value );
+  float SnapToMark(float value);
 
   /**
    * Search for if a mark has been reached
@@ -490,7 +481,7 @@ private:
    * @param[out] outIndex The index of the mark if found
    * @return If a mark has been found to match percent
    */
-  bool MarkReached( float value, int& outIndex );
+  bool MarkReached(float value, int& outIndex);
 
   /**
    * Handler for when the value view needs to be hidden
@@ -505,21 +496,21 @@ private:
    * @paramp[in] value The value to set
    * @param[in] raiseSignals Configure signals to be raised or not.
    */
-  void DisplayValue( float value, bool raiseSignals );
+  void DisplayValue(float value, bool raiseSignals);
 
   /**
    * Create the image for the track
    *
    * @param[in] filename The track image
    */
-  void SetTrackVisual( const std::string& filename );
+  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
    */
-  void SetTrackVisual( Dali::Property::Map map );
+  void SetTrackVisual(Dali::Property::Map map);
 
   /**
    * @brief Return the track image.
@@ -533,14 +524,14 @@ private:
    *
    * @param[in] filename The progress bar image
    */
-  void SetProgressVisual( const std::string& filename );
+  void SetProgressVisual(const std::string& filename);
 
   /**
    * @brief Set the progress visual from an Dali::Property::Map
    *
    * @param[in] map The Dali::Property::Map to use for to display
    */
-  void SetProgressVisual( Dali::Property::Map map );
+  void SetProgressVisual(Dali::Property::Map map);
 
   /**
    * @brief Return the progress bar image.
@@ -554,21 +545,21 @@ private:
    *
    * @param[in] filename The popup image
    */
-  void CreatePopupImage( const std::string& filename );
+  void CreatePopupImage(const std::string& filename);
 
   /**
    * @brief Set the popup image
    *
    * @param[in] filename The popup image to set
    */
-  void SetPopupVisual( const std::string& filename );
+  void SetPopupVisual(const std::string& filename);
 
   /**
    * @brief Set the popup from an Dali::Property::Map
    *
    * @param[in] map The Dali::Property::Map to use for to display
    */
-  void SetPopupVisual( Dali::Property::Map map );
+  void SetPopupVisual(Dali::Property::Map map);
 
   /**
    * @brief Return the popup image.
@@ -582,14 +573,14 @@ private:
    *
    * @param[in] filename The popup arrow image to set
    */
-  void SetPopupArrowVisual( const std::string& filename );
+  void SetPopupArrowVisual(const std::string& filename);
 
   /**
    * @brief Set the popup arrow from an Dali::Property::Map
    *
    * @param[in] map The Dali::Property::Map to use for to display
    */
-  void SetPopupArrowVisual( Dali::Property::Map map );
+  void SetPopupArrowVisual(Dali::Property::Map map);
 
   /**
    * @brief Return the popup arrow image.
@@ -603,28 +594,28 @@ private:
    *
    * @param[in] filename The popup arrow image to load and set
    */
-  void CreatePopupArrowImage( const std::string& filename );
+  void CreatePopupArrowImage(const std::string& filename);
 
   /**
    * Set the size of the progress bar region
    *
    * @param[in] region The size of the region to set
    */
-  void ResizeProgressRegion( const Vector2& region );
+  void ResizeProgressRegion(const Vector2& region);
 
   /**
    * Create the image for the handle
    *
    * @param[in] filename The handle image
    */
-  void SetHandleVisual( const std::string& filename );
+  void SetHandleVisual(const std::string& filename);
 
   /**
    * @brief Set the handle visual from an Dali::Property::Map
    *
    * @param[in] map The Dali::Property::Map to use for to display
    */
-  void SetHandleVisual( Property::Map map );
+  void SetHandleVisual(Property::Map map);
 
   /**
    * @brief Return the handle image.
@@ -638,7 +629,7 @@ private:
    *
    * @param[in] size The size of the handle to set
    */
-  void ResizeHandleSize( const Vector2& size );
+  void ResizeHandleSize(const Vector2& size);
 
   /**
    * Create and display the value on the handle
@@ -655,7 +646,7 @@ private:
    *
    * @param[in] size The handle size
    */
-  void SetHandleSize( const Vector2& size );
+  void SetHandleSize(const Vector2& size);
 
   /**
    * Get the size of the handle
@@ -669,7 +660,7 @@ private:
    *
    * @param[in] bound The value to set for the lower bound
    */
-  void SetLowerBound( float bound );
+  void SetLowerBound(float bound);
 
   /**
    * Get the lower bound of the slider's value
@@ -683,7 +674,7 @@ private:
    *
    * @param[in] bound The value to set for the upper bound
    */
-  void SetUpperBound( float bound );
+  void SetUpperBound(float bound);
 
   /**
    * Get the upper bound of the slider's value
@@ -693,69 +684,67 @@ private:
   float GetUpperBound() const;
 
 private:
-
   // Undefined
-  Slider( const Slider& );
+  Slider(const Slider&);
 
   // Undefined
-  Slider& operator=( const Slider& rhs );
+  Slider& operator=(const Slider& rhs);
 
 private:
+  Domain mDomain; ///< Current domain of the handle
 
-  Domain mDomain;                           ///< Current domain of the handle
-
-  Actor mHitArea;                           ///< The input handler
-  Actor mValueDisplay;                      ///< Display of the value
-  Toolkit::ImageView mTrack;                ///< Track image
-  Toolkit::ImageView mHandle;               ///< Slider handle
-  Toolkit::ImageView mProgress;             ///< Progress bar
-  Toolkit::ImageView mPopup;                ///< Popup backing
-  Toolkit::ImageView mPopupArrow;           ///< Popup arrow backing
+  Actor              mHitArea;      ///< The input handler
+  Actor              mValueDisplay; ///< Display of the value
+  Toolkit::ImageView mTrack;        ///< Track image
+  Toolkit::ImageView mHandle;       ///< Slider handle
+  Toolkit::ImageView mProgress;     ///< Progress bar
+  Toolkit::ImageView mPopup;        ///< Popup backing
+  Toolkit::ImageView mPopupArrow;   ///< Popup arrow backing
 
   Toolkit::TextLabel mValueTextLabel;       //< The text value in popup
   Toolkit::TextLabel mHandleValueTextLabel; ///< The text value on handle
-  Vector2 mHandleLastTouchPoint;            ///< The last touch point for the handle
-  Timer mValueTimer;                        ///< Timer used to hide value view
+  Vector2            mHandleLastTouchPoint; ///< The last touch point for the handle
+  Timer              mValueTimer;           ///< Timer used to hide value view
 
-  Toolkit::Slider::ValueChangedSignalType mValueChangedSignal;       ///< Signal emitted when the value is changed
-  Toolkit::Slider::ValueChangedSignalType mSlidingFinishedSignal;    ///< Signal emitted when a sliding is finished
-  Toolkit::Slider::MarkReachedSignalType mMarkReachedSignal;         ///< Signal emitted when a mark is reached
+  Toolkit::Slider::ValueChangedSignalType mValueChangedSignal;    ///< Signal emitted when the value is changed
+  Toolkit::Slider::ValueChangedSignalType mSlidingFinishedSignal; ///< Signal emitted when a sliding is finished
+  Toolkit::Slider::MarkReachedSignalType  mMarkReachedSignal;     ///< Signal emitted when a mark is reached
 
-  SliderState mState;                 ///< The state of the slider
+  SliderState mState; ///< The state of the slider
 
-  PanGestureDetector mPanDetector;    ///< Hit region pan detector
+  PanGestureDetector mPanDetector; ///< Hit region pan detector
 
-  MarkList mMarks;                    ///< List of discreet marks
+  MarkList mMarks; ///< List of discreet marks
 
-  std::string mPopupVisual;           ///< Image for popup image
-  std::string mPopupArrowVisual;      ///< Image for popup arrow image
-  std::string mTrackVisual;           ///< Image for track image
-  std::string mHandleVisual;          ///< Image for handle image
-  std::string mProgressVisual;        ///< Image for progress bar image
+  std::string mPopupVisual;      ///< Image for popup image
+  std::string mPopupArrowVisual; ///< Image for popup arrow image
+  std::string mTrackVisual;      ///< Image for track image
+  std::string mHandleVisual;     ///< Image for handle image
+  std::string mProgressVisual;   ///< Image for progress bar image
 
-  Property::Map mPopupMap;         ///< the Property::Map if the image came from a Property::Map, empty otherwise
-  Property::Map mTrackMap;         ///< the Property::Map if the image came from a Property::Map, empty otherwise
-  Property::Map mHandleMap;        ///< 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
-  Property::Map mPopupArrowMap;    ///< the Property::Map if the image came from a Property::Map, empty otherwise
+  Property::Map mPopupMap;      ///< the Property::Map if the image came from a Property::Map, empty otherwise
+  Property::Map mTrackMap;      ///< the Property::Map if the image came from a Property::Map, empty otherwise
+  Property::Map mHandleMap;     ///< 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
+  Property::Map mPopupArrowMap; ///< the Property::Map if the image came from a Property::Map, empty otherwise
 
-  Vector4 mDisabledColor;    ///< The color to tint the slider when disabled
+  Vector4 mDisabledColor; ///< The color to tint the slider when disabled
 
-  Vector2 mHitRegion;     ///< Size of hit region
-  Vector2 mTrackRegion;   ///< Size of track region
-  Vector2 mHandleSize;    ///< Size of the handle
+  Vector2 mHitRegion;   ///< Size of hit region
+  Vector2 mTrackRegion; ///< Size of track region
+  Vector2 mHandleSize;  ///< Size of the handle
 
-  float mLowerBound = 0.0f;        ///< Lower bound on value
-  float mUpperBound = 1.0f;        ///< Upper bound on value
-  float mValue = 0.0f;             ///< Current value of slider
+  float mLowerBound = 0.0f; ///< Lower bound on value
+  float mUpperBound = 1.0f; ///< Upper bound on value
+  float mValue      = 0.0f; ///< Current value of slider
 
-  float mMarkTolerance = 0.05f;     ///< Tolerance in percentage of slider width for which to snap to marks
+  float mMarkTolerance = 0.05f; ///< Tolerance in percentage of slider width for which to snap to marks
 
-  int mValuePrecision;      ///< The precision to use for outputting the value
+  int mValuePrecision; ///< The precision to use for outputting the value
 
-  bool mShowPopup   : 1,      ///< Show the popup or not
-       mShowValue   : 1,      ///< Whether to display the value number or not on the handle
-       mSnapToMarks : 1;      ///< Turn on or off snapping to marks
+  bool mShowPopup : 1, ///< Show the popup or not
+    mShowValue : 1,    ///< Whether to display the value number or not on the handle
+    mSnapToMarks : 1;  ///< Turn on or off snapping to marks
 
 protected:
   struct AccessibleImpl : public Control::Impl::AccessibleImpl,
@@ -765,7 +754,7 @@ protected:
     double GetMinimum() override;
     double GetCurrent() override;
     double GetMaximum() override;
-    bool SetCurrent( double ) override;
+    bool   SetCurrent(double) override;
     double GetMinimumIncrement() override;
   };
 };
@@ -774,22 +763,22 @@ protected:
 
 // Helpers for public-api forwarding methods
 
-inline Toolkit::Internal::Slider& GetImpl( Toolkit::Slider& pub )
+inline Toolkit::Internal::Slider& GetImpl(Toolkit::Slider& pub)
 {
-  DALI_ASSERT_ALWAYS( pub );
+  DALI_ASSERT_ALWAYS(pub);
 
   Dali::RefObject& handle = pub.GetImplementation();
 
-  return static_cast< Toolkit::Internal::Slider& >( handle );
+  return static_cast<Toolkit::Internal::Slider&>(handle);
 }
 
-inline const Toolkit::Internal::Slider& GetImpl( const Toolkit::Slider& pub )
+inline const Toolkit::Internal::Slider& GetImpl(const Toolkit::Slider& pub)
 {
-  DALI_ASSERT_ALWAYS( pub );
+  DALI_ASSERT_ALWAYS(pub);
 
   const Dali::RefObject& handle = pub.GetImplementation();
 
-  return static_cast< const Toolkit::Internal::Slider& >( handle );
+  return static_cast<const Toolkit::Internal::Slider&>(handle);
 }
 
 } // namespace Toolkit
index 2361955..28efb87 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_SUPER_BLUR_VIEW_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/rendering/renderer.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control-impl.h>
-#include <dali-toolkit/devel-api/controls/super-blur-view/super-blur-view.h>
 #include <dali-toolkit/devel-api/controls/gaussian-blur-view/gaussian-blur-view.h>
+#include <dali-toolkit/devel-api/controls/super-blur-view/super-blur-view.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 class SuperBlurView;
 
 namespace Internal
 {
-
 /**
  * SuperBlurView implementation class
  */
 class SuperBlurView : public Control
 {
-
 public:
-
   /**
    * @copydoc Dali::Toolkit::SuperBlurView::New
    */
-  static Toolkit::SuperBlurView New( unsigned int blurLevels );
+  static Toolkit::SuperBlurView New(unsigned int blurLevels);
 
   /**
    * @copydoc Dali::Toolkit::SuperBlurView::SetImage
    */
-  void SetTexture( Texture texture );
+  void SetTexture(Texture texture);
 
   /**
    * @copydoc Dali::Toolkit::SuperBlurView::GetBlurStrengthPropertyIndex
@@ -65,7 +60,7 @@ public:
   /**
    * @copydoc Dali::Toolkit::SuperBlurView::SetBlurStrength
    */
-  void SetBlurStrength( float blurStrength );
+  void SetBlurStrength(float blurStrength);
 
   /**
    * @copydoc Dali::Toolkit::SuperBlurView::GetCurrentBlurStrength
@@ -80,7 +75,7 @@ public:
   /**
    * @copydoc Dali::Toolkit::SuperBlurView::GetBlurredTexture
    */
-  Texture GetBlurredTexture( unsigned int level );
+  Texture GetBlurredTexture(unsigned int level);
 
   // Properties
 
@@ -90,7 +85,7 @@ public:
    * @param[in] index The property index.
    * @param[in] value The new property value.
    */
-  static void SetProperty( BaseObject* object, Property::Index propertyIndex, const Property::Value& value );
+  static void SetProperty(BaseObject* object, Property::Index propertyIndex, const Property::Value& value);
 
   /**
    * Called to retrieve a property of an object of this type.
@@ -98,14 +93,13 @@ public:
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index propertyIndex );
+  static Property::Value GetProperty(BaseObject* object, Property::Index propertyIndex);
 
 protected:
-
   /**
    * Constructor. It initializes the SuperBlurView members
    */
-  SuperBlurView( unsigned int blurLevels );
+  SuperBlurView(unsigned int blurLevels);
 
   /**
    * A reference counted object may only be deleted by calling Unreference()
@@ -113,7 +107,6 @@ protected:
   virtual ~SuperBlurView();
 
 private: // from Control
-
   /**
    * @copydoc Toolkit::Control::OnInitialize
    */
@@ -127,7 +120,7 @@ private: // from Control
   /**
    * @copydoc CustomActorImpl::OnSceneConnection()
    */
-  void OnSceneConnection( int depth ) override;
+  void OnSceneConnection(int depth) override;
 
   /**
    * @copydoc CustomActorImpl::OnSceneDisconnection()
@@ -140,19 +133,18 @@ private: // from Control
   Vector3 GetNaturalSize() override;
 
 private:
-
   /**
    * Carry out the idx-th pass of blurring
    * @param[in] idx The blur pass index
    * @param[in] texture The input texture for the current blurring, it is either the original image or the blurred texture from the previous pass
    */
-  void BlurTexture( unsigned int idx, Texture texture );
+  void BlurTexture(unsigned int idx, Texture texture);
 
   /**
    * Signal handler to tell when the last blur view completes
    * @param[in] blurView The blur view that just completed
    */
-  void OnBlurViewFinished( Toolkit::GaussianBlurView blurView );
+  void OnBlurViewFinished(Toolkit::GaussianBlurView blurView);
 
   /**
    * Clear the resources used to create the blurred image
@@ -168,31 +160,31 @@ private:
 
   Toolkit::SuperBlurView::SuperBlurViewSignal mBlurFinishedSignal; ///< Signal emitted when blur has completed.
 
-  std::string                            mUrl;
-  Property::Index                        mBlurStrengthPropertyIndex;
-  unsigned int                           mBlurLevels;
-  bool                                   mResourcesCleared;
+  std::string     mUrl;
+  Property::Index mBlurStrengthPropertyIndex;
+  unsigned int    mBlurLevels;
+  bool            mResourcesCleared;
 };
 
-}
+} // namespace Internal
 
 // Helpers for public-api forwarding methods
-inline Toolkit::Internal::SuperBlurView& GetImpl( Toolkit::SuperBlurView& obj )
+inline Toolkit::Internal::SuperBlurView& GetImpl(Toolkit::SuperBlurView& obj)
 {
   DALI_ASSERT_ALWAYS(obj);
   Dali::RefObject& handle = obj.GetImplementation();
   return static_cast<Toolkit::Internal::SuperBlurView&>(handle);
 }
 
-inline const Toolkit::Internal::SuperBlurView& GetImpl( const Toolkit::SuperBlurView& obj )
+inline const Toolkit::Internal::SuperBlurView& GetImpl(const Toolkit::SuperBlurView& obj)
 {
   DALI_ASSERT_ALWAYS(obj);
   const Dali::RefObject& handle = obj.GetImplementation();
   return static_cast<const Toolkit::Internal::SuperBlurView&>(handle);
 }
 
-}
+} // namespace Toolkit
 
-}
+} // namespace Dali
 
 #endif // DALI_TOOLKIT_INTERNAL_SUPER_BLUR_VIEW_H
index 31339c9..3128d6e 100644 (file)
@@ -3,7 +3,7 @@
 #define DALI_ARRAY2D_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics 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,7 +24,6 @@
 
 namespace Dali
 {
-
 /**
  * Helper wrapper for two dimensional array using std::vector
  * Usage:
@@ -34,40 +33,42 @@ namespace Dali
  *   intArray.Resize( 4, 4 );
  * </code>
  */
-template< typename T >
+template<typename T>
 class Array2d
 {
 public:
-
   /**
    * Default constructor. Creates a 0x0 array
    */
   Array2d()
-  : mArray( 0, std::vector< T >( 0 ) )
-  { }
+  : mArray(0, std::vector<T>(0))
+  {
+  }
 
   /**
    * Constructs an array with given dimensions
    * @param [in] rows for array
    * @param [in] columns for array
    */
-  Array2d( unsigned int rows, unsigned int columns )
-  : mArray( rows, std::vector< T >( columns ) )
-  { }
+  Array2d(unsigned int rows, unsigned int columns)
+  : mArray(rows, std::vector<T>(columns))
+  {
+  }
 
   /**
    * Destructor
    */
   ~Array2d()
-  { } // Nothing to do, vector cleans up itself
+  {
+  } // Nothing to do, vector cleans up itself
 
   /**
    * Copy constructor
    * @param array to copy from
    */
-  Array2d( const Array2d& array )
+  Array2d(const Array2d& array)
   {
-    if( this != &array )
+    if(this != &array)
     {
       mArray = array.mArray;
     }
@@ -78,13 +79,13 @@ public:
    * @param array to copy from
    * @return reference to self for chaining
    */
-  Array2d& operator=( const Array2d& array )
+  Array2d& operator=(const Array2d& array)
   {
-    if( this != &array )
+    if(this != &array)
     {
       mArray = array.mArray;
     }
-  return *this;
+    return *this;
   }
 
   /**
@@ -100,10 +101,10 @@ public:
    */
   unsigned int GetColumns()
   {
-    if( mArray.size() > 0 )
+    if(mArray.size() > 0)
     {
       // all columns are equal length
-      return mArray[ 0 ].size();
+      return mArray[0].size();
     }
     return 0;
   }
@@ -112,28 +113,28 @@ public:
    * @param [in] index of the row
    * @return reference to the row vector for given index
    */
-  std::vector< T >& operator[]( unsigned int index )
+  std::vector<T>& operator[](unsigned int index)
   {
-    return mArray[ index ];
+    return mArray[index];
   }
 
   /**
    * @param [in] index of the row
    * @return const reference to the row vector for given index
    */
-  const std::vector< T >& operator[]( unsigned int index ) const
+  const std::vector<T>& operator[](unsigned int index) const
   {
-    return mArray[ index ];
+    return mArray[index];
   }
 
   /**
    * Insert a new row to given index
    * @param [in] rowIndex of the new row
    */
-  void InsertRow( unsigned int rowIndex )
+  void InsertRow(unsigned int rowIndex)
   {
     // insert default initialized row of elements
-    mArray.insert( mArray.begin() + rowIndex, std::vector< T >( GetColumns() ) );
+    mArray.insert(mArray.begin() + rowIndex, std::vector<T>(GetColumns()));
   }
 
   /**
@@ -141,10 +142,10 @@ public:
    * Removed elements are deleted
    * @param [in] rowIndex of the row to delete
    */
-  void DeleteRow( unsigned int rowIndex )
+  void DeleteRow(unsigned int rowIndex)
   {
     // erase the row
-    mArray.erase( mArray.begin() + rowIndex );
+    mArray.erase(mArray.begin() + rowIndex);
   }
 
   /**
@@ -152,26 +153,26 @@ public:
    * @param [in] rowIndex of the row to delete
    * @param [out] removed elements
    */
-  void DeleteRow( unsigned int rowIndex, std::vector< T >& removed )
+  void DeleteRow(unsigned int rowIndex, std::vector<T>& removed)
   {
     // copy the row elements
-    removed.insert( removed.end(), mArray[ rowIndex ].begin(), mArray[ rowIndex ].end() );
+    removed.insert(removed.end(), mArray[rowIndex].begin(), mArray[rowIndex].end());
     // erase the row
-    mArray.erase( mArray.begin() + rowIndex );
+    mArray.erase(mArray.begin() + rowIndex);
   }
 
   /**
    * Insert a new column to given index
    * @param [in] columnIndex of the new column
    */
-  void InsertColumn( unsigned int columnIndex )
+  void InsertColumn(unsigned int columnIndex)
   {
     // go through all rows
     const unsigned int rows = GetRows();
-    for( unsigned int i = 0; i < rows; ++i )
+    for(unsigned int i = 0; i < rows; ++i)
     {
       // insert default initialized element
-      mArray[ i ].insert( mArray[ i ].begin() + columnIndex, T() );
+      mArray[i].insert(mArray[i].begin() + columnIndex, T());
     }
   }
 
@@ -180,14 +181,14 @@ public:
    * Removed elements are deleted
    * @param [in] columnIndex of the column to delete
    */
-  void DeleteColumn( unsigned int columnIndex )
+  void DeleteColumn(unsigned int columnIndex)
   {
     // go through all rows
     const unsigned int rows = GetRows();
-    for( unsigned int i = 0; i < rows; ++i )
+    for(unsigned int i = 0; i < rows; ++i)
     {
       // erase the column
-      mArray[ i ].erase( mArray[ i ].begin() + columnIndex );
+      mArray[i].erase(mArray[i].begin() + columnIndex);
     }
   }
 
@@ -196,16 +197,16 @@ public:
    * @param [in] columnIndex of the column to delete
    * @param [out] removed elements
    */
-  void DeleteColumn( unsigned int columnIndex, std::vector< T >& removed )
+  void DeleteColumn(unsigned int columnIndex, std::vector<T>& removed)
   {
     // go through all rows
     const unsigned int rows = GetRows();
-    for( unsigned int i = 0; i < rows; ++i )
+    for(unsigned int i = 0; i < rows; ++i)
     {
       // copy the column element of this row
-      removed.push_back( mArray[ i ][ columnIndex ] );
+      removed.push_back(mArray[i][columnIndex]);
       // erase the column
-      mArray[ i ].erase( mArray[ i ].begin() + columnIndex );
+      mArray[i].erase(mArray[i].begin() + columnIndex);
     }
   }
 
@@ -215,14 +216,14 @@ public:
    * @param [in] rows for array
    * @param [in] columns for array
    */
-  void Resize( unsigned int rows, unsigned int columns )
+  void Resize(unsigned int rows, unsigned int columns)
   {
     // resize rows first, may increase or decrease size
-    mArray.resize( rows );
-    for( unsigned int i = 0; i < rows; ++i )
+    mArray.resize(rows);
+    for(unsigned int i = 0; i < rows; ++i)
     {
       // resize each column, may increase or decrease size
-      mArray[ i ].resize( columns );
+      mArray[i].resize(columns);
     }
   }
 
@@ -233,41 +234,39 @@ public:
    * @param [in] columns for array
    * @param [out] removed elements in case array is smaller in either dimension
    */
-  void Resize( unsigned int rows, unsigned int columns, std::vector< T >& removed )
+  void Resize(unsigned int rows, unsigned int columns, std::vector<T>& removed)
   {
     // remember old counts
-    const unsigned int oldRows = GetRows();
+    const unsigned int oldRows    = GetRows();
     const unsigned int oldColumns = GetColumns();
     // are rows being removed ?
-    if( rows < oldRows )
+    if(rows < oldRows)
     {
       // gather the elements of removed rows
-      for( unsigned int i = rows; i < oldRows; ++i )
+      for(unsigned int i = rows; i < oldRows; ++i)
       {
         // copy the row elements, the whole row is gone
-        removed.insert( removed.end(), mArray[ i ].begin(), mArray[ i ].end() );
+        removed.insert(removed.end(), mArray[i].begin(), mArray[i].end());
       }
     }
     // resize the rows, may increase or decrease size
-    mArray.resize( rows );
+    mArray.resize(rows);
     // process columns, need to do all rows as also columns for new row need resizing
-    for( unsigned int i = 0; i < rows; ++i )
+    for(unsigned int i = 0; i < rows; ++i)
     {
       // if this is an old row and columns are being removed
-      if( ( i < oldRows )&&( columns < oldColumns ) )
+      if((i < oldRows) && (columns < oldColumns))
       {
         // copy the columns, the end of row from columns is gone
-        removed.insert( removed.end(), mArray[ i ].begin() + columns, mArray[ i ].end() );
+        removed.insert(removed.end(), mArray[i].begin() + columns, mArray[i].end());
       }
       // resize the column, may increase of decrease size
-      mArray[ i ].resize( columns );
+      mArray[i].resize(columns);
     }
   }
 
 private:
-
-  std::vector< std::vector< T > > mArray;
-
+  std::vector<std::vector<T> > mArray;
 };
 
 } // namespace Dali
old mode 100755 (executable)
new mode 100644 (file)
index 0bd7138..6f0776a
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_TABLE_VIEW_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/object/weak-handle.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/devel-api/controls/table-view/table-view.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
 #include "array-2d.h"
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * TableView is a custom control for laying out actors in a table layout
  * @see Dali::Toolkit:TableView for more details
@@ -42,77 +39,76 @@ namespace Internal
 class TableView : public Control
 {
 public:
-
   /**
    * Create a new TableView.
    * @return A smart-pointer to the newly allocated TableView.
    */
-  static Toolkit::TableView New( unsigned int initialRows, unsigned int initialColumns );
+  static Toolkit::TableView New(unsigned int initialRows, unsigned int initialColumns);
 
   /**
    * @copydoc Toolkit::TableView::AddChild
    */
-  bool AddChild( Actor& child, const Toolkit::TableView::CellPosition& position );
+  bool AddChild(Actor& child, const Toolkit::TableView::CellPosition& position);
 
   /**
    * @copydoc Toolkit::TableView::GetChildAt
    */
-  Actor GetChildAt( const Toolkit::TableView::CellPosition& position );
+  Actor GetChildAt(const Toolkit::TableView::CellPosition& position);
 
   /**
    * @copydoc Toolkit::TableView::RemoveChildAt
    */
-  Actor RemoveChildAt( const Toolkit::TableView::CellPosition& position );
+  Actor RemoveChildAt(const Toolkit::TableView::CellPosition& position);
 
   /**
    * @copydoc Toolkit::TableView::FindChildPosition
    */
-  bool FindChildPosition( const Actor& child, Toolkit::TableView::CellPosition& positionOut );
+  bool FindChildPosition(const Actor& child, Toolkit::TableView::CellPosition& positionOut);
 
   /**
    * @copydoc Toolkit::TableView::InsertRow
    */
-  void InsertRow( unsigned int rowIndex );
+  void InsertRow(unsigned int rowIndex);
 
   /**
    * @copydoc Toolkit::TableView::DeleteRow( unsigned int rowIndex )
    */
-  void DeleteRow( unsigned int rowIndex );
+  void DeleteRow(unsigned int rowIndex);
 
   /**
    * @copydoc Toolkit::TableView::DeleteRow( unsigned int rowIndex, std::vector<Actor>& removed )
    */
-  void DeleteRow( unsigned int rowIndex, std::vector<Actor>& removed );
+  void DeleteRow(unsigned int rowIndex, std::vector<Actor>& removed);
 
   /**
    * @copydoc Toolkit::TableView::InsertColumn
    */
-  void InsertColumn( unsigned int columnIndex );
+  void InsertColumn(unsigned int columnIndex);
 
   /**
    * @copydoc Toolkit::TableView::DeleteColumn( unsigned int columnIndex )
    */
-  void DeleteColumn( unsigned int columnIndex );
+  void DeleteColumn(unsigned int columnIndex);
 
   /**
    * @copydoc Toolkit::TableView::DeleteColumn( unsigned int columnIndex, std::vector<Actor>& removed )
    */
-  void DeleteColumn( unsigned int columnIndex, std::vector<Actor>& removed );
+  void DeleteColumn(unsigned int columnIndex, std::vector<Actor>& removed);
 
   /**
    * @copydoc Toolkit::TableView::Resize( unsigned int rows, unsigned int columns )
    */
-  void Resize( unsigned int rows, unsigned int columns );
+  void Resize(unsigned int rows, unsigned int columns);
 
   /**
    * @copydoc Toolkit::TableView::Resize( unsigned int rows, unsigned int columns, std::vector<Actor>& removed )
    */
-  void Resize( unsigned int rows, unsigned int columns, std::vector<Actor>& removed );
+  void Resize(unsigned int rows, unsigned int columns, std::vector<Actor>& removed);
 
   /**
    * @copydoc Toolkit::TableView::SetCellPadding
    */
-  void SetCellPadding( Size padding );
+  void SetCellPadding(Size padding);
 
   /**
    * @copydoc Toolkit::TableView::GetCellPadding
@@ -122,62 +118,62 @@ public:
   /**
    * @copydoc Toolkit::TableView::SetFitHeight
    */
-  void SetFitHeight( unsigned int rowIndex );
+  void SetFitHeight(unsigned int rowIndex);
 
   /**
    * @copydoc Toolkit::TableView::IsFitHeight
    */
-  bool IsFitHeight( unsigned int rowIndex ) const;
+  bool IsFitHeight(unsigned int rowIndex) const;
 
   /**
    * @copydoc Toolkit::TableView::SetFitWidth
    */
-  void SetFitWidth( unsigned int columnIndex );
+  void SetFitWidth(unsigned int columnIndex);
 
   /**
    * @copydoc Toolkit::TableView::IsFitWidth
    */
-  bool IsFitWidth( unsigned int columnIndex ) const;
+  bool IsFitWidth(unsigned int columnIndex) const;
 
   /**
    * @copydoc Toolkit::TableView::SetFixedWidth
    */
-  void SetFixedWidth( unsigned int columnIndex, float width );
+  void SetFixedWidth(unsigned int columnIndex, float width);
 
   /**
    * @copydoc Toolkit::TableView::GetFixedWidth
    */
-  float GetFixedWidth( unsigned int columnIndex ) const;
+  float GetFixedWidth(unsigned int columnIndex) const;
 
   /**
    * @copydoc Toolkit::TableView::SetFixedHeight
    */
-  void SetFixedHeight( unsigned int rowIndex, float height );
+  void SetFixedHeight(unsigned int rowIndex, float height);
 
   /**
    * @copydoc Toolkit::TableView::GetFixedHeight
    */
-  float GetFixedHeight( unsigned int rowIndex ) const;
+  float GetFixedHeight(unsigned int rowIndex) const;
 
   /**
    * @copydoc Toolkit::TableView::SetRelativeHeight
    */
-  void SetRelativeHeight( unsigned int rowIndex, float heightPercentage );
+  void SetRelativeHeight(unsigned int rowIndex, float heightPercentage);
 
   /**
    * @copydoc Toolkit::TableView::GetRelativeHeight
    */
-  float GetRelativeHeight( unsigned int rowIndex ) const;
+  float GetRelativeHeight(unsigned int rowIndex) const;
 
   /**
    * @copydoc Toolkit::TableView::SetRelativeWidth
    */
-  void SetRelativeWidth( unsigned int columnIndex, float widthPercentage );
+  void SetRelativeWidth(unsigned int columnIndex, float widthPercentage);
 
   /**
    * @copydoc Toolkit::TableView::GetRelativeWidth
    */
-  float GetRelativeWidth( unsigned int columnIndex ) const;
+  float GetRelativeWidth(unsigned int columnIndex) const;
 
   /**
    * @copydoc Toolkit::TableView::GetRows
@@ -192,7 +188,7 @@ public:
   /**
    * @copydoc Toolkit::TableView::SetCellAlignment
    */
-  void SetCellAlignment( Toolkit::TableView::CellPosition position, HorizontalAlignment::Type horizontal, VerticalAlignment::Type vertical );
+  void SetCellAlignment(Toolkit::TableView::CellPosition position, HorizontalAlignment::Type horizontal, VerticalAlignment::Type vertical);
 
   // Properties
 
@@ -202,7 +198,7 @@ public:
    * @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 );
+  static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value);
 
   /**
    * Called to retrieve a property of an object of this type.
@@ -210,29 +206,28 @@ public:
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index index );
+  static Property::Value GetProperty(BaseObject* object, Property::Index index);
 
 private: // From Control
-
   /**
    * @copydoc Control::OnChildAdd(Actor& child)
    */
-  void OnChildAdd( Actor& child ) override;
+  void OnChildAdd(Actor& child) override;
 
   /**
    * @copydoc Control::OnChildRemove(Actor& child)
    */
-  void OnChildRemove( Actor& child ) override;
+  void OnChildRemove(Actor& child) override;
 
   /**
    * @copydoc Control::OnRelayout
    */
-  void OnRelayout( const Vector2& size, RelayoutContainer& container ) override;
+  void OnRelayout(const Vector2& size, RelayoutContainer& container) override;
 
   /**
    * @copydoc Control::CalculateChildSize
    */
-  float CalculateChildSize( const Actor& child, Dimension::Type dimension ) override;
+  float CalculateChildSize(const Actor& child, Dimension::Type dimension) override;
 
   /**
    * @copydoc Control::OnInitialize()
@@ -242,7 +237,7 @@ private: // From Control
   /**
    * @copydoc Control::GetNextKeyboardFocusableActor
    */
-  Actor GetNextKeyboardFocusableActor( Actor currentFocusedActor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled ) override;
+  Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocus::Direction direction, bool loopEnabled) override;
 
   /**
    * @copydoc Control::GetNaturalSize()
@@ -252,25 +247,24 @@ private: // From Control
   /**
    * @copydoc Control::RelayoutDependentOnChildren()
    */
-  bool RelayoutDependentOnChildren( Dimension::Type dimension = Dimension::ALL_DIMENSIONS ) override;
+  bool RelayoutDependentOnChildren(Dimension::Type dimension = Dimension::ALL_DIMENSIONS) override;
 
   /**
    * @copydoc Control::OnCalculateRelayoutSize
    */
-  void OnCalculateRelayoutSize( Dimension::Type dimension ) override;
+  void OnCalculateRelayoutSize(Dimension::Type dimension) override;
 
   /**
    * @copydoc Control::OnLayoutNegotiated
    */
-  void OnLayoutNegotiated( float size, Dimension::Type dimension ) override;
+  void OnLayoutNegotiated(float size, Dimension::Type dimension) override;
 
   /**
    * @copydoc CustomActorImpl::OnSizeSet( const Vector3& size )
    */
-  void OnSizeSet( const Vector3& size ) override;
+  void OnSizeSet(const Vector3& size) override;
 
 private: // Implementation
-
   /**
    * Struct to hold data for rows and columns
    *
@@ -283,10 +277,10 @@ private: // Implementation
      * Default constructor
      */
     RowColumnData()
-    : size( 0.0f ),
-      fillRatio( 0.0f ),
-      position( 0.0f ),
-      sizePolicy( Toolkit::TableView::FILL )
+    : size(0.0f),
+      fillRatio(0.0f),
+      position(0.0f),
+      sizePolicy(Toolkit::TableView::FILL)
     {
     }
 
@@ -296,55 +290,53 @@ private: // Implementation
      * @param[in] newSize The size to set for this data
      * @param[in] newSizePolicy The policy used to interpret the size value
      */
-    RowColumnData( float newSize, float newFillRatio, Toolkit::TableView::LayoutPolicy newSizePolicy )
-    : size( newSize ),
-      fillRatio( newFillRatio ),
-      position( 0.0f ),
-      sizePolicy( newSizePolicy )
+    RowColumnData(float newSize, float newFillRatio, Toolkit::TableView::LayoutPolicy newSizePolicy)
+    : size(newSize),
+      fillRatio(newFillRatio),
+      position(0.0f),
+      sizePolicy(newSizePolicy)
     {
     }
 
-    float size;                                  ///< Set or calculated size
-    float fillRatio;                             ///< Ratio to fill remaining space, only valid with RELATIVE or FILL policy
-    float position;                              ///< Position of the row/column, this value is updated during every Relayout round
+    float                            size;       ///< Set or calculated size
+    float                            fillRatio;  ///< Ratio to fill remaining space, only valid with RELATIVE or FILL policy
+    float                            position;   ///< Position of the row/column, this value is updated during every Relayout round
     Toolkit::TableView::LayoutPolicy sizePolicy; ///< The size policy used to interpret the size value
   };
 
   typedef Dali::Vector<RowColumnData> RowColumnArray;
 
 public:
-
   /**
    * Structure for the layout data
    */
   struct CellData
   {
     CellData()
-    : horizontalAlignment( HorizontalAlignment::LEFT ),
-      verticalAlignment( VerticalAlignment::TOP )
+    : horizontalAlignment(HorizontalAlignment::LEFT),
+      verticalAlignment(VerticalAlignment::TOP)
     {
     }
 
     // data members
-    Dali::Actor actor;
+    Dali::Actor                      actor;
     Toolkit::TableView::CellPosition position;
-    HorizontalAlignment::Type horizontalAlignment;
-    VerticalAlignment::Type verticalAlignment;
+    HorizontalAlignment::Type        horizontalAlignment;
+    VerticalAlignment::Type          verticalAlignment;
   };
 
 private:
-
   /**
    * Construct a new TableView.
    */
-  TableView( unsigned int initialRows, unsigned int initialColumns );
+  TableView(unsigned int initialRows, unsigned int initialColumns);
 
   /**
    * Resizes the data containers to match the new size
    * @param [in] rows in the table
    * @param [in] columns in the table
    */
-  void ResizeContainers( unsigned int rows, unsigned int columns );
+  void ResizeContainers(unsigned int rows, unsigned int columns);
 
   /**
    * Resizes the data containers to match the new size
@@ -352,7 +344,7 @@ private:
    * @param [in] columns in the table
    * @param [out] removed celldata
    */
-  void ResizeContainers( unsigned int rows, unsigned int columns, std::vector<CellData>& removed );
+  void ResizeContainers(unsigned int rows, unsigned int columns, std::vector<CellData>& removed);
 
   /**
    * Helper to get the list of lost actors in the case when table looses cells.
@@ -362,29 +354,28 @@ private:
    * @param rowsRemoved from table
    * @param columnsRemoved from table
    */
-  void RemoveAndGetLostActors( const std::vector<CellData>& lost, std::vector<Actor>& removed,
-      unsigned int rowsRemoved, unsigned int columnsRemoved );
+  void RemoveAndGetLostActors(const std::vector<CellData>& lost, std::vector<Actor>& removed, unsigned int rowsRemoved, unsigned int columnsRemoved);
 
   /**
    * Helper to remove all instances of the actor
    * @param child actor to remove
    * @return true if the actor was found
    */
-  bool RemoveAllInstances( const Actor& child );
+  bool RemoveAllInstances(const Actor& child);
 
   /**
    * @brief Calculate the ratio of FILL rows/columns
    *
    * @param[in] data The RowColumn data to compute the relative sizes for
    */
-  void CalculateFillSizes( RowColumnArray& data );
+  void CalculateFillSizes(RowColumnArray& data);
 
   /**
    * @brief Calculate the total fixed sizes for a row or column
    *
    * @param[in] data The row or column data to process
    */
-  float CalculateTotalFixedSize( const RowColumnArray& data );
+  float CalculateTotalFixedSize(const RowColumnArray& data);
 
   /**
    * @brief Calculate the sizes of FIT rows/columns
@@ -392,7 +383,7 @@ private:
    * @param[in] data The row or column data to process
    * @param[in] dimension The dimension being calculated: row == Dimension::HEIGHT, column == Dimension::WIDTH
    */
-  void CalculateFitSizes( RowColumnArray& data, Dimension::Type dimension );
+  void CalculateFitSizes(RowColumnArray& data, Dimension::Type dimension);
 
   /**
    * @brief Search for a FIT cell in the array
@@ -400,7 +391,7 @@ private:
    * @param[in] data The row or column data to process
    * @return Return if a FIT cell was found or not
    */
-  bool FindFit( const RowColumnArray& data );
+  bool FindFit(const RowColumnArray& data);
 
   /**
    * @brief Return the cell padding for a given dimension
@@ -408,7 +399,7 @@ private:
    * @param[in] dimension The dimension to return the padding for
    * @return Return the padding (x = low, y = high)
    */
-  Vector2 GetCellPadding( Dimension::Type dimension );
+  Vector2 GetCellPadding(Dimension::Type dimension);
 
   /**
    * A reference counted object may only be deleted by calling Unreference()
@@ -416,7 +407,6 @@ private:
   virtual ~TableView();
 
 private: // scripting support
-
   /**
    * Called to set the heights/widths property.
    * @param[in] tableViewImpl The object whose property is set.
@@ -425,11 +415,11 @@ private: // scripting support
    * @param[in] funcFit The set function to call, it can be SetFitHeight or SetFiltWidth.
    * @param[in] value The new property value.
    */
-  static void SetHeightOrWidthProperty( TableView& tableViewImpl,
-                                        void(TableView::*funcFixed)(unsigned int, float),
-                                        void(TableView::*funcRelative)(unsigned int, float),
-                                        void(TableView::*funcFit)(unsigned int),
-                                        const Property::Value& map );
+  static void SetHeightOrWidthProperty(TableView& tableViewImpl,
+                                       void (TableView::*funcFixed)(unsigned int, float),
+                                       void (TableView::*funcRelative)(unsigned int, float),
+                                       void (TableView::*funcFit)(unsigned int),
+                                       const Property::Value& map);
 
   /**
    * Called to retrieve the property value of row heights.
@@ -448,8 +438,7 @@ private: // scripting support
    * @param[in] data The array of row or column data
    * @param[out] map The property value.
    */
-  void GetMapPropertyValue( const RowColumnArray& data, Property::Map& map );
-
+  void GetMapPropertyValue(const RowColumnArray& data, Property::Map& map);
 
   /**
    * Helper class to prevent child adds and removes from causing relayout
@@ -458,12 +447,11 @@ private: // scripting support
   class RelayoutingLock
   {
   public: // API
-
     /**
      * Constructor, sets the lock boolean
      */
-    RelayoutingLock( TableView& parent )
-    : mLock( parent.mLayoutingChild )
+    RelayoutingLock(TableView& parent)
+    : mLock(parent.mLayoutingChild)
     {
       mLock = true;
     }
@@ -486,32 +474,30 @@ private: // scripting support
   };
 
 private:
-
   // Undefined copy constructor and assignment operators
   TableView(const TableView&);
   TableView& operator=(const TableView& rhs);
 
-private: // Data
-
-  Array2d<CellData> mCellData;   ///< Data for each cell: Actor, alignment settings etc
+private:                       // Data
+  Array2d<CellData> mCellData; ///< Data for each cell: Actor, alignment settings etc
 
-  RowColumnArray mRowData;       ///< Data for each row
-  RowColumnArray mColumnData;    ///< Data for each column
-  Size mFixedTotals;             ///< Accumulated totals for fixed width and height
+  RowColumnArray mRowData;     ///< Data for each row
+  RowColumnArray mColumnData;  ///< Data for each column
+  Size           mFixedTotals; ///< Accumulated totals for fixed width and height
 
-  Size mPadding;                 ///< Padding to apply to each cell
+  Size mPadding; ///< Padding to apply to each cell
 
   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
+  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
 };
 
 } // namespace Internal
 
 // Helpers for public-api forwarding methods
 
-inline Toolkit::Internal::TableView& GetImpl( Toolkit::TableView& tableView )
+inline Toolkit::Internal::TableView& GetImpl(Toolkit::TableView& tableView)
 {
   DALI_ASSERT_ALWAYS(tableView);
 
@@ -520,7 +506,7 @@ inline Toolkit::Internal::TableView& GetImpl( Toolkit::TableView& tableView )
   return static_cast<Toolkit::Internal::TableView&>(handle);
 }
 
-inline const Toolkit::Internal::TableView& GetImpl( const Toolkit::TableView& tableView )
+inline const Toolkit::Internal::TableView& GetImpl(const Toolkit::TableView& tableView)
 {
   DALI_ASSERT_ALWAYS(tableView);
 
old mode 100755 (executable)
new mode 100644 (file)
index c2385a2..6be336b
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_TEXT_EDITOR_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/accessibility.h>
 #include <dali/devel-api/adaptor-framework/clipboard-event-notifier.h>
 #include <dali/devel-api/adaptor-framework/input-method-context.h>
-#include <dali/devel-api/adaptor-framework/accessibility.h>
 #include <dali/public-api/animation/animation.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/devel-api/controls/scroll-bar/scroll-bar.h>
-#include <dali-toolkit/public-api/controls/text-controls/text-editor.h>
 #include <dali-toolkit/devel-api/controls/text-controls/text-editor-devel.h>
+#include <dali-toolkit/internal/controls/control/control-data-impl.h>
 #include <dali-toolkit/internal/text/decorator/text-decorator.h>
+#include <dali-toolkit/internal/text/rendering/text-renderer.h>
 #include <dali-toolkit/internal/text/text-control-interface.h>
+#include <dali-toolkit/internal/text/text-controller.h>
 #include <dali-toolkit/internal/text/text-editable-control-interface.h>
 #include <dali-toolkit/internal/text/text-selectable-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>
-#include <dali-toolkit/internal/controls/control/control-data-impl.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali-toolkit/public-api/controls/text-controls/text-editor.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
 /**
@@ -52,7 +50,6 @@ namespace Internal
 class TextEditor : public Control, public Text::ControlInterface, public Text::EditableControlInterface, public Text::SelectableControlInterface
 {
 public:
-
   /**
    * @copydoc Dali::Toollkit::TextEditor::New()
    */
@@ -67,7 +64,7 @@ public:
    * @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 );
+  static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value);
 
   /**
    * @brief Called to retrieve a property of an object of this type.
@@ -76,7 +73,7 @@ public:
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index index );
+  static Property::Value GetProperty(BaseObject* object, Property::Index index);
 
   /**
    * @copydoc Dali::Toollkit::TextEditor::GetInputMethodContext()
@@ -86,7 +83,7 @@ public:
   /**
    * @copydoc Dali::Toollkit::TextEditor::MaxLengthReachedSignal()
    */
-  DevelTextEditor::MaxLengthReachedSignalType&  MaxLengthReachedSignal();
+  DevelTextEditor::MaxLengthReachedSignalType& MaxLengthReachedSignal();
 
   /**
    * Connects a callback function with the object's signals.
@@ -97,12 +94,12 @@ public:
    * @return True if the signal was connected.
    * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
    */
-  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
+  static bool DoConnectSignal(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor);
 
   /**
    * @copydoc TextEditor::TextChangedSignal()
    */
-  Toolkit::TextEditor::TextChangedSignalType&  TextChangedSignal();
+  Toolkit::TextEditor::TextChangedSignalType& TextChangedSignal();
 
   /**
    * @copydoc TextEditor::TextChangedSignal()
@@ -115,7 +112,6 @@ public:
   Toolkit::TextEditor::ScrollStateChangedSignalType& ScrollStateChangedSignal();
 
 private: // From Control
-
   /**
    * @copydoc Control::OnInitialize()
    */
@@ -124,7 +120,7 @@ private: // From Control
   /**
    * @copydoc Control::OnStyleChange()
    */
-  void OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change ) override;
+  void OnStyleChange(Toolkit::StyleManager styleManager, StyleChange::Type change) override;
 
   /**
    * @copydoc Control::GetNaturalSize()
@@ -134,12 +130,12 @@ private: // From Control
   /**
    * @copydoc Control::GetHeightForWidth()
    */
-  float GetHeightForWidth( float width ) override;
+  float GetHeightForWidth(float width) override;
 
   /**
    * @copydoc Control::OnInitialize()
    */
-  void OnRelayout( const Vector2& size, RelayoutContainer& container ) override;
+  void OnRelayout(const Vector2& size, RelayoutContainer& container) override;
 
   /**
    * @copydoc Control::OnKeyInputFocusGained()
@@ -159,51 +155,51 @@ private: // From Control
   /**
    * @copydoc Control::OnTap()
    */
-  void OnTap( const TapGesture& tap ) override;
+  void OnTap(const TapGesture& tap) override;
 
   /**
    * @copydoc Control::OnPan()
    */
-  void OnPan( const PanGesture& gesture ) override;
+  void OnPan(const PanGesture& gesture) override;
 
   /**
    * @copydoc Control::OnLongPress()
    */
-  void OnLongPress( const LongPressGesture& gesture ) override;
+  void OnLongPress(const LongPressGesture& gesture) override;
 
   /**
    * @copydoc Control::OnSceneConnection()
    */
-  void OnSceneConnection( int depth ) override;
+  void OnSceneConnection(int depth) override;
 
   /**
    * @copydoc Dali::CustomActorImpl::OnKeyEvent(const KeyEvent&)
    */
   bool OnKeyEvent(const KeyEvent& event) override;
 
-// From ControlInterface
+  // From ControlInterface
 
   /**
    * @copydoc Text::ControlInterface::RequestTextRelayout()
    */
   void RequestTextRelayout() override;
 
-// From EditableControlInterface
+  // From EditableControlInterface
 
   /**
    * @copydoc Text::EditableControlInterface::TextChanged()
    */
-  void TextInserted( unsigned int position, unsigned int length, const std::string &content ) override;
+  void TextInserted(unsigned int position, unsigned int length, const std::string& content) override;
 
   /**
    * @copydoc Text::EditableControlInterface::TextDeleted()
    */
-  void TextDeleted( unsigned int position, unsigned int length, const std::string &content ) override;
+  void TextDeleted(unsigned int position, unsigned int length, const std::string& content) override;
 
   /**
    * @copydoc Text::EditableControlInterface::CaretMoved()
    */
-  void CaretMoved( unsigned int position ) override;
+  void CaretMoved(unsigned int position) override;
 
   /**
    * @copydoc Text::EditableControlInterface::TextChanged()
@@ -218,19 +214,19 @@ private: // From Control
   /**
    * @copydoc Text::EditableControlInterface::InputStyleChanged()
    */
-  void InputStyleChanged( Text::InputStyle::Mask inputStyleMask ) override;
+  void InputStyleChanged(Text::InputStyle::Mask inputStyleMask) override;
 
   /**
    * @copydoc Text::EditableControlInterface::AddDecoration()
    */
-  void AddDecoration( Actor& actor, bool needsClipping ) override;
+  void AddDecoration(Actor& actor, bool needsClipping) override;
 
-// From SelectableControlInterface
+  // From SelectableControlInterface
 public:
   /**
    * @copydoc Text::SelectableControlInterface::SetTextSelectionRange()
    */
-  void SetTextSelectionRange(const uint32_t *start, const uint32_t *end) override;
+  void SetTextSelectionRange(const uint32_t* start, const uint32_t* end) override;
 
   /**
    * @copydoc Text::SelectableControlInterface::GetTextSelectionRange()
@@ -279,21 +275,20 @@ public:
   /**
    * @copydoc Text::EditableControlInterface::SetEditable()
    */
-  void SetEditable( bool editable ) override;
+  void                SetEditable(bool editable) override;
   Text::ControllerPtr getController();
 
 private: // Implementation
-
   /**
    * @copydoc Dali::Toolkit::Text::Controller::(InputMethodContext& inputMethodContext, const InputMethodContext::EventData& inputMethodContextEvent)
    */
-  InputMethodContext::CallbackData OnInputMethodContextEvent( InputMethodContext& inputMethodContext, const InputMethodContext::EventData& inputMethodContextEvent );
+  InputMethodContext::CallbackData OnInputMethodContextEvent(InputMethodContext& inputMethodContext, const InputMethodContext::EventData& inputMethodContextEvent);
 
   /**
    * @brief Callback when Clipboard signals an item should be pasted
    * @param[in] clipboard handle to Clipboard Event Notifier
    */
-  void OnClipboardTextSelected( ClipboardEventNotifier& clipboard );
+  void OnClipboardTextSelected(ClipboardEventNotifier& clipboard);
 
   /**
    * @brief Get a Property Map for the image used for the required Handle Image
@@ -301,14 +296,14 @@ private: // Implementation
    * @param[in] handleType the type of handle
    * @param[in] handleImageType the type of image for the given handleType
    */
-  void GetHandleImagePropertyValue(  Property::Value& value, Text::HandleType handleType, Text::HandleImageType handleImageType );
+  void GetHandleImagePropertyValue(Property::Value& value, Text::HandleType handleType, Text::HandleImageType handleImageType);
 
   /**
    * @brief Callback when keyboard is shown/hidden.
    *
    * @param[in] keyboardShown True if keyboard is shown.
    */
-  void KeyboardStatusChanged( bool keyboardShown );
+  void KeyboardStatusChanged(bool keyboardShown);
 
   /**
    * @brief update scroll bar position
@@ -323,7 +318,7 @@ private: // Implementation
    * @param[in] actor TextEditor touched
    * @param[in] touch Touch information
    */
-  bool OnTouched( Actor actor, const TouchEvent& touch );
+  bool OnTouched(Actor actor, const TouchEvent& touch);
 
   /**
    * @brief Callbacks called on idle.
@@ -344,7 +339,7 @@ private: // Implementation
    *
    * Emit ScrollBarStateChanged Signal and toggle mScrollStarted flag to false
    */
-  void OnScrollIndicatorAnimationFinished( Animation& animation );
+  void OnScrollIndicatorAnimationFinished(Animation& animation);
 
   /**
    * Construct a new TextEditor.
@@ -363,41 +358,41 @@ private: // Implementation
   /**
    * @brief Render view, create and attach actor(s) to this text editor.
    */
-  void RenderText( Text::Controller::UpdateTextType updateTextType );
+  void RenderText(Text::Controller::UpdateTextType updateTextType);
 
   // Connection needed to re-render text, when a text editor returns to the scene.
-  void OnSceneConnect( Dali::Actor actor );
+  void OnSceneConnect(Dali::Actor actor);
 
 private: // Data
   // Signals
-  Toolkit::TextEditor::TextChangedSignalType mTextChangedSignal;
-  Toolkit::TextEditor::InputStyleChangedSignalType mInputStyleChangedSignal;
-  Toolkit::TextEditor::ScrollStateChangedSignalType mScrollStateChangedSignal;
+  Toolkit::TextEditor::TextChangedSignalType           mTextChangedSignal;
+  Toolkit::TextEditor::InputStyleChangedSignalType     mInputStyleChangedSignal;
+  Toolkit::TextEditor::ScrollStateChangedSignalType    mScrollStateChangedSignal;
   Toolkit::DevelTextEditor::MaxLengthReachedSignalType mMaxLengthReachedSignal;
 
-  InputMethodContext mInputMethodContext;
-  Text::ControllerPtr mController;
-  Text::RendererPtr mRenderer;
-  Text::DecoratorPtr mDecorator;
+  InputMethodContext            mInputMethodContext;
+  Text::ControllerPtr           mController;
+  Text::RendererPtr             mRenderer;
+  Text::DecoratorPtr            mDecorator;
   Text::TextVerticalScrollerPtr mTextVerticalScroller;
-  Toolkit::Control mStencil;
-  Toolkit::ScrollBar mScrollBar;
-  Dali::Animation mAnimation;                                              ///< Scroll indicator Show/Hide Animation.
-  Dali::TimePeriod mAnimationPeriod;
-  std::vector<Actor> mClippingDecorationActors;   ///< Decoration actors which need clipping.
-
-  Actor mRenderableActor;
-  Actor mActiveLayer;
+  Toolkit::Control              mStencil;
+  Toolkit::ScrollBar            mScrollBar;
+  Dali::Animation               mAnimation; ///< Scroll indicator Show/Hide Animation.
+  Dali::TimePeriod              mAnimationPeriod;
+  std::vector<Actor>            mClippingDecorationActors; ///< Decoration actors which need clipping.
+
+  Actor         mRenderableActor;
+  Actor         mActiveLayer;
   CallbackBase* mIdleCallback;
 
   float mAlignmentOffset;
   float mScrollAnimationDuration;
   float mLineSpacing;
-  int mRenderingBackend;
-  bool mHasBeenStaged:1;
-  bool mScrollAnimationEnabled:1;
-  bool mScrollBarEnabled:1;
-  bool mScrollStarted:1;
+  int   mRenderingBackend;
+  bool  mHasBeenStaged : 1;
+  bool  mScrollAnimationEnabled : 1;
+  bool  mScrollBarEnabled : 1;
+  bool  mScrollStarted : 1;
 
   struct AccessibleImpl : public Control::Impl::AccessibleImpl,
                           public virtual Dali::Accessibility::Text,
@@ -405,21 +400,18 @@ private: // Data
   {
     using Control::Impl::AccessibleImpl::AccessibleImpl;
 
-    std::string GetName() override;
-    std::string GetText( size_t startOffset, size_t endOffset ) override;
-    size_t GetCharacterCount() override;
-    size_t GetCaretOffset() override;
-    bool SetCaretOffset(size_t offset) override;
-    Dali::Accessibility::Range
-    GetTextAtOffset( size_t offset,
-                     Dali::Accessibility::TextBoundary boundary ) override;
-    Dali::Accessibility::Range GetSelection( size_t selectionNum ) override;
-    bool RemoveSelection( size_t selectionNum ) override;
-    bool SetSelection( size_t selectionNum, size_t startOffset,
-                       size_t endOffset ) override;
-    bool CopyText( size_t startPosition, size_t endPosition ) override;
-    bool CutText( size_t startPosition, size_t endPosition ) override;
-    Dali::Accessibility::States CalculateStates() override;
+    std::string           GetName() override;
+    std::string           GetText(size_t startOffset, size_t endOffset) override;
+    size_t                GetCharacterCount() override;
+    size_t                GetCaretOffset() override;
+    bool                  SetCaretOffset(size_t offset) override;
+    Accessibility::Range  GetTextAtOffset(size_t offset, Accessibility::TextBoundary boundary) override;
+    Accessibility::Range  GetSelection(size_t selectionNum) override;
+    bool                  RemoveSelection(size_t selectionNum) override;
+    bool                  SetSelection(size_t selectionNum, size_t startOffset, size_t endOffset) override;
+    bool                  CopyText(size_t startPosition, size_t endPosition) override;
+    bool                  CutText(size_t startPosition, size_t endPosition) override;
+    Accessibility::States CalculateStates() override;
   };
 };
 
@@ -427,7 +419,7 @@ private: // Data
 
 // Helpers for public-api forwarding methods
 
-inline Toolkit::Internal::TextEditor& GetImpl( Toolkit::TextEditor& textEditor )
+inline Toolkit::Internal::TextEditor& GetImpl(Toolkit::TextEditor& textEditor)
 {
   DALI_ASSERT_ALWAYS(textEditor);
 
@@ -436,7 +428,7 @@ inline Toolkit::Internal::TextEditor& GetImpl( Toolkit::TextEditor& textEditor )
   return static_cast<Toolkit::Internal::TextEditor&>(handle);
 }
 
-inline const Toolkit::Internal::TextEditor& GetImpl( const Toolkit::TextEditor& textEditor )
+inline const Toolkit::Internal::TextEditor& GetImpl(const Toolkit::TextEditor& textEditor)
 {
   DALI_ASSERT_ALWAYS(textEditor);
 
old mode 100755 (executable)
new mode 100644 (file)
index 157e832..87f4060
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_TEXT_FIELD_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/devel-api/adaptor-framework/input-method-context.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control-impl.h>
-#include <dali-toolkit/public-api/controls/text-controls/text-field.h>
+#include <dali-toolkit/internal/controls/control/control-data-impl.h>
 #include <dali-toolkit/internal/text/decorator/text-decorator.h>
+#include <dali-toolkit/internal/text/rendering/text-renderer.h>
 #include <dali-toolkit/internal/text/text-control-interface.h>
+#include <dali-toolkit/internal/text/text-controller.h>
 #include <dali-toolkit/internal/text/text-editable-control-interface.h>
 #include <dali-toolkit/internal/text/text-selectable-control-interface.h>
-#include <dali-toolkit/internal/text/text-controller.h>
-#include <dali-toolkit/internal/text/rendering/text-renderer.h>
-#include <dali-toolkit/internal/controls/control/control-data-impl.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali-toolkit/public-api/controls/text-controls/text-field.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
 /**
@@ -47,7 +45,6 @@ namespace Internal
 class TextField : public Control, public Text::ControlInterface, public Text::EditableControlInterface, public Text::SelectableControlInterface
 {
 public:
-
   /**
    * @copydoc Dali::Toollkit::TextField::New()
    */
@@ -62,7 +59,7 @@ public:
    * @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 );
+  static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value);
 
   /**
    * @brief Called to retrieve a property of an object of this type.
@@ -71,7 +68,7 @@ public:
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index index );
+  static Property::Value GetProperty(BaseObject* object, Property::Index index);
 
   /**
    * @copydoc Dali::Toollkit::TextField::GetInputMethodContext()
@@ -87,17 +84,17 @@ public:
    * @return True if the signal was connected.
    * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
    */
-  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
+  static bool DoConnectSignal(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor);
 
   /**
    * @copydoc TextField::TextChangedSignal()
    */
-  Toolkit::TextField::TextChangedSignalType&  TextChangedSignal();
+  Toolkit::TextField::TextChangedSignalType& TextChangedSignal();
 
   /**
    * @copydoc TextField::MaxLengthReachedSignal()
    */
-  Toolkit::TextField::MaxLengthReachedSignalType&  MaxLengthReachedSignal();
+  Toolkit::TextField::MaxLengthReachedSignalType& MaxLengthReachedSignal();
 
   /**
    * @copydoc TextField::TextChangedSignal()
@@ -107,7 +104,6 @@ public:
   Text::ControllerPtr getController();
 
 private: // From Control
-
   /**
    * @copydoc Control::OnInitialize()
    */
@@ -116,7 +112,7 @@ private: // From Control
   /**
    * @copydoc Control::OnStyleChange()
    */
-  void OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change ) override;
+  void OnStyleChange(Toolkit::StyleManager styleManager, StyleChange::Type change) override;
 
   /**
    * @copydoc Control::GetNaturalSize()
@@ -126,12 +122,12 @@ private: // From Control
   /**
    * @copydoc Control::GetHeightForWidth()
    */
-  float GetHeightForWidth( float width ) override;
+  float GetHeightForWidth(float width) override;
 
   /**
    * @copydoc Control::OnInitialize()
    */
-  void OnRelayout( const Vector2& size, RelayoutContainer& container ) override;
+  void OnRelayout(const Vector2& size, RelayoutContainer& container) override;
 
   /**
    * @copydoc Control::OnKeyInputFocusGained()
@@ -151,51 +147,51 @@ private: // From Control
   /**
    * @copydoc Control::OnTap()
    */
-  void OnTap( const TapGesture& tap ) override;
+  void OnTap(const TapGesture& tap) override;
 
   /**
    * @copydoc Control::OnPan()
    */
-  void OnPan( const PanGesture& gesture ) override;
+  void OnPan(const PanGesture& gesture) override;
 
   /**
    * @copydoc Control::OnLongPress()
    */
-  void OnLongPress( const LongPressGesture& gesture ) override;
+  void OnLongPress(const LongPressGesture& gesture) override;
 
   /**
    * @copydoc Control::OnSceneConnection()
    */
-  void OnSceneConnection( int depth ) override;
+  void OnSceneConnection(int depth) override;
 
   /**
    * @copydoc Dali::CustomActorImpl::OnKeyEvent(const KeyEvent&)
    */
   bool OnKeyEvent(const KeyEvent& event) override;
 
-// From ControlInterface
+  // From ControlInterface
 
   /**
    * @copydoc Text::ControlInterface::RequestTextRelayout()
    */
   void RequestTextRelayout() override;
 
-// From EditableControlInterface
+  // From EditableControlInterface
 
   /**
    * @copydoc Text::EditableControlInterface::TextChanged()
    */
-  void TextInserted( unsigned int position, unsigned int length, const std::string &content ) override;
+  void TextInserted(unsigned int position, unsigned int length, const std::string& content) override;
 
   /**
    * @copydoc Text::EditableControlInterface::TextDeleted()
    */
-  void TextDeleted( unsigned int position, unsigned int length, const std::string &content ) override;
+  void TextDeleted(unsigned int position, unsigned int length, const std::string& content) override;
 
   /**
    * @copydoc Text::EditableControlInterface::CaretMoved()
    */
-  void CaretMoved( unsigned int position ) override;
+  void CaretMoved(unsigned int position) override;
 
   /**
    * @copydoc Text::EditableControlInterface::TextChanged()
@@ -210,19 +206,19 @@ private: // From Control
   /**
    * @copydoc Text::EditableControlInterface::InputStyleChanged()
    */
-  void InputStyleChanged( Text::InputStyle::Mask inputStyleMask ) override;
+  void InputStyleChanged(Text::InputStyle::Mask inputStyleMask) override;
 
   /**
    * @copydoc Text::EditableControlInterface::AddDecoration()
    */
-  void AddDecoration( Actor& actor, bool needsClipping ) override;
+  void AddDecoration(Actor& actor, bool needsClipping) override;
 
-// From SelectableControlInterface
+  // From SelectableControlInterface
 public:
   /**
    * @copydoc Text::SelectableControlInterface::SetTextSelectionRange()
    */
-  void SetTextSelectionRange(const uint32_t *start, const uint32_t *end) override;
+  void SetTextSelectionRange(const uint32_t* start, const uint32_t* end) override;
 
   /**
    * @copydoc Text::SelectableControlInterface::GetTextSelectionRange()
@@ -252,20 +248,19 @@ public:
   /**
    * @copydoc Text::EditableControlInterface::SetEditable()
    */
-  void SetEditable( bool editable ) override;
+  void SetEditable(bool editable) override;
 
 private: // Implementation
-
   /**
    * @copydoc Dali::Toolkit::Text::Controller::(InputMethodContext& inputMethodContext, const InputMethodContext::EventData& inputMethodContextEvent)
    */
-  InputMethodContext::CallbackData OnInputMethodContextEvent( InputMethodContext& inputMethodContext, const InputMethodContext::EventData& inputMethodContextEvent );
+  InputMethodContext::CallbackData OnInputMethodContextEvent(InputMethodContext& inputMethodContext, const InputMethodContext::EventData& inputMethodContextEvent);
 
   /**
    * @brief Callback when Clipboard signals an item should be pasted
    * @param[in] clipboard handle to Clipboard Event Notifier
    */
-  void OnClipboardTextSelected( ClipboardEventNotifier& clipboard );
+  void OnClipboardTextSelected(ClipboardEventNotifier& clipboard);
 
   /**
    * @brief Get a Property Map for the image used for the required Handle Image
@@ -273,7 +268,7 @@ private: // Implementation
    * @param[in] handleType the type of handle
    * @param[in] handleImageType the type of image for the given handleType
    */
-  void GetHandleImagePropertyValue(  Property::Value& value, Text::HandleType handleType, Text::HandleImageType handleImageType );
+  void GetHandleImagePropertyValue(Property::Value& value, Text::HandleType handleType, Text::HandleImageType handleImageType);
 
   /**
    * @brief Enable or disable clipping.
@@ -285,7 +280,7 @@ private: // Implementation
    *
    * @param[in] keyboardShown True if keyboard is shown.
    */
-  void KeyboardStatusChanged( bool keyboardShown );
+  void KeyboardStatusChanged(bool keyboardShown);
 
   /**
    * @brief Callback when TextField is touched
@@ -293,7 +288,7 @@ private: // Implementation
    * @param[in] actor TextField touched
    * @param[in] touch Touch information
    */
-  bool OnTouched( Actor actor, const TouchEvent& touch );
+  bool OnTouched(Actor actor, const TouchEvent& touch);
 
   /**
    * @brief Callbacks called on idle.
@@ -319,39 +314,40 @@ private: // Implementation
   /**
    * @brief Render view, create and attach actor(s) to this Text Field.
    */
-  void RenderText( Text::Controller::UpdateTextType updateTextType );
+  void RenderText(Text::Controller::UpdateTextType updateTextType);
 
   // Connection needed to re-render text, when a Text Field returns to the scene.
-  void OnSceneConnect( Dali::Actor actor );
+  void OnSceneConnect(Dali::Actor actor);
 
 public: // For UTC only
-
-  Text::ControllerPtr GetTextController() { return mController; }
+  Text::ControllerPtr GetTextController()
+  {
+    return mController;
+  }
 
 private: // Data
-
   // Signals
-  Toolkit::TextField::TextChangedSignalType mTextChangedSignal;
-  Toolkit::TextField::MaxLengthReachedSignalType mMaxLengthReachedSignal;
+  Toolkit::TextField::TextChangedSignalType       mTextChangedSignal;
+  Toolkit::TextField::MaxLengthReachedSignalType  mMaxLengthReachedSignal;
   Toolkit::TextField::InputStyleChangedSignalType mInputStyleChangedSignal;
 
-  InputMethodContext mInputMethodContext;
-  Text::ControllerPtr mController;
-  Text::RendererPtr mRenderer;
-  Text::DecoratorPtr mDecorator;
-  Toolkit::Control mStencil; ///< For EXCEED_POLICY_CLIP
-  std::vector<Actor> mClippingDecorationActors;   ///< Decoration actors which need clipping.
+  InputMethodContext       mInputMethodContext;
+  Text::ControllerPtr      mController;
+  Text::RendererPtr        mRenderer;
+  Text::DecoratorPtr       mDecorator;
+  Toolkit::Control         mStencil;                  ///< For EXCEED_POLICY_CLIP
+  std::vector<Actor>       mClippingDecorationActors; ///< Decoration actors which need clipping.
   Dali::InputMethodOptions mInputMethodOptions;
 
-  Actor mRenderableActor;
-  Actor mActiveLayer;
-  Actor mBackgroundActor;
+  Actor         mRenderableActor;
+  Actor         mActiveLayer;
+  Actor         mBackgroundActor;
   CallbackBase* mIdleCallback;
 
   float mAlignmentOffset;
-  int mRenderingBackend;
-  int mExceedPolicy;
-  bool mHasBeenStaged:1;
+  int   mRenderingBackend;
+  int   mExceedPolicy;
+  bool  mHasBeenStaged : 1;
 
 protected:
   struct AccessibleImpl : public Control::Impl::AccessibleImpl,
@@ -360,21 +356,18 @@ protected:
   {
     using Control::Impl::AccessibleImpl::AccessibleImpl;
 
-    std::string GetName() override;
-    std::string GetText( size_t startOffset, size_t endOffset ) override;
-    size_t GetCharacterCount() override;
-    size_t GetCaretOffset() override;
-    bool SetCaretOffset(size_t offset) override;
-    Dali::Accessibility::Range
-    GetTextAtOffset( size_t offset,
-                     Dali::Accessibility::TextBoundary boundary ) override;
-    Dali::Accessibility::Range GetSelection( size_t selectionNum ) override;
-    bool RemoveSelection( size_t selectionNum ) override;
-    bool SetSelection( size_t selectionNum, size_t startOffset,
-                       size_t endOffset ) override;
-    bool CopyText( size_t startPosition, size_t endPosition ) override;
-    bool CutText( size_t startPosition, size_t endPosition ) override;
-    Dali::Accessibility::States CalculateStates() override;
+    std::string           GetName() override;
+    std::string           GetText(size_t startOffset, size_t endOffset) override;
+    size_t                GetCharacterCount() override;
+    size_t                GetCaretOffset() override;
+    bool                  SetCaretOffset(size_t offset) override;
+    Accessibility::Range  GetTextAtOffset(size_t offset, Accessibility::TextBoundary boundary) override;
+    Accessibility::Range  GetSelection(size_t selectionNum) override;
+    bool                  RemoveSelection(size_t selectionNum) override;
+    bool                  SetSelection(size_t selectionNum, size_t startOffset, size_t endOffset) override;
+    bool                  CopyText(size_t startPosition, size_t endPosition) override;
+    bool                  CutText(size_t startPosition, size_t endPosition) override;
+    Accessibility::States CalculateStates() override;
   };
 };
 
@@ -382,7 +375,7 @@ protected:
 
 // Helpers for public-api forwarding methods
 
-inline Toolkit::Internal::TextField& GetImpl( Toolkit::TextField& textField )
+inline Toolkit::Internal::TextField& GetImpl(Toolkit::TextField& textField)
 {
   DALI_ASSERT_ALWAYS(textField);
 
@@ -391,7 +384,7 @@ inline Toolkit::Internal::TextField& GetImpl( Toolkit::TextField& textField )
   return static_cast<Toolkit::Internal::TextField&>(handle);
 }
 
-inline const Toolkit::Internal::TextField& GetImpl( const Toolkit::TextField& textField )
+inline const Toolkit::Internal::TextField& GetImpl(const Toolkit::TextField& textField)
 {
   DALI_ASSERT_ALWAYS(textField);
 
index 926128e..87a80e0 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_TEXT_LABEL_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/object/property-map.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control-impl.h>
-#include <dali-toolkit/public-api/controls/text-controls/text-label.h>
+#include <dali-toolkit/internal/controls/control/control-data-impl.h>
+#include <dali-toolkit/internal/text/rendering/text-renderer.h>
 #include <dali-toolkit/internal/text/text-control-interface.h>
 #include <dali-toolkit/internal/text/text-controller.h>
 #include <dali-toolkit/internal/text/text-scroller-interface.h>
-#include <dali-toolkit/internal/text/rendering/text-renderer.h>
 #include <dali-toolkit/internal/text/text-scroller.h>
 #include <dali-toolkit/internal/visuals/text/text-visual.h>
-#include <dali-toolkit/internal/controls/control/control-data-impl.h>
-
+#include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali-toolkit/public-api/controls/text-controls/text-label.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * @brief A control which renders a short text string.
  */
 class TextLabel : public Control, public Text::ControlInterface, public Text::ScrollerInterface
 {
 public:
-
   /**
    * @copydoc Dali::Toollkit::TextLabel::New()
    */
@@ -63,7 +58,7 @@ public:
    * @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 );
+  static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value);
 
   /**
    * @brief Called to retrieve a property of an object of this type.
@@ -72,12 +67,11 @@ public:
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index index );
+  static Property::Value GetProperty(BaseObject* object, Property::Index index);
 
   Text::ControllerPtr getController();
 
 private: // From Control
-
   /**
    * @copydoc Control::OnInitialize()
    */
@@ -86,12 +80,12 @@ private: // From Control
   /**
    * @copydoc Control::OnStyleChange()
    */
-  void OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change ) override;
+  void OnStyleChange(Toolkit::StyleManager styleManager, StyleChange::Type change) override;
 
   /**
    * @copydoc Control::OnRelayout()
    */
-  void OnRelayout( const Vector2& size, RelayoutContainer& container ) override;
+  void OnRelayout(const Vector2& size, RelayoutContainer& container) override;
 
   /**
    * @copydoc Control::GetNaturalSize()
@@ -101,12 +95,12 @@ private: // From Control
   /**
    * @copydoc Control::GetHeightForWidth()
    */
-  float GetHeightForWidth( float width ) override;
+  float GetHeightForWidth(float width) override;
 
   /**
    * @copydoc Control::OnPropertySet()
    */
-  void OnPropertySet( Property::Index index, const Property::Value& propertyValue ) override ;
+  void OnPropertySet(Property::Index index, const Property::Value& propertyValue) override;
 
   // From ControlInterface
 
@@ -116,14 +110,12 @@ private: // From Control
   void RequestTextRelayout() override;
 
 private: // from TextScroller
-
   /**
    * @copydoc Text::ScrollerInterface::ScrollingFinished()
    */
   void ScrollingFinished() override;
 
 private: // Implementation
-
   /**
    * Construct a new TextLabel.
    */
@@ -135,7 +127,6 @@ private: // Implementation
   virtual ~TextLabel();
 
 private:
-
   // Undefined copy constructor and assignment operators
   TextLabel(const TextLabel&);
   TextLabel& operator=(const TextLabel& rhs);
@@ -151,22 +142,21 @@ private:
    */
   Text::TextScrollerPtr GetTextScroller()
   {
-    if( !mTextScroller )
+    if(!mTextScroller)
     {
-      mTextScroller = Text::TextScroller::New( *this );
+      mTextScroller = Text::TextScroller::New(*this);
     }
     return mTextScroller;
   }
 
 private: // Data
-
-  Text::ControllerPtr mController;
+  Text::ControllerPtr   mController;
   Text::TextScrollerPtr mTextScroller;
 
   Toolkit::Visual::Base mVisual;
 
-  int mRenderingBackend;
-  bool mTextUpdateNeeded:1;
+  int  mRenderingBackend;
+  bool mTextUpdateNeeded : 1;
 
 protected:
   struct AccessibleImpl : public Control::Impl::AccessibleImpl,
@@ -174,19 +164,16 @@ protected:
   {
     using Control::Impl::AccessibleImpl::AccessibleImpl;
 
-    std::string GetText( size_t startOffset, size_t endOffset ) override;
-    size_t GetCharacterCount() override;
-    size_t GetCaretOffset() override;
-    bool SetCaretOffset(size_t offset) override;
-    Dali::Accessibility::Range
-    GetTextAtOffset( size_t offset,
-                     Dali::Accessibility::TextBoundary boundary ) override;
-    Dali::Accessibility::Range GetSelection( size_t selectionNum ) override;
-    bool RemoveSelection( size_t selectionNum ) override;
-    bool SetSelection( size_t selectionNum, size_t startOffset,
-                       size_t endOffset ) override;
-    std::string GetNameRaw() override;
-    Property::Index GetNamePropertyIndex() override;
+    std::string          GetText(size_t startOffset, size_t endOffset) override;
+    size_t               GetCharacterCount() override;
+    size_t               GetCaretOffset() override;
+    bool                 SetCaretOffset(size_t offset) override;
+    Accessibility::Range GetTextAtOffset(size_t offset, Accessibility::TextBoundary boundary) override;
+    Accessibility::Range GetSelection(size_t selectionNum) override;
+    bool                 RemoveSelection(size_t selectionNum) override;
+    bool                 SetSelection(size_t selectionNum, size_t startOffset, size_t endOffset) override;
+    std::string          GetNameRaw() override;
+    Property::Index      GetNamePropertyIndex() override;
   };
 };
 
@@ -194,7 +181,7 @@ protected:
 
 // Helpers for public-api forwarding methods
 
-inline Toolkit::Internal::TextLabel& GetImpl( Toolkit::TextLabel& textLabel )
+inline Toolkit::Internal::TextLabel& GetImpl(Toolkit::TextLabel& textLabel)
 {
   DALI_ASSERT_ALWAYS(textLabel);
 
@@ -203,7 +190,7 @@ inline Toolkit::Internal::TextLabel& GetImpl( Toolkit::TextLabel& textLabel )
   return static_cast<Toolkit::Internal::TextLabel&>(handle);
 }
 
-inline const Toolkit::Internal::TextLabel& GetImpl( const Toolkit::TextLabel& textLabel )
+inline const Toolkit::Internal::TextLabel& GetImpl(const Toolkit::TextLabel& textLabel)
 {
   DALI_ASSERT_ALWAYS(textLabel);
 
index a94fee9..82947a1 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_POPUP_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <string>
 #include <dali/public-api/actors/layer.h>
 #include <dali/public-api/object/property-map.h>
+#include <string>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control-impl.h>
-#include <dali-toolkit/public-api/controls/buttons/push-button.h>
-#include <dali-toolkit/public-api/controls/image-view/image-view.h>
 #include <dali-toolkit/devel-api/controls/table-view/table-view.h>
 #include <dali-toolkit/devel-api/controls/text-controls/text-selection-popup.h>
 #include <dali-toolkit/devel-api/controls/text-controls/text-selection-toolbar.h>
+#include <dali-toolkit/public-api/controls/buttons/push-button.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali-toolkit/public-api/controls/image-view/image-view.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 enum PopupCustomisations
 {
   POPUP_MAXIMUM_SIZE,
@@ -51,41 +48,43 @@ enum PopupCustomisations
 class TextSelectionPopup : public Control
 {
 public:
-
   struct ButtonRequirement
   {
     ButtonRequirement()
-    : id( Toolkit::TextSelectionPopup::NONE ),
-      priority( 0u ),
+    : id(Toolkit::TextSelectionPopup::NONE),
+      priority(0u),
       name(),
       caption(),
-      enabled( false )
-    {}
-
-    ButtonRequirement( Toolkit::TextSelectionPopup::Buttons buttonId,
-                       std::size_t buttonPriority,
-                       const std::string& buttonName,
-                       const std::string& buttonCaption,
-                       bool buttonEnabled )
-    : id( buttonId ),
-      priority( buttonPriority ),
-      name( buttonName ),
-      caption( buttonCaption ),
-      enabled( buttonEnabled )
-    {}
+      enabled(false)
+    {
+    }
+
+    ButtonRequirement(Toolkit::TextSelectionPopup::Buttons buttonId,
+                      std::size_t                          buttonPriority,
+                      const std::string&                   buttonName,
+                      const std::string&                   buttonCaption,
+                      bool                                 buttonEnabled)
+    : id(buttonId),
+      priority(buttonPriority),
+      name(buttonName),
+      caption(buttonCaption),
+      enabled(buttonEnabled)
+    {
+    }
 
     Toolkit::TextSelectionPopup::Buttons id;
-    std::size_t priority;
-    std::string name;
-    std::string caption;
-    bool enabled;
+    std::size_t                          priority;
+    std::string                          name;
+    std::string                          caption;
+    bool                                 enabled;
   };
 
   struct ButtonPriorityCompare
   {
-      bool operator()( const ButtonRequirement& lhs, const ButtonRequirement& rhs ) const {
-        return lhs.priority < rhs.priority;
-      }
+    bool operator()(const ButtonRequirement& lhs, const ButtonRequirement& rhs) const
+    {
+      return lhs.priority < rhs.priority;
+    }
   };
 
   /**
@@ -93,7 +92,7 @@ public:
    * @param[in] callbackInterface The text popup callback interface which receives the button click callbacks.
    * @return A handle to the TextSelectionPopup control.
    */
-  static Toolkit::TextSelectionPopup New( TextSelectionPopupCallbackInterface* callbackInterface );
+  static Toolkit::TextSelectionPopup New(TextSelectionPopupCallbackInterface* callbackInterface);
 
   // Properties
 
@@ -103,7 +102,7 @@ public:
    * @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 );
+  static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value);
 
   /**
    * @brief Called to retrieve a property of an object of this type.
@@ -112,17 +111,17 @@ public:
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index index );
+  static Property::Value GetProperty(BaseObject* object, Property::Index index);
 
   /**
    * @copydoc Toolkit::EnableButtons
    */
-  void EnableButtons( Toolkit::TextSelectionPopup::Buttons buttonsToEnable );
+  void EnableButtons(Toolkit::TextSelectionPopup::Buttons buttonsToEnable);
 
   /**
    * @copydoc Toolkit::TextSelectionPopup::RaiseAbove()
    */
-  void RaiseAbove( Actor target );
+  void RaiseAbove(Actor target);
 
   /**
    * @copydoc Toolkit::TextSelectionPopup::ShowPopup()
@@ -135,57 +134,55 @@ public:
   void HidePopup();
 
 private: // From Control
-
   /**
    * @copydoc Control::OnInitialize()
    */
   void OnInitialize() override;
 
 private: // Implementation
-
-  void HideAnimationFinished( Animation& animation );
+  void HideAnimationFinished(Animation& animation);
 
   /**
    * @brief When the cut button is pressed.
    * @param[in] button the button pressed
    * @return @e true to consume the event.
    */
-  bool OnCutButtonPressed( Toolkit::Button button );
+  bool OnCutButtonPressed(Toolkit::Button button);
 
   /**
    * @brief When the copy button is pressed.
    * @param[in] button the button pressed
    * @return @e true to consume the event.
    */
-  bool OnCopyButtonPressed( Toolkit::Button button );
+  bool OnCopyButtonPressed(Toolkit::Button button);
 
   /**
    * @brief When the paste button is pressed.
    * @param[in] button the button pressed
    * @return @e true to consume the event.
    */
-  bool OnPasteButtonPressed( Toolkit::Button button );
+  bool OnPasteButtonPressed(Toolkit::Button button);
 
   /**
    * @brief When the select button is pressed.
    * @param[in] button the button pressed
    * @return @e true to consume the event.
    */
-  bool OnSelectButtonPressed( Toolkit::Button button );
+  bool OnSelectButtonPressed(Toolkit::Button button);
 
   /**
    * @brief When the select all button is pressed.
    * @param[in] button the button pressed
    * @return @e true to consume the event.
    */
-  bool OnSelectAllButtonPressed( Toolkit::Button button );
+  bool OnSelectAllButtonPressed(Toolkit::Button button);
 
   /**
    * @brief When the clipboard button is pressed.
    * @param[in] button the button pressed
    * @return @e true to consume the event.
    */
-  bool OnClipboardButtonPressed( Toolkit::Button button );
+  bool OnClipboardButtonPressed(Toolkit::Button button);
 
   /**
    * @brief Method to set the dimension or dimension constraint on certain aspects of the Popup.
@@ -193,14 +190,14 @@ private: // Implementation
    * @param[in] settingToCustomise The setting for the PopupCustomisations enum that can be customised
    * @param[in] dimension The size to customise with
    */
-  void SetDimensionToCustomise( const PopupCustomisations& settingToCustomise, const Size& dimension );
+  void SetDimensionToCustomise(const PopupCustomisations& settingToCustomise, const Size& dimension);
 
   /**
    * @brief Method to get the dimension or dimension constraint on certain aspects of the Popup that was previously customised
    *
    * @param[in] setting The setting from the PopupCustomisations enum
    */
-  Size GetDimensionToCustomise( const PopupCustomisations& setting ) const;
+  Size GetDimensionToCustomise(const PopupCustomisations& setting) const;
 
   /**
    * @brief Sets the image for the given button of the Popup.
@@ -208,7 +205,7 @@ private: // Implementation
    * @param[in] button  The button the image should be used for from the Buttons Enum.
    * @param[in] image The image to use.
    */
void SetButtonImage( Toolkit::TextSelectionPopup::Buttons button, const std::string& image );
 void SetButtonImage(Toolkit::TextSelectionPopup::Buttons button, const std::string& image);
 
   /**
    * @brief Retrieves the image of the given button used by the popup
@@ -216,14 +213,14 @@ private: // Implementation
    * @param[in] button The button to get the image from
    * @return The image used for that button.
    */
-  const std::string& GetButtonImage( Toolkit::TextSelectionPopup::Buttons button ) const;
+  const std::string& GetButtonImage(Toolkit::TextSelectionPopup::Buttons button) const;
 
   /**
    * @brief Sets the image for the pressed state of a popup option.
    *
    * @param[in]  filename The image filename to use.
    */
-  void SetPressedImage( const std::string& filename);
+  void SetPressedImage(const std::string& filename);
 
   /**
    * @brief Gets the image used for the pressed state of a popup option.
@@ -234,23 +231,23 @@ private: // Implementation
 
   void CreateOrderedListOfPopupOptions();
 
-  void AddOption( const ButtonRequirement& button, bool showDivider, bool showIcons, bool showCaption );
+  void AddOption(const ButtonRequirement& button, bool showDivider, bool showIcons, bool showCaption);
 
   std::size_t GetNumberOfEnabledOptions() const;
 
-  void AddPopupOptionsToToolbar(  bool showIcons, bool showCaptions );
+  void AddPopupOptionsToToolbar(bool showIcons, bool showCaptions);
 
   /**
    * Creates the background-border image
    *
    * @param[in] propertyMap The properties describing the background-border
    */
-  void CreateBackgroundBorder( Property::Map& propertyMap );
+  void CreateBackgroundBorder(Property::Map& propertyMap);
 
   /**
    * Construct a new TextField.
    */
-  TextSelectionPopup( TextSelectionPopupCallbackInterface* callbackInterface );
+  TextSelectionPopup(TextSelectionPopupCallbackInterface* callbackInterface);
 
   /**
    * A reference counted object may only be deleted by calling Unreference()
@@ -258,17 +255,14 @@ private: // Implementation
   virtual ~TextSelectionPopup();
 
 private:
-
   // Undefined copy constructor and assignment operators
   TextSelectionPopup(const TextSelectionPopup&);
   TextSelectionPopup& operator=(const TextSelectionPopup& rhs);
 
 private: // Data
-
-
   Dali::Toolkit::TextSelectionToolbar mToolbar;
 
-  Dali::Toolkit::TableView mTableOfButtons;           // Actor which holds all the buttons, sensitivity can be set on buttons via this actor
+  Dali::Toolkit::TableView mTableOfButtons; // Actor which holds all the buttons, sensitivity can be set on buttons via this actor
 
   // Images paths to be used by the Popup buttons
   std::string mCutIconImage;
@@ -278,20 +272,20 @@ private: // Data
   std::string mSelectIconImage;
   std::string mSelectAllIconImage;
 
-  Size mPopupMaxSize;                   // Maximum size of the Popup
-  Size mOptionMaxSize;                  // Maximum size of an Option button
-  Size mOptionMinSize;                  // Minimum size of an Option button
-  Size mOptionDividerSize;              // Size of divider line
+  Size mPopupMaxSize;      // Maximum size of the Popup
+  Size mOptionMaxSize;     // Maximum size of an Option button
+  Size mOptionMinSize;     // Minimum size of an Option button
+  Size mOptionDividerSize; // Size of divider line
 
   std::vector<ButtonRequirement> mOrderListOfButtons; // List of buttons in the order to be displayed and a flag to indicate if needed.
 
-  Toolkit::TextSelectionPopup::Buttons mEnabledButtons; // stores enabled buttons
+  Toolkit::TextSelectionPopup::Buttons          mEnabledButtons; // stores enabled buttons
   Toolkit::TextSelectionPopupCallbackInterface* mCallbackInterface;
 
-  std::string mPressedImage;            // Image used for the popup option when pressed.
-  Vector4 mPressedColor;                // Color of the popup option when pressed.
-  Vector4 mDividerColor;                // Color of the divider between buttons
-  Vector4 mIconColor;                   // Color of the popup icon.
+  std::string mPressedImage; // Image used for the popup option when pressed.
+  Vector4     mPressedColor; // Color of the popup option when pressed.
+  Vector4     mDividerColor; // Color of the divider between buttons
+  Vector4     mIconColor;    // Color of the popup icon.
 
   // Priority of Options/Buttons in the Cut and Paste pop-up, higher priority buttons are displayed first, left to right.
   std::size_t mSelectOptionPriority;    // Position of Select Button
@@ -300,32 +294,31 @@ private: // Data
   std::size_t mCopyOptionPriority;      // Position of Copy button
   std::size_t mPasteOptionPriority;     // Position of Paste button
   std::size_t mClipboardOptionPriority; // Position of Clipboard button
-  float mFadeInDuration;                // Duration of the animation to fade in the Popup
-  float mFadeOutDuration;               // Duration of the animation to fade out the Popup
-
-  bool mShowIcons:1; // Flag to show icons
-  bool mShowCaptions:1; // Flag to show text captions
-  bool mPopupShowing:1; // Flag to indicate Popup showing
-  bool mButtonsChanged:1; // Flag to indicate the Popup Buttons have changed
+  float       mFadeInDuration;          // Duration of the animation to fade in the Popup
+  float       mFadeOutDuration;         // Duration of the animation to fade out the Popup
 
+  bool mShowIcons : 1;      // Flag to show icons
+  bool mShowCaptions : 1;   // Flag to show text captions
+  bool mPopupShowing : 1;   // Flag to indicate Popup showing
+  bool mButtonsChanged : 1; // Flag to indicate the Popup Buttons have changed
 };
 
 } // namespace Internal
 
 // Helpers for public-api forwarding methods
 
-inline Toolkit::Internal::TextSelectionPopup& GetImpl( Toolkit::TextSelectionPopup& textSelectionPopup )
+inline Toolkit::Internal::TextSelectionPopup& GetImpl(Toolkit::TextSelectionPopup& textSelectionPopup)
 {
-  DALI_ASSERT_ALWAYS( textSelectionPopup );
+  DALI_ASSERT_ALWAYS(textSelectionPopup);
 
   Dali::RefObject& handle = textSelectionPopup.GetImplementation();
 
   return static_cast<Toolkit::Internal::TextSelectionPopup&>(handle);
 }
 
-inline const Toolkit::Internal::TextSelectionPopup& GetImpl( const Toolkit::TextSelectionPopup& textSelectionPopup )
+inline const Toolkit::Internal::TextSelectionPopup& GetImpl(const Toolkit::TextSelectionPopup& textSelectionPopup)
 {
-  DALI_ASSERT_ALWAYS( textSelectionPopup );
+  DALI_ASSERT_ALWAYS(textSelectionPopup);
 
   const Dali::RefObject& handle = textSelectionPopup.GetImplementation();
 
@@ -337,4 +330,3 @@ inline const Toolkit::Internal::TextSelectionPopup& GetImpl( const Toolkit::Text
 } // namespace Dali
 
 #endif // DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_POPUP_H
-
index 5cc4fda..36c7e56 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_TOOLBAR_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // 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/devel-api/controls/scroll-bar/scroll-bar.h>
 #include <dali-toolkit/devel-api/controls/table-view/table-view.h>
 #include <dali-toolkit/devel-api/controls/text-controls/text-selection-toolbar.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
+#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.h>
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/actors/layer.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class TextSelectionToolbar : public Control
 {
 public:
-
   /**
    * @copydoc Dali::Toollkit::TextSelectionToolbar::New()
    */
@@ -54,7 +50,7 @@ public:
    * @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 );
+  static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value);
 
   /**
    * @brief Called to retrieve a property of an object of this type.
@@ -63,34 +59,34 @@ public:
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index index );
+  static Property::Value GetProperty(BaseObject* object, Property::Index index);
 
   /**
    *  @copydoc Toolkit::TextSelectionToolbar::AddOption()
    */
-  void AddOption( Actor& option );
+  void AddOption(Actor& option);
 
   /**
    *  @copydoc Toolkit::TextSelectionToolbar::AddDivider()
    */
-  void AddDivider( Actor& divider );
+  void AddDivider(Actor& divider);
 
   /**
    * @copydoc Toolkit::TextSelectionToolbar::ResizeDividers()
    */
-  void ResizeDividers( Size& size );
+  void ResizeDividers(Size& size);
 
   /**
    * @copydoc Toolkit::TextSelectionToolbar::RaiseAbove()
    */
-  void RaiseAbove( Actor target );
+  void RaiseAbove(Actor target);
 
   /**
    * Sets the scroll bar padding.
    *
    * @param[in] padding The padding value.
    */
-  void SetScrollBarPadding( const Vector2& padding );
+  void SetScrollBarPadding(const Vector2& padding);
 
   /**
    * @return The padding value.
@@ -100,10 +96,9 @@ public:
   /**
    * @copydoc Toolkit::TextSelectionToolbar::ScrollTo()
    */
-  void ScrollTo( const Vector2& position );
+  void ScrollTo(const Vector2& position);
 
 private: // From Control
-
   /**
    * @copydoc Control::OnInitialize()
    */
@@ -112,13 +107,13 @@ private: // From Control
   /**
   * @copydoc Control::OnRelayout()
   */
-  void OnRelayout( const Vector2& size, RelayoutContainer& container ) override;
+  void OnRelayout(const Vector2& size, RelayoutContainer& container) override;
 
   /**
    * @brief Set max size of Popup
    * @param[in] maxSize Size (Vector2)
    */
-  void SetPopupMaxSize( const Size& maxSize );
+  void SetPopupMaxSize(const Size& maxSize);
 
   /**
    * @brief Get Max size of Popup
@@ -127,11 +122,10 @@ private: // From Control
   const Dali::Vector2& GetPopupMaxSize() const;
 
 private: // Implementation
-
   /**
    * @copydoc Toolkit::TextSelectionToolbar::ConfigureScrollview()
    */
-  void ConfigureScrollview( const Property::Map& properties );
+  void ConfigureScrollview(const Property::Map& properties);
 
   /**
    * @brief Set up scrollview to scroll Toolbar horizontally
@@ -148,19 +142,19 @@ private: // Implementation
    *
    * @param[in] enable True if the scroll-bar is required
    */
-  void SetUpScrollBar( bool enable );
+  void SetUpScrollBar(bool enable);
 
   /**
    * Toolbar has started to scroll
    * @param[in] position current scroll view position
    */
-  void OnScrollStarted( const Vector2& position );
+  void OnScrollStarted(const Vector2& position);
 
   /**
    * Toolbar has stopped scrolling
    * @param[in] position current scroll view position
    */
-  void OnScrollCompleted( const Vector2& position );
+  void OnScrollCompleted(const Vector2& position);
 
   /**
    * Construct a new TextField.
@@ -173,41 +167,39 @@ private: // Implementation
   virtual ~TextSelectionToolbar();
 
 private:
-
   // Undefined copy constructor and assignment operators
   TextSelectionToolbar(const TextSelectionToolbar&);
   TextSelectionToolbar& operator=(const TextSelectionToolbar& rhs);
 
-private: // Data
-
-  Actor mToolbarActor;                                ///< The actor 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.
-  bool mFirstScrollEnd;                               ///< Used for RTL mirroring. Avoids the overshoot to be shown the first time the popup is shown.
+private:                                        // Data
+  Actor                      mToolbarActor;     ///< The actor 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.
+  bool                       mFirstScrollEnd;   ///< Used for RTL mirroring. Avoids the overshoot to be shown the first time the popup is shown.
 };
 
 } // namespace Internal
 
 // Helpers for public-api forwarding methods
 
-inline Toolkit::Internal::TextSelectionToolbar& GetImpl( Toolkit::TextSelectionToolbar& textSelectionToolbar )
+inline Toolkit::Internal::TextSelectionToolbar& GetImpl(Toolkit::TextSelectionToolbar& textSelectionToolbar)
 {
-  DALI_ASSERT_ALWAYS( textSelectionToolbar );
+  DALI_ASSERT_ALWAYS(textSelectionToolbar);
 
   Dali::RefObject& handle = textSelectionToolbar.GetImplementation();
 
   return static_cast<Toolkit::Internal::TextSelectionToolbar&>(handle);
 }
 
-inline const Toolkit::Internal::TextSelectionToolbar& GetImpl( const Toolkit::TextSelectionToolbar& textSelectionToolbar )
+inline const Toolkit::Internal::TextSelectionToolbar& GetImpl(const Toolkit::TextSelectionToolbar& textSelectionToolbar)
 {
-  DALI_ASSERT_ALWAYS( textSelectionToolbar );
+  DALI_ASSERT_ALWAYS(textSelectionToolbar);
 
   const Dali::RefObject& handle = textSelectionToolbar.GetImplementation();
 
index e5116e8..1039ea0 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_TOOL_BAR_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/devel-api/common/map-wrapper.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/devel-api/controls/table-view/table-view.h>
 #include <dali-toolkit/devel-api/controls/tool-bar/tool-bar.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 class ToolBar;
 
 namespace Internal
 {
-
 /**
  * ToolBar is a control to create a tool bar.
  * @see Dali::Toolkit::ToolBar for more details.
@@ -44,7 +41,6 @@ namespace Internal
 class ToolBar : public Control
 {
 public:
-
   /**
    * Create an initialized ToolBar.
    * @return A handle to a newly allocated Dali resource.
@@ -54,15 +50,14 @@ public:
   /**
    * @copydoc Dali::Toolkit::ToolBar::AddControl()
    */
-  void AddControl( Dali::Actor control, float relativeSize, Toolkit::Alignment::Type alignment, const Toolkit::Alignment::Padding& padding );
+  void AddControl(Dali::Actor control, float relativeSize, Toolkit::Alignment::Type alignment, const Toolkit::Alignment::Padding& padding);
 
   /**
    * @copydoc Dali::Toolkit::ToolBar::RemoveControl()
    */
-  void RemoveControl( Dali::Actor control );
+  void RemoveControl(Dali::Actor control);
 
 private: // From Control
-
   /**
    * @copydoc Toolkit::Control::OnInitialize()
    */
@@ -85,8 +80,8 @@ private:
     /**
      * Constructor, sets the lock boolean
      */
-    Lock( bool& lock )
-    : mLock( lock )
+    Lock(bool& lock)
+    : mLock(lock)
     {
       mLock = true;
     }
@@ -98,6 +93,7 @@ private:
     {
       mLock = false;
     }
+
   private:
     bool& mLock;
   };
@@ -125,30 +121,29 @@ private:
   float              mAccumulatedRelativeSpace; ///< Stores the total percentage space used by controls.
   bool               mInitializing;             ///< Allows the use of Actor's API to add controls.
 
-  std::map<Actor/*control*/,Toolkit::Alignment> mControls; ///< Stores a relationship between controls and their alignments used to place them inside the table view.
+  std::map<Actor /*control*/, Toolkit::Alignment> mControls; ///< Stores a relationship between controls and their alignments used to place them inside the table view.
 };
 
 } // namespace Internal
 
-
 // Helpers for public-api forwarding methods
 
-inline Toolkit::Internal::ToolBar& GetImpl( Toolkit::ToolBar& toolBar )
+inline Toolkit::Internal::ToolBar& GetImpl(Toolkit::ToolBar& toolBar)
 {
-  DALI_ASSERT_ALWAYS( toolBar );
+  DALI_ASSERT_ALWAYS(toolBar);
 
   Dali::RefObject& handle = toolBar.GetImplementation();
 
-  return static_cast<Toolkit::Internal::ToolBar&>( handle );
+  return static_cast<Toolkit::Internal::ToolBar&>(handle);
 }
 
-inline const Toolkit::Internal::ToolBar& GetImpl( const Toolkit::ToolBar& toolBar )
+inline const Toolkit::Internal::ToolBar& GetImpl(const Toolkit::ToolBar& toolBar)
 {
-  DALI_ASSERT_ALWAYS( toolBar );
+  DALI_ASSERT_ALWAYS(toolBar);
 
   const Dali::RefObject& handle = toolBar.GetImplementation();
 
-  return static_cast<const Toolkit::Internal::ToolBar&>( handle );
+  return static_cast<const Toolkit::Internal::ToolBar&>(handle);
 }
 
 } // namespace Toolkit
index bd44de4..c13be4b 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_TOOLTIP_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <string>
 #include <dali/public-api/adaptor-framework/timer.h>
 #include <dali/public-api/common/intrusive-ptr.h>
 #include <dali/public-api/object/property-array.h>
 #include <dali/public-api/object/property-map.h>
 #include <dali/public-api/object/ref-object.h>
-#include <dali/public-api/signals/connection-tracker.h>
 #include <dali/public-api/object/weak-handle.h>
+#include <dali/public-api/signals/connection-tracker.h>
+#include <string>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control.h>
 #include <dali-toolkit/devel-api/controls/popup/popup.h>
 #include <dali-toolkit/devel-api/controls/tooltip/tooltip-properties.h>
+#include <dali-toolkit/public-api/controls/control.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class Tooltip;
-typedef IntrusivePtr< Tooltip > TooltipPtr;
+typedef IntrusivePtr<Tooltip> TooltipPtr;
 
 /**
  * @brief Handles all the required tooltip related functionality for a control.
@@ -54,12 +51,11 @@ typedef IntrusivePtr< Tooltip > TooltipPtr;
 class Tooltip : public RefObject, public ConnectionTracker
 {
 public:
-
   /**
    * @brief Creates an instance of the Tooltip class.
    * @param[in]  control  The control the tooltip should be shown on.
    */
-  static TooltipPtr New( Toolkit::Control control );
+  static TooltipPtr New(Toolkit::Control control);
 
   /**
    * @brief Sets the properties of the Tooltip.
@@ -69,29 +65,28 @@ public:
    *          If a Property::ARRAY of Visuals then all are displayed in one row.
    * @param[in]  value  This can either be a Property::STRING, Property::MAP or Property::ARRAY.
    */
-  void SetProperties( const Property::Value& value );
+  void SetProperties(const Property::Value& value);
 
   /**
    * @brief Creates a property map of the tooltip properties.
    * @param[out]  map  Filled with all the properties of the tooltip.
    * @note map should be empty.
    */
-  void CreatePropertyMap( Property::Map& map ) const;
+  void CreatePropertyMap(Property::Map& map) const;
 
 private:
-
   /**
    * @brief Private constructor.
    */
-  Tooltip( Toolkit::Control control );
+  Tooltip(Toolkit::Control control);
 
   /**
    * @brief Private destructor.
    */
   ~Tooltip();
 
-  Tooltip( const Tooltip& ); ///< Undefined
-  Tooltip& operator=( const Tooltip& ); ///< ///< Undefined
+  Tooltip(const Tooltip&);            ///< Undefined
+  Tooltip& operator=(const Tooltip&); ///< ///< Undefined
 
   /**
    * @brief Sets the content of the tooltip.
@@ -99,25 +94,25 @@ private:
    * @param[in]  control  Is used to connect to this control's signals.
    * @param[in]  value    The content property value.
    */
-  void SetContent( Toolkit::Control& control, const Property::Value& value );
+  void SetContent(Toolkit::Control& control, const Property::Value& value);
 
   /**
    * @brief Sets the background properties of the tooltip.
    * @param[in]  value  The background property value.
    */
-  void SetBackground( const Property::Value& value );
+  void SetBackground(const Property::Value& value);
 
   /**
    * @brief Sets the tail properties of the tooltip.
    * @param[in]  value  The tail property value.
    */
-  void SetTail( const Property::Value& value );
+  void SetTail(const Property::Value& value);
 
   /**
    * @brief Method used to connect to the control's Hovered signal.
    * @param[in]  hover  The hover event.
    */
-  bool OnHovered( Actor /* actor */, const HoverEvent& hover );
+  bool OnHovered(Actor /* actor */, const HoverEvent& hover);
 
   /**
    * @brief Method used to connect to the internal timer used by Tooltip.
@@ -130,23 +125,23 @@ private:
    * @details This is required so we can appropriately position it.
    * @param[in]  actor  The actor being laid out.
    */
-  void OnRelayout( Actor actor );
+  void OnRelayout(Actor actor);
 
   // Data
 
-  Toolkit::Popup mPopup; ///< The Popup class is used to display the actual tooltip.
-  Timer mTooltipTimer; ///< Timer used to wait a certain length of time before we display the tooltip.
+  Toolkit::Popup mPopup;        ///< The Popup class is used to display the actual tooltip.
+  Timer          mTooltipTimer; ///< Timer used to wait a certain length of time before we display the tooltip.
 
-  WeakHandle< Toolkit::Control > mControl; ///< A weak handle to the control we are setting the tooltip on.
+  WeakHandle<Toolkit::Control> mControl; ///< A weak handle to the control we are setting the tooltip on.
 
-  Property::Map mContentTextVisual; ///< If using just one visual, then this is set.
-  Property::Map mTailImages; ///< The different images used by the tail.
-  Property::Array mContentArray; ///< If using an array of visuals, then this is used.
+  Property::Map   mContentTextVisual; ///< If using just one visual, then this is set.
+  Property::Map   mTailImages;        ///< The different images used by the tail.
+  Property::Array mContentArray;      ///< If using an array of visuals, then this is used.
 
-  Rect< int > mBackgroundBorder; ///< The size of the background border in the order: left, right, bottom, top. @see Toolkit::Tooltip::Border::Property::BORDER
+  Rect<int> mBackgroundBorder; ///< The size of the background border in the order: left, right, bottom, top. @see Toolkit::Tooltip::Border::Property::BORDER
 
-  Vector2 mLayout; ///< The layout of the content if using an array.
-  Vector2 mHoverPoint; ///< The first point where hover starts.
+  Vector2 mLayout;           ///< The layout of the content if using an array.
+  Vector2 mHoverPoint;       ///< The first point where hover starts.
   Vector2 mHoverPointOffset; ///< The tooltip is displayed with this offset from hover point if using Toolkit::Tooltip::Position::HOVER_POINT.
 
   std::string mBackgroundImage; ///< The path to the background image used for the tooltip.
@@ -155,10 +150,10 @@ private:
 
   int mWaitTime; ///< Time in milliseconds to wait before we display the tooltip.
 
-  Toolkit::Tooltip::Position::Type mPositionType; ///< The position of the tooltip.
-  bool mTailVisibility; ///< Whether we are showing a tail or not.
-  bool mDisappearOnMovement; ///< Whether the tooltip is set to disappear on movement or when we go out of the bounds of mControl.
-  bool mSignalsConnected; ///< Whether any signals required for Tooltip functionality have been connected.
+  Toolkit::Tooltip::Position::Type mPositionType;        ///< The position of the tooltip.
+  bool                             mTailVisibility;      ///< Whether we are showing a tail or not.
+  bool                             mDisappearOnMovement; ///< Whether the tooltip is set to disappear on movement or when we go out of the bounds of mControl.
+  bool                             mSignalsConnected;    ///< Whether any signals required for Tooltip functionality have been connected.
 };
 
 } // namespace Internal
old mode 100755 (executable)
new mode 100644 (file)
index d23c622..4d76176
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_VIDEO_VIEW_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/video-player.h>
+#include <dali/devel-api/adaptor-framework/video-sync-mode.h>
+#include <dali/integration-api/adaptor-framework/trigger-event-factory.h>
+#include <dali/public-api/images/image-operations.h>
+#include <dali/public-api/object/property-conditions.h>
 #include <dali/public-api/object/property-map.h>
 #include <dali/public-api/object/property-notification.h>
-#include <dali/public-api/object/property-conditions.h>
 #include <dali/public-api/rendering/renderer.h>
-#include <dali/public-api/images/image-operations.h>
 #include <dali/public-api/rendering/texture.h>
-#include <dali/devel-api/adaptor-framework/video-player.h>
-#include <dali/integration-api/adaptor-framework/trigger-event-factory.h>
-#include <dali/devel-api/adaptor-framework/video-sync-mode.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control-impl.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 class VideoView;
 
 namespace Internal
 {
-
-class VideoView: public Control
+class VideoView : public Control
 {
 protected:
-
-  VideoView( Dali::VideoSyncMode syncMode );
+  VideoView(Dali::VideoSyncMode syncMode);
 
   virtual ~VideoView();
 
 public:
-
   /**
    * @copydoc Toolkit::DevelVideoView::New()
    */
-  static Toolkit::VideoView New( VideoSyncMode syncMode );
+  static Toolkit::VideoView New(VideoSyncMode syncMode);
 
   /**
    * @brief Sets a video url to play.
@@ -65,7 +60,7 @@ public:
    * @SINCE_1_1.38
    * @param [in] url The url of the video resource to play
    */
-  void SetUrl( const std::string& url );
+  void SetUrl(const std::string& url);
 
   /**
    * @brief Returns a video url.
@@ -108,19 +103,19 @@ public:
   /**
    * @copydoc Toolkit::VideoView::Forward()
    */
-  void Forward( int millisecond );
+  void Forward(int millisecond);
 
   /**
    * @copydoc Toolkit::VideoView::Backward()
    */
-  void Backward( int millisecond );
+  void Backward(int millisecond);
 
   /**
    * @brief Sets the player mute status.
    * @SINCE_1_1.38
    * @param[i] mute The new mute status, true is mute.
    */
-  void SetMute( bool mute );
+  void SetMute(bool mute);
 
   /**
    * @brief Returns the player mute status.
@@ -135,7 +130,7 @@ public:
    * @param[in] left The left volume scalar
    * @param[in] right The right volume scalar
    */
-  void SetVolume( float left, float right );
+  void SetVolume(float left, float right);
 
   /**
    * @brief Returns current volume factor.
@@ -143,9 +138,9 @@ public:
    * @param[out] left The current left volume scalar
    * @param[out] right The current right volume scalar
    */
-  void GetVolume( float& left, float& right );
+  void GetVolume(float& left, float& right);
 
- /**
 /**
    * @copydoc Dali::Toolkit::VideoView::FinishedSignal()
    */
   Dali::Toolkit::VideoView::VideoViewSignalType& FinishedSignal();
@@ -160,7 +155,7 @@ public:
    * @SINCE_1_1.38
    * @param[in] map The Dali::Property::Map to use for to display.
    */
-  void SetPropertyMap( Property::Map map );
+  void SetPropertyMap(Property::Map map);
 
   // Properties
   /**
@@ -170,7 +165,7 @@ public:
    * @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 );
+  static void SetProperty(BaseObject* object, Property::Index index, const Property::Value& value);
 
   /**
    * @brief Called to retrieve a property of an object of this type.
@@ -179,7 +174,7 @@ public:
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Property::Value GetProperty( BaseObject* object, Property::Index propertyIndex );
+  static Property::Value GetProperty(BaseObject* object, Property::Index propertyIndex);
 
   /**
    * @brief Set the depth index of this image renderer
@@ -188,7 +183,7 @@ public:
    * @SINCE_1_1.38
    * @param[in] depthIndex The depth index of this renderer
    */
-  void SetDepthIndex( int depthIndex );
+  void SetDepthIndex(int depthIndex);
 
   /**
    * @brief Performs actions as requested using the action name.
@@ -198,7 +193,7 @@ public:
    * @param[in] attributes The attributes with which to perfrom this action.
    * @return True if action has been accepted by this control
    */
-  static bool DoAction( BaseObject* object, const std::string& actionName, const Property::Map& attributes );
+  static bool DoAction(BaseObject* object, const std::string& actionName, const Property::Map& attributes);
 
   /**
    * Connects a callback function with the object's signals.
@@ -209,17 +204,17 @@ public:
    * @return True if the signal was connected.
    * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the c
    */
-  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
+  static bool DoConnectSignal(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor);
 
   /**
    * @brief Updates video display area for window rendering target
    */
-  void UpdateDisplayArea( Dali::PropertyNotification& source );
+  void UpdateDisplayArea(Dali::PropertyNotification& source);
 
   /**
    * @brief Sets underlay flag and initializes new rendering target by flag.
    */
-  void SetUnderlay( bool set );
+  void SetUnderlay(bool set);
 
   /**
    * @brief Checks underlay flag.
@@ -229,7 +224,7 @@ public:
   /**
    * @brief Sets sw codec type.
    */
-  void SetSWCodec( bool on );
+  void SetSWCodec(bool on);
 
   /**
    * @brief Gets play position.
@@ -239,12 +234,12 @@ public:
   /**
    * @brief Sets play position.
    */
-  void SetPlayPosition( int pos );
+  void SetPlayPosition(int pos);
 
   /**
    * @brief Sets Display mode.
    */
-  void SetDisplayMode( int mode );
+  void SetDisplayMode(int mode);
 
   /**
    * @brief Gets Display mode.
@@ -265,10 +260,9 @@ public:
    * @param[in] videoView The current VideoView
    * @param[in] animation The animation for video view's resize or move.
    */
-  void PlayAnimation( Dali::Animation animation );
+  void PlayAnimation(Dali::Animation animation);
 
 private: // From Control
-
   /**
    * @copydoc Toolkit::Control::OnInitialize()
    */
@@ -277,7 +271,7 @@ private: // From Control
   /**
    * @copydoc Toolkit::Control::OnSceneConnection()
    */
-  void OnSceneConnection( int depth ) override;
+  void OnSceneConnection(int depth) override;
 
   /**
    * @copydoc Toolkit::Control::OnSceneDisconnection()
@@ -287,7 +281,7 @@ private: // From Control
   /**
    * @copydoc Toolkit::Control::OnSizeSet()
    */
-  void OnSizeSet( const Vector3& targetSize ) override;
+  void OnSizeSet(const Vector3& targetSize) override;
 
   /**
    * @copydoc Toolkit::Control::GetNaturalSize
@@ -297,22 +291,21 @@ private: // From Control
   /**
    * @copydoc Toolkit::Control::GetHeightForWidth()
    */
-  float GetHeightForWidth( float width ) override;
+  float GetHeightForWidth(float width) override;
 
   /**
    * @copydoc Toolkit::Control::GetWidthForHeight()
    */
-  float GetWidthForHeight( float height ) override;
+  float GetWidthForHeight(float height) override;
 
 private:
-
   /**
    * @brief Construct a new VideoView.
    */
-  VideoView( const VideoView& videoView );
+  VideoView(const VideoView& videoView);
 
   // Undefined assignment operator.
-  VideoView& operator=( const VideoView& videoView );
+  VideoView& operator=(const VideoView& videoView);
 
   /**
    * @brief SetWindowSurfaceTarget for underlay video playback.
@@ -335,12 +328,12 @@ private:
    * @param String output
    * @return true if the output was found
    */
-  bool GetStringFromProperty( const Dali::Property::Value& value, std::string& output );
+  bool GetStringFromProperty(const Dali::Property::Value& value, std::string& output);
 
   /*
    * @brief Internal version of SetProperty
    */
-  void SetPropertyInternal( Property::Index index, const Property::Value& value );
+  void SetPropertyInternal(Property::Index index, const Property::Value& value);
 
   /*
    * @brief Apply properties after reset video player
@@ -354,7 +347,7 @@ private:
    * so Ui and video player's synchronization can be finished.
    *
    */
-  void FrameRenderCallback( int frameID );
+  void FrameRenderCallback(int frameID);
 
   /*
    * @brief Set frameRender Callback function
@@ -364,30 +357,32 @@ private:
    */
   void SetFrameRenderCallback();
 
-
   /*
    * @brief resize/move animation finished callback function
    *
    * This function is called the resize/move animation is finished,
    *
    */
-  void OnAnimationFinished( Dali::Animation& animation );
+  void OnAnimationFinished(Dali::Animation& animation);
 
 private:
-
-  Dali::VideoPlayer mVideoPlayer;
+  Dali::VideoPlayer     mVideoPlayer;
   Dali::ImageDimensions mVideoSize;
-  Dali::Property::Map mPropertyMap;
-  Dali::Property::Map mEffectPropertyMap;
-  Dali::Texture mNativeTexture;
+  Dali::Property::Map   mPropertyMap;
+  Dali::Property::Map   mEffectPropertyMap;
+  Dali::Texture         mNativeTexture;
+
   Dali::Toolkit::VideoView::VideoViewSignalType mFinishedSignal;
-  std::string mUrl;
+
+  std::string       mUrl;
   Dali::DisplayArea mDisplayArea;
-  Dali::Renderer mOverlayRenderer;
-  Dali::Renderer mTextureRenderer;
+  Dali::Renderer    mOverlayRenderer;
+  Dali::Renderer    mTextureRenderer;
+
   Dali::PropertyNotification mPositionUpdateNotification;
   Dali::PropertyNotification mSizeUpdateNotification;
   Dali::PropertyNotification mScaleUpdateNotification;
+
   Dali::Property::Map mPropertyBackup;
 
   int mCurrentVideoPlayPosition;
@@ -401,18 +396,18 @@ private:
 
 } // namespace Internal
 
-inline Toolkit::Internal::VideoView& GetImpl( Toolkit::VideoView& handle )
+inline Toolkit::Internal::VideoView& GetImpl(Toolkit::VideoView& handle)
 {
-  DALI_ASSERT_ALWAYS( handle );
+  DALI_ASSERT_ALWAYS(handle);
   Dali::RefObject& impl = handle.GetImplementation();
-  return static_cast< Toolkit::Internal::VideoView& >( impl );
+  return static_cast<Toolkit::Internal::VideoView&>(impl);
 }
 
-inline const Toolkit::Internal::VideoView& GetImpl( const Toolkit::VideoView& handle )
+inline const Toolkit::Internal::VideoView& GetImpl(const Toolkit::VideoView& handle)
 {
-  DALI_ASSERT_ALWAYS( handle );
+  DALI_ASSERT_ALWAYS(handle);
   const Dali::RefObject& impl = handle.GetImplementation();
-  return static_cast< const Toolkit::Internal::VideoView& >( impl );
+  return static_cast<const Toolkit::Internal::VideoView&>(impl);
 }
 
 } // namespace Toolkit
old mode 100755 (executable)
new mode 100644 (file)
index 572688b..5a76ab5
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_WEB_VIEW_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <memory>
 #include <dali/devel-api/adaptor-framework/web-engine.h>
 #include <dali/public-api/images/image-operations.h>
 #include <dali/public-api/object/property-notification.h>
+#include <memory>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/controls/web-view/web-view.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 class KeyEvent;
 class TouchEvent;
 class WebBackForwardList;
@@ -46,21 +44,18 @@ class WebView;
 
 namespace Internal
 {
-
 class WebView : public Control
 {
 protected:
-
   WebView();
 
-  WebView( const std::string& locale, const std::string& timezoneId );
+  WebView(const std::string& locale, const std::string& timezoneId);
 
-  WebView( int argc, char** argv );
+  WebView(int argc, char** argv);
 
   virtual ~WebView();
 
 public:
-
   /**
    * @copydoc Dali::Toolkit::WebView::New()
    */
@@ -69,7 +64,7 @@ public:
   /**
    * @copydoc Dali::Toolkit::WebView::New( const std::string&, const std::string& )
    */
-  static Toolkit::WebView New( const std::string& locale, const std::string& timezoneId );
+  static Toolkit::WebView New(const std::string& locale, const std::string& timezoneId);
 
   /**
    * @brief Get settings of WebEngine.
@@ -94,7 +89,7 @@ public:
   /**
    * @copydoc Dali::Toolkit::WebView::New( int, char** )
    */
-  static Toolkit::WebView New( int argc, char** argv );
+  static Toolkit::WebView New(int argc, char** argv);
 
   /**
    * @brief Get Favicon of web page.
@@ -106,12 +101,12 @@ public:
   /**
    * @copydoc Dali::Toolkit::WebView::LoadUrl()
    */
-  void LoadUrl( const std::string& url );
+  void LoadUrl(const std::string& url);
 
   /**
    * @copydoc Dali::WebEngine::LoadHTMLString()
    */
-  void LoadHtmlString( const std::string& htmlString );
+  void LoadHtmlString(const std::string& htmlString);
 
   /**
    * @copydoc Dali::Toolkit::WebView::Reload()
@@ -136,7 +131,7 @@ public:
   /**
    * @copydoc Dali::Toolkit::WebView::ScrollBy()
    */
-  void ScrollBy( int deltaX, int deltaY );
+  void ScrollBy(int deltaX, int deltaY);
 
   /**
    * @copydoc Dali::Toolkit::WebView::CanGoForward()
@@ -161,12 +156,12 @@ public:
   /**
    * @copydoc Dali::Toolkit::WebView::EvaluateJavaScript()
    */
-  void EvaluateJavaScript( const std::string& script, std::function< void( const std::string& ) > resultHandler );
+  void EvaluateJavaScript(const std::string& script, std::function<void(const std::string&)> resultHandler);
 
   /**
    * @copydoc Dali::Toolkit::WebView::AddJavaScriptMessageHandler()
    */
-  void AddJavaScriptMessageHandler( const std::string& exposedObjectName, std::function< void( const std::string& ) > handler );
+  void AddJavaScriptMessageHandler(const std::string& exposedObjectName, std::function<void(const std::string&)> handler);
 
   /**
    * @brief Clears all tiles resources of Web.
@@ -199,7 +194,6 @@ public:
   Dali::Toolkit::WebView::WebViewScrollEdgeReachedSignalType& ScrollEdgeReachedSignal();
 
 public: // Properties
-
   /**
    * @brief Called when a property of an object of this type is set.
    *
@@ -207,7 +201,7 @@ public: // Properties
    * @param[in] index The property index.
    * @param[in] value The new property value.
    */
-  static void SetProperty( Dali::BaseObject* object, Dali::Property::Index index, const Dali::Property::Value& value );
+  static void SetProperty(Dali::BaseObject* object, Dali::Property::Index index, const Dali::Property::Value& value);
 
   /**
    * @brief Called to retrieve a property of an object of this type.
@@ -216,7 +210,7 @@ public: // Properties
    * @param[in] index The property index.
    * @return The current value of the property.
    */
-  static Dali::Property::Value GetProperty( Dali::BaseObject* object, Dali::Property::Index propertyIndex );
+  static Dali::Property::Value GetProperty(Dali::BaseObject* object, Dali::Property::Index propertyIndex);
 
   /**
    * Connects a callback function with the object's signals.
@@ -227,10 +221,9 @@ public: // Properties
    * @return True if the signal was connected.
    * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the c
    */
-  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
+  static bool DoConnectSignal(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor);
 
 private: // From Control
-
   /**
    * @copydoc Toolkit::Control::OnInitialize()
    */
@@ -247,12 +240,12 @@ private: // From Control
    * @param[in] touch The Touch Data.
    * @return Whether to consume event or not.
    */
-  bool OnTouchEvent( Actor actor, const Dali::TouchEvent& touch );
+  bool OnTouchEvent(Actor actor, const Dali::TouchEvent& touch);
 
   /**
    * @copydoc Toolkit::Control::OnKeyEvent()
    */
-  bool OnKeyEvent( const Dali::KeyEvent& event ) override;
+  bool OnKeyEvent(const Dali::KeyEvent& event) override;
 
   /**
    * @copydoc Toolkit::Control::OnKeyInputFocusGained()
@@ -267,21 +260,20 @@ private: // From Control
   /**
    * @copydoc Toolkit::Control::OnSceneConnection()
    */
-  void OnSceneConnection( int depth ) override;
+  void OnSceneConnection(int depth) override;
 
 private:
-
   // Undefined
-  WebView( const WebView& webView );
+  WebView(const WebView& webView);
 
-  WebView& operator=( const WebView& webView );
+  WebView& operator=(const WebView& webView);
 
   /**
    * @brief Sets an absolute scroll of the given view.
    * @param[in] x The coordinate x of scroll
    * @param[in] y The coordinate y of scroll
    */
-  void SetScrollPosition( int x, int y );
+  void SetScrollPosition(int x, int y);
 
   /**
    * @brief Gets the current scroll position of the given view.
@@ -321,90 +313,89 @@ private:
    * @brief Set user agent string.
    * @param[in] userAgent The string value of user agent
    */
-  void SetUserAgent( const std::string& userAgent );
+  void SetUserAgent(const std::string& userAgent);
 
   /**
    * @brief Updates display area of web view.
    * @param[in] source The soource triggers Notification.
    */
-  void UpdateDisplayArea( Dali::PropertyNotification& source );
+  void UpdateDisplayArea(Dali::PropertyNotification& source);
 
   /**
    * @brief Enable/Disable video hole for video playing.
    * @param[in] enabled True if video hole is enabled, false otherwise.
    */
-  void EnableVideoHole( bool enabled );
+  void EnableVideoHole(bool enabled);
 
   /**
    * @brief Enable blend mode.
    * @param[in] blendEnabled True if turn on blend mode, false otherwise.
    */
-  void EnableBlendMode( bool blendEnabled );
+  void EnableBlendMode(bool blendEnabled);
 
   /**
    * @brief Callback function to be called when page load started.
    * @param[in] url The url currently being loaded
    */
-  void OnPageLoadStarted( const std::string& url );
+  void OnPageLoadStarted(const std::string& url);
 
   /**
    * @brief Callback function to be called when page load finished.
    * @param[in] url The url currently being loaded
    */
-  void OnPageLoadFinished( const std::string& url );
+  void OnPageLoadFinished(const std::string& url);
 
   /**
    * @brief Callback function to be called when there is an error in page loading.
    * @param[in] url The url currently being loaded
    * @param[in] errorCode The error code
    */
-  void OnPageLoadError( const std::string& url, int errorCode );
+  void OnPageLoadError(const std::string& url, int errorCode);
 
   /**
    * @brief Callback function to be called when scroll edge is reached.
    * @param[in] e The scroll edge reached.
    */
-  void OnScrollEdgeReached( Dali::WebEnginePlugin::ScrollEdge edge );
+  void OnScrollEdgeReached(Dali::WebEnginePlugin::ScrollEdge edge);
 
 private:
-
-  std::string                                            mUrl;
-  Dali::Toolkit::Visual::Base                            mVisual;
-  Dali::Size                                             mWebViewSize;
-  Dali::WebEngine                                        mWebEngine;
-
-  Dali::Toolkit::WebView::WebViewPageLoadSignalType      mPageLoadStartedSignal;
-  Dali::Toolkit::WebView::WebViewPageLoadSignalType      mPageLoadFinishedSignal;
-  Dali::Toolkit::WebView::WebViewPageLoadErrorSignalType mPageLoadErrorSignal;
+  std::string                 mUrl;
+  Dali::Toolkit::Visual::Base mVisual;
+  Dali::Size                  mWebViewSize;
+  Dali::WebEngine             mWebEngine;
+
+  Dali::Toolkit::WebView::WebViewPageLoadSignalType          mPageLoadStartedSignal;
+  Dali::Toolkit::WebView::WebViewPageLoadSignalType          mPageLoadFinishedSignal;
+  Dali::Toolkit::WebView::WebViewPageLoadErrorSignalType     mPageLoadErrorSignal;
   Dali::Toolkit::WebView::WebViewScrollEdgeReachedSignalType mScrollEdgeReachedSignal;
 
-  std::unique_ptr<Dali::Toolkit::WebContext>             mWebContext;
-  std::unique_ptr<Dali::Toolkit::WebCookieManager>       mWebCookieManager;
-  std::unique_ptr<Dali::Toolkit::WebSettings>            mWebSettings;
-  std::unique_ptr<Dali::Toolkit::WebBackForwardList>     mWebBackForwardList;
-  Dali::Toolkit::ImageView mFaviconView;
-
-  Dali::PropertyNotification                             mPositionUpdateNotification;
-  Dali::PropertyNotification                             mSizeUpdateNotification;
-  Dali::PropertyNotification                             mScaleUpdateNotification;
-  bool                                                   mVideoHoleEnabled;
-  Dali::Rect< int >                                      mWebViewArea;
+  std::unique_ptr<Dali::Toolkit::WebContext>         mWebContext;
+  std::unique_ptr<Dali::Toolkit::WebCookieManager>   mWebCookieManager;
+  std::unique_ptr<Dali::Toolkit::WebSettings>        mWebSettings;
+  std::unique_ptr<Dali::Toolkit::WebBackForwardList> mWebBackForwardList;
+  Dali::Toolkit::ImageView                           mFaviconView;
+
+  Dali::PropertyNotification mPositionUpdateNotification;
+  Dali::PropertyNotification mSizeUpdateNotification;
+  Dali::PropertyNotification mScaleUpdateNotification;
+  bool                       mVideoHoleEnabled;
+  Dali::Rect<int>            mWebViewArea;
 };
 
 } // namespace Internal
 
-inline Toolkit::Internal::WebView& GetImpl( Toolkit::WebView& handle )
+inline Toolkit::Internal::WebView& GetImpl(Toolkit::WebView& handle)
 {
-  DALI_ASSERT_ALWAYS( handle );
+  DALI_ASSERT_ALWAYS(handle);
   Dali::RefObject& impl = handle.GetImplementation();
-  return static_cast< Toolkit::Internal::WebView& >( impl );
+  return static_cast<Toolkit::Internal::WebView&>(impl);
 }
 
-inline const Toolkit::Internal::WebView& GetImpl( const Toolkit::WebView& handle )
+inline const Toolkit::Internal::WebView& GetImpl(const Toolkit::WebView& handle)
 {
-  DALI_ASSERT_ALWAYS( handle );
+  DALI_ASSERT_ALWAYS(handle);
   const Dali::RefObject& impl = handle.GetImplementation();
-  return static_cast< const Toolkit::Internal::WebView& >( impl );
+  return static_cast<const Toolkit::Internal::WebView&>(impl);
 }
 
 } // namespace Toolkit
old mode 100755 (executable)
new mode 100644 (file)
index 01ca57e..f4c5f82
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_DRAG_AND_DROP_DETECTOR_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
+#include <algorithm>
 #include <string>
 #include <vector>
-#include <algorithm>
 
-#include <dali/public-api/object/base-object.h>
 #include <dali/public-api/math/vector2.h>
+#include <dali/public-api/object/base-object.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/drag-drop-detector/drag-and-drop-detector.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
-using DragAndDropDetectorPtr = IntrusivePtr< DragAndDropDetector >;
+using DragAndDropDetectorPtr = IntrusivePtr<DragAndDropDetector>;
 
 /**
  * This class listens to Drag & Drop events.
@@ -48,7 +45,6 @@ using DragAndDropDetectorPtr = IntrusivePtr< DragAndDropDetector >;
 class DragAndDropDetector : public Dali::BaseObject, public ConnectionTracker
 {
 public:
-
   using DragAndDropSignal = Dali::Toolkit::DragAndDropDetector::DragAndDropSignal;
 
   // Creation
@@ -101,7 +97,7 @@ public:
    * Sets the dragged content.
    * @param[in] content  A string that represents the content that has been dropped.
    */
-  void SetContent( const std::string& content );
+  void SetContent(const std::string& content);
 
   /**
    * Clears the stored content.
@@ -111,7 +107,7 @@ public:
   /**
    * Sets the position the drop occurred.
    */
-  void SetPosition( const Vector2& screenPosition );
+  void SetPosition(const Vector2& screenPosition);
 
   /**
    * Called when a draggable object start drag.
@@ -144,7 +140,6 @@ public:
   void EmitEndedSignal(Dali::Toolkit::Control& control);
 
 public: // Signals
-
   /**
    * @copydoc Dali::Toolkit::DragAndDropDetector::StartedSignal
    */
@@ -198,7 +193,6 @@ public:
   void OnPan(Dali::Actor actor, const PanGesture& gesture);
 
 private:
-
   // Construction & Destruction
 
   /**
@@ -212,12 +206,11 @@ private:
   virtual ~DragAndDropDetector();
 
   // Undefined
-  DragAndDropDetector( const DragAndDropDetector& ) = delete;
-  DragAndDropDetector& operator=( DragAndDropDetector& );
+  DragAndDropDetector(const DragAndDropDetector&) = delete;
+  DragAndDropDetector& operator                   =(DragAndDropDetector&);
 
 private:
-
-  std::string mContent;    ///< The current Drag & drop content.
+  std::string mContent; ///< The current Drag & drop content.
 
   DragAndDropSignal mStartedSignal;
   DragAndDropSignal mEnteredSignal;
@@ -226,11 +219,11 @@ private:
   DragAndDropSignal mDroppedSignal;
   DragAndDropSignal mEndedSignal;
 
-  std::vector<Dali::Toolkit::Control> mControls;      //controls attached by Attach interface for drag&drop
-  Dali::Toolkit::Control mDragControl;                //the current drag control
-  Dali::Toolkit::Control mShadowControl;              //a shadow control for indicating where the control is, same size as the dragged control
-  std::vector<uint32_t> mFirstEnter;                  //control id indicating if the cursor is enter
-  Dali::PanGestureDetector mPanGestureDetector;       //pangesture for calculating the shadow actor position
+  std::vector<Dali::Toolkit::Control> mControls;           //controls attached by Attach interface for drag&drop
+  Dali::Toolkit::Control              mDragControl;        //the current drag control
+  Dali::Toolkit::Control              mShadowControl;      //a shadow control for indicating where the control is, same size as the dragged control
+  std::vector<uint32_t>               mFirstEnter;         //control id indicating if the cursor is enter
+  Dali::PanGestureDetector            mPanGestureDetector; //pangesture for calculating the shadow actor position
 
   Vector2 mLocalPosition;
   Vector2 mDragLocalPosition;
@@ -241,12 +234,11 @@ private:
 
 } // namespace Internal
 
-
 // Helpers for public-api forwarding methods
 
 inline Internal::DragAndDropDetector& GetImplementation(Dali::Toolkit::DragAndDropDetector& detector)
 {
-  DALI_ASSERT_ALWAYS( detector && "DragAndDropDetector handle is empty" );
+  DALI_ASSERT_ALWAYS(detector && "DragAndDropDetector handle is empty");
 
   BaseObject& handle = detector.GetBaseObject();
 
@@ -255,7 +247,7 @@ inline Internal::DragAndDropDetector& GetImplementation(Dali::Toolkit::DragAndDr
 
 inline const Internal::DragAndDropDetector& GetImplementation(const Dali::Toolkit::DragAndDropDetector& detector)
 {
-  DALI_ASSERT_ALWAYS( detector && "DragAndDropDetector handle is empty" );
+  DALI_ASSERT_ALWAYS(detector && "DragAndDropDetector handle is empty");
 
   const BaseObject& handle = detector.GetBaseObject();
 
index 7dd256e..79a8e6d 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_FEEDBACK_IDS_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics 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,7 +20,6 @@
 
 namespace Dali
 {
-
 /**
  *  Enumerations for the types of feedback
  *  Note: These are based on feedback_type_e in libsvi
@@ -44,41 +43,41 @@ enum FeedbackPattern
 {
   FEEDBACK_PATTERN_NONE = -1,
 
-  FEEDBACK_PATTERN_TAP = 0,           /**< feedback pattern when general touch */
-  FEEDBACK_PATTERN_SIP,               /**< feedback pattern when touch text key */
-  FEEDBACK_PATTERN_SIP_BACKSPACE,     /**< feedback pattern when touch backspace key */
-  FEEDBACK_PATTERN_MAX_CHARACTER,     /**< feedback pattern when max character */
-  FEEDBACK_PATTERN_KEY0,              /**< feedback pattern when touch numeric 0 key */
-  FEEDBACK_PATTERN_KEY1,              /**< feedback pattern when touch numeric 1 key */
-  FEEDBACK_PATTERN_KEY2,              /**< feedback pattern when touch numeric 2 key */
-  FEEDBACK_PATTERN_KEY3,              /**< feedback pattern when touch numeric 3 key */
-  FEEDBACK_PATTERN_KEY4,              /**< feedback pattern when touch numeric 4 key */
-  FEEDBACK_PATTERN_KEY5,              /**< feedback pattern when touch numeric 5 key */
-  FEEDBACK_PATTERN_KEY6,              /**< feedback pattern when touch numeric 6 key */
-  FEEDBACK_PATTERN_KEY7,              /**< feedback pattern when touch numeric 7 key */
-  FEEDBACK_PATTERN_KEY8,              /**< feedback pattern when touch numeric 8 key */
-  FEEDBACK_PATTERN_KEY9,              /**< feedback pattern when touch numeric 9 key */
-  FEEDBACK_PATTERN_KEY_STAR,          /**< feedback pattern when touch star key */
-  FEEDBACK_PATTERN_KEY_SHARP,         /**< feedback pattern when touch sharp key */
-  FEEDBACK_PATTERN_HOLD,              /**< feedback pattern when touch hold */
-  FEEDBACK_PATTERN_MULTI_TAP,         /**< feedback pattern when multi touch */
-  FEEDBACK_PATTERN_HW_TAP,            /**< feedback pattern when press hardware key */
-  FEEDBACK_PATTERN_HW_HOLD,           /**< feedback pattern when holding press hardware key */
+  FEEDBACK_PATTERN_TAP = 0,       /**< feedback pattern when general touch */
+  FEEDBACK_PATTERN_SIP,           /**< feedback pattern when touch text key */
+  FEEDBACK_PATTERN_SIP_BACKSPACE, /**< feedback pattern when touch backspace key */
+  FEEDBACK_PATTERN_MAX_CHARACTER, /**< feedback pattern when max character */
+  FEEDBACK_PATTERN_KEY0,          /**< feedback pattern when touch numeric 0 key */
+  FEEDBACK_PATTERN_KEY1,          /**< feedback pattern when touch numeric 1 key */
+  FEEDBACK_PATTERN_KEY2,          /**< feedback pattern when touch numeric 2 key */
+  FEEDBACK_PATTERN_KEY3,          /**< feedback pattern when touch numeric 3 key */
+  FEEDBACK_PATTERN_KEY4,          /**< feedback pattern when touch numeric 4 key */
+  FEEDBACK_PATTERN_KEY5,          /**< feedback pattern when touch numeric 5 key */
+  FEEDBACK_PATTERN_KEY6,          /**< feedback pattern when touch numeric 6 key */
+  FEEDBACK_PATTERN_KEY7,          /**< feedback pattern when touch numeric 7 key */
+  FEEDBACK_PATTERN_KEY8,          /**< feedback pattern when touch numeric 8 key */
+  FEEDBACK_PATTERN_KEY9,          /**< feedback pattern when touch numeric 9 key */
+  FEEDBACK_PATTERN_KEY_STAR,      /**< feedback pattern when touch star key */
+  FEEDBACK_PATTERN_KEY_SHARP,     /**< feedback pattern when touch sharp key */
+  FEEDBACK_PATTERN_HOLD,          /**< feedback pattern when touch hold */
+  FEEDBACK_PATTERN_MULTI_TAP,     /**< feedback pattern when multi touch */
+  FEEDBACK_PATTERN_HW_TAP,        /**< feedback pattern when press hardware key */
+  FEEDBACK_PATTERN_HW_HOLD,       /**< feedback pattern when holding press hardware key */
 
-  FEEDBACK_PATTERN_MESSAGE,           /**< feedback pattern when incoming a message */
-  FEEDBACK_PATTERN_MESSAGE_ON_CALL,   /**< feedback pattern when incoming a message on call */
-  FEEDBACK_PATTERN_EMAIL,             /**< feedback pattern when incoming an email */
-  FEEDBACK_PATTERN_EMAIL_ON_CALL,     /**< feedback pattern when incoming an email on call */
-  FEEDBACK_PATTERN_WAKEUP,            /**< feedback pattern when alert wake up call */
-  FEEDBACK_PATTERN_WAKEUP_ON_CALL,    /**< feedback pattern when alert wake up call on call */
-  FEEDBACK_PATTERN_SCHEDULE,          /**< feedback pattern when alert schedule alarm */
-  FEEDBACK_PATTERN_SCHEDULE_ON_CALL,    /**< feedback pattern when alert schedule alarm on call */
-  FEEDBACK_PATTERN_TIMER,             /**< feedback pattern when alert timer */
-  FEEDBACK_PATTERN_TIMER_ON_CALL,     /**< feedback pattern when alert timer on call */
-  FEEDBACK_PATTERN_GENERAL,           /**< feedback pattern when alert general event */
-  FEEDBACK_PATTERN_GENERAL_ON_CALL,   /**< feedback pattern when alert general event on call */
+  FEEDBACK_PATTERN_MESSAGE,          /**< feedback pattern when incoming a message */
+  FEEDBACK_PATTERN_MESSAGE_ON_CALL,  /**< feedback pattern when incoming a message on call */
+  FEEDBACK_PATTERN_EMAIL,            /**< feedback pattern when incoming an email */
+  FEEDBACK_PATTERN_EMAIL_ON_CALL,    /**< feedback pattern when incoming an email on call */
+  FEEDBACK_PATTERN_WAKEUP,           /**< feedback pattern when alert wake up call */
+  FEEDBACK_PATTERN_WAKEUP_ON_CALL,   /**< feedback pattern when alert wake up call on call */
+  FEEDBACK_PATTERN_SCHEDULE,         /**< feedback pattern when alert schedule alarm */
+  FEEDBACK_PATTERN_SCHEDULE_ON_CALL, /**< feedback pattern when alert schedule alarm on call */
+  FEEDBACK_PATTERN_TIMER,            /**< feedback pattern when alert timer */
+  FEEDBACK_PATTERN_TIMER_ON_CALL,    /**< feedback pattern when alert timer on call */
+  FEEDBACK_PATTERN_GENERAL,          /**< feedback pattern when alert general event */
+  FEEDBACK_PATTERN_GENERAL_ON_CALL,  /**< feedback pattern when alert general event on call */
 
-  FEEDBACK_PATTERN_POWER_ON,           /**< feedback pattern when power on */
+  FEEDBACK_PATTERN_POWER_ON,            /**< feedback pattern when power on */
   FEEDBACK_PATTERN_POWER_OFF,           /**< feedback pattern when power off */
   FEEDBACK_PATTERN_CHARGERCONN,         /**< feedback pattern when connecting charger */
   FEEDBACK_PATTERN_CHARGERCONN_ON_CALL, /**< feedback pattern when connecting charger on call */
@@ -99,7 +98,6 @@ enum FeedbackPattern
   FEEDBACK_PATTERN_END,
 };
 
-
-}  // namespace Dali
+} // namespace Dali
 
 #endif // DALI_FEEDBACK_IDS_H
index 2167ace..cdb1e21 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_FEEDBACK_STYLE_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <map>
-#include <dali/public-api/object/base-handle.h>
 #include <dali/devel-api/adaptor-framework/feedback-player.h>
-#include <dali/public-api/signals/connection-tracker.h>
 #include <dali/public-api/adaptor-framework/style-change.h>
+#include <dali/public-api/object/base-handle.h>
+#include <dali/public-api/signals/connection-tracker.h>
 #include <dali/public-api/signals/slot-delegate.h>
+#include <map>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/feedback/feedback-ids.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 struct FeedbackStyleInfo;
 struct SignalFeedbackInfo;
 
@@ -51,7 +48,6 @@ struct SignalFeedbackInfo;
 class FeedbackStyle : public ConnectionTracker
 {
 public:
-
   /**
    * Constructor.
    */
@@ -84,7 +80,7 @@ public:
    * Connects feedback to signals for the newly created object
    * @param [in] object Handle to the newly created object
    */
-  void ObjectCreated( BaseHandle object );
+  void ObjectCreated(BaseHandle object);
 
   /**
    * Style changed so reload the theme file
@@ -94,13 +90,12 @@ public:
   void StyleChanged(const std::string& userDefinedThemePath, StyleChange::Type styleChange);
 
 private:
-
   /**
    * Helper to retrieve styleInfo from mStyleInfoLut
    * @param type A string described a type of object
    * @return The style information for the given object
    */
-  const FeedbackStyleInfo& GetStyleInfo( const std::string& type) const;
+  const FeedbackStyleInfo& GetStyleInfo(const std::string& type) const;
 
   /**
    * Callback function for Dali::Toolkit::PushButton::SignalPressed signal
@@ -114,21 +109,21 @@ private:
    * @param [in] data A string represenation of the theme.
    * @param [in] format The string representation format ie JSON.
    */
-  void LoadFromString( const std::string& data );
+  void LoadFromString(const std::string& data);
 
   /**
    * Helper to store signal information.
    * @param [in] styleInfo The information will be stored here.
    * @param [in] signalInfo The information to add.
    */
-  void AddSignalInfo( FeedbackStyleInfo& styleInfo, SignalFeedbackInfo&& signalInfo );
+  void AddSignalInfo(FeedbackStyleInfo& styleInfo, SignalFeedbackInfo&& signalInfo);
 
   /**
    * Map a pattern string to feedback pattern ID.
    * @param [in] pattern The pattern string.
    * @return A feedback pattern ID.
    */
-  FeedbackPattern GetFeedbackPattern( const std::string& pattern );
+  FeedbackPattern GetFeedbackPattern(const std::string& pattern);
 
   /**
    * Plays a feedback effect
@@ -151,10 +146,10 @@ private:
   std::map<const std::string, FeedbackStyleInfo> mStyleInfoLut;       ///< Converts key strings into style information
 };
 
-} // namespace Toolkit
-
 } // namespace Internal
 
+} // namespace Toolkit
+
 } // namespace Dali
 
 #endif // DALI_INTERNAL_FEEDBACK_STYLE_H
index 8ff681a..2e2e0a9 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_BLUR_TWO_PASS_FILTER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * A two pass blur filter, pass one performs a horizontal blur and pass two performs a
  * vertical blur on the result of pass one.
@@ -61,13 +58,16 @@ public: // From ImageFilter
   void Refresh() override;
 
   /// @copydoc Dali::Toolkit::Internal::ImageFilter::SetSize
-  void SetSize( const Vector2& size ) override;
+  void SetSize(const Vector2& size) override;
 
   /**
    * Get the property index that controls the strength of the blur applied to the image. Useful for animating this property.
    * This property represents a value in the range [0.0 - 1.0] where 0.0 is no blur and 1.0 is full blur.
    */
-  Property::Index GetBlurStrengthPropertyIndex() const {return mBlurStrengthPropertyIndex;}
+  Property::Index GetBlurStrengthPropertyIndex() const
+  {
+    return mBlurStrengthPropertyIndex;
+  }
 
   /**
    * Retrieve the handle to the object in order to animate or constrain the blur strength property
@@ -76,33 +76,31 @@ public: // From ImageFilter
   Handle GetHandleForAnimateBlurStrength();
 
 private:
-
   /**
    * Setup render tasks for blur
    */
   void CreateRenderTasks();
 
 private:
-  BlurTwoPassFilter( const BlurTwoPassFilter& );
-  BlurTwoPassFilter& operator=( const BlurTwoPassFilter& );
+  BlurTwoPassFilter(const BlurTwoPassFilter&);
+  BlurTwoPassFilter& operator=(const BlurTwoPassFilter&);
 
 private: // Attributes
-
   // To perform horizontal blur from mInputTexture to mFrameBufferForHorz
-  RenderTask         mRenderTaskForHorz;
-  Actor              mActorForInput;
-  FrameBuffer        mFrameBufferForHorz;
+  RenderTask  mRenderTaskForHorz;
+  Actor       mActorForInput;
+  FrameBuffer mFrameBufferForHorz;
 
   // To perform vertical blur from mFrameBufferForHorz to mOutputFrameBuffer
-  RenderTask         mRenderTaskForVert;
-  Actor              mActorForHorz;
-  FrameBuffer        mBlurredFrameBuffer;
+  RenderTask  mRenderTaskForVert;
+  Actor       mActorForHorz;
+  FrameBuffer mBlurredFrameBuffer;
 
   // To blend the blurred image and input image according to the blur strength
-  RenderTask         mRenderTaskForBlending;
-  Actor              mActorForBlending;
-  Actor              mRootActorForBlending;
-  Property::Index    mBlurStrengthPropertyIndex;
+  RenderTask      mRenderTaskForBlending;
+  Actor           mActorForBlending;
+  Actor           mRootActorForBlending;
+  Property::Index mBlurStrengthPropertyIndex;
 
 }; // class BlurTwoPassFilter
 
@@ -113,4 +111,3 @@ private: // Attributes
 } // namespace Dali
 
 #endif // DALI_TOOLKIT_INTERNAL_BLUR_TWO_PASS_FILTER_H
-
index 122c70c..4a519b1 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_EMBOSS_FILTER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * An embossing image filter, implements Dali::Toolkit::Internal::ImageFilter
  */
@@ -62,7 +59,7 @@ public: // From ImageFilter
   void Refresh() override;
 
   /// @copydoc Dali::Toolkit::Internal::ImageFilter::SetSize
-  void SetSize( const Vector2& size ) override;
+  void SetSize(const Vector2& size) override;
 
 private:
   /**
@@ -71,21 +68,20 @@ private:
   void CreateRenderTasks();
 
 private:
-  EmbossFilter( const EmbossFilter& );
-  EmbossFilter& operator=( const EmbossFilter& );
+  EmbossFilter(const EmbossFilter&);
+  EmbossFilter& operator=(const EmbossFilter&);
 
 private: // Attributes
-
-  RenderTask            mRenderTaskForEmboss1;
-  RenderTask            mRenderTaskForEmboss2;
-  RenderTask            mRenderTaskForOutput;
-  FrameBuffer           mFrameBufferForEmboss1;
-  FrameBuffer           mFrameBufferForEmboss2;
-  Actor                 mActorForInput1;
-  Actor                 mActorForInput2;
-  Renderer              mRendererForEmboss1;
-  Renderer              mRendererForEmboss2;
-  Actor                 mActorForComposite;
+  RenderTask  mRenderTaskForEmboss1;
+  RenderTask  mRenderTaskForEmboss2;
+  RenderTask  mRenderTaskForOutput;
+  FrameBuffer mFrameBufferForEmboss1;
+  FrameBuffer mFrameBufferForEmboss2;
+  Actor       mActorForInput1;
+  Actor       mActorForInput2;
+  Renderer    mRendererForEmboss1;
+  Renderer    mRendererForEmboss2;
+  Actor       mActorForComposite;
 }; // class EmbossFilter
 
 } // namespace Internal
@@ -95,4 +91,3 @@ private: // Attributes
 } // namespace Dali
 
 #endif // DALI_TOOLKIT_INTERNAL_EMBOSS_FILTER_H
-
index d73f9e6..fcdaf01 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_IMAGE_FILTER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/rendering/texture.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/control-impl.h>
 #include <dali-toolkit/devel-api/controls/effects-view/effects-view.h>
+#include <dali-toolkit/public-api/controls/control-impl.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * An interface class that provides a interface for image filters that perform
  * a simple shader effect on an input texture, rendering the output to a FrameBuffer.
@@ -43,10 +40,9 @@ namespace Internal
 class ImageFilter
 {
 public:
-  typedef std::vector< Vector3 > FilterKernel;
+  typedef std::vector<Vector3> FilterKernel;
 
 public:
-
   /**
    * Default constructor
    */
@@ -75,37 +71,37 @@ public:
   /**
    * @copydoc Dali::Toolkit::EffectsView::SetRefreshOnDemand
    */
-  void SetRefreshOnDemand( bool onDemand );
+  void SetRefreshOnDemand(bool onDemand);
 
   /**
    * Set the input texture
    * @param[in] The input/original texture.
    */
-  void SetInputTexture( Texture texture );
+  void SetInputTexture(Texture texture);
 
   /**
    * Set the output frame buffer
    * @return The output frame buffer.
    */
-  void SetOutputFrameBuffer( FrameBuffer frameBuffer );
+  void SetOutputFrameBuffer(FrameBuffer frameBuffer);
 
   /**
    * Set size of ImageFilter. Used to create internal offscreen buffers
    * @param[in] size  THe size.
    */
-  virtual void SetSize( const Vector2& size );
+  virtual void SetSize(const Vector2& size);
 
   /**
    * Set the pixel format for internal offscreen buffers
    * @param[in] pixelFormat The pixel format.
    */
-  void SetPixelFormat( Pixel::Format pixelFormat );
+  void SetPixelFormat(Pixel::Format pixelFormat);
 
   /**
    * Set the filter kernel
    * @param[in] The filter kernel
    */
-  void SetKernel( const FilterKernel& kernel );
+  void SetKernel(const FilterKernel& kernel);
 
   /**
    * Get a const reference to the internal filter kernel
@@ -124,38 +120,37 @@ public:
    * @param[in] weights
    * @param[in] count
    */
-  void CreateKernel( const float* weights, size_t count);
+  void CreateKernel(const float* weights, size_t count);
 
   /**
    * Set the actor which acts as the root actor for all internal actors for connection to stage
    * @param[in] rootActor   An actor which acts as the root actor for any internal actors that need
    *                        to be created
    */
-  void SetRootActor( Actor rootActor );
+  void SetRootActor(Actor rootActor);
 
   /**
    * Set the background / clear color
    * @param[in] color The background / clear color
    */
-  void SetBackgroundColor( const Vector4& color );
+  void SetBackgroundColor(const Vector4& color);
 
 protected:
-
   /**
    * Setup position and parameters for camera
    */
   void SetupCamera();
 
 protected:
-  Texture          mInputTexture;
-  FrameBuffer      mOutputFrameBuffer;
-  FilterKernel     mKernel;
-  Actor            mRootActor;
-  CameraActor      mCameraActor;
-  Vector4          mBackgroundColor;
-  Vector2          mTargetSize;
-  Pixel::Format    mPixelFormat;
-  bool             mRefreshOnDemand;
+  Texture       mInputTexture;
+  FrameBuffer   mOutputFrameBuffer;
+  FilterKernel  mKernel;
+  Actor         mRootActor;
+  CameraActor   mCameraActor;
+  Vector4       mBackgroundColor;
+  Vector2       mTargetSize;
+  Pixel::Format mPixelFormat;
+  bool          mRefreshOnDemand;
 
 }; // class Imagefilter
 
@@ -166,4 +161,3 @@ protected:
 } // namespace Dali
 
 #endif // DALI_TOOLKIT_INTERNAL_IMAGE_FILTER_H
-
index 926c98d..61cc0a8 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_SPREAD_FILTER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * A spread/thicken filter. Expands an image into transparent areas.
  */
@@ -53,7 +50,7 @@ public:
    * Set the amount of spread in pixels.
    * @param[in] spread The amount of spread
    */
-  void SetSpread( float spread );
+  void SetSpread(float spread);
 
 public: // From ImageFilter
   /// @copydoc Dali::Toolkit::Internal::ImageFilter::Enable
@@ -66,31 +63,29 @@ public: // From ImageFilter
   void Refresh() override;
 
   /// @copydoc Dali::Toolkit::Internal::ImageFilter::SetSize
-  void SetSize( const Vector2& size ) override;
+  void SetSize(const Vector2& size) override;
 
 private:
-
   /**
    * Setup render tasks for blur
    */
   void CreateRenderTasks();
 
 private:
-  SpreadFilter( const SpreadFilter& );
-  SpreadFilter& operator=( const SpreadFilter& );
+  SpreadFilter(const SpreadFilter&);
+  SpreadFilter& operator=(const SpreadFilter&);
 
 private: // Attributes
-
   // To perform horizontal spread from mInputTexture to mFrameBufferForHorz
-  RenderTask         mRenderTaskForHorz;
-  Actor              mActorForInput;
-  FrameBuffer        mFrameBufferForHorz;
+  RenderTask  mRenderTaskForHorz;
+  Actor       mActorForInput;
+  FrameBuffer mFrameBufferForHorz;
 
   // To perform vertical spread from mFrameBufferForHorz to mOutputFrameBuffer
-  RenderTask         mRenderTaskForVert;
-  Actor              mActorForHorz;
+  RenderTask mRenderTaskForVert;
+  Actor      mActorForHorz;
 
-  int                mSpread;
+  int mSpread;
 }; // class SpreadFilter
 
 } // namespace Internal
@@ -100,4 +95,3 @@ private: // Attributes
 } // namespace Dali
 
 #endif // DALI_TOOLKIT_INTERNAL_SPREAD_FILTER_H
-
index 4ab0ea3..07bf86f 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_KEYBOARD_FOCUS_MANAGER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
+#include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/object/base-object.h>
 #include <dali/public-api/object/weak-handle.h>
-#include <dali/public-api/common/vector-wrapper.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h>
 #include <dali-toolkit/devel-api/focus-manager/keyboard-focus-manager-devel.h>
+#include <dali-toolkit/public-api/focus-manager/keyboard-focus-manager.h>
 #include <dali/devel-api/adaptor-framework/window-devel.h>
 
 namespace Dali
 {
-
 namespace Integration
 {
-
 class SceneHolder;
 
 } // namespace Integration
 
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * @copydoc Toolkit::KeyboardFocusManager
  */
 class KeyboardFocusManager : public Dali::BaseObject, public ConnectionTracker
 {
 public:
-
   typedef Toolkit::DevelKeyboardFocusManager::CustomAlgorithmInterface CustomAlgorithmInterface;
 
   enum FocusIndicatorState
   {
-    UNKNOWN = -1,   ///< Unknown state
-    HIDE = 0,          ///< FocusIndicator is hidden
-    SHOW = 1,          ///< FocusIndicator is shown
+    UNKNOWN = -1, ///< Unknown state
+    HIDE    = 0,  ///< FocusIndicator is hidden
+    SHOW    = 1,  ///< FocusIndicator is shown
   };
 
   enum EnableFocusedIndicatorState
   {
-    DISABLE = 0,          ///< FocusIndicator is disable
-    ENABLE = 1,          ///< FocusIndicator is enable
+    DISABLE = 0, ///< FocusIndicator is disable
+    ENABLE  = 1, ///< FocusIndicator is enable
   };
 
   enum FocusedIndicatorModeState
   {
-    NONE = 0,          ///< Set nothing
-    ALWAYS_SHOW = 1,          ///< FocusIndicator is always shown
+    NONE        = 0, ///< Set nothing
+    ALWAYS_SHOW = 1, ///< FocusIndicator is always shown
   };
 
   /**
@@ -158,7 +153,6 @@ public:
   bool IsFocusIndicatorEnabled() const;
 
 public:
-
   /**
    * @copydoc Toolkit::KeyboardFocusManager::PreFocusChangeSignal()
    */
@@ -188,19 +182,17 @@ public:
    * @return True if the signal was connected.
    * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
    */
-  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
+  static bool DoConnectSignal(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor);
 
 protected:
-
   /**
    * Destructor
    */
   virtual ~KeyboardFocusManager();
 
 private:
-
-  typedef std::vector< WeakHandle< Actor > > FocusStack; ///< Define Dali::Vector< Dali::BaseObject* > as FocusStack to contain focus history
-  typedef FocusStack::iterator FocusStackIterator; ///< Define FocusStack::Iterator as FocusStackIterator to navigate FocusStack
+  typedef std::vector<WeakHandle<Actor> > FocusStack;         ///< Define Dali::Vector< Dali::BaseObject* > as FocusStack to contain focus history
+  typedef FocusStack::iterator            FocusStackIterator; ///< Define FocusStack::Iterator as FocusStackIterator to navigate FocusStack
 
   /**
    * This will be called when the adaptor is initialized
@@ -211,7 +203,7 @@ private:
    * This will be called when a new scene holder is created
    * @param sceneHolder The new scene holder
    */
-  void OnSceneHolderCreated( Dali::Integration::SceneHolder& sceneHolder );
+  void OnSceneHolderCreated(Dali::Integration::SceneHolder& sceneHolder);
 
   /**
    * Get configuration from StyleManager.
@@ -256,7 +248,7 @@ private:
    * This function will emit FocusedActorEnterKeySignal.
    * @param actor The actor to notify
    */
-  void DoKeyboardEnter( Actor actor );
+  void DoKeyboardEnter(Actor actor);
 
   /**
    * Check whether the actor is a layout control that supports two dimensional keyboard navigation.
@@ -274,27 +266,27 @@ private:
    * @param actor The actor to be checked for its parent layout control
    * @return The parent layout control the given actor belongs to or an empty handle if the given actor doesn't belong to a layout control
    */
- Toolkit::Control GetParentLayoutControl(Actor actor) const;
 Toolkit::Control GetParentLayoutControl(Actor actor) const;
 
   /**
    * Callback for the key event when no actor in the stage has gained the key input focus
    * @param[in] event The KeyEvent event.
    */
-  void OnKeyEvent( const KeyEvent& event );
+  void OnKeyEvent(const KeyEvent& event);
 
   /**
    * Callback for the touch event when the screen is touched and when the touch ends
    * (i.e. the down & up touch events only).
    * @param[in] touch The touch information
    */
-  void OnTouch( const TouchEvent& touch );
+  void OnTouch(const TouchEvent& touch);
 
   /**
    * Called when the window focus is changed.
    * @param[in] window The window whose focus is changed
    * @param[in] focusIn Whether the focus is in/out
    */
-  void OnWindowFocusChanged( Window window, bool focusIn );
+  void OnWindowFocusChanged(Window window, bool focusIn);
 
   /**
    * Get the focus Actor from current window
@@ -302,46 +294,44 @@ private:
   Actor GetFocusActorFromCurrentWindow();
 
 private:
-
   // Undefined
   KeyboardFocusManager(const KeyboardFocusManager&);
 
   KeyboardFocusManager& operator=(const KeyboardFocusManager& rhs);
 
 private:
-
-  Toolkit::KeyboardFocusManager::PreFocusChangeSignalType mPreFocusChangeSignal; ///< The signal to notify the focus will be changed
-  Toolkit::KeyboardFocusManager::FocusChangedSignalType mFocusChangedSignal; ///< The signal to notify the focus change
-  Toolkit::KeyboardFocusManager::FocusGroupChangedSignalType mFocusGroupChangedSignal; ///< The signal to notify the focus group change
+  Toolkit::KeyboardFocusManager::PreFocusChangeSignalType       mPreFocusChangeSignal;       ///< The signal to notify the focus will be changed
+  Toolkit::KeyboardFocusManager::FocusChangedSignalType         mFocusChangedSignal;         ///< The signal to notify the focus change
+  Toolkit::KeyboardFocusManager::FocusGroupChangedSignalType    mFocusGroupChangedSignal;    ///< The signal to notify the focus group change
   Toolkit::KeyboardFocusManager::FocusedActorEnterKeySignalType mFocusedActorEnterKeySignal; ///< The signal to notify that enter has been pressed on the focused actor
 
-  WeakHandle< Actor > mCurrentFocusActor; ///< A weak handle to the current focused actor
+  WeakHandle<Actor> mCurrentFocusActor; ///< A weak handle to the current focused actor
 
   Actor mFocusIndicatorActor; ///< The focus indicator actor shared by all the keyboard focusable actors for highlight
 
   FocusStack mFocusHistory; ///< Stack to contain pre-focused actor's BaseObject*
 
-  SlotDelegate< KeyboardFocusManager > mSlotDelegate;
+  SlotDelegate<KeyboardFocusManager> mSlotDelegate;
 
   CustomAlgorithmInterface* mCustomAlgorithmInterface; ///< The user's (application / toolkit) implementation of CustomAlgorithmInterface
 
-  typedef std::vector< std::pair< WeakHandle< Layer >, WeakHandle< Actor > > > FocusActorContainer;
+  typedef std::vector<std::pair<WeakHandle<Layer>, WeakHandle<Actor> > > FocusActorContainer;
 
   FocusActorContainer mCurrentFocusActors; ///< A container of focused actors
 
-  WeakHandle< Layer > mCurrentFocusedWindow; ///< A weak handle to the current focused window's root layer
+  WeakHandle<Layer> mCurrentFocusedWindow; ///< A weak handle to the current focused window's root layer
 
   FocusIndicatorState mIsFocusIndicatorShown; ///< Whether indicator should be shown / hidden when getting focus. It could be enabled when keyboard focus feature is enabled and navigation keys or 'Tab' key are pressed.
 
-  EnableFocusedIndicatorState mEnableFocusIndicator;  ///< Whether use focus indicator
+  EnableFocusedIndicatorState mEnableFocusIndicator; ///< Whether use focus indicator
 
   FocusedIndicatorModeState mAlwaysShowIndicator; ///< Whether always show indicator. If true, the indicator would be directly shown when focused
 
-  bool mFocusGroupLoopEnabled:1; ///< Whether the focus movement is looped within the same focus group
+  bool mFocusGroupLoopEnabled : 1; ///< Whether the focus movement is looped within the same focus group
 
-  bool mIsWaitingKeyboardFocusChangeCommit:1; /// A flag to indicate PreFocusChangeSignal emitted but the proposed focus actor is not commited by the application yet.
+  bool mIsWaitingKeyboardFocusChangeCommit : 1; /// A flag to indicate PreFocusChangeSignal emitted but the proposed focus actor is not commited by the application yet.
 
-  bool mClearFocusOnTouch:1; ///< Whether clear focus on touch.
+  bool mClearFocusOnTouch : 1; ///< Whether clear focus on touch.
 };
 
 } // namespace Internal
index 2a3d7de..5974b88 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_KEYINPUT_FOCUS_MANAGER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics 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,9 +19,9 @@
  */
 
 // EXTERNAL INCLUDES
-#include <string>
 #include <dali/public-api/object/base-object.h>
 #include <dali/public-api/object/object-registry.h>
+#include <string>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/focus-manager/keyinput-focus-manager.h>
 
 namespace Dali
 {
-
 namespace Integration
 {
-
 class SceneHolder;
 
 } // namespace Integration
 
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class KeyInputFocusManager;
 
 /**
@@ -72,7 +68,6 @@ public:
   Toolkit::Control GetCurrentFocusControl() const;
 
 public:
-
   /**
    * @copydoc Toolkit::KeyInputFocusManager::KeyInputFocusChangedSignal()
    */
@@ -87,10 +82,9 @@ public:
    * @return True if the signal was connected.
    * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
    */
-  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
+  static bool DoConnectSignal(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor);
 
 protected:
-
   /**
    * Destructor
    */
@@ -101,7 +95,7 @@ private:
    * This will be called when a new scene holder is created
    * @param sceneHolder The new scene holder
    */
-  void OnSceneHolderCreated( Dali::Integration::SceneHolder& sceneHolder );
+  void OnSceneHolderCreated(Dali::Integration::SceneHolder& sceneHolder);
 
   /**
    * Callback for the key event when no actor in the stage has gained the key input focus
@@ -113,7 +107,7 @@ private:
    * Signal handler called when a focused Control is removed from Scene.
    * @param[in]  control  The control removed from the scene.
    */
-  void OnFocusControlSceneDisconnection( Dali::Actor control );
+  void OnFocusControlSceneDisconnection(Dali::Actor control);
 
   /**
     *  Recursively deliver events to the control and its parents, until the event is consumed or the stage is reached.
@@ -121,21 +115,19 @@ private:
    * @param[in]  event    The KeyEvent.
    * @return True if KeyEvent is consumed.
     */
-  bool EmitKeyEventSignal( Toolkit::Control control, const KeyEvent& event );
+  bool EmitKeyEventSignal(Toolkit::Control control, const KeyEvent& event);
 
 private:
-
   // Undefined
   KeyInputFocusManager(const KeyInputFocusManager&);
 
   KeyInputFocusManager& operator=(const KeyInputFocusManager& rhs);
 
 private:
-
   // The key input focus change signal
   Toolkit::KeyInputFocusManager::KeyInputFocusChangedSignalType mKeyInputFocusChangedSignal;
 
-  SlotDelegate< KeyInputFocusManager > mSlotDelegate;
+  SlotDelegate<KeyInputFocusManager> mSlotDelegate;
 
   Toolkit::Control mCurrentFocusControl; ///< The current focused control
 };
index 2838dc3..d032fc2 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_COLOR_CONVERSION_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <string>
 #include <dali/public-api/object/property.h>
+#include <string>
 
 namespace Dali
 {
-
 struct Vector4;
 
 namespace Toolkit
 {
 namespace Internal
 {
-
 /*
  * @brief Convert the string representation of a color into a Vector4.
  *
@@ -42,7 +40,7 @@ namespace Internal
  * @param[out] outColor The color if found.
  * @return True if the conversion was successful.
  */
-bool ConvertStringToColor( const std::string& colorString, Vector4& outColor );
+bool ConvertStringToColor(const std::string& colorString, Vector4& outColor);
 
 /*
  * @brief Convert a variety of different color representations into a Vector4.
@@ -51,11 +49,10 @@ bool ConvertStringToColor( const std::string& colorString, Vector4& outColor );
  * @param[out] outColor The color if found.
  * @return True if the conversion was successful.
  */
-bool ConvertPropertyToColor( const Property::Value& colorValue, Vector4& outColor );
-
-} // Internal
-} // Toolkit
-} // Dali
+bool ConvertPropertyToColor(const Property::Value& colorValue, Vector4& outColor);
 
+} // namespace Internal
+} // namespace Toolkit
+} // namespace Dali
 
 #endif // DALI_TOOLKIT_INTERNAL_COLOR_CONVERSION_H
index e91062d..fc9b657 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_PROPERTY_HELPER_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <string>
 #include <dali/public-api/object/property.h>
+#include <string>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * @brief Parses a Property::Value to retrieve the string.
  *
@@ -40,7 +37,7 @@ namespace Internal
  *
  * @return True if a string was extracted successfully.
  */
-bool GetStringFromProperty( const Property::Value& value, std::string& output );
+bool GetStringFromProperty(const Property::Value& value, std::string& output);
 
 } // namespace Internal
 
@@ -48,5 +45,4 @@ bool GetStringFromProperty( const Property::Value& value, std::string& output );
 
 } // namespace Dali
 
-
 #endif // DALI_TOOLKIT_INTERNAL_PROPERTY_HELPER_H
index c3619f9..b5f97df 100644 (file)
@@ -3,7 +3,7 @@
 #define DALI_TOOLKIT_INTERNAL_ROUND_ROBIN_CONTAINER_VIEW_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * @brief RoundRobinContainerView is a view to a container that allows iterating through the elements cyclically.
  */
@@ -92,9 +89,9 @@ public:
   // default members
   ~RoundRobinContainerView() = default;
 
-  RoundRobinContainerView(const RoundRobinContainerView&)  = delete;
-  RoundRobinContainerView& operator=(const RoundRobinContainerView&)  = delete;
-  RoundRobinContainerView(RoundRobinContainerView&&) = default;
+  RoundRobinContainerView(const RoundRobinContainerView&) = delete;
+  RoundRobinContainerView& operator=(const RoundRobinContainerView&) = delete;
+  RoundRobinContainerView(RoundRobinContainerView&&)                 = default;
   RoundRobinContainerView& operator=(RoundRobinContainerView&&) = default;
 
 private:
@@ -110,8 +107,8 @@ private:
   }
 
 private:
-  ContainerType mElements; //< container of elements
-  size_t mNextIndex;       //< index to the next element to be viewed
+  ContainerType mElements;  //< container of elements
+  size_t        mNextIndex; //< index to the next element to be viewed
 };
 
 } // namespace Internal
@@ -120,5 +117,4 @@ private:
 
 } // namespace Dali
 
-
 #endif // DALI_TOOLKIT_INTERNAL_ROUND_ROBIN_CONTAINER_VIEW_H
index 4ffda6c..2227711 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_ASYNC_IMAGE_LOADER_IMPL_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/object/base-object.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/image-loader/async-image-loader.h>
 #include <dali-toolkit/devel-api/image-loader/async-image-loader-devel.h>
 #include <dali-toolkit/internal/image-loader/image-load-thread.h>
+#include <dali-toolkit/public-api/image-loader/async-image-loader.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class AsyncImageLoader : public BaseObject
 {
 public:
-
   /**
    * Constructor
    */
@@ -52,18 +48,18 @@ public:
   /**
    * @copydoc Toolkit::AsyncImageLoader::LoadAnimatedImage( Dali::AnimatedImageLoading animatedImageLoading, uint32_t frameIndex )
    */
-  uint32_t LoadAnimatedImage( Dali::AnimatedImageLoading animatedImageLoading,
-                              uint32_t frameIndex );
+  uint32_t LoadAnimatedImage(Dali::AnimatedImageLoading animatedImageLoading,
+                             uint32_t                   frameIndex);
 
   /**
    * @copydoc Toolkit::AsyncImageLoader::Load( const std::string&, ImageDimensions, FittingMode::Type, SamplingMode::Type, bool , DevelAsyncImageLoader::PreMultiplyOnLoad )
    */
-  uint32_t Load( const VisualUrl& url,
-                 ImageDimensions dimensions,
-                 FittingMode::Type fittingMode,
-                 SamplingMode::Type samplingMode,
-                 bool orientationCorrection,
-                 DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad );
+  uint32_t Load(const VisualUrl&                         url,
+                ImageDimensions                          dimensions,
+                FittingMode::Type                        fittingMode,
+                SamplingMode::Type                       samplingMode,
+                bool                                     orientationCorrection,
+                DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad);
 
   /**
    * @brief Starts an mask applying task.
@@ -74,11 +70,11 @@ public:
    * @param[in] preMultiplyOnLoad ON if the image color should be multiplied by it's alpha. Set to OFF if there is no alpha.
    * @return The loading task id
    */
-  uint32_t ApplyMask( Devel::PixelBuffer pixelBuffer,
-                      Devel::PixelBuffer maskPixelBuffer,
-                      float contentScale,
-                      bool cropToMask,
-                      DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad );
+  uint32_t ApplyMask(Devel::PixelBuffer                       pixelBuffer,
+                     Devel::PixelBuffer                       maskPixelBuffer,
+                     float                                    contentScale,
+                     bool                                     cropToMask,
+                     DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad);
 
   /**
    * @copydoc Toolkit::AsyncImageLoader::ImageLoadedSignal
@@ -93,7 +89,7 @@ public:
   /**
    * @copydoc Toolkit::AsyncImageLoader::Cancel
    */
-  bool Cancel( uint32_t loadingTaskId );
+  bool Cancel(uint32_t loadingTaskId);
 
   /**
    * @copydoc Toolkit::AsyncImageLoader::CancelAll
@@ -106,14 +102,13 @@ public:
   void ProcessLoadedImage();
 
 protected:
-
   /**
    * Destructor
    */
   ~AsyncImageLoader() override;
 
 private:
-  Toolkit::AsyncImageLoader::ImageLoadedSignalType mLoadedSignal;
+  Toolkit::AsyncImageLoader::ImageLoadedSignalType            mLoadedSignal;
   Toolkit::DevelAsyncImageLoader::PixelBufferLoadedSignalType mPixelBufferLoadedSignal;
 
   ImageLoadThread mLoadThread;
@@ -123,22 +118,22 @@ private:
 
 } // namespace Internal
 
-inline const Internal::AsyncImageLoader& GetImplementation( const Toolkit::AsyncImageLoader& handle )
+inline const Internal::AsyncImageLoader& GetImplementation(const Toolkit::AsyncImageLoader& handle)
 {
-  DALI_ASSERT_ALWAYS( handle && "AsyncImageLoader handle is empty" );
+  DALI_ASSERT_ALWAYS(handle && "AsyncImageLoader handle is empty");
 
   const BaseObject& object = handle.GetBaseObject();
 
-  return static_cast<const Internal::AsyncImageLoader&>( object );
+  return static_cast<const Internal::AsyncImageLoader&>(object);
 }
 
-inline Internal::AsyncImageLoader& GetImplementation( Toolkit::AsyncImageLoader& handle )
+inline Internal::AsyncImageLoader& GetImplementation(Toolkit::AsyncImageLoader& handle)
 {
-  DALI_ASSERT_ALWAYS( handle && "AsyncImageLoader handle is empty" );
+  DALI_ASSERT_ALWAYS(handle && "AsyncImageLoader handle is empty");
 
   BaseObject& object = handle.GetBaseObject();
 
-  return static_cast<Internal::AsyncImageLoader&>( object );
+  return static_cast<Internal::AsyncImageLoader&>(object);
 }
 
 } // namespace Toolkit
index b356124..6d480e0 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_ATLAS_PACKER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
-#include <stdint.h>
 #include <dali/public-api/common/dali-vector.h>
 #include <dali/public-api/math/rect.h>
 #include <dali/public-api/math/uint-16-pair.h>
+#include <stdint.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * Binary space tree based bin packing algorithm.
  * It is initialised with a fixed width and height and will fit each block into the first node where it fits
@@ -39,11 +36,10 @@ namespace Internal
 class AtlasPacker
 {
 public:
-
   /**
    * rectangular area (x,y,width,height)
    */
-  typedef uint32_t SizeType;
+  typedef uint32_t       SizeType;
   typedef Rect<SizeType> RectArea;
 
   /**
@@ -51,12 +47,12 @@ public:
    */
   struct Node
   {
-    Node( Node* parent, SizeType x, SizeType y, SizeType width, SizeType height );
+    Node(Node* parent, SizeType x, SizeType y, SizeType width, SizeType height);
 
     RectArea rectArea;
-    Node* parent;
-    Node* child[2];
-    bool occupied;
+    Node*    parent;
+    Node*    child[2];
+    bool     occupied;
   };
 
   /**
@@ -65,7 +61,7 @@ public:
    * @param[in] atlasWidth The width of the atlas.
    * @param[in] atlasHeight The height of the atlas.
    */
-  AtlasPacker( SizeType atlasWidth, SizeType atlasHeight );
+  AtlasPacker(SizeType atlasWidth, SizeType atlasHeight);
 
   /**
    * Destructor
@@ -81,8 +77,7 @@ public:
    * @param[out] packPositionY The y coordinate of the position to pack the block.
    * @return True if there are room for this block, false otherwise.
    */
-  bool Pack( SizeType blockWidth, SizeType blockHeight,
-             SizeType& packPositionX, SizeType& packPositionY);
+  bool Pack(SizeType blockWidth, SizeType blockHeight, SizeType& packPositionX, SizeType& packPositionY);
 
   /**
    * Delete the block.
@@ -92,7 +87,7 @@ public:
    * @param[in] blockWidth The width of the block to delete.
    * @param[in] blockHeight The height of the block to delete.
    */
-  void DeleteBlock( SizeType packPositionX, SizeType packPositionY, SizeType blockWidth, SizeType blockHeight );
+  void DeleteBlock(SizeType packPositionX, SizeType packPositionY, SizeType blockWidth, SizeType blockHeight);
 
   /**
    * Query how much empty space left.
@@ -107,10 +102,9 @@ public:
    * @param[out] packPositions The packing position of each block.
    * @return The required size to accommodate all the blocks.
    */
-  static Uint16Pair GroupPack( const Dali::Vector<Uint16Pair>& blockSizes, Dali::Vector<Uint16Pair>& packPositions );
+  static Uint16Pair GroupPack(const Dali::Vector<Uint16Pair>& blockSizes, Dali::Vector<Uint16Pair>& packPositions);
 
 private:
-
   /*
    * Search the node which can pack the block with given size.
    *
@@ -120,7 +114,7 @@ private:
    * @return The poniter pointing to node that can pack the block.
    *          If it is NULL, there are no room in the subtree to pack the block.
    */
-  Node* InsertNode( Node* root, SizeType blockWidth, SizeType blockHeight );
+  Node* InsertNode(Node* root, SizeType blockWidth, SizeType blockHeight);
 
   /**
    * Split the node into two to fit the block width/size.
@@ -129,7 +123,7 @@ private:
    * @param[in] blockWidth The width of the block to pack.
    * @param[in] blockHeight The height of the block to pack.
    */
-  void SplitNode( Node* node, SizeType blockWidth, SizeType blockHeight );
+  void SplitNode(Node* node, SizeType blockWidth, SizeType blockHeight);
 
   /**
    * Search the node at the given position and with the given size.
@@ -140,21 +134,21 @@ private:
    * @param[in] blockWidth The width of the block.
    * @param[in] blockHeight The height of the block.
    */
-  Node* SearchNode( Node* node, SizeType packPositionX, SizeType packPositionY, SizeType blockWidth, SizeType blockHeight  );
+  Node* SearchNode(Node* node, SizeType packPositionX, SizeType packPositionY, SizeType blockWidth, SizeType blockHeight);
 
   /**
    * Merge the rect of the node to non-occupied area.
    *
    * @param[in] node The node to me merged to the non-occupied area
    */
-  void MergeToNonOccupied( Node* node );
+  void MergeToNonOccupied(Node* node);
 
   /**
    * Delete a node and its subtree.
    *
    * @parm[in] node The node to delete.
    */
-  void DeleteNode( Node* node );
+  void DeleteNode(Node* node);
 
   /**
    * Pack a block into the atlas. If there is no enough room, grow the partition tree.
@@ -164,8 +158,7 @@ private:
    * @param[out] packPositionX The x coordinate of the position to pack the block.
    * @param[out] packPositionY The y coordinate of the position to pack the block.
    */
-  void GrowPack( SizeType blockWidth, SizeType blockHeight,
-                 SizeType& packPositionX, SizeType& packPositionY );
+  void GrowPack(SizeType blockWidth, SizeType blockHeight, SizeType& packPositionX, SizeType& packPositionY);
 
   /**
    * Add extra node into the partition tree to accommodate the given block.
@@ -173,22 +166,19 @@ private:
    * @param[in] blockWidth The width of the block to pack.
    * @param[in] blockHeight The height of the block to pack.
    */
-  void GrowNode( SizeType blockWidth, SizeType blockHeight );
+  void GrowNode(SizeType blockWidth, SizeType blockHeight);
 
   // Undefined
-  AtlasPacker( const AtlasPacker& atlasPacker);
+  AtlasPacker(const AtlasPacker& atlasPacker);
 
   // Undefined
-  AtlasPacker& operator=( const AtlasPacker& atlasPacker );
+  AtlasPacker& operator=(const AtlasPacker& atlasPacker);
 
 private:
-
-  Node* mRoot; ///< The root of the binary space tree
+  Node*        mRoot; ///< The root of the binary space tree
   unsigned int mAvailableArea;
-
 };
 
-
 } // namespace Internal
 
 } // namespace Toolkit
index 94601a2..49dd3ef 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_IMAGE_ATLAS_IMPL_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/common/owner-container.h>
 #include <dali/public-api/common/intrusive-ptr.h>
 #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/common/owner-container.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/image-loader/image-atlas.h>
@@ -35,20 +34,17 @@ class EventThreadCallback;
 
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class ImageAtlas : public BaseObject, public ConnectionTracker
 {
 public:
-
   typedef Toolkit::ImageAtlas::SizeType SizeType;
 
   /**
    * @copydoc ImageAtlas::PackToAtlas( const std::vector<PixelData>&, Dali::Vector<Vector4>& )
    */
-  static Texture PackToAtlas( const std::vector<PixelData>& pixelData, Dali::Vector<Vector4>& textureRects  );
+  static Texture PackToAtlas(const std::vector<PixelData>& pixelData, Dali::Vector<Vector4>& textureRects);
 
   /**
    * Constructor
@@ -56,12 +52,12 @@ public:
    * @param [in] height         The atlas height in pixels.
    * @param [in] pixelFormat    The pixel format.
    */
-  ImageAtlas( SizeType width, SizeType height, Pixel::Format pixelFormat );
+  ImageAtlas(SizeType width, SizeType height, Pixel::Format pixelFormat);
 
   /**
    * @copydoc Toolkit::ImageAtlas::New
    */
-  static IntrusivePtr<ImageAtlas> New( SizeType width, SizeType height, Pixel::Format pixelFormat );
+  static IntrusivePtr<ImageAtlas> New(SizeType width, SizeType height, Pixel::Format pixelFormat);
 
   /**
    * @copydoc Toolkit::ImageAtlas::GetAtlas
@@ -76,81 +72,79 @@ public:
   /**
    * @copydoc Toolkit::ImageAtlas::SetBrokenImage
    */
-  void SetBrokenImage( const std::string& brokenImageUrl );
+  void SetBrokenImage(const std::string& brokenImageUrl);
 
   /**
    * @copydoc Toolkit::ImageAtlas::Upload( Vector4&, const std::string&, ImageDimensions,FittingMode::Type, bool )
    */
-  bool Upload( Vector4& textureRect,
-               const std::string& url,
-               ImageDimensions size,
-               FittingMode::Type fittingMode,
-               bool orientationCorrection,
-               AtlasUploadObserver* atlasUploadObserver );
+  bool Upload(Vector4&             textureRect,
+              const std::string&   url,
+              ImageDimensions      size,
+              FittingMode::Type    fittingMode,
+              bool                 orientationCorrection,
+              AtlasUploadObserver* atlasUploadObserver);
 
   /**
    * @copydoc Toolkit::ImageAtlas::Upload( Vector4&, PixelData )
    */
-  bool Upload( Vector4& textureRect, PixelData pixelData );
+  bool Upload(Vector4& textureRect, PixelData pixelData);
 
   /**
    * @copydoc Toolkit::ImageAtlas::Remove
    */
-  void Remove( const Vector4& textureRect );
+  void Remove(const Vector4& textureRect);
 
   /**
    * Resets the destroying observer pointer so that we know not to call methods of this object any more.
    */
-  void ObserverDestroyed( AtlasUploadObserver* observer );
+  void ObserverDestroyed(AtlasUploadObserver* observer);
 
 protected:
-
   /**
    * Destructor
    */
   ~ImageAtlas();
 
 private:
-
   /**
    * @copydoc PixelDataRequester::ProcessPixels
    */
-  void UploadToAtlas( uint32_t id, PixelData pixelData );
+  void UploadToAtlas(uint32_t id, PixelData pixelData);
 
   /**
    * Upload broken image
    *
    * @param[in] area The pixel area for uploading.
    */
-  void UploadBrokenImage( const Rect<unsigned int>& area );
+  void UploadBrokenImage(const Rect<unsigned int>& area);
 
   // Undefined
-  ImageAtlas( const ImageAtlas& imageAtlas);
+  ImageAtlas(const ImageAtlas& imageAtlas);
 
   // Undefined
-  ImageAtlas& operator=( const ImageAtlas& imageAtlas );
+  ImageAtlas& operator=(const ImageAtlas& imageAtlas);
 
 private:
-
   /**
    * Each loading task( identified with an ID ) is associated with a rect region for packing the loaded pixel data into the atlas,
    * and an AtlasUploadObserver whose UploadCompleted method should get executed once the sub texture is ready.
    */
   struct LoadingTaskInfo
   {
-    LoadingTaskInfo( unsigned short loadTaskId,
-                     unsigned int packPositionX,
-                     unsigned int packPositionY,
-                     unsigned int width,
-                     unsigned int height,
-                     AtlasUploadObserver* observer )
-    : loadTaskId( loadTaskId ),
-      packRect( packPositionX, packPositionY, width, height ),
-      observer( observer )
-    {}
-
-    unsigned short loadTaskId;
-    Rect<unsigned int> packRect;
+    LoadingTaskInfo(unsigned short       loadTaskId,
+                    unsigned int         packPositionX,
+                    unsigned int         packPositionY,
+                    unsigned int         width,
+                    unsigned int         height,
+                    AtlasUploadObserver* observer)
+    : loadTaskId(loadTaskId),
+      packRect(packPositionX, packPositionY, width, height),
+      observer(observer)
+    {
+    }
+
+    unsigned short       loadTaskId;
+    Rect<unsigned int>   packRect;
     AtlasUploadObserver* observer;
   };
 
@@ -164,24 +158,22 @@ private:
   float                     mWidth;
   float                     mHeight;
   Pixel::Format             mPixelFormat;
-
-
 };
 
 } // namespace Internal
 
-inline const Internal::ImageAtlas& GetImplementation( const Toolkit::ImageAtlas& imageAtlas )
+inline const Internal::ImageAtlas& GetImplementation(const Toolkit::ImageAtlas& imageAtlas)
 {
-  DALI_ASSERT_ALWAYS( imageAtlas && "ImageAtlas handle is empty" );
+  DALI_ASSERT_ALWAYS(imageAtlas && "ImageAtlas handle is empty");
 
   const BaseObject& handle = imageAtlas.GetBaseObject();
 
   return static_cast<const Internal::ImageAtlas&>(handle);
 }
 
-inline Internal::ImageAtlas& GetImplementation( Toolkit::ImageAtlas& imageAtlas )
+inline Internal::ImageAtlas& GetImplementation(Toolkit::ImageAtlas& imageAtlas)
 {
-  DALI_ASSERT_ALWAYS( imageAtlas && "ImageAtlas handle is empty" );
+  DALI_ASSERT_ALWAYS(imageAtlas && "ImageAtlas handle is empty");
 
   BaseObject& handle = imageAtlas.GetBaseObject();
 
index c7d5d06..9505b17 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_IMAGE_LOAD_THREAD_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/common/dali-vector.h>
-#include <dali/public-api/object/ref-object.h>
-#include <dali/public-api/images/image-operations.h>
+#include <dali-toolkit/devel-api/image-loader/async-image-loader-devel.h>
+#include <dali-toolkit/internal/visuals/visual-url.h>
+#include <dali/devel-api/adaptor-framework/event-thread-callback.h>
+#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 #include <dali/devel-api/threading/conditional-wait.h>
 #include <dali/devel-api/threading/mutex.h>
 #include <dali/devel-api/threading/thread.h>
-#include <dali/devel-api/adaptor-framework/event-thread-callback.h>
-#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
-#include <dali-toolkit/internal/visuals/visual-url.h>
-#include <dali-toolkit/devel-api/image-loader/async-image-loader-devel.h>
 #include <dali/integration-api/adaptor-framework/log-factory-interface.h>
+#include <dali/public-api/common/dali-vector.h>
+#include <dali/public-api/images/image-operations.h>
+#include <dali/public-api/object/ref-object.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * The task of loading and packing an image into the atlas.
  */
@@ -50,9 +47,9 @@ struct LoadingTask
    * @param [in] animatedImageLoading The AnimatedImageLoading to load animated image
    * @param [in] frameIndex The frame index of a frame to be loaded frame
    */
-  LoadingTask( uint32_t id,
-               Dali::AnimatedImageLoading animatedImageLoading,
-               uint32_t frameIndex );
+  LoadingTask(uint32_t                   id,
+              Dali::AnimatedImageLoading animatedImageLoading,
+              uint32_t                   frameIndex);
 
   /**
    * Constructor.
@@ -64,13 +61,13 @@ struct LoadingTask
    * @param [in] orientationCorrection Reorient the image to respect any orientation metadata in its header.
    * @param [in] preMultiplyOnLoad ON if the image's color should be multiplied by it's alpha. Set to OFF if there is no alpha or if the image need to be applied alpha mask.
    */
-  LoadingTask( uint32_t id,
-               const VisualUrl& url,
-               ImageDimensions dimensions,
-               FittingMode::Type fittingMode,
-               SamplingMode::Type samplingMode,
-               bool orientationCorrection,
-               DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad );
+  LoadingTask(uint32_t                                 id,
+              const VisualUrl&                         url,
+              ImageDimensions                          dimensions,
+              FittingMode::Type                        fittingMode,
+              SamplingMode::Type                       samplingMode,
+              bool                                     orientationCorrection,
+              DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad);
 
   /**
    * Constructor.
@@ -81,12 +78,12 @@ struct LoadingTask
    * @param [in] cropToMask Whether to crop the content to the mask size
    * @param [in] preMultiplyOnLoad ON if the image's color should be multiplied by it's alpha. Set to OFF if there is no alpha.
    */
-  LoadingTask( uint32_t id,
-               Devel::PixelBuffer pixelBuffer,
-               Devel::PixelBuffer maskPixelBuffer,
-               float contentScale,
-               bool cropToMask,
-               DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad );
+  LoadingTask(uint32_t                                 id,
+              Devel::PixelBuffer                       pixelBuffer,
+              Devel::PixelBuffer                       maskPixelBuffer,
+              float                                    contentScale,
+              bool                                     cropToMask,
+              DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad);
 
   /**
    * Load the image
@@ -104,47 +101,43 @@ struct LoadingTask
   void MultiplyAlpha();
 
 private:
-
   // Undefined
-  LoadingTask( const LoadingTask& queue );
+  LoadingTask(const LoadingTask& queue);
 
   // Undefined
-  LoadingTask& operator=( const LoadingTask& queue );
+  LoadingTask& operator=(const LoadingTask& queue);
 
 public:
-
-  Devel::PixelBuffer pixelBuffer;   ///< pixelBuffer handle after successful load
-                                    ///< or pixelBuffer to be masked image in the mask task
-  VisualUrl          url;           ///< url of the image to load
-  uint32_t           id;            ///< The unique id associated with this task.
-  ImageDimensions    dimensions;    ///< dimensions to load
-  FittingMode::Type  fittingMode;   ///< fitting options
-  SamplingMode::Type samplingMode;  ///< sampling options
-  bool               orientationCorrection:1; ///< if orientation correction is needed
-  DevelAsyncImageLoader::PreMultiplyOnLoad            preMultiplyOnLoad; //< if the image's color should be multiplied by it's alpha
-
-  bool isMaskTask;                  ///< whether this task is for mask or not
-  Devel::PixelBuffer maskPixelBuffer; ///< pixelBuffer of mask image
-  float contentScale;               ///< The factor to scale the content
-  bool cropToMask;                  ///< Whether to crop the content to the mask size
+  Devel::PixelBuffer pixelBuffer;                                     ///< pixelBuffer handle after successful load
+                                                                      ///< or pixelBuffer to be masked image in the mask task
+  VisualUrl                                url;                       ///< url of the image to load
+  uint32_t                                 id;                        ///< The unique id associated with this task.
+  ImageDimensions                          dimensions;                ///< dimensions to load
+  FittingMode::Type                        fittingMode;               ///< fitting options
+  SamplingMode::Type                       samplingMode;              ///< sampling options
+  bool                                     orientationCorrection : 1; ///< if orientation correction is needed
+  DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad;         //< if the image's color should be multiplied by it's alpha
+
+  bool                       isMaskTask;      ///< whether this task is for mask or not
+  Devel::PixelBuffer         maskPixelBuffer; ///< pixelBuffer of mask image
+  float                      contentScale;    ///< The factor to scale the content
+  bool                       cropToMask;      ///< Whether to crop the content to the mask size
   Dali::AnimatedImageLoading animatedImageLoading;
-  uint32_t frameIndex;
+  uint32_t                   frameIndex;
 };
 
-
 /**
  * The worker thread for image loading.
  */
 class ImageLoadThread : public Thread
 {
 public:
-
   /**
    * Constructor.
    *
    * @param[in] mTrigger The trigger to wake up the main thread.
    */
-  ImageLoadThread( EventThreadCallback* mTrigger );
+  ImageLoadThread(EventThreadCallback* mTrigger);
 
   /**
    * Destructor.
@@ -158,7 +151,7 @@ public:
    *
    * @note This class takes ownership of the task object
    */
-  void AddTask( LoadingTask* task );
+  void AddTask(LoadingTask* task);
 
   /**
    * Pop the next task out from the completed queue.
@@ -170,7 +163,7 @@ public:
   /**
    * Remove the loading task from the waiting queue.
    */
-  bool CancelTask( uint32_t loadingTaskId );
+  bool CancelTask(uint32_t loadingTaskId);
 
   /**
    * Remove all the loading tasks in the waiting queue.
@@ -178,7 +171,6 @@ public:
   void CancelAll();
 
 private:
-
   /**
    * Pop the next loading task out from the queue to process.
    *
@@ -191,10 +183,9 @@ private:
    *
    * @param[in] task The task added to the queue.
    */
-  void AddCompletedTask( LoadingTask* task );
+  void AddCompletedTask(LoadingTask* task);
 
 protected:
-
   /**
    * The entry function of the worker thread.
    * It fetches loading task from the loadQueue, loads the image and adds to the completeQueue.
@@ -202,22 +193,20 @@ protected:
   void Run() override;
 
 private:
-
   // Undefined
-  ImageLoadThread( const ImageLoadThread& thread );
+  ImageLoadThread(const ImageLoadThread& thread);
 
   // Undefined
-  ImageLoadThread& operator=( const ImageLoadThread& thread );
+  ImageLoadThread& operator=(const ImageLoadThread& thread);
 
 private:
-
-  Vector< LoadingTask* > mLoadQueue;     ///<The task queue with images for loading.
-  Vector< LoadingTask* > mCompleteQueue; ///<The task queue with images loaded.
-  EventThreadCallback*   mTrigger;
+  Vector<LoadingTask*>             mLoadQueue;     ///<The task queue with images for loading.
+  Vector<LoadingTask*>             mCompleteQueue; ///<The task queue with images loaded.
+  EventThreadCallback*             mTrigger;
   const Dali::LogFactoryInterface& mLogFactory; ///< The log factory
 
-  ConditionalWait        mConditionalWait;
-  Dali::Mutex            mMutex;
+  ConditionalWait mConditionalWait;
+  Dali::Mutex     mMutex;
 };
 
 } // namespace Internal
index 7b3fd53..b6eaff5 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_STYLE_MANAGER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <string>
-#include <dali/public-api/common/vector-wrapper.h>
-#include <dali/devel-api/common/map-wrapper.h>
 #include <dali/devel-api/adaptor-framework/style-monitor.h>
+#include <dali/devel-api/common/map-wrapper.h>
+#include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/object/base-object.h>
 #include <dali/public-api/object/property-map.h>
 #include <dali/public-api/signals/connection-tracker.h>
+#include <string>
 
 // 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>
+#include <dali-toolkit/public-api/styling/style-manager.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class FeedbackStyle;
 
 /**
@@ -67,11 +64,10 @@ protected:
   virtual ~StyleManager();
 
 public: // Public API
-
   /**
    * @copydoc Toolkit::StyleManager::ApplyTheme
    */
-  void ApplyTheme( const std::string& themeFile );
+  void ApplyTheme(const std::string& themeFile);
 
   /**
    * @copydoc Toolkit::StyleManager::ApplyDefaultTheme
@@ -86,12 +82,12 @@ public: // Public API
   /**
    * @copydoc Toolkit::StyleManager::SetStyleConstant
    */
-  void SetStyleConstant( const std::string& key, const Property::Value& value );
+  void SetStyleConstant(const std::string& key, const Property::Value& value);
 
   /**
    * @copydoc Toolkit::StyleManager::GetStyleConstant
    */
-  bool GetStyleConstant( const std::string& key, Property::Value& valueOut );
+  bool GetStyleConstant(const std::string& key, Property::Value& valueOut);
 
   /**
    * @copydoc Toolkit::StyleManager::GetConfigurations
@@ -103,26 +99,26 @@ public: // Public API
    *
    * @param[in] control The control to apply style.
    */
-  void ApplyThemeStyle( Toolkit::Control control );
+  void ApplyThemeStyle(Toolkit::Control control);
 
   /**
    * @brief Apply the theme style to a control at initialization.
    *
    * @param[in] control The control to apply style.
    */
-  void ApplyThemeStyleAtInit( Toolkit::Control control );
+  void ApplyThemeStyleAtInit(Toolkit::Control control);
 
   /**
    * @copydoc Toolkit::StyleManager::ApplyStyle
    */
-  void ApplyStyle( Toolkit::Control control, const std::string& jsonFileName, const std::string& styleName );
+  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 );
+  const StylePtr GetRecordedStyle(Toolkit::Control control);
 
 public:
   // SIGNALS
@@ -147,7 +143,7 @@ private:
    * @brief Set the current theme. Called only once per event processing cycle.
    * @param[in] themeFile The name of the theme file to read.
    */
-  void SetTheme( const std::string& themeFile );
+  void SetTheme(const std::string& themeFile);
 
   /**
    * @brief Internal helper method to read a file from file system.
@@ -165,7 +161,7 @@ private:
    *
    * @return Return the newly created builder
    */
-  Toolkit::Builder CreateBuilder( const Property::Map& constants );
+  Toolkit::Builder CreateBuilder(const Property::Map& constants);
 
   /**
    * @brief Load a JSON file into given builder
@@ -174,7 +170,7 @@ private:
    * @param[in] jsonFileName The name of the JSON file to load
    * @return Return true if file was loaded
    */
-  bool LoadJSON( Toolkit::Builder builder, const std::string& jsonFileName );
+  bool LoadJSON(Toolkit::Builder builder, const std::string& jsonFileName);
 
   /**
    * @brief Apply a style to the control using the given builder
@@ -182,7 +178,7 @@ private:
    * @param[in] builder The builder to apply the style from
    * @param[in] control The control to apply the style to
    */
-  void ApplyStyle( Toolkit::Builder builder, Toolkit::Control control );
+  void ApplyStyle(Toolkit::Builder builder, Toolkit::Control control);
 
   /**
    * Search for a builder in the cache
@@ -190,7 +186,7 @@ private:
    * @param[in] key The key the builder was cached under
    * @return Return the cached builder if found or an empty builder object if not found
    */
-  Toolkit::Builder FindCachedBuilder( const std::string& key );
+  Toolkit::Builder FindCachedBuilder(const std::string& key);
 
   /**
    * Store a given builder in the cache keyed to the given key
@@ -198,7 +194,7 @@ private:
    * @param[in] builder The builder object to store
    * @param[in] key The key to store the builder under
    */
-  void CacheBuilder( Toolkit::Builder builder, const std::string& key );
+  void CacheBuilder(Toolkit::Builder builder, const std::string& key);
 
   /**
    * Callback for when style monitor raises a signal
@@ -206,13 +202,12 @@ private:
    * @param[in] styleMonitor The style monitor object
    * @param[in] styleChange The style change type
    */
-  void StyleMonitorChange( StyleMonitor styleMonitor, StyleChange::Type styleChange );
+  void StyleMonitorChange(StyleMonitor styleMonitor, StyleChange::Type styleChange);
 
   /**
    * Emit signals to controls first, app second
    */
-  void EmitStyleChangeSignals( StyleChange::Type styleChange );
-
+  void EmitStyleChangeSignals(StyleChange::Type styleChange);
 
   // Undefined
   StyleManager(const StyleManager&);
@@ -220,48 +215,47 @@ private:
   StyleManager& operator=(const StyleManager& rhs);
 
 private:
-
   // Map to store builders keyed by JSON file name
-  typedef std::map< std::string, Toolkit::Builder > BuilderMap;
+  typedef std::map<std::string, Toolkit::Builder> BuilderMap;
 
-  Toolkit::Builder mThemeBuilder;     ///< Builder for all default theme properties
-  StyleMonitor mStyleMonitor;         ///< Style monitor handle
+  Toolkit::Builder mThemeBuilder; ///< Builder for all default theme properties
+  StyleMonitor     mStyleMonitor; ///< Style monitor handle
 
-  int mDefaultFontSize;               ///< Logical size, not a point-size
+  int         mDefaultFontSize; ///< Logical size, not a point-size
   std::string mDefaultFontFamily;
-  std::string mDefaultThemeFilePath;  ///< The full path of the default theme file
-  std::string mThemeFile;             ///< The full path of the current theme file
+  std::string mDefaultThemeFilePath; ///< The full path of the default theme file
+  std::string mThemeFile;            ///< The full path of the current theme file
 
-  Property::Map mThemeBuilderConstants;   ///< Contants to give the theme builder
-  Property::Map mStyleBuilderConstants;   ///< Constants specific to building styles
+  Property::Map mThemeBuilderConstants; ///< Contants to give the theme builder
+  Property::Map mStyleBuilderConstants; ///< Constants specific to building styles
 
-  BuilderMap mBuilderCache;           ///< Cache of builders keyed by JSON file name
+  BuilderMap mBuilderCache; ///< Cache of builders keyed by JSON file name
 
   Toolkit::Internal::FeedbackStyle* mFeedbackStyle; ///< Feedback style
 
   // Signals
   Toolkit::StyleManager::StyleChangedSignalType mControlStyleChangeSignal; ///< Emitted when the style( theme/font ) changes for the controls to style themselves
-  Toolkit::StyleManager::StyleChangedSignalType mStyleChangedSignal; ///< Emitted after the controls have been styled
+  Toolkit::StyleManager::StyleChangedSignalType mStyleChangedSignal;       ///< Emitted after the controls have been styled
 };
 
 } // namespace Internal
 
-inline Internal::StyleManager& GetImpl( Dali::Toolkit::StyleManager& obj )
+inline Internal::StyleManager& GetImpl(Dali::Toolkit::StyleManager& obj)
 {
-  DALI_ASSERT_ALWAYS( obj );
+  DALI_ASSERT_ALWAYS(obj);
 
   Dali::BaseObject& handle = obj.GetBaseObject();
 
-  return static_cast< Internal::StyleManager& >( handle );
+  return static_cast<Internal::StyleManager&>(handle);
 }
 
-inline const Internal::StyleManager& GetImpl( const Dali::Toolkit::StyleManager& obj )
+inline const Internal::StyleManager& GetImpl(const Dali::Toolkit::StyleManager& obj)
 {
-  DALI_ASSERT_ALWAYS( obj );
+  DALI_ASSERT_ALWAYS(obj);
 
   const Dali::BaseObject& handle = obj.GetBaseObject();
 
-  return static_cast< const Internal::StyleManager& >( handle );
+  return static_cast<const Internal::StyleManager&>(handle);
 }
 
 } // namespace Toolkit
index c04918b..63a8017 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_BIDIRECTIONAL_LINE_INFO_RUN_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief BidirectionalLineInfoRun
  */
@@ -37,8 +34,8 @@ struct BidirectionalLineInfoRun
 {
   CharacterRun       characterRun;       ///< The initial character index within the whole text and the number of characters of the run.
   CharacterIndex*    visualToLogicalMap; ///< Pointer to the visual to logical map table.
-  CharacterDirection direction:1;        ///< Direction of the first character of the paragraph.
-  bool               isIdentity:1;       ///< Whether the map is the identity.
+  CharacterDirection direction : 1;      ///< Direction of the first character of the paragraph.
+  bool               isIdentity : 1;     ///< Whether the map is the identity.
 };
 
 } // namespace Text
index 44a9614..f244c85 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_BIDIRECTIONAL_PARAGRAPH_INFO_RUN_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief BidirectionalParagraphInfoRun
  *
@@ -38,9 +35,9 @@ namespace Text
  */
 struct BidirectionalParagraphInfoRun
 {
-  CharacterRun  characterRun;           ///< The initial character index within the whole text and the number of characters of the run.
-  BidiInfoIndex bidirectionalInfoIndex; ///< Index to the table with the bidirectional info per paragraph.
-  CharacterDirection direction;         ///< The paragraph's direction.
+  CharacterRun       characterRun;           ///< The initial character index within the whole text and the number of characters of the run.
+  BidiInfoIndex      bidirectionalInfoIndex; ///< Index to the table with the bidirectional info per paragraph.
+  CharacterDirection direction;              ///< The paragraph's direction.
 };
 
 } // namespace Text
old mode 100755 (executable)
new mode 100644 (file)
index 4f92c62..46c368e
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_BIDIRECTIONAL_SUPPORT_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics 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,8 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/common/dali-vector.h>
 #include <dali/public-api/actors/actor-enumerations.h>
+#include <dali/public-api/common/dali-vector.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/text/bidirectional-line-info-run.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * Sets the bidirectional info into the logical model.
  *
@@ -49,14 +46,14 @@ namespace Text
  * @param[in] matchSystemLanguageDirection Whether match for system language direction or not.
  * @param[in] layoutDirection The direction of the system language.
  */
-void SetBidirectionalInfo( const Vector<Character>& text,
-                           const Vector<ScriptRun>& scripts,
-                           const Vector<LineBreakInfo>& lineBreakInfo,
-                           CharacterIndex startIndex,
-                           Length numberOfCharacters,
-                           Vector<BidirectionalParagraphInfoRun>& bidirectionalInfo,
-                           bool matchSystemLanguageDirection = false,
-                           Dali::LayoutDirection::Type layoutDirection = LayoutDirection::LEFT_TO_RIGHT );
+void SetBidirectionalInfo(const Vector<Character>&               text,
+                          const Vector<ScriptRun>&               scripts,
+                          const Vector<LineBreakInfo>&           lineBreakInfo,
+                          CharacterIndex                         startIndex,
+                          Length                                 numberOfCharacters,
+                          Vector<BidirectionalParagraphInfoRun>& bidirectionalInfo,
+                          bool                                   matchSystemLanguageDirection = false,
+                          Dali::LayoutDirection::Type            layoutDirection              = LayoutDirection::LEFT_TO_RIGHT);
 
 /**
  * @brief Sets the visual to logical map table for a given line.
@@ -68,12 +65,12 @@ void SetBidirectionalInfo( const Vector<Character>& text,
  * @param[in] numberOfCharacters The number of characters.
  * @param[in] direction The direction of the line.
  */
-void ReorderLine( const BidirectionalParagraphInfoRun& bidirectionalParagraphInfo,
-                  Vector<BidirectionalLineInfoRun>& lineInfoRuns,
-                  BidirectionalLineRunIndex bidiLineIndex,
-                  CharacterIndex startIndex,
-                  Length numberOfCharacters,
-                  CharacterDirection direction );
+void ReorderLine(const BidirectionalParagraphInfoRun& bidirectionalParagraphInfo,
+                 Vector<BidirectionalLineInfoRun>&    lineInfoRuns,
+                 BidirectionalLineRunIndex            bidiLineIndex,
+                 CharacterIndex                       startIndex,
+                 Length                               numberOfCharacters,
+                 CharacterDirection                   direction);
 
 /**
  * @brief Replaces any character in the right to left paragraphs which could be mirrored.
@@ -87,12 +84,12 @@ void ReorderLine( const BidirectionalParagraphInfoRun& bidirectionalParagraphInf
  *
  * @return @e true if a character has been replaced.
  */
-bool GetMirroredText( const Vector<Character>& text,
-                      const Vector<CharacterDirection>& directions,
-                      const Vector<BidirectionalParagraphInfoRun>& bidirectionalInfo,
-                      CharacterIndex startIndex,
-                      Length numberOfCharacters,
-                      Vector<Character>& mirroredText );
+bool GetMirroredText(const Vector<Character>&                     text,
+                     const Vector<CharacterDirection>&            directions,
+                     const Vector<BidirectionalParagraphInfoRun>& bidirectionalInfo,
+                     CharacterIndex                               startIndex,
+                     Length                                       numberOfCharacters,
+                     Vector<Character>&                           mirroredText);
 
 /**
  * @brief Retrieves the characters' directions.
@@ -106,11 +103,11 @@ bool GetMirroredText( const Vector<Character>& text,
  * @param[in] numberOfCharacters The number of characters.
  * @param[out] directions The direction, @e false is left to right and @e true is right to left, of each character of the paragraph.
  */
-void GetCharactersDirection( const Vector<BidirectionalParagraphInfoRun>& bidirectionalInfo,
-                             Length totalNumberOfCharacters,
-                             CharacterIndex startIndex,
-                             Length numberOfCharacters,
-                             Vector<CharacterDirection>& directions );
+void GetCharactersDirection(const Vector<BidirectionalParagraphInfoRun>& bidirectionalInfo,
+                            Length                                       totalNumberOfCharacters,
+                            CharacterIndex                               startIndex,
+                            Length                                       numberOfCharacters,
+                            Vector<CharacterDirection>&                  directions);
 
 } // namespace Text
 
index eb354c9..51a3ef7 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_CHARACTER_RUN_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief A run of consecutive characters.
  */
 struct CharacterRun
 {
   CharacterRun()
-  : characterIndex{ 0u },
-    numberOfCharacters{ 0u }
-  {}
-
-  CharacterRun( CharacterIndex characterIndex, Length numberOfCharacters )
-  : characterIndex{ characterIndex },
-    numberOfCharacters{ numberOfCharacters }
-  {}
+  : characterIndex{0u},
+    numberOfCharacters{0u}
+  {
+  }
+
+  CharacterRun(CharacterIndex characterIndex, Length numberOfCharacters)
+  : characterIndex{characterIndex},
+    numberOfCharacters{numberOfCharacters}
+  {
+  }
 
   CharacterIndex characterIndex;     ///< Index to the first character.
   Length         numberOfCharacters; ///< Number of characters in the run.
index 168c525..3f8f40a 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_CHARACTER_SET_CONVERSION_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief Retrieves the number of bytes of a utf8 character.
  *
@@ -38,7 +35,7 @@ namespace Text
  *
  * @return The number of bytes of the character.
  */
-uint8_t GetUtf8Length( uint8_t utf8LeadByte );
+uint8_t GetUtf8Length(uint8_t utf8LeadByte);
 
 /**
  * @brief Retrieves the number of characters of the text array encoded in UTF8
@@ -48,7 +45,7 @@ uint8_t GetUtf8Length( uint8_t utf8LeadByte );
  *
  * @return The number of characters.
  */
-uint32_t GetNumberOfUtf8Characters( const uint8_t* const utf8, uint32_t length );
+uint32_t GetNumberOfUtf8Characters(const uint8_t* const utf8, uint32_t length);
 
 /**
  * @brief Retrieves the number of bytes needed to encode in UTF8 the given text array encoded in UTF32.
@@ -58,7 +55,7 @@ uint32_t GetNumberOfUtf8Characters( const uint8_t* const utf8, uint32_t length )
  *
  * @return The number of bytes.
  */
-uint32_t GetNumberOfUtf8Bytes( const uint32_t* const utf32, uint32_t numberOfCharacters );
+uint32_t GetNumberOfUtf8Bytes(const uint32_t* const utf32, uint32_t numberOfCharacters);
 
 /**
  * @brief Converts a text array encoded in UTF8 into a text array encoded in UTF32.
@@ -76,7 +73,7 @@ uint32_t GetNumberOfUtf8Bytes( const uint32_t* const utf32, uint32_t numberOfCha
  *
  * @return The number of characters.
  */
-uint32_t Utf8ToUtf32( const uint8_t* const utf8, uint32_t length, uint32_t* utf32 );
+uint32_t Utf8ToUtf32(const uint8_t* const utf8, uint32_t length, uint32_t* utf32);
 
 /**
  * @brief Converts a text array encoded in UTF32 into a text array encoded in UTF8.
@@ -89,7 +86,7 @@ uint32_t Utf8ToUtf32( const uint8_t* const utf8, uint32_t length, uint32_t* utf3
  *
  * @return The number of bytes.
  */
-uint32_t Utf32ToUtf8( const uint32_t* const utf32, uint32_t numberOfCharacters, uint8_t* utf8 );
+uint32_t Utf32ToUtf8(const uint32_t* const utf32, uint32_t numberOfCharacters, uint8_t* utf8);
 
 /**
  * @brief Converts a text array encoded in UTF32 into a text array encoded in UTF8.
@@ -98,7 +95,7 @@ uint32_t Utf32ToUtf8( const uint32_t* const utf32, uint32_t numberOfCharacters,
  * @param[in] numberOfCharacters The number of characters of the UTF32 array.
  * @param[out] utf8 The UTF8 characters will be stored here.
  */
-void Utf32ToUtf8( const uint32_t* const utf32, uint32_t numberOfCharacters, std::string& utf8 );
+void Utf32ToUtf8(const uint32_t* const utf32, uint32_t numberOfCharacters, std::string& utf8);
 
 } // namespace Text
 
index ad5e6db..edae1e2 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_COLOR_RUN_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief Run of characters with the same color.
  */
index cde9997..dbf75d0 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_COLOR_SEGMENTATION_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 class LogicalModel;
 
 /**
@@ -47,14 +44,14 @@ class LogicalModel;
  * @param[out] colors The vector of colors.
  * @param[out] colorIndices Indices to the vector of colors.
  */
-void SetColorSegmentationInfo( const Vector<ColorRun>& colorRuns,
-                               const Vector<GlyphIndex>& charactersToGlyph,
-                               const Vector<Length>& glyphsPerCharacter,
-                               CharacterIndex startCharacterIndex,
-                               GlyphIndex startGlyphIndex,
-                               Length numberOfCharacters,
-                               Vector<Vector4>& colors,
-                               Vector<ColorIndex>& colorIndices );
+void SetColorSegmentationInfo(const Vector<ColorRun>&   colorRuns,
+                              const Vector<GlyphIndex>& charactersToGlyph,
+                              const Vector<Length>&     glyphsPerCharacter,
+                              CharacterIndex            startCharacterIndex,
+                              GlyphIndex                startGlyphIndex,
+                              Length                    numberOfCharacters,
+                              Vector<Vector4>&          colors,
+                              Vector<ColorIndex>&       colorIndices);
 
 } // namespace Text
 
index ad17b31..dc005a3 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_CURSOR_HELPER_FUNCTIONS_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 struct CharacterHitTest
 {
   /**
@@ -49,16 +46,18 @@ struct CursorInfo
   CursorInfo()
   : primaryPosition(),
     secondaryPosition(),
-    lineOffset( 0.f ),
-    glyphOffset( 0.f ),
-    lineHeight( 0.f ),
-    primaryCursorHeight( 0.f ),
-    secondaryCursorHeight( 0.f ),
-    isSecondaryCursor( false )
-  {}
+    lineOffset(0.f),
+    glyphOffset(0.f),
+    lineHeight(0.f),
+    primaryCursorHeight(0.f),
+    secondaryCursorHeight(0.f),
+    isSecondaryCursor(false)
+  {
+  }
 
   ~CursorInfo()
-  {}
+  {
+  }
 
   Vector2 primaryPosition;       ///< The primary cursor's position (in text's coords).
   Vector2 secondaryPosition;     ///< The secondary cursor's position (in text's coords).
@@ -75,11 +74,11 @@ struct CursorInfo
  */
 struct GetCursorPositionParameters
 {
-  VisualModelPtr visualModel;    ///< The visual model.
-  LogicalModelPtr logicalModel;  ///< The logical model.
-  MetricsPtr metrics;            ///< A wrapper around FontClient used to get metrics.
-  CharacterIndex logical;        ///< The logical cursor position (in characters). 0 is just before the first character, a value equal to the number of characters is just after the last character.
-  bool isMultiline;              ///< Whether the text control is multi-line.
+  VisualModelPtr  visualModel;  ///< The visual model.
+  LogicalModelPtr logicalModel; ///< The logical model.
+  MetricsPtr      metrics;      ///< A wrapper around FontClient used to get metrics.
+  CharacterIndex  logical;      ///< The logical cursor position (in characters). 0 is just before the first character, a value equal to the number of characters is just after the last character.
+  bool            isMultiline;  ///< Whether the text control is multi-line.
 };
 
 /**
@@ -93,9 +92,9 @@ struct GetCursorPositionParameters
  *
  * @return A line index.
  */
-LineIndex GetClosestLine( VisualModelPtr visualModel,
-                          float visualY,
-                          bool& matchedLine );
+LineIndex GetClosestLine(VisualModelPtr visualModel,
+                         float          visualY,
+                         bool&          matchedLine);
 
 /**
  * @brief Calculates the vertical line's offset for a given line.
@@ -107,8 +106,8 @@ LineIndex GetClosestLine( VisualModelPtr visualModel,
  *
  * @return The vertical offset of the given line.
  */
-float CalculateLineOffset( const Vector<LineRun>& lines,
-                           LineIndex lineIndex );
+float CalculateLineOffset(const Vector<LineRun>& lines,
+                          LineIndex              lineIndex);
 
 /**
  * @brief Retrieves the cursor's logical position for a given touch point x,y
@@ -128,13 +127,13 @@ float CalculateLineOffset( const Vector<LineRun>& lines,
  *
  * @return The logical cursor position (in characters). 0 is just before the first character, a value equal to the number of characters is just after the last character.
  */
-CharacterIndex GetClosestCursorIndex( VisualModelPtr visualModel,
-                                      LogicalModelPtr logicalModel,
-                                      MetricsPtr metrics,
-                                      float visualX,
-                                      float visualY,
-                                      CharacterHitTest::Mode mode,
-                                      bool& matchedCharacter );
+CharacterIndex GetClosestCursorIndex(VisualModelPtr         visualModel,
+                                     LogicalModelPtr        logicalModel,
+                                     MetricsPtr             metrics,
+                                     float                  visualX,
+                                     float                  visualY,
+                                     CharacterHitTest::Mode mode,
+                                     bool&                  matchedCharacter);
 
 /**
  * @brief Calculates the cursor's position for a given character index in the logical order.
@@ -145,8 +144,8 @@ CharacterIndex GetClosestCursorIndex( VisualModelPtr visualModel,
  * @param[in] parameters Parameters used to calculate the cursor's position.
  * @param[out] cursorInfo The line's height, the cursor's height, the cursor's position and whether there is an alternative cursor.
  */
-void GetCursorPosition( GetCursorPositionParameters& parameters,
-                        CursorInfo& cursorInfo );
+void GetCursorPosition(GetCursorPositionParameters& parameters,
+                       CursorInfo&                  cursorInfo);
 
 /**
  * @brief Find the indices to the first and last characters of a word for the given touch point.
@@ -162,14 +161,14 @@ void GetCursorPosition( GetCursorPositionParameters& parameters,
  *
  * @return @e true if the touch point hits a character.
  */
-bool FindSelectionIndices( VisualModelPtr visualModel,
-                           LogicalModelPtr logicalModel,
-                           MetricsPtr metrics,
-                           float visualX,
-                           float visualY,
-                           CharacterIndex& startIndex,
-                           CharacterIndex& endIndex,
-                           CharacterIndex& noTextHitIndex );
+bool FindSelectionIndices(VisualModelPtr  visualModel,
+                          LogicalModelPtr logicalModel,
+                          MetricsPtr      metrics,
+                          float           visualX,
+                          float           visualY,
+                          CharacterIndex& startIndex,
+                          CharacterIndex& endIndex,
+                          CharacterIndex& noTextHitIndex);
 
 } // namespace Text
 
index 0d0b25b..59b06e1 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_DECORATOR_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/intrusive-ptr.h>
-#include <dali/public-api/object/ref-object.h>
 #include <dali/public-api/math/rect.h>
+#include <dali/public-api/object/ref-object.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/controls/text-controls/text-selection-popup.h>
 
 namespace Dali
 {
-
 struct Vector2;
 struct Vector4;
 
 namespace Toolkit
 {
-
 namespace Text
 {
-
 class Decorator;
 typedef IntrusivePtr<Decorator> DecoratorPtr;
 
@@ -102,34 +99,32 @@ enum HandleType
 class Decorator : public RefObject
 {
 public:
-
   class ControllerInterface
   {
   public:
-
     /**
      * @brief Constructor.
      */
-    ControllerInterface() {};
+    ControllerInterface(){};
 
     /**
      * @brief Virtual destructor.
      */
-    virtual ~ControllerInterface() {};
+    virtual ~ControllerInterface(){};
 
     /**
      * @brief Query the target size of the UI control.
      *
      * @param[out] targetSize The size of the UI control the decorator is adding it's decorations to.
      */
-    virtual void GetTargetSize( Vector2& targetSize ) = 0;
+    virtual void GetTargetSize(Vector2& targetSize) = 0;
 
     /**
      * @brief Add a decoration to the parent UI control.
      *
      * @param[in] decoration The actor displaying a decoration.
      */
-    virtual void AddDecoration( Actor& actor, bool needsClipping ) = 0;
+    virtual void AddDecoration(Actor& actor, bool needsClipping) = 0;
 
     /**
      * @brief An input event from one of the handles.
@@ -139,7 +134,7 @@ public:
      * @param[in] x The x position relative to the top-left of the parent control.
      * @param[in] y The y position relative to the top-left of the parent control.
      */
-    virtual void DecorationEvent( HandleType handleType, HandleState state, float x, float y ) = 0;
+    virtual void DecorationEvent(HandleType handleType, HandleState state, float x, float y) = 0;
   };
 
   /**
@@ -150,8 +145,8 @@ public:
    *
    * @return A pointer to a new Decorator.
    */
-  static DecoratorPtr New( ControllerInterface& controller,
-                           TextSelectionPopupCallbackInterface& callbackInterface );
+  static DecoratorPtr New(ControllerInterface&                 controller,
+                          TextSelectionPopupCallbackInterface& callbackInterface);
 
   /**
    * @brief Set the bounding box which handles, popup and similar decorations will not exceed.
@@ -173,7 +168,7 @@ public:
    *
    * @param[in] boundingBox Vector( x coordinate, y coordinate, width, height )
    */
-  void SetBoundingBox( const Rect<int>& boundingBox );
+  void SetBoundingBox(const Rect<int>& boundingBox);
 
   /**
    * @brief Retrieve the bounding box origin and dimensions.
@@ -181,21 +176,21 @@ public:
    * default is set once control is added to stage, before this the return vector will be Vector4:ZERO
    * @param[out] boundingBox The bounding box origin, width and height.
    */
-  void GetBoundingBox( Rect<int>& boundingBox ) const;
+  void GetBoundingBox(Rect<int>& boundingBox) const;
 
   /**
    * @brief The decorator waits until a relayout before creating actors etc.
    *
    * @param[in] size The size of the parent control after size-negotiation.
    */
-  void Relayout( const Dali::Vector2& size );
+  void Relayout(const Dali::Vector2& size);
 
   /**
    * @brief Updates the decorator's actor positions after scrolling.
    *
    * @param[in] scrollOffset The scroll offset.
    */
-  void UpdatePositions( const Vector2& scrollOffset );
+  void UpdatePositions(const Vector2& scrollOffset);
 
   /**
    * @brief Sets which of the cursors are active.
@@ -203,7 +198,7 @@ public:
    * @note Cursor will only be visible if within the parent area.
    * @param[in] activeCursor Which of the cursors should be active (if any).
    */
-  void SetActiveCursor( ActiveCursor activeCursor );
+  void SetActiveCursor(ActiveCursor activeCursor);
 
   /**
    * @brief Query which of the cursors are active.
@@ -221,7 +216,7 @@ public:
    * @param[in] cursorHeight The logical height of the cursor.
    * @param[in] lineHeight The logical height of the line.
    */
-  void SetPosition( Cursor cursor, float x, float y, float cursorHeight, float lineHeight );
+  void SetPosition(Cursor cursor, float x, float y, float cursorHeight, float lineHeight);
 
   /**
    * @brief Retrieves the position, height and lineHeight of a cursor.
@@ -232,7 +227,7 @@ public:
    * @param[out] cursorHeight The logical height of the cursor.
    * @param[out] lineHeight The logical height of the line.
    */
-  void GetPosition( Cursor cursor, float& x, float& y, float& cursorHeight, float& lineHeight ) const;
+  void GetPosition(Cursor cursor, float& x, float& y, float& cursorHeight, float& lineHeight) const;
 
   /**
    * @brief Retrieves the position of a cursor.
@@ -241,8 +236,7 @@ public:
    *
    * @return The position.
    */
-  const Vector2& GetPosition( Cursor cursor ) const;
-
+  const Vector2& GetPosition(Cursor cursor) const;
 
   /**
    * @brief Sets the glyph offset of a cursor.
@@ -250,7 +244,7 @@ public:
    * @param[in] cursor The cursor to set.
    * @param[in] glyphoffset The difference of line ascender and glyph ascender.
    */
-  void SetGlyphOffset( Cursor cursor, float glyphOffset );
+  void SetGlyphOffset(Cursor cursor, float glyphOffset);
 
   /**
    * @brief Retrieves the glyph offset of a cursor.
@@ -259,7 +253,7 @@ public:
    *
    * @return The glyph offset. glyph offset means difference of line ascender and glyph ascender.
    */
-  const float GetGlyphOffset( Cursor cursor ) const;
+  const float GetGlyphOffset(Cursor cursor) const;
 
   /**
    * @brief Sets the color for a cursor.
@@ -267,7 +261,7 @@ public:
    * @param[in] cursor Whether this color is for the primary or secondary cursor.
    * @param[in] color The color to use.
    */
-  void SetCursorColor( Cursor cursor, const Dali::Vector4& color );
+  void SetCursorColor(Cursor cursor, const Dali::Vector4& color);
 
   /**
    * @brief Retrieves the color for a cursor.
@@ -275,7 +269,7 @@ public:
    * @param[in] cursor Whether this color is for the primary or secondary cursor.
    * @return The cursor color.
    */
-  const Dali::Vector4& GetColor( Cursor cursor ) const;
+  const Dali::Vector4& GetColor(Cursor cursor) const;
 
   /**
    * @brief Start blinking the cursor; see also SetCursorBlinkDuration().
@@ -297,7 +291,7 @@ public:
    *
    * @param[in] seconds The interval in seconds.
    */
-  void SetCursorBlinkInterval( float seconds );
+  void SetCursorBlinkInterval(float seconds);
 
   /**
    * @brief Retrieves the blink-interval for a cursor.
@@ -311,7 +305,7 @@ public:
    *
    * @param[in] seconds The duration in seconds.
    */
-  void SetCursorBlinkDuration( float seconds );
+  void SetCursorBlinkDuration(float seconds);
 
   /**
    * @brief Retrieves the blink-duration for a cursor.
@@ -325,7 +319,7 @@ public:
    *
    * @param[in] width The width of the cursor in pixels.
    */
-  void SetCursorWidth( int width );
+  void SetCursorWidth(int width);
 
   /**
    * @brief Retrieves the width of the cursors.
@@ -340,8 +334,8 @@ public:
    * @param[in] handleType One of the handles.
    * @param[in] active True if the handle should be active.
    */
-  void SetHandleActive( HandleType handleType,
-                        bool active );
+  void SetHandleActive(HandleType handleType,
+                       bool       active);
 
   /**
    * @brief Query whether a handle is active.
@@ -350,7 +344,7 @@ public:
    *
    * @return True if the handle is active.
    */
-  bool IsHandleActive( HandleType handleType ) const;
+  bool IsHandleActive(HandleType handleType) const;
 
   /**
    * @brief Sets the image file name for one of the handles.
@@ -359,7 +353,7 @@ public:
    * @param[in] handleImageType A different image can be set for the pressed/released states.
    * @param[in] imageFileName The image filename to use.
    */
-  void SetHandleImage( HandleType handleType, HandleImageType handleImageType, const std::string& imageFileName );
+  void SetHandleImage(HandleType handleType, HandleImageType handleImageType, const std::string& imageFileName);
 
   /**
    * @brief Retrieves the file name of the image for one of the handles.
@@ -369,14 +363,14 @@ public:
    *
    * @return The grab handle image string.
    */
-  const std::string& GetHandleImage( HandleType handleType, HandleImageType handleImageType ) const;
+  const std::string& GetHandleImage(HandleType handleType, HandleImageType handleImageType) const;
 
   /**
    * @brief Sets the color of the handles
    *
    * @param[in] color The color to use.
    */
-  void SetHandleColor( const Vector4& color );
+  void SetHandleColor(const Vector4& color);
 
   /**
    * @brief Retrieves the handles color.
@@ -393,7 +387,7 @@ public:
    * @param[in] y The y position relative to the top-left of the parent control.
    * @param[in] lineHeight The logical line height at this position.
    */
-  void SetPosition( HandleType handleType, float x, float y, float lineHeight );
+  void SetPosition(HandleType handleType, float x, float y, float lineHeight);
 
   /**
    * @brief Retrieves the position of a selection handle.
@@ -403,7 +397,7 @@ public:
    * @param[out] y The y position relative to the top-left of the parent control.
    * @param[out] lineHeight The logical line height at this position.
    */
-  void GetPosition( HandleType handleType, float& x, float& y, float& lineHeight ) const;
+  void GetPosition(HandleType handleType, float& x, float& y, float& lineHeight) const;
 
   /**
    * @brief Retrieves the position of a selection handle.
@@ -412,7 +406,7 @@ public:
    *
    * @return The position of the selection handle relative to the top-left of the parent control.
    */
-  const Vector2& GetPosition( HandleType handleType ) const;
+  const Vector2& GetPosition(HandleType handleType) const;
 
   /**
    * @brief Whether to flip vertically a handle.
@@ -420,7 +414,7 @@ public:
    * @param[in] handleType The handle to flip vertically.
    * @param[in] flip Whether to flip vertically.
    */
-  void FlipHandleVertically( HandleType handleType, bool flip );
+  void FlipHandleVertically(HandleType handleType, bool flip);
 
   /**
    * @brief Retrieves whether the handle is vertically flipped.
@@ -429,7 +423,7 @@ public:
    *
    * @return @e ture if the handle is vertically flipped.
    */
-  bool IsHandleVerticallyFlipped( HandleType handleType ) const;
+  bool IsHandleVerticallyFlipped(HandleType handleType) const;
 
   /**
    * @brief Whether to flip the selection handles as soon as they are crossed.
@@ -438,7 +432,7 @@ public:
    *
    * @param[in] enable If @e true the selection handles will flip as soon as they are crossed.
    */
-  void FlipSelectionHandlesOnCrossEnabled( bool enable );
+  void FlipSelectionHandlesOnCrossEnabled(bool enable);
 
   /**
    * @brief Sets info to calculate the handle flip state.
@@ -450,7 +444,7 @@ public:
    * @param[in] left The direction of the character pointed by the primary selection handle.
    * @param[in] right The direction of the character pointed by the secondary selection handle.
    */
-  void SetSelectionHandleFlipState( bool indicesSwapped, bool left, bool right );
+  void SetSelectionHandleFlipState(bool indicesSwapped, bool left, bool right);
 
   /**
    * @brief Adds a quad to the existing selection highlights. Vertices are in decorator's coordinates.
@@ -458,7 +452,7 @@ public:
    * @param[in] index Position in the vector where to add the quad.
    * @param[in] quad The quad. The 'x' and 'y' coordinates store the min 'x' and min 'y'. The 'z' and 'w' coordinates store the max 'x' and max 'y'.
    */
-  void AddHighlight( unsigned int index, const Vector4& quad );
+  void AddHighlight(unsigned int index, const Vector4& quad);
 
   /**
    * @brief Sets the min 'x,y' coordinates and the size of the highlighted box.
@@ -470,9 +464,9 @@ public:
    * @param[in] size The size of the highlighted text.
    * @param[in] outlineOffset The outline's offset.
    */
-  void SetHighLightBox( const Vector2& position,
-                        const Size& size,
-                        float outlineOffset );
+  void SetHighLightBox(const Vector2& position,
+                       const Size&    size,
+                       float          outlineOffset);
 
   /**
    * @brief Removes all of the previously added highlights.
@@ -484,14 +478,14 @@ public:
    *
    * @param[in] numberOfQuads The expected number of quads.
    */
-  void ResizeHighlightQuads( unsigned int numberOfQuads );
+  void ResizeHighlightQuads(unsigned int numberOfQuads);
 
   /**
    * @brief Sets the selection highlight color.
    *
    * @param[in] color The color to use.
    */
-  void SetHighlightColor( const Vector4& color );
+  void SetHighlightColor(const Vector4& color);
 
   /**
    * @brief Retrieves the selection highlight color.
@@ -505,7 +499,7 @@ public:
    *
    * @param[in] active Whether the highlight is active.
    */
-  void SetHighlightActive( bool active );
+  void SetHighlightActive(bool active);
 
   /**
    * @brief Retrieves whether the highlight is active.
@@ -526,13 +520,13 @@ public:
    *
    * @param[in] depth The text's depth.
    */
-  void SetTextDepth( int textDepth );
+  void SetTextDepth(int textDepth);
 
   /**
    * @brief Set the Selection Popup to show or hide via the active flaf
    * @param[in] active true to show, false to hide
    */
-  void SetPopupActive( bool active );
+  void SetPopupActive(bool active);
 
   /**
    * @brief Query whether the Selection Popup is active.
@@ -545,7 +539,7 @@ public:
    * @brief Set a bit mask of the buttons to be shown by Popup
    * @param[in] enabledButtonsBitMask from TextSelectionPopup::Buttons enum
    */
-  void SetEnabledPopupButtons( TextSelectionPopup::Buttons& enabledButtonsBitMask );
+  void SetEnabledPopupButtons(TextSelectionPopup::Buttons& enabledButtonsBitMask);
 
   /**
    * @brief Get the current bit mask of buttons to be shown by Popup
@@ -561,7 +555,7 @@ public:
    *
    * @param[in] threshold The scroll threshold in pixels.
    */
-  void SetScrollThreshold( float threshold );
+  void SetScrollThreshold(float threshold);
 
   /**
    * @brief Retrieves the scroll threshold.
@@ -577,16 +571,16 @@ public:
    *
    * @param[in] speed The scroll speed in pixels/second.
    */
-  void SetScrollSpeed( float speed );
+  void SetScrollSpeed(float speed);
 
- /**
 /**
    * @brief Sets Editable mode decoration.
    *
    * If this set to false, Primary cursor and grab will always be hidden.
    *
    * @param[in] isEditable enable or disable Editing.
    */
-  void SetEditable( bool isEditable );
+  void SetEditable(bool isEditable);
 
   /**
    * @brief Retrieves the scroll speed.
@@ -603,7 +597,7 @@ public:
   /**
    * @copydoc Text::Controller::SetHorizontalScrollEnabled()
    */
-  void SetHorizontalScrollEnabled( bool enable );
+  void SetHorizontalScrollEnabled(bool enable);
 
   /**
    * @copydoc Text::Controller::IsHorizontalScrollEnabled()
@@ -613,7 +607,7 @@ public:
   /**
    * @copydoc Text::Controller::SetVerticalScrollEnabled()
    */
-  void SetVerticalScrollEnabled( bool enable );
+  void SetVerticalScrollEnabled(bool enable);
 
   /**
    * @copydoc Text::Controller::IsVerticalScrollEnabled()
@@ -623,7 +617,7 @@ public:
   /**
    * @copydoc Text::Controller::SetSmoothHandlePanEnabled()
    */
-  void SetSmoothHandlePanEnabled( bool enable );
+  void SetSmoothHandlePanEnabled(bool enable);
 
   /**
    * @copydoc Text::Controller::IsSmoothHandlePanEnabled()
@@ -631,30 +625,27 @@ public:
   bool IsSmoothHandlePanEnabled() const;
 
 protected:
-
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
    */
   virtual ~Decorator();
 
 private:
-
   /**
    * @brief Private constructor.
    * @param[in] controller The controller which receives input events from Decorator components.
    * @param[in] callbackInterface The text popup callback interface which receives the button click callbacks.
    */
-  Decorator( ControllerInterface& controller,
-             TextSelectionPopupCallbackInterface& callbackInterface );
+  Decorator(ControllerInterface&                 controller,
+            TextSelectionPopupCallbackInterface& callbackInterface);
 
   // Undefined
-  Decorator( const Decorator& handle );
+  Decorator(const Decorator& handle);
 
   // Undefined
-  Decorator& operator=( const Decorator& handle );
+  Decorator& operator=(const Decorator& handle);
 
 private:
-
   struct Impl;
   Impl* mImpl;
 };
old mode 100755 (executable)
new mode 100644 (file)
index 496c207..e590fa4
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_EMBEDDED_ITEM_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief An embedded item within the text.
  *
index b14ab1d..04a5e91 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_FONT_DESCRIPTION_RUN_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief Run of characters with the same font.
  */
@@ -44,44 +41,46 @@ struct FontDescriptionRun
    */
   FontDescriptionRun()
   : characterRun{},
-    familyName{ nullptr },
-    familyLength{ 0u },
-    weight{ FontWeight::NONE },
-    width{ FontWidth::NONE },
-    slant{ FontSlant::NONE },
-    size{ 0u },
-    familyDefined{ false },
-    weightDefined{ false },
-    widthDefined{ false },
-    slantDefined{ false },
-    sizeDefined{ false }
-  {}
+    familyName{nullptr},
+    familyLength{0u},
+    weight{FontWeight::NONE},
+    width{FontWidth::NONE},
+    slant{FontSlant::NONE},
+    size{0u},
+    familyDefined{false},
+    weightDefined{false},
+    widthDefined{false},
+    slantDefined{false},
+    sizeDefined{false}
+  {
+  }
 
-  FontDescriptionRun( const CharacterRun& characterRun,
-                      char* familyName,
-                      Length familyLength,
-                      FontWeight weight,
-                      FontWidth width,
-                      FontSlant slant,
-                      PointSize26Dot6 size,
-                      bool familyDefined,
-                      bool weightDefined,
-                      bool widthDefined,
-                      bool slantDefined,
-                      bool sizeDefined )
-  : characterRun{ characterRun },
-    familyName{ familyName },
-    familyLength{ familyLength },
-    weight{ weight },
-    width{ width },
-    slant{ slant },
-    size{ size },
-    familyDefined{ familyDefined },
-    weightDefined{ weightDefined },
-    widthDefined{ widthDefined },
-    slantDefined{ slantDefined },
-    sizeDefined{ sizeDefined }
-  {}
+  FontDescriptionRun(const CharacterRun& characterRun,
+                     char*               familyName,
+                     Length              familyLength,
+                     FontWeight          weight,
+                     FontWidth           width,
+                     FontSlant           slant,
+                     PointSize26Dot6     size,
+                     bool                familyDefined,
+                     bool                weightDefined,
+                     bool                widthDefined,
+                     bool                slantDefined,
+                     bool                sizeDefined)
+  : characterRun{characterRun},
+    familyName{familyName},
+    familyLength{familyLength},
+    weight{weight},
+    width{width},
+    slant{slant},
+    size{size},
+    familyDefined{familyDefined},
+    weightDefined{weightDefined},
+    widthDefined{widthDefined},
+    slantDefined{slantDefined},
+    sizeDefined{sizeDefined}
+  {
+  }
 
   CharacterRun    characterRun; ///< The initial character index and the number of characters of the run.
   char*           familyName;   ///< The font's family name.
@@ -91,11 +90,11 @@ struct FontDescriptionRun
   FontSlant       slant;        ///< The font's slant.
   PointSize26Dot6 size;         ///< The font's size.
 
-  bool familyDefined : 1;       ///< Whether the font's family is defined.
-  bool weightDefined : 1;       ///< Whether the font's weight is defined.
-  bool widthDefined  : 1;       ///< Whether the font's width is defined.
-  bool slantDefined  : 1;       ///< Whether the font's slant is defined.
-  bool sizeDefined   : 1;       ///< Whether the font's size is defined.
+  bool familyDefined : 1; ///< Whether the font's family is defined.
+  bool weightDefined : 1; ///< Whether the font's weight is defined.
+  bool widthDefined : 1;  ///< Whether the font's width is defined.
+  bool slantDefined : 1;  ///< Whether the font's slant is defined.
+  bool sizeDefined : 1;   ///< Whether the font's size is defined.
 };
 
 } // namespace Text
index 8190fcd..ebfe51a 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_FONT_RUN_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief Run of characters with the same font.
  */
 struct FontRun
 {
-  CharacterRun characterRun;       ///< The initial character index and the number of characters of the run.
-  FontId       fontId;             ///< Font id of the run.
-  bool         isItalicRequired:1; ///< Whether the italic style is required.
-  bool         isBoldRequired:1;   ///< Whether the bold style is required.
+  CharacterRun characterRun;         ///< The initial character index and the number of characters of the run.
+  FontId       fontId;               ///< Font id of the run.
+  bool         isItalicRequired : 1; ///< Whether the italic style is required.
+  bool         isBoldRequired : 1;   ///< Whether the bold style is required.
 };
 
 } // namespace Text
index 6856d27..05ba882 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_GLYPH_METRICS_HELPER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief Some characters can be shaped in more than one glyph.
  * This struct is used to retrieve metrics from these group of glyphs.
@@ -37,16 +34,18 @@ namespace Text
 struct GlyphMetrics
 {
   GlyphMetrics()
-  : fontId( 0u ),
-    fontHeight( 0.f ),
-    width( 0.f ),
-    advance( 0.f ),
-    ascender( 0.f ),
-    xBearing( 0.f )
-  {}
+  : fontId(0u),
+    fontHeight(0.f),
+    width(0.f),
+    advance(0.f),
+    ascender(0.f),
+    xBearing(0.f)
+  {
+  }
 
   ~GlyphMetrics()
-  {}
+  {
+  }
 
   FontId fontId;     ///< The font id of the glyphs.
   float  fontHeight; ///< The font's height of those glyphs.
@@ -65,9 +64,9 @@ struct GlyphMetrics
  *
  * @return The number of glyphs of the group.
  */
-Length GetNumberOfGlyphsOfGroup( GlyphIndex glyphIndex,
-                                 GlyphIndex lastGlyphPlusOne,
-                                 const Length* const charactersPerGlyphBuffer );
+Length GetNumberOfGlyphsOfGroup(GlyphIndex          glyphIndex,
+                                GlyphIndex          lastGlyphPlusOne,
+                                const Length* const charactersPerGlyphBuffer);
 
 /**
  * @brief Get some glyph's metrics of a group of glyphs formed as a result of shaping one character.
@@ -78,11 +77,11 @@ Length GetNumberOfGlyphsOfGroup( GlyphIndex glyphIndex,
  * @param[in] glyphsBuffer The glyphs buffer.
  * @param[in] metrics Used to access metrics from FontClient.
  */
-void GetGlyphsMetrics( GlyphIndex glyphIndex,
-                       Length numberOfGlyphs,
-                       GlyphMetrics& glyphMetrics,
-                       const GlyphInfo* const glyphsBuffer,
-                       MetricsPtr& metrics );
+void GetGlyphsMetrics(GlyphIndex             glyphIndex,
+                      Length                 numberOfGlyphs,
+                      GlyphMetrics&          glyphMetrics,
+                      const GlyphInfo* const glyphsBuffer,
+                      MetricsPtr&            metrics);
 
 } // namespace Text
 
index 9524f01..5328af1 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_GLYPH_RUN_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief A run of consecutive glyphs.
  */
index 2480a4e..70d4a82 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_HIDDEN_TEXT_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/object/property-map.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/controls/text-controls/hidden-input-properties.h>
 #include <dali-toolkit/internal/text/text-definitions.h>
+#include <dali-toolkit/public-api/controls/text-controls/hidden-input-properties.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * Class to handle the hidden text
  */
@@ -44,7 +41,6 @@ public:
   class Observer
   {
   public:
-
     /**
      * @brief Invoked when the time to show last character is expired
      */
@@ -55,28 +51,27 @@ public:
    * @brief Constructor
    * @param[in] observer The Observer pointer.
    */
-  HiddenText( Observer* observer );
+  HiddenText(Observer* observer);
 
 public: // Intended for internal use
-
   /**
    * @brief Used to set options of hidden text
    * @param[in] map The property map describing the option
    */
-  void SetProperties( const Property::Map& map );
+  void SetProperties(const Property::Map& map);
 
   /**
    * @brief Retrieve property map of hidden text options
    * @param[out] map The hidden text option
    */
-  void GetProperties( Property::Map& map );
+  void GetProperties(Property::Map& map);
 
   /**
    * @brief Convert source text to destination text according to current option
    * @param[in] source The original text
    * @param[out] destination The applied text
    */
-  void Substitute( const Vector<Character>& source, Vector<Character>& destination );
+  void Substitute(const Vector<Character>& source, Vector<Character>& destination);
 
   /**
    * @brief Invoked when the timer is expired
@@ -84,14 +79,13 @@ public: // Intended for internal use
   bool OnTick();
 
 private:
-
-  Timer mTimer;
+  Timer     mTimer;
   Observer* mObserver;
-  int mHideMode;
-  int mSubstituteText;
-  int mDisplayDuration;
-  int mSubstituteCount;
-  Length mPreviousTextCount;
+  int       mHideMode;
+  int       mSubstituteText;
+  int       mDisplayDuration;
+  int       mSubstituteCount;
+  Length    mPreviousTextCount;
 };
 
 } // namespace Text
index 0a10d90..de3a1f2 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_INPUT_STYLE_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * The input text's style.
  */
@@ -55,71 +52,71 @@ struct InputStyle
   };
 
   InputStyle()
-  : textColor( Color::BLACK ),
+  : textColor(Color::BLACK),
     familyName(),
-    weight( TextAbstraction::FontWeight::NORMAL ),
-    width( TextAbstraction::FontWidth::NORMAL ),
-    slant( TextAbstraction::FontSlant::NORMAL ),
-    size( 0.f ),
-    lineSpacing( 0.f ),
+    weight(TextAbstraction::FontWeight::NORMAL),
+    width(TextAbstraction::FontWidth::NORMAL),
+    slant(TextAbstraction::FontSlant::NORMAL),
+    size(0.f),
+    lineSpacing(0.f),
     underlineProperties(),
     shadowProperties(),
     embossProperties(),
     outlineProperties(),
-    isDefaultColor( true ),
-    isFamilyDefined( false ),
-    isWeightDefined( false ),
-    isWidthDefined( false ),
-    isSlantDefined( false ),
-    isSizeDefined( false ),
-    isLineSpacingDefined( false ),
-    isUnderlineDefined( false ),
-    isShadowDefined( false ),
-    isEmbossDefined( false ),
-    isOutlineDefined( false )
-    {}
-
-  ~InputStyle()
-  {};
+    isDefaultColor(true),
+    isFamilyDefined(false),
+    isWeightDefined(false),
+    isWidthDefined(false),
+    isSlantDefined(false),
+    isSizeDefined(false),
+    isLineSpacingDefined(false),
+    isUnderlineDefined(false),
+    isShadowDefined(false),
+    isEmbossDefined(false),
+    isOutlineDefined(false)
+  {
+  }
+
+  ~InputStyle(){};
 
   /**
    * @brief
    *
    * Does not copy the font-style, underline, shadow, emboss and outline property strings.
    */
-  void Copy( const InputStyle& inputStyle )
+  void Copy(const InputStyle& inputStyle)
   {
     isDefaultColor = inputStyle.isDefaultColor;
-    textColor = inputStyle.textColor;
+    textColor      = inputStyle.textColor;
 
     isFamilyDefined = inputStyle.isFamilyDefined;
-    familyName = inputStyle.familyName;
+    familyName      = inputStyle.familyName;
 
     isWeightDefined = inputStyle.isWeightDefined;
-    weight = inputStyle.weight;
+    weight          = inputStyle.weight;
 
     isWidthDefined = inputStyle.isWidthDefined;
-    width = inputStyle.width;
+    width          = inputStyle.width;
 
     isSlantDefined = inputStyle.isSlantDefined;
-    slant = inputStyle.slant;
+    slant          = inputStyle.slant;
 
     isSizeDefined = inputStyle.isSizeDefined;
-    size = inputStyle.size;
+    size          = inputStyle.size;
 
     isLineSpacingDefined = inputStyle.isLineSpacingDefined;
-    lineSpacing = inputStyle.lineSpacing;
+    lineSpacing          = inputStyle.lineSpacing;
 
-    isUnderlineDefined = inputStyle.isUnderlineDefined;
+    isUnderlineDefined  = inputStyle.isUnderlineDefined;
     underlineProperties = inputStyle.underlineProperties;
 
-    isShadowDefined = inputStyle.isShadowDefined;
+    isShadowDefined  = inputStyle.isShadowDefined;
     shadowProperties = inputStyle.shadowProperties;
 
-    isEmbossDefined = inputStyle.isEmbossDefined;
+    isEmbossDefined  = inputStyle.isEmbossDefined;
     embossProperties = inputStyle.embossProperties;
 
-    isOutlineDefined = inputStyle.isOutlineDefined;
+    isOutlineDefined  = inputStyle.isOutlineDefined;
     outlineProperties = inputStyle.outlineProperties;
   }
 
@@ -128,30 +125,30 @@ struct InputStyle
    *
    * Does not compare the font-style, underline, shadow, emboss and outline property strings.
    */
-  bool Equal( const InputStyle& inputStyle ) const
+  bool Equal(const InputStyle& inputStyle) const
   {
-    if( ( isDefaultColor != inputStyle.isDefaultColor )             ||
-        ( isFamilyDefined != inputStyle.isFamilyDefined )           ||
-        ( isWeightDefined != inputStyle.isWeightDefined )           ||
-        ( isWidthDefined != inputStyle.isWidthDefined )             ||
-        ( isSlantDefined != inputStyle.isSlantDefined )             ||
-        ( isSizeDefined != inputStyle.isSizeDefined )               ||
-        ( isLineSpacingDefined != inputStyle.isLineSpacingDefined ) ||
-        ( isUnderlineDefined != inputStyle.isUnderlineDefined )     ||
-        ( isShadowDefined != inputStyle.isShadowDefined )           ||
-        ( isEmbossDefined != inputStyle.isEmbossDefined )           ||
-        ( isOutlineDefined != inputStyle.isOutlineDefined )         ||
-        ( textColor != inputStyle.textColor )                       ||
-        ( familyName != inputStyle.familyName )                     ||
-        ( weight != inputStyle.weight )                             ||
-        ( width != inputStyle.width )                               ||
-        ( slant != inputStyle.slant )                               ||
-        ( size != inputStyle.size )                                 ||
-        ( lineSpacing != inputStyle.lineSpacing )                   ||
-        ( underlineProperties != inputStyle.underlineProperties )   ||
-        ( shadowProperties != inputStyle.shadowProperties )         ||
-        ( embossProperties != inputStyle.embossProperties )         ||
-        ( outlineProperties != inputStyle.outlineProperties ) )
+    if((isDefaultColor != inputStyle.isDefaultColor) ||
+       (isFamilyDefined != inputStyle.isFamilyDefined) ||
+       (isWeightDefined != inputStyle.isWeightDefined) ||
+       (isWidthDefined != inputStyle.isWidthDefined) ||
+       (isSlantDefined != inputStyle.isSlantDefined) ||
+       (isSizeDefined != inputStyle.isSizeDefined) ||
+       (isLineSpacingDefined != inputStyle.isLineSpacingDefined) ||
+       (isUnderlineDefined != inputStyle.isUnderlineDefined) ||
+       (isShadowDefined != inputStyle.isShadowDefined) ||
+       (isEmbossDefined != inputStyle.isEmbossDefined) ||
+       (isOutlineDefined != inputStyle.isOutlineDefined) ||
+       (textColor != inputStyle.textColor) ||
+       (familyName != inputStyle.familyName) ||
+       (weight != inputStyle.weight) ||
+       (width != inputStyle.width) ||
+       (slant != inputStyle.slant) ||
+       (size != inputStyle.size) ||
+       (lineSpacing != inputStyle.lineSpacing) ||
+       (underlineProperties != inputStyle.underlineProperties) ||
+       (shadowProperties != inputStyle.shadowProperties) ||
+       (embossProperties != inputStyle.embossProperties) ||
+       (outlineProperties != inputStyle.outlineProperties))
     {
       return false;
     }
@@ -159,84 +156,84 @@ struct InputStyle
     return true;
   }
 
-  Mask GetInputStyleChangeMask( const InputStyle& inputStyle ) const
+  Mask GetInputStyleChangeMask(const InputStyle& inputStyle) const
   {
     Mask mask = NONE;
 
-    if( textColor != inputStyle.textColor )
+    if(textColor != inputStyle.textColor)
     {
-      mask = static_cast<Mask>( mask | INPUT_COLOR );
+      mask = static_cast<Mask>(mask | INPUT_COLOR);
     }
-    if( familyName != inputStyle.familyName )
+    if(familyName != inputStyle.familyName)
     {
-      mask = static_cast<Mask>( mask | INPUT_FONT_FAMILY );
+      mask = static_cast<Mask>(mask | INPUT_FONT_FAMILY);
     }
-    if( weight != inputStyle.weight )
+    if(weight != inputStyle.weight)
     {
-      mask = static_cast<Mask>( mask | INPUT_FONT_WEIGHT );
+      mask = static_cast<Mask>(mask | INPUT_FONT_WEIGHT);
     }
-    if( width != inputStyle.width )
+    if(width != inputStyle.width)
     {
-      mask = static_cast<Mask>( mask | INPUT_FONT_WIDTH );
+      mask = static_cast<Mask>(mask | INPUT_FONT_WIDTH);
     }
-    if( slant != inputStyle.slant )
+    if(slant != inputStyle.slant)
     {
-      mask = static_cast<Mask>( mask | INPUT_FONT_SLANT );
+      mask = static_cast<Mask>(mask | INPUT_FONT_SLANT);
     }
-    if( size != inputStyle.size )
+    if(size != inputStyle.size)
     {
-      mask = static_cast<Mask>( mask | INPUT_POINT_SIZE );
+      mask = static_cast<Mask>(mask | INPUT_POINT_SIZE);
     }
-    if( lineSpacing != inputStyle.lineSpacing )
+    if(lineSpacing != inputStyle.lineSpacing)
     {
-      mask = static_cast<Mask>( mask | INPUT_LINE_SPACING );
+      mask = static_cast<Mask>(mask | INPUT_LINE_SPACING);
     }
-    if( underlineProperties != inputStyle.underlineProperties )
+    if(underlineProperties != inputStyle.underlineProperties)
     {
-      mask = static_cast<Mask>( mask | INPUT_UNDERLINE );
+      mask = static_cast<Mask>(mask | INPUT_UNDERLINE);
     }
-    if( shadowProperties != inputStyle.shadowProperties )
+    if(shadowProperties != inputStyle.shadowProperties)
     {
-      mask = static_cast<Mask>( mask | INPUT_SHADOW );
+      mask = static_cast<Mask>(mask | INPUT_SHADOW);
     }
-    if( embossProperties != inputStyle.embossProperties )
+    if(embossProperties != inputStyle.embossProperties)
     {
-      mask = static_cast<Mask>( mask | INPUT_EMBOSS );
+      mask = static_cast<Mask>(mask | INPUT_EMBOSS);
     }
-    if( outlineProperties != inputStyle.outlineProperties )
+    if(outlineProperties != inputStyle.outlineProperties)
     {
-      mask = static_cast<Mask>( mask | INPUT_OUTLINE );
+      mask = static_cast<Mask>(mask | INPUT_OUTLINE);
     }
 
     return mask;
   }
 
-  Vector4     textColor;           ///< The text's color.
-  std::string familyName;          ///< The font's family name.
-  FontWeight  weight;              ///< The font's weight.
-  FontWidth   width;               ///< The font's width.
-  FontSlant   slant;               ///< The font's slant.
-  float       size;                ///< The font's size.
+  Vector4     textColor;  ///< The text's color.
+  std::string familyName; ///< The font's family name.
+  FontWeight  weight;     ///< The font's weight.
+  FontWidth   width;      ///< The font's width.
+  FontSlant   slant;      ///< The font's slant.
+  float       size;       ///< The font's size.
 
-  float       lineSpacing;         ///< The line's spacing.
+  float lineSpacing; ///< The line's spacing.
 
   std::string underlineProperties; ///< The underline properties string.
   std::string shadowProperties;    ///< The shadow properties string.
   std::string embossProperties;    ///< The emboss properties string.
   std::string outlineProperties;   ///< The outline properties string.
 
-  bool        isDefaultColor       : 1; ///< Whether the text's color is the default.
-  bool        isFamilyDefined      : 1; ///< Whether the font's family is defined.
-  bool        isWeightDefined      : 1; ///< Whether the font's weight is defined.
-  bool        isWidthDefined       : 1; ///< Whether the font's width is defined.
-  bool        isSlantDefined       : 1; ///< Whether the font's slant is defined.
-  bool        isSizeDefined        : 1; ///< Whether the font's size is defined.
-
-  bool        isLineSpacingDefined : 1; ///< Whether the line spacing is defined.
-  bool        isUnderlineDefined   : 1; ///< Whether the underline parameters are defined.
-  bool        isShadowDefined      : 1; ///< Whether the shadow parameters are defined.
-  bool        isEmbossDefined      : 1; ///< Whether the emboss parameters are defined.
-  bool        isOutlineDefined     : 1; ///< Whether the outline parameters are defined.
+  bool isDefaultColor : 1;  ///< Whether the text's color is the default.
+  bool isFamilyDefined : 1; ///< Whether the font's family is defined.
+  bool isWeightDefined : 1; ///< Whether the font's weight is defined.
+  bool isWidthDefined : 1;  ///< Whether the font's width is defined.
+  bool isSlantDefined : 1;  ///< Whether the font's slant is defined.
+  bool isSizeDefined : 1;   ///< Whether the font's size is defined.
+
+  bool isLineSpacingDefined : 1; ///< Whether the line spacing is defined.
+  bool isUnderlineDefined : 1;   ///< Whether the underline parameters are defined.
+  bool isShadowDefined : 1;      ///< Whether the shadow parameters are defined.
+  bool isEmbossDefined : 1;      ///< Whether the emboss parameters are defined.
+  bool isOutlineDefined : 1;     ///< Whether the outline parameters are defined.
 };
 
 } // namespace Text
old mode 100755 (executable)
new mode 100644 (file)
index 5641c47..28e987c
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_LAYOUT_ENGINE_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDE
+#include <dali/public-api/actors/actor-enumerations.h>
 #include <dali/public-api/common/dali-vector.h>
 #include <dali/public-api/math/vector2.h>
-#include <dali/public-api/actors/actor-enumerations.h>
 
 // INTERNAL INCLUDE
-#include <dali-toolkit/public-api/text/text-enumerations.h>
 #include <dali-toolkit/internal/text/line-run.h>
 #include <dali-toolkit/internal/text/metrics.h>
+#include <dali-toolkit/public-api/text/text-enumerations.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 namespace Layout
 {
-
 struct Parameters;
 
 /**
@@ -48,7 +44,6 @@ struct Parameters;
 class Engine
 {
 public:
-
   enum Type
   {
     SINGLE_LINE_BOX,
@@ -70,14 +65,14 @@ public:
    *
    * @param[in] metrics Used to get metrics
    */
-  void SetMetrics( MetricsPtr& metrics );
+  void SetMetrics(MetricsPtr& metrics);
 
   /**
    * @brief Choose the required layout.
    *
    * @param[in] layout The required layout.
    */
-  void SetLayout( Type layout );
+  void SetLayout(Type layout);
 
   /**
    * @brief Query the required layout.
@@ -91,7 +86,7 @@ public:
    *
    * @param[in] width The width of the cursor in pixels.
    */
-  void SetCursorWidth( int width );
+  void SetCursorWidth(int width);
 
   /**
    * @brief Retrieves the width of the cursor.
@@ -112,10 +107,10 @@ public:
    *
    * @return \e true if the text has been re-laid-out. \e false means the given width is too small to layout even a single character.
    */
-  bool LayoutText( Parameters& layoutParameters,
-                   Size& layoutSize,
-                   bool elideTextEnabled,
-                   bool& isAutoScrollEnabled );
+  bool LayoutText(Parameters& layoutParameters,
+                  Size&       layoutSize,
+                  bool        elideTextEnabled,
+                  bool&       isAutoScrollEnabled);
 
   /**
    * @brief Aligns the laid out lines.
@@ -129,21 +124,21 @@ public:
    * @param[in] layoutDirection The direction of the system language.
    * @param[in] matchSystemLanguageDirection Whether match align for system language direction or not.
    */
-  void Align( const Size& size,
-              CharacterIndex startIndex,
-              Length numberOfCharacters,
-              Text::HorizontalAlignment::Type horizontalAlignment,
-              Vector<LineRun>& lines,
-              float& alignmentOffset,
-              Dali::LayoutDirection::Type layoutDirection,
-              bool matchSystemLanguageDirection );
+  void Align(const Size&                     size,
+             CharacterIndex                  startIndex,
+             Length                          numberOfCharacters,
+             Text::HorizontalAlignment::Type horizontalAlignment,
+             Vector<LineRun>&                lines,
+             float&                          alignmentOffset,
+             Dali::LayoutDirection::Type     layoutDirection,
+             bool                            matchSystemLanguageDirection);
 
   /**
    * @brief Sets the default line spacing.
    *
    * @param[in] lineSpacing The line spacing.
    */
-  void SetDefaultLineSpacing( float lineSpacing );
+  void SetDefaultLineSpacing(float lineSpacing);
 
   /**
    * @brief Retrieves the default line spacing.
@@ -157,7 +152,7 @@ public:
    *
    * @param[in] lineSize The line size.
    */
-  void SetDefaultLineSize( float lineSize );
+  void SetDefaultLineSize(float lineSize);
 
   /**
    * @brief Retrieves the default line size.
@@ -167,15 +162,13 @@ public:
   float GetDefaultLineSize() const;
 
 private:
-
   // Undefined
-  Engine( const Engine& handle );
+  Engine(const Engine& handle);
 
   // Undefined
-  Engine& operator=( const Engine& handle );
+  Engine& operator=(const Engine& handle);
 
 private:
-
   struct Impl;
   Impl* mImpl;
 };
old mode 100755 (executable)
new mode 100644 (file)
index b3aeaad..f8a62b3
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_LAYOUT_PARAMETERS_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/math/vector2.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/text/text-enumerations.h>
 #include <dali-toolkit/internal/text/text-definitions.h>
 #include <dali-toolkit/internal/text/text-model.h>
+#include <dali-toolkit/public-api/text/text-enumerations.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 struct BidirectionalLineInfoRun;
 
 namespace Layout
 {
-
 /**
  * @brief Struct used to pass parameters.
  */
@@ -51,30 +47,31 @@ struct Parameters
    * @param[in] boundingBox The size of the box containing the text.
    * @param[in,out] textModel The text's model.
    */
-  Parameters( const Vector2& boundingBox,
-              ModelPtr textModel )
-  : boundingBox{ boundingBox },
-    textModel{ textModel },
-    lineBidirectionalInfoRunsBuffer{ nullptr },
-    numberOfBidirectionalInfoRuns{ 0u },
-    startGlyphIndex{ 0u },
-    numberOfGlyphs{ 0u },
-    startLineIndex{ 0u },
-    estimatedNumberOfLines{ 0u },
-    interGlyphExtraAdvance{ 0.f },
-    isLastNewParagraph{ false }
-  {}
+  Parameters(const Vector2& boundingBox,
+             ModelPtr       textModel)
+  : boundingBox{boundingBox},
+    textModel{textModel},
+    lineBidirectionalInfoRunsBuffer{nullptr},
+    numberOfBidirectionalInfoRuns{0u},
+    startGlyphIndex{0u},
+    numberOfGlyphs{0u},
+    startLineIndex{0u},
+    estimatedNumberOfLines{0u},
+    interGlyphExtraAdvance{0.f},
+    isLastNewParagraph{false}
+  {
+  }
 
-  Vector2                         boundingBox;                     ///< The size of the box containing the text.
-  ModelPtr textModel;
-  BidirectionalLineInfoRun*       lineBidirectionalInfoRunsBuffer; ///< Bidirectional conversion tables per line.
-  Length                          numberOfBidirectionalInfoRuns;   ///< The number of lines with bidirectional info.
-  GlyphIndex                      startGlyphIndex;                 ///< Index to the first glyph to layout.
-  Length                          numberOfGlyphs;                  ///< The number of glyphs to layout.
-  LineIndex                       startLineIndex;                  ///< The line index where to insert the new lines.
-  Length                          estimatedNumberOfLines;          ///< The estimated number of lines.
-  float                           interGlyphExtraAdvance;          ///< Extra advance added to each glyph.
-  bool                            isLastNewParagraph:1;            ///< Whether the last character is a new paragraph character.
+  Vector2                   boundingBox; ///< The size of the box containing the text.
+  ModelPtr                  textModel;
+  BidirectionalLineInfoRun* lineBidirectionalInfoRunsBuffer; ///< Bidirectional conversion tables per line.
+  Length                    numberOfBidirectionalInfoRuns;   ///< The number of lines with bidirectional info.
+  GlyphIndex                startGlyphIndex;                 ///< Index to the first glyph to layout.
+  Length                    numberOfGlyphs;                  ///< The number of glyphs to layout.
+  LineIndex                 startLineIndex;                  ///< The line index where to insert the new lines.
+  Length                    estimatedNumberOfLines;          ///< The estimated number of lines.
+  float                     interGlyphExtraAdvance;          ///< Extra advance added to each glyph.
+  bool                      isLastNewParagraph : 1;          ///< Whether the last character is a new paragraph character.
 };
 
 } // namespace Layout
index 84fde1c..f4d13e0 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_LINE_RUN_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief LineRun
  */
@@ -45,7 +42,7 @@ struct LineRun
   float              alignmentOffset; ///< The horizontal alignment offset.
   float              lineSpacing;     ///< The line's spacing
   CharacterDirection direction : 1;   ///< Direction of the first character of the paragraph.
-  bool               ellipsis  : 1;   ///< Wheter ellipsis is added to the line.
+  bool               ellipsis : 1;    ///< Wheter ellipsis is added to the line.
 };
 
 } // namespace Text
old mode 100755 (executable)
new mode 100644 (file)
index 3c01dc6..4702c38
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_LOGICAL_MODEL_IMPL_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali-toolkit/internal/text/bidirectional-paragraph-info-run.h>
 #include <dali-toolkit/internal/text/color-run.h>
 #include <dali-toolkit/internal/text/embedded-item.h>
-#include <dali-toolkit/internal/text/font-run.h>
 #include <dali-toolkit/internal/text/font-description-run.h>
+#include <dali-toolkit/internal/text/font-run.h>
 #include <dali-toolkit/internal/text/paragraph-run.h>
 #include <dali-toolkit/internal/text/script-run.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 class LogicalModel;
 typedef IntrusivePtr<LogicalModel> LogicalModelPtr;
 struct InputStyle;
@@ -55,7 +52,6 @@ struct InputStyle;
 class LogicalModel : public RefObject
 {
 public:
-
   /**
    * @brief Create a new instance of a LogicalModel.
    *
@@ -72,7 +68,7 @@ public:
    *
    * @return The character's script.
    */
-  Script GetScript( CharacterIndex characterIndex ) const;
+  Script GetScript(CharacterIndex characterIndex) const;
 
   // Bidirectional support interface.
 
@@ -85,7 +81,7 @@ public:
    *
    * @return The character's direction.
    */
-  CharacterDirection GetCharacterDirection( CharacterIndex characterIndex ) const;
+  CharacterDirection GetCharacterDirection(CharacterIndex characterIndex) const;
 
   // Visual <--> Logical conversion tables.
 
@@ -99,7 +95,7 @@ public:
    *
    * @return The logical cursor index.
    */
-  CharacterIndex GetLogicalCursorIndex( CharacterIndex visualCursorIndex );
+  CharacterIndex GetLogicalCursorIndex(CharacterIndex visualCursorIndex);
 
   /**
    * @brief Retrieves the logical character index for the given visual character index.
@@ -111,7 +107,7 @@ public:
    *
    * @return The logical character index.
    */
-  CharacterIndex GetLogicalCharacterIndex( CharacterIndex visualCharacterIndex );
+  CharacterIndex GetLogicalCharacterIndex(CharacterIndex visualCharacterIndex);
 
   /**
    * @brief Fetch the bidirectional line info for the given character.
@@ -122,7 +118,7 @@ public:
    *
    * @return @e true if the given @e character is in a bidirectional line.
    */
-  bool FetchBidirectionalLineInfo( CharacterIndex characterIndex );
+  bool FetchBidirectionalLineInfo(CharacterIndex characterIndex);
 
   /**
    * @brief Retrieves the last fetched bidirectional line info.
@@ -139,7 +135,7 @@ public:
    * @param[in] index The character's index.
    * @param[in] numberOfCharacters The number of characters added or removed. If the value is negative the characters are removed.
    */
-  void UpdateTextStyleRuns( CharacterIndex index, int numberOfCharacters );
+  void UpdateTextStyleRuns(CharacterIndex index, int numberOfCharacters);
 
   /**
    * @brief Retrieves the text's style for the given character index.
@@ -147,7 +143,7 @@ public:
    * @param[in] index The character index.
    * @param[out] style The text's style in the given style.
    */
-  void RetrieveStyle( CharacterIndex index, InputStyle& style );
+  void RetrieveStyle(CharacterIndex index, InputStyle& style);
 
   /**
    * @brief Clears the font description runs.
@@ -164,8 +160,8 @@ public:
    * @param[in] startIndex The character from where the paragraph info is set.
    * @param[in] numberOfCharacters The number of characters.
    */
-  void CreateParagraphInfo( CharacterIndex startIndex,
-                            Length numberOfCharacters );
+  void CreateParagraphInfo(CharacterIndex startIndex,
+                           Length         numberOfCharacters);
 
   /**
    * @brief Find the paragraphs which contains the given characters.
@@ -174,9 +170,9 @@ public:
    * @param[in] numberOfCharacters The number of characters of the run.
    * @param[out] paragraphs Indices to the paragraphs which contain the characters.
    */
-  void FindParagraphs( CharacterIndex index,
-                       Length numberOfCharacters,
-                       Vector<ParagraphRunIndex>& paragraphs );
+  void FindParagraphs(CharacterIndex             index,
+                      Length                     numberOfCharacters,
+                      Vector<ParagraphRunIndex>& paragraphs);
 
   // Embedded images
 
@@ -186,27 +182,24 @@ public:
   void ClearEmbeddedImages();
 
 protected:
-
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
    */
   virtual ~LogicalModel();
 
 private:
-
   /**
    * @brief Private constructor.
    */
   LogicalModel();
 
   // Undefined
-  LogicalModel( const LogicalModel& handle );
+  LogicalModel(const LogicalModel& handle);
 
   // Undefined
-  LogicalModel& operator=( const LogicalModel& handle );
+  LogicalModel& operator=(const LogicalModel& handle);
 
 public:
-
   Vector<Character>                     mText;
   Vector<ScriptRun>                     mScriptRuns;
   Vector<FontRun>                       mFontRuns;
@@ -216,11 +209,11 @@ public:
   Vector<LineBreakInfo>                 mLineBreakInfo;
   Vector<ParagraphRun>                  mParagraphInfo;
   Vector<BidirectionalParagraphInfoRun> mBidirectionalParagraphInfo;
-  Vector<CharacterDirection>            mCharacterDirections;              ///< For each character, whether is right to left. ( @e flase is left to right, @e true right to left ).
+  Vector<CharacterDirection>            mCharacterDirections; ///< For each character, whether is right to left. ( @e flase is left to right, @e true right to left ).
   Vector<BidirectionalLineInfoRun>      mBidirectionalLineInfo;
   Vector<EmbeddedItem>                  mEmbeddedItems;
 
-  BidirectionalLineRunIndex             mBidirectionalLineIndex;           ///< The last fetched bidirectional line info.
+  BidirectionalLineRunIndex mBidirectionalLineIndex; ///< The last fetched bidirectional line info.
 };
 
 } // namespace Text
index 52fa73b..89e9d2a 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_COLOR_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 struct Tag;
 struct ColorRun;
 
@@ -36,7 +33,7 @@ struct ColorRun;
  * @param[in] tag The color tag and its attributes.
  * @param[in,out] colorRun The color run.
  */
-void ProcessColorTag( const Tag& tag, ColorRun& colorRun );
+void ProcessColorTag(const Tag& tag, ColorRun& colorRun);
 
 } // namespace Text
 
old mode 100755 (executable)
new mode 100644 (file)
index 6333c35..1677244
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_EMBEDDED_ITEM_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 struct Tag;
 struct EmbeddedItem;
 
@@ -36,7 +33,7 @@ struct EmbeddedItem;
  * @param[in] tag The embedded item tag and its attributes.
  * @param[in,out] embeddedItem The embedded item.
  */
-void ProcessEmbeddedItem( const Tag& tag, EmbeddedItem& embeddedItem );
+void ProcessEmbeddedItem(const Tag& tag, EmbeddedItem& embeddedItem);
 
 } // namespace Text
 
index 954d471..8b075bf 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_FONT_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 struct Tag;
 struct FontDescriptionRun;
 
@@ -36,7 +33,7 @@ struct FontDescriptionRun;
  * @param[in] tag The font tag and its attributes.
  * @param[in,out] fontRun The font description run.
  */
-void ProcessFontTag( const Tag& tag, FontDescriptionRun& fontRun );
+void ProcessFontTag(const Tag& tag, FontDescriptionRun& fontRun);
 
 } // namespace Text
 
old mode 100755 (executable)
new mode 100644 (file)
index d6f65c1..490e51f
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_HELPER_FUNCTIONS_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 struct Vector2;
 struct Vector4;
 
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief Stores an attribute pair: name, value.
  */
@@ -44,20 +41,20 @@ struct Attribute
 {
   const char* nameBuffer;
   const char* valueBuffer;
-  Length nameLength;
-  Length valueLength;
+  Length      nameLength;
+  Length      valueLength;
 };
 
 /**
  * @brief Stores a tag and its attributes.
  */
- struct Tag
- {
-   Vector<Attribute> attributes;
-   const char* buffer;
-   Length length;
-   bool isEndTag;
- };
+struct Tag
+{
+  Vector<Attribute> attributes;
+  const char*       buffer;
+  Length            length;
+  bool              isEndTag;
+};
 
 /**
  * @brief Compare if two tokens are equal.
@@ -74,7 +71,7 @@ struct Attribute
  *
  * @return @e true if both strings are equal.
  */
-bool TokenComparison( const std::string& string1, const char* const stringBuffer2, Length length );
+bool TokenComparison(const std::string& string1, const char* const stringBuffer2, Length length);
 
 /**
  * @brief Skips any unnecessary white space.
@@ -82,8 +79,8 @@ bool TokenComparison( const std::string& string1, const char* const stringBuffer
  * @param[in,out] stringBuffer The string buffer. It's a const iterator pointing the current character.
  * @param[in] stringEndBuffer Pointer to one character after the end of the string buffer.
  */
-void SkipWhiteSpace( const char*& stringBuffer,
-                     const char* const stringEndBuffer );
+void SkipWhiteSpace(const char*&      stringBuffer,
+                    const char* const stringEndBuffer);
 
 /**
  * @Brief Jumps to the next white space.
@@ -91,8 +88,8 @@ void SkipWhiteSpace( const char*& stringBuffer,
  * @param[in,out] stringBuffer The string buffer. It's a const iterator pointing the current character.
  * @param[in] stringEndBuffer Pointer to one character after the end of the string buffer.
  */
-void JumpToWhiteSpace( const char*& stringBuffer,
-                       const char* const stringEndBuffer );
+void JumpToWhiteSpace(const char*&      stringBuffer,
+                      const char* const stringEndBuffer);
 
 /**
 * @brief Converts a string into an unsigned int.
@@ -101,7 +98,7 @@ void JumpToWhiteSpace( const char*& stringBuffer,
 *
 * @return The unsigned int value.
 */
-unsigned int StringToUint( const char* const uintStr );
+unsigned int StringToUint(const char* const uintStr);
 
 /**
  * @brief Converts a string into an hexadecimal unsigned int.
@@ -110,7 +107,7 @@ unsigned int StringToUint( const char* const uintStr );
  *
  * @return The hexadecimal value.
  */
-unsigned int StringToHex( const char* const uintStr );
+unsigned int StringToHex(const char* const uintStr);
 
 /**
  * @brief Converts a string into a float value.
@@ -119,7 +116,7 @@ unsigned int StringToHex( const char* const uintStr );
  *
  * @return The float value.
  */
-float StringToFloat( const char* const floatStr );
+float StringToFloat(const char* const floatStr);
 
 /**
  * @brief Converts a float into a string.
@@ -127,7 +124,7 @@ float StringToFloat( const char* const floatStr );
  * @param[in] value The float value.
  * @param[out] floatStr The string.
  */
-void FloatToString( float value, std::string& floatStr );
+void FloatToString(float value, std::string& floatStr);
 
 /**
  * @brief Converts an unsigned int into a string.
@@ -135,7 +132,7 @@ void FloatToString( float value, std::string& floatStr );
  * @param[in] value The unsigned int value.
  * @param[out] uIntStr The string.
  */
-void UintToString( unsigned int value, std::string& uIntStr );
+void UintToString(unsigned int value, std::string& uIntStr);
 
 /**
  * @brief Converts an ARGB color packed in 4 byte unsigned int into a Vector4 color used in Dali.
@@ -143,7 +140,7 @@ void UintToString( unsigned int value, std::string& uIntStr );
  * @param[in] color An ARGB color packed in an unsigned int.
  * @param[out] retColor A Vector4 with the converted color.
  */
-void UintColorToVector4( unsigned int color, Vector4& retColor );
+void UintColorToVector4(unsigned int color, Vector4& retColor);
 
 /**
  * @brief Converts a color packed inside a string into an ARGB Vector4 color.
@@ -155,7 +152,7 @@ void UintColorToVector4( unsigned int color, Vector4& retColor );
  * @param[in] length The length of the color string.
  * @param[out] retColor A color packed inside a Vector4.
  */
-void ColorStringToVector4( const char* const colorStr, Length length, Vector4& retColor );
+void ColorStringToVector4(const char* const colorStr, Length length, Vector4& retColor);
 
 /**
  * @brief Converts a color packed in a Vector4 into a string.
@@ -167,7 +164,7 @@ void ColorStringToVector4( const char* const colorStr, Length length, Vector4& r
  * @param[in] value The color value.
  * @param[out] colorStr The string.
  */
-void Vector4ToColorString( const Vector4& value, std::string& vector2Str );
+void Vector4ToColorString(const Vector4& value, std::string& vector2Str);
 
 /**
  * @brief Converts a two dimension vector packed inside a string into a Vector2.
@@ -176,7 +173,7 @@ void Vector4ToColorString( const Vector4& value, std::string& vector2Str );
  * @param[in] length The length of the string.
  * @param[out] vector2 The Vector2.
  */
-void StringToVector2( const char* const vectorStr, Length length, Vector2& vector2 );
+void StringToVector2(const char* const vectorStr, Length length, Vector2& vector2);
 
 /**
  * @brief Converts a Vector2 into a string.
@@ -184,7 +181,7 @@ void StringToVector2( const char* const vectorStr, Length length, Vector2& vecto
  * @param[in] value The vector2 value.
  * @param[out] vector2Str The string.
  */
-void Vector2ToString( const Vector2& value, std::string& vector2Str );
+void Vector2ToString(const Vector2& value, std::string& vector2Str);
 
 } // namespace Text
 
old mode 100755 (executable)
new mode 100644 (file)
index de66e7f..fee7ae1
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief Keeps the plain text and references to vectors from the model which stores runs with text styles.
  */
 struct MarkupProcessData
 {
-MarkupProcessData( Vector<ColorRun>& colorRuns,
-                   Vector<FontDescriptionRun>& fontRuns,
-                   Vector<EmbeddedItem>& items )
-  : colorRuns( colorRuns ),
-    fontRuns( fontRuns ),
+  MarkupProcessData(Vector<ColorRun>&           colorRuns,
+                    Vector<FontDescriptionRun>& fontRuns,
+                    Vector<EmbeddedItem>&       items)
+  : colorRuns(colorRuns),
+    fontRuns(fontRuns),
     items(items),
     markupProcessedText()
-  {}
+  {
+  }
 
   Vector<ColorRun>&           colorRuns;           ///< The color runs.
   Vector<FontDescriptionRun>& fontRuns;            ///< The font description runs.
@@ -62,7 +60,7 @@ MarkupProcessData( Vector<ColorRun>& colorRuns,
  * @param[in] markupString The mark-up string.
  * @param[out] markupProcessData The plain text and the style.
  */
-void ProcessMarkupString( const std::string& markupString, MarkupProcessData& markupProcessData );
+void ProcessMarkupString(const std::string& markupString, MarkupProcessData& markupProcessData);
 
 } // namespace Text
 
old mode 100755 (executable)
new mode 100644 (file)
index d85fff4..5fad448
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_METRICS_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/common/intrusive-ptr.h>
 #include <dali/devel-api/text-abstraction/font-client.h>
+#include <dali/public-api/common/intrusive-ptr.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/text/text-definitions.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 class Metrics;
 typedef IntrusivePtr<Metrics> MetricsPtr;
 
@@ -43,13 +40,12 @@ typedef IntrusivePtr<Metrics> MetricsPtr;
 class Metrics : public RefObject
 {
 public:
-
   /**
    * Create a new Metrics object
    */
-  static Metrics* New( TextAbstraction::FontClient& fontClient )
+  static Metrics* New(TextAbstraction::FontClient& fontClient)
   {
-    return new Metrics( fontClient );
+    return new Metrics(fontClient);
   }
 
   /**
@@ -57,7 +53,7 @@ public:
    *
    * @param[in] glyphType The type of glyph; note that metrics for bitmap & vector based glyphs are different.
    */
-  void SetGlyphType( TextAbstraction::GlyphType glyphType )
+  void SetGlyphType(TextAbstraction::GlyphType glyphType)
   {
     mGlyphType = glyphType;
   }
@@ -68,9 +64,9 @@ public:
    * @param[in] fontId The ID of the font for the required glyph.
    * @param[out] metrics The font metrics.
    */
-  void GetFontMetrics( FontId fontId, FontMetrics& metrics )
+  void GetFontMetrics(FontId fontId, FontMetrics& metrics)
   {
-    mFontClient.GetFontMetrics( fontId, metrics ); // inline for performance
+    mFontClient.GetFontMetrics(fontId, metrics); // inline for performance
   }
 
   /**
@@ -82,9 +78,9 @@ public:
    * @param[in] size The size of the array.
    * @return True if all of the requested metrics were found.
    */
-  bool GetGlyphMetrics( GlyphInfo* array, uint32_t size )
+  bool GetGlyphMetrics(GlyphInfo* array, uint32_t size)
   {
-    return mFontClient.GetGlyphMetrics( array, size, mGlyphType, true ); // inline for performance
+    return mFontClient.GetGlyphMetrics(array, size, mGlyphType, true); // inline for performance
   }
 
   /**
@@ -94,27 +90,28 @@ public:
    *
    * @return true if the font has italic style.
    */
-  bool HasItalicStyle( FontId fontId ) const
+  bool HasItalicStyle(FontId fontId) const
   {
-    return mFontClient.HasItalicStyle( fontId );
+    return mFontClient.HasItalicStyle(fontId);
   }
 
 protected:
-
   /**
    * A reference counted object may only be deleted by calling Unreference()
    */
-  virtual ~Metrics() {}
+  virtual ~Metrics()
+  {
+  }
 
 private:
-
   /**
    * Constructor.
    */
-  Metrics( TextAbstraction::FontClient& fontClient )
-  : mFontClient( fontClient ),
-    mGlyphType( TextAbstraction::BITMAP_GLYPH )
-  {}
+  Metrics(TextAbstraction::FontClient& fontClient)
+  : mFontClient(fontClient),
+    mGlyphType(TextAbstraction::BITMAP_GLYPH)
+  {
+  }
 
   // Undefined
   Metrics(const Metrics&);
@@ -123,9 +120,8 @@ private:
   Metrics& operator=(const Metrics& rhs);
 
 private:
-
   TextAbstraction::FontClient mFontClient;
-  TextAbstraction::GlyphType mGlyphType;
+  TextAbstraction::GlyphType  mGlyphType;
 };
 
 } // namespace Text
index c5dc7cd..41cb04a 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_MULTI_LANGUAGE_HELPER_FUNCTIONS_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief Merges font's descriptions to retrieve the combined font's description for a given character.
  *
@@ -45,13 +42,13 @@ namespace Text
  * @param[out] fontPointSize The font's point size for the character.
  * @param[out] isDefaultFont Whether the font is a default one.
  */
-void MergeFontDescriptions( const Vector<FontDescriptionRun>& fontDescriptions,
-                            const TextAbstraction::FontDescription& defaultFontDescription,
-                            TextAbstraction::PointSize26Dot6 defaultPointSize,
-                            CharacterIndex characterIndex,
-                            TextAbstraction::FontDescription& fontDescription,
-                            TextAbstraction::PointSize26Dot6& fontPointSize,
-                            bool& isDefaultFont );
+void MergeFontDescriptions(const Vector<FontDescriptionRun>&       fontDescriptions,
+                           const TextAbstraction::FontDescription& defaultFontDescription,
+                           TextAbstraction::PointSize26Dot6        defaultPointSize,
+                           CharacterIndex                          characterIndex,
+                           TextAbstraction::FontDescription&       fontDescription,
+                           TextAbstraction::PointSize26Dot6&       fontPointSize,
+                           bool&                                   isDefaultFont);
 
 /**
  * @brief Retrieves the script Id from the script run for a given character's @p index.
@@ -64,9 +61,9 @@ void MergeFontDescriptions( const Vector<FontDescriptionRun>& fontDescriptions,
  *
  * @return The script.
  */
-Script GetScript( Length index,
-                  Vector<ScriptRun>::ConstIterator& scriptRunIt,
-                  const Vector<ScriptRun>::ConstIterator& scriptRunEndIt );
+Script GetScript(Length                                  index,
+                 Vector<ScriptRun>::ConstIterator&       scriptRunIt,
+                 const Vector<ScriptRun>::ConstIterator& scriptRunEndIt);
 
 } // namespace Text
 
index cc6c985..de44e19 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_MULTI_LANGUAGE_SUPPORT_IMPL_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace TextAbstraction
 {
 //Forward declaration
 class FontClient;
-}
+} // namespace TextAbstraction
 
 namespace Toolkit
 {
-
 namespace Text
 {
-
 namespace Internal
 {
-
 /**
  * @brief Stores valid font ids per script.
  */
@@ -52,13 +48,15 @@ struct ValidateFontsPerScript
    */
   ValidateFontsPerScript()
   : mValidFonts()
-  {}
+  {
+  }
 
   /**
    * Default destructor.
    */
   ~ValidateFontsPerScript()
-  {}
+  {
+  }
 
   /**
    * @brief Whether the given @p fontId is in the vector of valid fonts.
@@ -67,7 +65,7 @@ struct ValidateFontsPerScript
    *
    * @return @e true if the font is in the vector of valid fonts.
    */
-  bool IsValidFont( FontId fontId ) const;
+  bool IsValidFont(FontId fontId) const;
 
   Vector<FontId> mValidFonts;
 };
@@ -80,7 +78,7 @@ struct DefaultFonts
   struct CacheItem
   {
     TextAbstraction::FontDescription description;
-    FontId fontId;
+    FontId                           fontId;
   };
 
   /**
@@ -88,13 +86,15 @@ struct DefaultFonts
    */
   DefaultFonts()
   : mFonts()
-  {}
+  {
+  }
 
   /**
    * Default destructor.
    */
   ~DefaultFonts()
-  {}
+  {
+  }
 
   /**
    * @brief Finds a default font for the given @p size.
@@ -105,11 +105,11 @@ struct DefaultFonts
    *
    * @return The font id of a default font for the given @p size. If there isn't any font cached it returns 0.
    */
-  FontId FindFont( TextAbstraction::FontClient& fontClient,
-                   const TextAbstraction::FontDescription& description,
-                   PointSize26Dot6 size ) const;
+  FontId FindFont(TextAbstraction::FontClient&            fontClient,
+                  const TextAbstraction::FontDescription& description,
+                  PointSize26Dot6                         size) const;
 
-  void Cache( const TextAbstraction::FontDescription& description, FontId fontId );
+  void Cache(const TextAbstraction::FontDescription& description, FontId fontId);
 
   std::vector<CacheItem> mFonts;
 };
@@ -120,7 +120,6 @@ struct DefaultFonts
 class MultilanguageSupport : public BaseObject
 {
 public:
-
   /**
    * Constructor
    */
@@ -141,22 +140,22 @@ public:
   /**
    * @copydoc Dali::MultilanguageSupport::SetScripts()
    */
-  void SetScripts( const Vector<Character>& text,
-                   CharacterIndex startIndex,
-                   Length numberOfCharacters,
-                   Vector<ScriptRun>& scripts );
+  void SetScripts(const Vector<Character>& text,
+                  CharacterIndex           startIndex,
+                  Length                   numberOfCharacters,
+                  Vector<ScriptRun>&       scripts);
 
   /**
    * @copydoc Dali::MultilanguageSupport::ValidateFonts()
    */
-  void ValidateFonts( const Vector<Character>& text,
-                      const Vector<ScriptRun>& scripts,
-                      const Vector<FontDescriptionRun>& fontDescriptions,
-                      const TextAbstraction::FontDescription& defaultFontDescription,
-                      TextAbstraction::PointSize26Dot6 defaultFontPointSize,
-                      CharacterIndex startIndex,
-                      Length numberOfCharacters,
-                      Vector<FontRun>& fonts );
+  void ValidateFonts(const Vector<Character>&                text,
+                     const Vector<ScriptRun>&                scripts,
+                     const Vector<FontDescriptionRun>&       fontDescriptions,
+                     const TextAbstraction::FontDescription& defaultFontDescription,
+                     TextAbstraction::PointSize26Dot6        defaultFontPointSize,
+                     CharacterIndex                          startIndex,
+                     Length                                  numberOfCharacters,
+                     Vector<FontRun>&                        fonts);
 
 private:
   Vector<DefaultFonts*>           mDefaultFontPerScriptCache; ///< Caches default fonts for a script.
@@ -165,18 +164,18 @@ private:
 
 } // namespace Internal
 
-inline static Internal::MultilanguageSupport& GetImplementation( MultilanguageSupport& multilanguageSupport )
+inline static Internal::MultilanguageSupport& GetImplementation(MultilanguageSupport& multilanguageSupport)
 {
-  DALI_ASSERT_ALWAYS( multilanguageSupport && "multi-language handle is empty" );
+  DALI_ASSERT_ALWAYS(multilanguageSupport && "multi-language handle is empty");
   BaseObject& handle = multilanguageSupport.GetBaseObject();
-  return static_cast<Internal::MultilanguageSupport&>( handle );
+  return static_cast<Internal::MultilanguageSupport&>(handle);
 }
 
-inline static const Internal::MultilanguageSupport& GetImplementation( const MultilanguageSupport& multilanguageSupport )
+inline static const Internal::MultilanguageSupport& GetImplementation(const MultilanguageSupport& multilanguageSupport)
 {
-  DALI_ASSERT_ALWAYS( multilanguageSupport && "multi-language handle is empty" );
+  DALI_ASSERT_ALWAYS(multilanguageSupport && "multi-language handle is empty");
   const BaseObject& handle = multilanguageSupport.GetBaseObject();
-  return static_cast<const Internal::MultilanguageSupport&>( handle );
+  return static_cast<const Internal::MultilanguageSupport&>(handle);
 }
 
 } // namespace Text
index f9749df..7423820 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_MULTI_LANGUAGE_SUPPORT_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/object/base-handle.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/internal/text/font-run.h>
 #include <dali-toolkit/internal/text/font-description-run.h>
+#include <dali-toolkit/internal/text/font-run.h>
 #include <dali-toolkit/internal/text/script-run.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 namespace Internal DALI_INTERNAL
 {
-
 class MultilanguageSupport;
 
-} // Internal
+} // namespace DALI_INTERNAL
 
 /**
  * @brief Sets the character's scripts to the model and validates the fonts set by the user or assigns default ones.
@@ -49,7 +45,6 @@ class MultilanguageSupport;
 class MultilanguageSupport : public BaseHandle
 {
 public:
-
   /**
    * @brief Create an uninitialized MultilanguageSupport handle.
    */
@@ -67,7 +62,7 @@ public:
    *
    * @param[in] implementation A pointer to the internal multi-language support object.
    */
-  explicit DALI_INTERNAL MultilanguageSupport( Internal::MultilanguageSupport* implementation );
+  explicit DALI_INTERNAL MultilanguageSupport(Internal::MultilanguageSupport* implementation);
 
   /**
    * @brief Retrieve a handle to the MultilanguageSupport instance.
@@ -94,10 +89,10 @@ public:
    * @param[in] numberOfCharacters The number of characters to set the script.
    * @param[out] scripts Vector containing the script runs for the whole text.
    */
-  void SetScripts( const Vector<Character>& text,
-                   CharacterIndex startIndex,
-                   Length numberOfCharacters,
-                   Vector<ScriptRun>& scripts );
+  void SetScripts(const Vector<Character>& text,
+                  CharacterIndex           startIndex,
+                  Length                   numberOfCharacters,
+                  Vector<ScriptRun>&       scripts);
 
   /**
    * @brief Validates the character's font of the whole text.
@@ -119,14 +114,14 @@ public:
    * @param[in] numberOfCharacters The number of characters to set the font.
    * @param[out] fonts The validated fonts.
    */
-  void ValidateFonts( const Vector<Character>& text,
-                      const Vector<ScriptRun>& scripts,
-                      const Vector<FontDescriptionRun>& fontDescriptions,
-                      const TextAbstraction::FontDescription& defaultFontDescription,
-                      TextAbstraction::PointSize26Dot6 defaultFontPointSize,
-                      CharacterIndex startIndex,
-                      Length numberOfCharacters,
-                      Vector<FontRun>& fonts );
+  void ValidateFonts(const Vector<Character>&                text,
+                     const Vector<ScriptRun>&                scripts,
+                     const Vector<FontDescriptionRun>&       fontDescriptions,
+                     const TextAbstraction::FontDescription& defaultFontDescription,
+                     TextAbstraction::PointSize26Dot6        defaultFontPointSize,
+                     CharacterIndex                          startIndex,
+                     Length                                  numberOfCharacters,
+                     Vector<FontRun>&                        fonts);
 };
 
 } // namespace Text
index 64f2fa1..94e9382 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_PARAGRAPH_RUN_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief ParagraphRun
  *
@@ -41,8 +38,8 @@ namespace Text
  */
 struct ParagraphRun
 {
-  CharacterRun  characterRun; ///< The initial character index within the whole text and the number of characters of the run.
-  Size          layoutSize;   ///< The size of the paragraph when is laid-out.
+  CharacterRun characterRun; ///< The initial character index within the whole text and the number of characters of the run.
+  Size         layoutSize;   ///< The size of the paragraph when is laid-out.
 };
 
 } // namespace Text
index 3584f35..a6e0e0f 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_PROPERTY_STRING_PARSER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 // Forward declaration
 struct Vector2;
 
 namespace Toolkit
 {
-
 // Forward declaration
 class TreeNode;
 
 namespace Text
 {
-
 /**
  * @brief Creates a map with pairs 'key,value' with the property's parameters.
  *
@@ -45,7 +42,7 @@ namespace Text
  * @param[out] map A map with the property's parameters.
  *
  */
-void CreatePropertyMap( const TreeNode* const node, Property::Map& map );
+void CreatePropertyMap(const TreeNode* const node, Property::Map& map);
 
 /**
  * @brief Parses a property string.
@@ -54,7 +51,7 @@ void CreatePropertyMap( const TreeNode* const node, Property::Map& map );
  * @param[out] map A map with the property's parameters.
  *
  */
-void ParsePropertyString( const std::string& property, Property::Map& map );
+void ParsePropertyString(const std::string& property, Property::Map& map);
 
 } //namespace Text
 
old mode 100755 (executable)
new mode 100644 (file)
index e78b095..26bd6e3
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_ATLAS_GLYPH_MANAGER_IMPL_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,7 +17,6 @@
  * limitations under the License.
  */
 
-
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/object/base-object.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 class AtlasGlyphManager;
 
 } // namespace Toolkit
 
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class AtlasGlyphManager;
 typedef IntrusivePtr<AtlasGlyphManager> AtlasGlyphManagerPtr;
 
 class AtlasGlyphManager : public Dali::BaseObject
 {
 public:
-
   struct GlyphRecordEntry
   {
     Text::GlyphIndex mIndex;
-    uint32_t mImageId;
-    int32_t mCount;
-    uint16_t mOutlineWidth;
-    bool isItalic:1;
-    bool isBold:1;
+    uint32_t         mImageId;
+    int32_t          mCount;
+    uint16_t         mOutlineWidth;
+    bool             isItalic : 1;
+    bool             isBold : 1;
   };
 
   struct FontGlyphRecord
   {
-    Text::FontId mFontId;
-    Vector< GlyphRecordEntry > mGlyphRecords;
+    Text::FontId             mFontId;
+    Vector<GlyphRecordEntry> mGlyphRecords;
   };
 
   /**
@@ -72,50 +66,50 @@ public:
   /**
    * @copydoc Toolkit::AtlasGlyphManager::Add
    */
-  void Add( const Text::GlyphInfo& glyph,
-            const Toolkit::AtlasGlyphManager::GlyphStyle& style,
-            const PixelData& bitmap,
-            Dali::Toolkit::AtlasManager::AtlasSlot& slot );
+  void Add(const Text::GlyphInfo&                        glyph,
+           const Toolkit::AtlasGlyphManager::GlyphStyle& style,
+           const PixelData&                              bitmap,
+           Dali::Toolkit::AtlasManager::AtlasSlot&       slot);
 
   /**
    * @copydoc Toolkit::AtlasGlyphManager::GenerateMeshData
    */
-  void GenerateMeshData( uint32_t imageId,
-                         const Vector2& position,
-                         Toolkit::AtlasManager::Mesh2D& mesh );
+  void GenerateMeshData(uint32_t                       imageId,
+                        const Vector2&                 position,
+                        Toolkit::AtlasManager::Mesh2D& mesh);
 
   /**
    * @copydoc Toolkit::AtlasGlyphManager::IsCached
    */
-  bool IsCached( Text::FontId fontId,
-                 Text::GlyphIndex index,
-                 const Toolkit::AtlasGlyphManager::GlyphStyle& style,
-                 Dali::Toolkit::AtlasManager::AtlasSlot& slot );
+  bool IsCached(Text::FontId                                  fontId,
+                Text::GlyphIndex                              index,
+                const Toolkit::AtlasGlyphManager::GlyphStyle& style,
+                Dali::Toolkit::AtlasManager::AtlasSlot&       slot);
 
   /**
    * @copydoc Toolkit::AtlasGlyphManager::GetAtlasSize
    */
-  Vector2 GetAtlasSize( uint32_t atlasId );
+  Vector2 GetAtlasSize(uint32_t atlasId);
 
   /**
    * @copydoc Toolkit::AtlasGlyphManager::SetNewAtlasSize
    */
-  void SetNewAtlasSize( uint32_t width, uint32_t height, uint32_t blockWidth, uint32_t blockHeight );
+  void SetNewAtlasSize(uint32_t width, uint32_t height, uint32_t blockWidth, uint32_t blockHeight);
 
   /**
    * @copydoc Toolkit::AtlasGlyphManager::GetPixelFormat
    */
-  Pixel::Format GetPixelFormat( uint32_t atlasId );
+  Pixel::Format GetPixelFormat(uint32_t atlasId);
 
   /**
    * @copydoc toolkit::AtlasGlyphManager::AdjustReferenceCount
    */
-  void AdjustReferenceCount( Text::FontId fontId, Text::GlyphIndex index, const Toolkit::AtlasGlyphManager::GlyphStyle& style, int32_t delta );
+  void AdjustReferenceCount(Text::FontId fontId, Text::GlyphIndex index, const Toolkit::AtlasGlyphManager::GlyphStyle& style, int32_t delta);
 
   /**
    * @copydoc Toolkit::AtlasGlyphManager::GetTextures
    */
-  TextureSet GetTextures( uint32_t atlasId ) const;
+  TextureSet GetTextures(uint32_t atlasId) const;
 
   /**
    * @copydoc Toolkit::AtlasGlyphManager::GetMetrics
@@ -123,25 +117,23 @@ public:
   const Toolkit::AtlasGlyphManager::Metrics& GetMetrics();
 
 protected:
-
   /**
    * A reference counted object may only be deleted by calling Unreference()
    */
   virtual ~AtlasGlyphManager();
 
 private:
-
-  Dali::Toolkit::AtlasManager mAtlasManager;          ///> Atlas Manager created by GlyphManager
-  std::vector< FontGlyphRecord > mFontGlyphRecords;
-  Toolkit::AtlasGlyphManager::Metrics mMetrics;       ///> Metrics to pass back on GlyphManager status
-  Sampler mSampler;
+  Dali::Toolkit::AtlasManager         mAtlasManager; ///> Atlas Manager created by GlyphManager
+  std::vector<FontGlyphRecord>        mFontGlyphRecords;
+  Toolkit::AtlasGlyphManager::Metrics mMetrics; ///> Metrics to pass back on GlyphManager status
+  Sampler                             mSampler;
 };
 
 } // namespace Internal
 
 inline const Internal::AtlasGlyphManager& GetImplementation(const Toolkit::AtlasGlyphManager& manager)
 {
-  DALI_ASSERT_ALWAYS( manager && "AtlasGlyphManager handle is empty" );
+  DALI_ASSERT_ALWAYS(manager && "AtlasGlyphManager handle is empty");
 
   const BaseObject& handle = manager.GetBaseObject();
 
@@ -150,7 +142,7 @@ inline const Internal::AtlasGlyphManager& GetImplementation(const Toolkit::Atlas
 
 inline Internal::AtlasGlyphManager& GetImplementation(Toolkit::AtlasGlyphManager& manager)
 {
-  DALI_ASSERT_ALWAYS( manager && "AtlasGlyphManager handle is empty" );
+  DALI_ASSERT_ALWAYS(manager && "AtlasGlyphManager handle is empty");
 
   BaseObject& handle = manager.GetBaseObject();
 
index 592017b..cc6f92f 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_ATLAS_GLYPH_MANAGER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal DALI_INTERNAL
 {
 class AtlasGlyphManager;
 }
 
-
 class AtlasGlyphManager : public BaseHandle
 {
 public:
-
   /**
    * Description of GlyphManager state
    */
   struct Metrics
   {
     Metrics()
-    : mGlyphCount( 0u )
-    {}
+    : mGlyphCount(0u)
+    {
+    }
 
     ~Metrics()
-    {}
+    {
+    }
 
-    uint32_t mGlyphCount;                   ///< number of glyphs being managed
-    std::string mVerboseGlyphCounts;        ///< a verbose list of the glyphs + ref counts
-    AtlasManager::Metrics mAtlasMetrics;    ///< metrics from the Atlas Manager
+    uint32_t              mGlyphCount;         ///< number of glyphs being managed
+    std::string           mVerboseGlyphCounts; ///< a verbose list of the glyphs + ref counts
+    AtlasManager::Metrics mAtlasMetrics;       ///< metrics from the Atlas Manager
   };
 
   struct GlyphStyle
   {
     GlyphStyle()
-    : outline{ 0u },
-      isItalic{ false },
-      isBold{ false }
-    {}
-
-    uint16_t outline; ///< The outline width of this glyph
-    bool isItalic:1;  ///< Whether the glyph is italic.
-    bool isBold:1;    ///< Whether the glyph is bold.
+    : outline{0u},
+      isItalic{false},
+      isBold{false}
+    {
+    }
+
+    uint16_t outline;      ///< The outline width of this glyph
+    bool     isItalic : 1; ///< Whether the glyph is italic.
+    bool     isBold : 1;   ///< Whether the glyph is bold.
   };
 
   /**
@@ -97,10 +96,10 @@ public:
    * @param[in] bitmap bitmap to use for glyph addition
    * @param[out] slot information returned by atlas manager for addition
    */
-  void Add( const Text::GlyphInfo& glyph,
-            const GlyphStyle& style,
-            const PixelData& bitmap,
-            AtlasManager::AtlasSlot& slot );
+  void Add(const Text::GlyphInfo&   glyph,
+           const GlyphStyle&        style,
+           const PixelData&         bitmap,
+           AtlasManager::AtlasSlot& slot);
 
   /**
    * @brief Generate mesh data for an image contained in an atlas
@@ -109,9 +108,9 @@ public:
    * @param[in] position top left of image
    * @param[out] meshData generated MeshData
    */
-  void GenerateMeshData( uint32_t imageId,
-                         const Vector2& position,
-                         Toolkit::AtlasManager::Mesh2D& mesh );
+  void GenerateMeshData(uint32_t                       imageId,
+                        const Vector2&                 position,
+                        Toolkit::AtlasManager::Mesh2D& mesh);
 
   /**
    * @brief Check to see if a glyph is being cached
@@ -123,10 +122,10 @@ public:
    *
    * @return Whether glyph is cached or not ?
    */
-  bool IsCached( Text::FontId fontId,
-                 Text::GlyphIndex index,
-                 const GlyphStyle& style,
-                 AtlasManager::AtlasSlot& slot );
+  bool IsCached(Text::FontId             fontId,
+                Text::GlyphIndex         index,
+                const GlyphStyle&        style,
+                AtlasManager::AtlasSlot& slot);
 
   /**
    * @brief Retrieve the size of an atlas
@@ -135,9 +134,9 @@ public:
    *
    * @return The pixel size of the atlas
    */
-  Vector2 GetAtlasSize( uint32_t atlasId );
+  Vector2 GetAtlasSize(uint32_t atlasId);
 
-   /**
+  /**
     * @brief Set the atlas size and block size for subsequent Atlas generation
     *
     * @param[in] width width of atlas in pixels
@@ -145,7 +144,7 @@ public:
     * @param[in] blockWidth width of a block in pixels
     * @param[in] blockHeight height of a block in pixels
     */
-  void SetNewAtlasSize( uint32_t width, uint32_t height, uint32_t blockWidth, uint32_t blockHeight );
+  void SetNewAtlasSize(uint32_t width, uint32_t height, uint32_t blockWidth, uint32_t blockHeight);
 
   /**
    * @brief Get the Pixel Format used by an atlas
@@ -154,7 +153,7 @@ public:
    *
    * @return The pixel format of the atlas
    */
-  Pixel::Format GetPixelFormat( uint32_t atlasId );
+  Pixel::Format GetPixelFormat(uint32_t atlasId);
 
   /**
    * @brief Get the texture set used by an atlas
@@ -163,7 +162,7 @@ public:
    *
    * @return The texture set used by the atlas
    */
-  TextureSet GetTextures( uint32_t atlasId ) const;
+  TextureSet GetTextures(uint32_t atlasId) const;
 
   /**
    * @brief Get Glyph Manager metrics
@@ -180,12 +179,10 @@ public:
    * @param[in] style The style of this glyph
    * @param[in] delta The adjustment to make to the reference count
    */
-  void AdjustReferenceCount( Text::FontId fontId, Text::GlyphIndex index, const GlyphStyle& style, int32_t delta );
+  void AdjustReferenceCount(Text::FontId fontId, Text::GlyphIndex index, const GlyphStyle& style, int32_t delta);
 
 private:
-
-  explicit DALI_INTERNAL AtlasGlyphManager(Internal::AtlasGlyphManager *impl);
-
+  explicit DALI_INTERNAL AtlasGlyphManager(Internal::AtlasGlyphManager* impl);
 };
 
 } // namespace Toolkit
index ed51450..7fb81fd 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_ATLAS_MANAGER_IMPL_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,7 +17,6 @@
  * limitations under the License.
  */
 
-
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/object/base-object.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 class AtlasManager;
 
 } // namespace Toolkit
 
 namespace Toolkit
 {
-
 namespace Internal
 {
-
-typedef Dali::Vector< Toolkit::AtlasManager::AtlasSlot > slotContainer;
+typedef Dali::Vector<Toolkit::AtlasManager::AtlasSlot> slotContainer;
 
 class AtlasManager;
 typedef IntrusivePtr<AtlasManager> AtlasManagerPtr;
@@ -49,7 +44,6 @@ typedef IntrusivePtr<AtlasManager> AtlasManagerPtr;
 class AtlasManager : public Dali::BaseObject
 {
 public:
-
   typedef uint32_t SizeType;
   typedef SizeType AtlasId;
   typedef SizeType ImageId;
@@ -59,24 +53,24 @@ public:
    */
   struct AtlasDescriptor
   {
-    Dali::Texture mAtlas;                                                 // atlas image
-    Toolkit::AtlasManager::AtlasSize mSize;                             // size of atlas
-    Pixel::Format mPixelFormat;                                         // pixel format used by atlas
-    PixelData mHorizontalStrip;                                       // Image used to pad upload
-    PixelData mVerticalStrip;                                         // Image used to pad upload
-    TextureSet mTextureSet;                                             // Texture set used for atlas texture
-    SizeType mTotalBlocks;                                              // total number of blocks in atlas
-    SizeType mAvailableBlocks;                                          // number of blocks available in atlas
-    Dali::Vector< SizeType > mFreeBlocksList;                           // unless there are any previously freed blocks
+    Dali::Texture                    mAtlas;           // atlas image
+    Toolkit::AtlasManager::AtlasSize mSize;            // size of atlas
+    Pixel::Format                    mPixelFormat;     // pixel format used by atlas
+    PixelData                        mHorizontalStrip; // Image used to pad upload
+    PixelData                        mVerticalStrip;   // Image used to pad upload
+    TextureSet                       mTextureSet;      // Texture set used for atlas texture
+    SizeType                         mTotalBlocks;     // total number of blocks in atlas
+    SizeType                         mAvailableBlocks; // number of blocks available in atlas
+    Dali::Vector<SizeType>           mFreeBlocksList;  // unless there are any previously freed blocks
   };
 
   struct AtlasSlotDescriptor
   {
-    SizeType mCount;                                                    // Reference count for this slot
-    SizeType mImageWidth;                                               // Width of image stored
-    SizeType mImageHeight;                                              // Height of image stored
-    AtlasId mAtlasId;                                                   // Image is stored in this Atlas
-    SizeType mBlock;                                                    // Block within atlas used for image
+    SizeType mCount;       // Reference count for this slot
+    SizeType mImageWidth;  // Width of image stored
+    SizeType mImageHeight; // Height of image stored
+    AtlasId  mAtlasId;     // Image is stored in this Atlas
+    SizeType mBlock;       // Block within atlas used for image
   };
 
   AtlasManager();
@@ -91,62 +85,62 @@ public:
   /**
    * @copydoc: Toolkit::AtlasManager::CreateAtlas
    */
-  AtlasId CreateAtlas( const Toolkit::AtlasManager::AtlasSize& size, Pixel::Format pixelformat );
+  AtlasId CreateAtlas(const Toolkit::AtlasManager::AtlasSize& size, Pixel::Format pixelformat);
 
   /**
    * @copydoc Toolkit::AtlasManager::SetAddPolicy
    */
-  void SetAddPolicy( Toolkit::AtlasManager::AddFailPolicy policy );
+  void SetAddPolicy(Toolkit::AtlasManager::AddFailPolicy policy);
 
   /**
    * @copydoc Toolkit::AtlasManager::Add
    */
-  bool Add( const PixelData& image,
-            Toolkit::AtlasManager::AtlasSlot& slot,
-            Toolkit::AtlasManager::AtlasId atlas );
+  bool Add(const PixelData&                  image,
+           Toolkit::AtlasManager::AtlasSlot& slot,
+           Toolkit::AtlasManager::AtlasId    atlas);
 
   /**
    * @copydoc Toolkit::AtlasManager::GenerateMeshData
    */
-  void GenerateMeshData( ImageId id,
-                         const Vector2& position,
-                         Toolkit::AtlasManager::Mesh2D& mesh,
-                         bool addReference );
+  void GenerateMeshData(ImageId                        id,
+                        const Vector2&                 position,
+                        Toolkit::AtlasManager::Mesh2D& mesh,
+                        bool                           addReference);
 
   /**
    * @copydoc Toolkit::AtlasManager::Remove
    */
-  bool Remove( ImageId id );
+  bool Remove(ImageId id);
 
   /**
    * @copydoc Toolkit::AtlasManager::GetAtlasContainer
    */
-  Dali::Texture GetAtlasContainer( AtlasId atlas ) const;
+  Dali::Texture GetAtlasContainer(AtlasId atlas) const;
 
   /**
    * @copydoc Toolkit::AtlasManager::GetAtlas
    */
-  AtlasId GetAtlas( ImageId id ) const;
+  AtlasId GetAtlas(ImageId id) const;
 
   /**
    * @copydoc Toolkit::AtlasManager::SetNewAtlasSize
    */
-  void SetNewAtlasSize( const Toolkit::AtlasManager::AtlasSize& size );
+  void SetNewAtlasSize(const Toolkit::AtlasManager::AtlasSize& size);
 
   /**
    * @copydoc Toolkit::AtlasManager::GetAtlasSize
    */
-  const Toolkit::AtlasManager::AtlasSize& GetAtlasSize( AtlasId atlas );
+  const Toolkit::AtlasManager::AtlasSize& GetAtlasSize(AtlasId atlas);
 
   /**
    * @copydoc Toolkit::AtlasManager::GetBlockSize
    */
-  Vector2 GetBlockSize( AtlasId atlas );
+  Vector2 GetBlockSize(AtlasId atlas);
 
   /**
    * @copydoc Toolkit::AtlasManager::GetFreeBlocks
    */
-  SizeType GetFreeBlocks( AtlasId atlas ) const;
+  SizeType GetFreeBlocks(AtlasId atlas) const;
 
   /*
    * @copydoc Toolkit::AtlasManager::GetAtlasCount
@@ -156,45 +150,43 @@ public:
   /**
    * @copydoc Toolkit::AtlasManager::GetPixelFormat
    */
-  Pixel::Format GetPixelFormat( AtlasId atlas ) const;
+  Pixel::Format GetPixelFormat(AtlasId atlas) const;
 
   /**
    * @copydoc Toolkit::AtlasManager::GetMetrics
    */
-  void GetMetrics( Toolkit::AtlasManager::Metrics& metrics );
+  void GetMetrics(Toolkit::AtlasManager::Metrics& metrics);
 
   /**
    * @copydoc Toolkit::AtlasManager::GetTextures
    */
-  TextureSet GetTextures( AtlasId atlas ) const;
+  TextureSet GetTextures(AtlasId atlas) const;
 
   /**
    * @copydoc Toolkit::AtlasManager::SetTextures
    */
-  void SetTextures( AtlasId atlas, TextureSet& textureSet );
+  void SetTextures(AtlasId atlas, TextureSet& textureSet);
 
 private:
-
-  std::vector< AtlasDescriptor > mAtlasList;            // List of atlases created
-  Vector< AtlasSlotDescriptor > mImageList;             // List of bitmaps stored in atlases
-  Toolkit::AtlasManager::AtlasSize mNewAtlasSize;       // Atlas size to use in next creation
-  Toolkit::AtlasManager::AddFailPolicy mAddFailPolicy;  // Policy for failing to add an Image
-
-  SizeType CheckAtlas( SizeType atlas,
-                       SizeType width,
-                       SizeType height,
-                       Pixel::Format pixelFormat );
-
-  void UploadImage( const PixelData& image,
-                    const AtlasSlotDescriptor& desc );
-
+  std::vector<AtlasDescriptor>         mAtlasList;     // List of atlases created
+  Vector<AtlasSlotDescriptor>          mImageList;     // List of bitmaps stored in atlases
+  Toolkit::AtlasManager::AtlasSize     mNewAtlasSize;  // Atlas size to use in next creation
+  Toolkit::AtlasManager::AddFailPolicy mAddFailPolicy; // Policy for failing to add an Image
+
+  SizeType CheckAtlas(SizeType      atlas,
+                      SizeType      width,
+                      SizeType      height,
+                      Pixel::Format pixelFormat);
+
+  void UploadImage(const PixelData&           image,
+                   const AtlasSlotDescriptor& desc);
 };
 
 } // namespace Internal
 
 inline const Internal::AtlasManager& GetImplementation(const Toolkit::AtlasManager& manager)
 {
-  DALI_ASSERT_ALWAYS( manager && "AtlasManager handle is empty" );
+  DALI_ASSERT_ALWAYS(manager && "AtlasManager handle is empty");
 
   const BaseObject& handle = manager.GetBaseObject();
 
@@ -203,7 +195,7 @@ inline const Internal::AtlasManager& GetImplementation(const Toolkit::AtlasManag
 
 inline Internal::AtlasManager& GetImplementation(Toolkit::AtlasManager& manager)
 {
-  DALI_ASSERT_ALWAYS( manager && "AtlasManager handle is empty" );
+  DALI_ASSERT_ALWAYS(manager && "AtlasManager handle is empty");
 
   BaseObject& handle = manager.GetBaseObject();
 
@@ -214,5 +206,4 @@ inline Internal::AtlasManager& GetImplementation(Toolkit::AtlasManager& manager)
 
 } // namespace Dali
 
-
- #endif // DALI_TOOLKIT_ATLAS_MANAGER_IMPL_H
+#endif // DALI_TOOLKIT_ATLAS_MANAGER_IMPL_H
index 044b9e3..91bb97e 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_ATLAS_MANAGER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <stdint.h>
 #include <dali/public-api/common/dali-vector.h>
 #include <dali/public-api/rendering/texture-set.h>
+#include <stdint.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal DALI_INTERNAL
 {
-
 class AtlasManager;
 
-} // namespace Internal
+} // namespace DALI_INTERNAL
 
 class AtlasManager : public BaseHandle
 {
 public:
-
   typedef uint32_t SizeType;
   typedef SizeType AtlasId;
   typedef SizeType ImageId;
 
   struct AtlasSize
   {
-    SizeType mWidth;              ///< width of the atlas in pixels
-    SizeType mHeight;             ///< height of the atlas in pixels
-    SizeType mBlockWidth;         ///< width of a block in pixels
-    SizeType mBlockHeight;        ///< height of a block in pixels
+    SizeType mWidth;       ///< width of the atlas in pixels
+    SizeType mHeight;      ///< height of the atlas in pixels
+    SizeType mBlockWidth;  ///< width of a block in pixels
+    SizeType mBlockHeight; ///< height of a block in pixels
   };
 
   /**
@@ -57,38 +53,40 @@ public:
    */
   struct AtlasMetricsEntry
   {
-    AtlasSize mSize;                 ///< size of atlas and blocks
-    SizeType mBlocksUsed;            ///< number of blocks used in the atlas
-    SizeType mTotalBlocks;           ///< total blocks used by atlas
-    Pixel::Format mPixelFormat;      ///< pixel format of the atlas
+    AtlasSize     mSize;        ///< size of atlas and blocks
+    SizeType      mBlocksUsed;  ///< number of blocks used in the atlas
+    SizeType      mTotalBlocks; ///< total blocks used by atlas
+    Pixel::Format mPixelFormat; ///< pixel format of the atlas
   };
 
   struct Metrics
   {
     Metrics()
-    : mAtlasCount( 0u ),
-      mTextureMemoryUsed( 0u )
-    {}
+    : mAtlasCount(0u),
+      mTextureMemoryUsed(0u)
+    {
+    }
 
     ~Metrics()
-    {}
+    {
+    }
 
-    SizeType mAtlasCount;                               ///< number of atlases
-    SizeType mTextureMemoryUsed;                        ///< texture memory used by atlases
-    Dali::Vector< AtlasMetricsEntry > mAtlasMetrics;    ///< container of atlas information
+    SizeType                        mAtlasCount;        ///< number of atlases
+    SizeType                        mTextureMemoryUsed; ///< texture memory used by atlases
+    Dali::Vector<AtlasMetricsEntry> mAtlasMetrics;      ///< container of atlas information
   };
 
   struct Vertex2D
   {
-    Vector2 mPosition;        ///< Vertex posiiton
-    Vector2 mTexCoords;       ///< Vertex texture co-ordinates
-    Vector4 mColor;           ///< Vertex color
+    Vector2 mPosition;  ///< Vertex posiiton
+    Vector2 mTexCoords; ///< Vertex texture co-ordinates
+    Vector4 mColor;     ///< Vertex color
   };
 
   struct Mesh2D
   {
-    Vector< Vertex2D > mVertices;       ///< container of vertices
-    Vector< unsigned short > mIndices;        ///< container of indices
+    Vector<Vertex2D>       mVertices; ///< container of vertices
+    Vector<unsigned short> mIndices;  ///< container of indices
   };
 
   /**
@@ -125,11 +123,11 @@ public:
    */
   struct AtlasSlot
   {
-    ImageId mImageId;                           ///< Id of stored Image
-    AtlasId mAtlasId;                           ///< Id of Atlas containing this slot
+    ImageId mImageId; ///< Id of stored Image
+    AtlasId mAtlasId; ///< Id of Atlas containing this slot
   };
 
-  typedef Dali::Vector< AtlasManager::AtlasSlot > slotContainer;
+  typedef Dali::Vector<AtlasManager::AtlasSlot> slotContainer;
 
   /**
    * @brief Create a blank atlas of specific dimensions and pixel format with a certain block size
@@ -139,14 +137,14 @@ public:
    *
    * @return atlas Id
    */
-  AtlasId CreateAtlas( const AtlasSize& size, Pixel::Format pixelformat = Pixel::RGBA8888 );
+  AtlasId CreateAtlas(const AtlasSize& size, Pixel::Format pixelformat = Pixel::RGBA8888);
 
   /**
    * @brief Set the policy on failure to add an image to an atlas
    *
    * @param policy policy to carry out if add fails
    */
-  void SetAddPolicy( AddFailPolicy policy );
+  void SetAddPolicy(AddFailPolicy policy);
 
   /**
    * @brief Attempts to add an image to the most suitable atlas
@@ -161,9 +159,9 @@ public:
    *
    * @return true if a new atlas was created
    */
-  bool Add( const PixelData& image,
-            AtlasSlot& slot,
-            AtlasId atlas = 0 );
+  bool Add(const PixelData& image,
+           AtlasSlot&       slot,
+           AtlasId          atlas = 0);
 
   /**
    * @brief Remove previously added bitmapimage from atlas
@@ -172,7 +170,7 @@ public:
    *
    * @return if true then image has been removed from the atlas
    */
-  bool Remove( ImageId id );
+  bool Remove(ImageId id);
 
   /**
    * @brief Generate mesh data for a previously added image
@@ -182,10 +180,10 @@ public:
    * @param[out] mesh Mesh Data Object to populate with mesh data
    * @param[in] addReference Whether to increase the internal reference count for image or not
    */
-  void GenerateMeshData( ImageId id,
-                         const Vector2& position,
-                         Mesh2D& mesh,
-                         bool addReference = true );
+  void GenerateMeshData(ImageId        id,
+                        const Vector2& position,
+                        Mesh2D&        mesh,
+                        bool           addReference = true);
 
   /**
    * @brief Get the Texture containing an atlas
@@ -194,7 +192,7 @@ public:
    *
    * @return Atlas Handle
    */
-  Dali::Texture GetAtlasContainer( AtlasId atlas ) const;
+  Dali::Texture GetAtlasContainer(AtlasId atlas) const;
 
   /**
    * @brief Get the Id of the atlas containing an image
@@ -203,7 +201,7 @@ public:
    *
    * @return Atlas Id
    */
-  AtlasId GetAtlas( ImageId id );
+  AtlasId GetAtlas(ImageId id);
   /**
    * @brief Get the current size of an atlas
    *
@@ -211,7 +209,7 @@ public:
    *
    * @return AtlasSize structure for the atlas
    */
-  const AtlasSize& GetAtlasSize( AtlasId atlas );
+  const AtlasSize& GetAtlasSize(AtlasId atlas);
 
   /**
    * @brief Get the number of blocks available in an atlas
@@ -220,7 +218,7 @@ public:
    *
    * @return Number of blocks free in this atlas
    */
-  SizeType GetFreeBlocks( AtlasId atlas );
+  SizeType GetFreeBlocks(AtlasId atlas);
 
   /**
    * @brief Sets the pixel area of any new atlas and also the individual block size
@@ -229,7 +227,7 @@ public:
    *
    * @param blockSize pixel area in atlas for a block
    */
-  void SetNewAtlasSize( const AtlasSize& size );
+  void SetNewAtlasSize(const AtlasSize& size);
 
   /**
    * @brief Get the number of atlases created
@@ -245,14 +243,14 @@ public:
    *
    * @return Pixel format used by this atlas
    */
-  Pixel::Format GetPixelFormat( AtlasId atlas ) const;
+  Pixel::Format GetPixelFormat(AtlasId atlas) const;
 
   /**
    * @brief Fill in a metrics structure showing current status of this Atlas Manager
    *
    * @param[in] metrics metrics structure to be filled
    */
-  void GetMetrics( Metrics& metrics );
+  void GetMetrics(Metrics& metrics);
 
   /**
    * @brief Get TextureSet used by atlas
@@ -261,7 +259,7 @@ public:
    *
    * @return TextureSet used by atlas
    */
-  TextureSet GetTextures( AtlasId atlas ) const;
+  TextureSet GetTextures(AtlasId atlas) const;
 
   /**
    * @brief Set the texture set used by an atlas
@@ -269,12 +267,10 @@ public:
    * @param[in] atlas AtlasId
    * @param[in] textureSet The texture set to assign
    */
-  void SetTextures( AtlasId atlas, TextureSet& textureSet );
+  void SetTextures(AtlasId atlas, TextureSet& textureSet);
 
 private:
-
-  explicit DALI_INTERNAL AtlasManager(Internal::AtlasManager *impl);
-
+  explicit DALI_INTERNAL AtlasManager(Internal::AtlasManager* impl);
 };
 
 } // namespace Toolkit
index bbc1d2f..a8f8d80 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_ATLAS_MESH_FACTORY_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 namespace AtlasMeshFactory
 {
-  typedef uint32_t SizeType;
+typedef uint32_t SizeType;
 
-  /**
+/**
    * @brief Create a Quad that describes an area in an atlas and a position.
    *
    * @param[in]  width Width of area in pixels.
@@ -43,21 +40,21 @@ namespace AtlasMeshFactory
    * @param[in]  position Position to place area in space.
    * @param[out] mesh Mesh object to hold created quad.
    */
-  void CreateQuad( SizeType width,
-                   SizeType height,
-                   SizeType block,
-                   const Toolkit::AtlasManager::AtlasSize& atlasSize,
-                   const Vector2& position,
-                   Toolkit::AtlasManager::Mesh2D& mesh );
+void CreateQuad(SizeType                                width,
+                SizeType                                height,
+                SizeType                                block,
+                const Toolkit::AtlasManager::AtlasSize& atlasSize,
+                const Vector2&                          position,
+                Toolkit::AtlasManager::Mesh2D&          mesh);
 
-  /**
+/**
    * @brief Append one mesh to another.
    *
    * @param[in,out] first Mesh to append to.
    * @param[in]     second Mesh to append.
    */
-  void AppendMesh( Toolkit::AtlasManager::Mesh2D& first,
-                   const Toolkit::AtlasManager::Mesh2D& second );
+void AppendMesh(Toolkit::AtlasManager::Mesh2D&       first,
+                const Toolkit::AtlasManager::Mesh2D& second);
 
 } // namespace AtlasMeshFactory
 
index 131dd26..678e458 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_ATLAS_RENDERER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief Implementation of a text renderer based on dynamic atlases.
  *
@@ -37,7 +34,6 @@ namespace Text
 class AtlasRenderer : public Renderer
 {
 public:
-
   /**
    * @brief Create the renderer.
    */
@@ -46,14 +42,13 @@ public:
   /**
    * @copydoc Renderer::Render()
    */
-  virtual Actor Render( ViewInterface& view,
-                        Actor textControl,
-                        Property::Index animatablePropertyIndex,
-                        float& alignmentOffset,
-                        int depth );
+  virtual Actor Render(ViewInterface&  view,
+                       Actor           textControl,
+                       Property::Index animatablePropertyIndex,
+                       float&          alignmentOffset,
+                       int             depth);
 
 protected:
-
   /**
    * @brief Constructor.
    */
@@ -65,15 +60,13 @@ protected:
   virtual ~AtlasRenderer();
 
 private:
-
   // Undefined
-  AtlasRenderer( const AtlasRenderer& handle );
+  AtlasRenderer(const AtlasRenderer& handle);
 
   // Undefined
-  AtlasRenderer& operator=( const AtlasRenderer& handle );
+  AtlasRenderer& operator=(const AtlasRenderer& handle);
 
 private:
-
   struct Impl;
   Impl* mImpl;
 };
index fc52c5f..154abb3 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_TEXT_BACKEND_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 namespace Internal
 {
-
 /**
  * Implementation of the text rendering backend
  */
 class Backend : public BaseObject
 {
 public:
-
   /**
    * Constructor
    */
@@ -61,18 +56,16 @@ public:
   /**
    * @copydoc Dali::Toolkit::Text::Backend::NewRenderer()
    */
-  RendererPtr NewRenderer( unsigned int renderingType );
+  RendererPtr NewRenderer(unsigned int renderingType);
 
 private:
-
   // Undefined copy constructor.
-  Backend( const Backend& );
+  Backend(const Backend&);
 
   // Undefined assignment constructor.
-  Backend& operator=( Backend& );
+  Backend& operator=(Backend&);
 
 private:
-
   struct Impl;
   Impl* mImpl;
 
@@ -82,14 +75,14 @@ private:
 
 inline static Internal::Backend& GetImplementation(Backend& backend)
 {
-  DALI_ASSERT_ALWAYS( backend && "backend handle is empty" );
+  DALI_ASSERT_ALWAYS(backend && "backend handle is empty");
   BaseObject& handle = backend.GetBaseObject();
   return static_cast<Internal::Backend&>(handle);
 }
 
 inline static const Internal::Backend& GetImplementation(const Backend& backend)
 {
-  DALI_ASSERT_ALWAYS( backend && "backend handle is empty" );
+  DALI_ASSERT_ALWAYS(backend && "backend handle is empty");
   const BaseObject& handle = backend.GetBaseObject();
   return static_cast<const Internal::Backend&>(handle);
 }
index 2b554dc..926ecd3 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_BACKEND_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 namespace Internal DALI_INTERNAL
 {
 class Backend;
@@ -44,7 +41,6 @@ class Backend;
 class Backend : public BaseHandle
 {
 public:
-
   /**
    * @brief Retrieve a handle to the Backend instance.
    *
@@ -58,7 +54,7 @@ public:
    * @param[in] renderingType The type of rendering required.
    * @return A handle to the newly created renderer.
    */
-  RendererPtr NewRenderer( unsigned int renderingType );
+  RendererPtr NewRenderer(unsigned int renderingType);
 
   /**
    * @brief Create an uninitialized TextAbstraction handle.
@@ -77,7 +73,7 @@ public:
    *
    * @param[in] handle A reference to the copied handle.
    */
-  Backend( const Backend& handle );
+  Backend(const Backend& handle);
 
   /**
    * @brief This assignment operator is required for (smart) pointer semantics.
@@ -85,16 +81,15 @@ public:
    * @param [in] handle  A reference to the copied handle.
    * @return A reference to this.
    */
-  Backend& operator=( const Backend& handle );
+  Backend& operator=(const Backend& handle);
 
 public: // Not intended for application developers
-
   /**
    * @brief This constructor is used by Backend::Get().
    *
    * @param[in] backend A pointer to the internal backend object.
    */
-  explicit DALI_INTERNAL Backend( Internal::Backend* backend );
+  explicit DALI_INTERNAL Backend(Internal::Backend* backend);
 };
 
 } // namespace Text
index 65fbf50..6a2a003 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_RENDERER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 class Renderer;
 typedef IntrusivePtr<Renderer> RendererPtr;
 
@@ -46,7 +43,6 @@ class ViewInterface;
 class Renderer : public RefObject
 {
 public:
-
   /**
    * @brief Render the glyphs from a ViewInterface.
    *
@@ -57,14 +53,13 @@ public:
    * @param[in] depth The depth in the tree of the parent.
    * @return The Renderable actor used to position the text.
    */
-  virtual Actor Render( ViewInterface& view,
-                        Actor textContol,
-                        Property::Index animatablePropertyIndex,
-                        float& alignmentOffset,
-                        int depth ) = 0;
+  virtual Actor Render(ViewInterface&  view,
+                       Actor           textContol,
+                       Property::Index animatablePropertyIndex,
+                       float&          alignmentOffset,
+                       int             depth) = 0;
 
 protected:
-
   /**
    * @brief Constructor.
    */
@@ -76,12 +71,11 @@ protected:
   virtual ~Renderer();
 
 private:
-
   // Undefined
-  Renderer( const Renderer& handle );
+  Renderer(const Renderer& handle);
 
   // Undefined
-  Renderer& operator=( const Renderer& handle );
+  Renderer& operator=(const Renderer& handle);
 };
 
 } // namespace Text
index 453541b..2f29a47 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_TYPESETTER_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
+#include <dali-toolkit/devel-api/text/text-enumerations-devel.h>
+#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
+#include <dali/devel-api/text-abstraction/text-abstraction-definitions.h>
 #include <dali/public-api/common/intrusive-ptr.h>
-#include <dali/public-api/object/ref-object.h>
-#include <dali/public-api/images/pixel.h>
 #include <dali/public-api/images/pixel-data.h>
-#include <dali/devel-api/text-abstraction/text-abstraction-definitions.h>
-#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
-#include <dali-toolkit/devel-api/text/text-enumerations-devel.h>
+#include <dali/public-api/images/pixel.h>
+#include <dali/public-api/object/ref-object.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 class ModelInterface;
 class ViewModel;
 class Typesetter;
@@ -48,16 +45,15 @@ typedef IntrusivePtr<Typesetter> TypesetterPtr;
 class Typesetter : public RefObject
 {
 public:
-
   /**
    * @brief Behaviours of how to render the text.
    */
   enum RenderBehaviour
   {
-    RENDER_TEXT_AND_STYLES,  ///< Render both the text and its styles
-    RENDER_NO_TEXT,          ///< Do not render the text itself
-    RENDER_NO_STYLES,        ///< Do not render any styles
-    RENDER_MASK              ///< Render an alpha mask (for color glyphs with no color animation, e.g. emoji)
+    RENDER_TEXT_AND_STYLES, ///< Render both the text and its styles
+    RENDER_NO_TEXT,         ///< Do not render the text itself
+    RENDER_NO_STYLES,       ///< Do not render any styles
+    RENDER_MASK             ///< Render an alpha mask (for color glyphs with no color animation, e.g. emoji)
   };
 
   /**
@@ -65,13 +61,13 @@ public:
    */
   enum Style
   {
-    STYLE_NONE,              ///< No style
-    STYLE_MASK,              ///< Alpha mask
-    STYLE_SHADOW,            ///< Hard shadow
-    STYLE_SOFT_SHADOW,       ///< Soft shadow
-    STYLE_UNDERLINE,         ///< Underline
-    STYLE_OUTLINE,           ///< Outline
-    STYLE_BACKGROUND         ///< Text background
+    STYLE_NONE,        ///< No style
+    STYLE_MASK,        ///< Alpha mask
+    STYLE_SHADOW,      ///< Hard shadow
+    STYLE_SOFT_SHADOW, ///< Soft shadow
+    STYLE_UNDERLINE,   ///< Underline
+    STYLE_OUTLINE,     ///< Outline
+    STYLE_BACKGROUND   ///< Text background
   };
 
 public: // Constructor.
@@ -83,7 +79,7 @@ public: // Constructor.
    *
    * @param[in] model Pointer to the text's data model.
    */
-  static TypesetterPtr New( const ModelInterface* const model );
+  static TypesetterPtr New(const ModelInterface* const model);
 
 public:
   /**
@@ -110,7 +106,7 @@ public:
    *
    * @return A pixel data with the text rendered.
    */
-  PixelData Render( const Vector2& size, Toolkit::DevelText::TextDirection::Type textDirection, RenderBehaviour behaviour = RENDER_TEXT_AND_STYLES, bool ignoreHorizontalAlignment = false, Pixel::Format pixelFormat = Pixel::RGBA8888 );
+  PixelData Render(const Vector2& size, Toolkit::DevelText::TextDirection::Type textDirection, RenderBehaviour behaviour = RENDER_TEXT_AND_STYLES, bool ignoreHorizontalAlignment = false, Pixel::Format pixelFormat = Pixel::RGBA8888);
 
 private:
   /**
@@ -118,13 +114,13 @@ private:
    *
    * @param[in] model Pointer to the text's data model.
    */
-  Typesetter( const ModelInterface* const model );
+  Typesetter(const ModelInterface* const model);
 
   // Declared private and left undefined to avoid copies.
-  Typesetter( const Typesetter& handle );
+  Typesetter(const Typesetter& handle);
 
   // Declared private and left undefined to avoid copies.
-  Typesetter& operator=( const Typesetter& handle );
+  Typesetter& operator=(const Typesetter& handle);
 
   /**
    * @brief Create the image buffer for the given range of the glyphs in the given style.
@@ -146,7 +142,7 @@ private:
    *
    * @return An image buffer with the text.
    */
-  Devel::PixelBuffer CreateImageBuffer( const unsigned int bufferWidth, const unsigned int bufferHeight, Typesetter::Style style, bool ignoreHorizontalAlignment, Pixel::Format pixelFormat, int horizontalOffset, int verticalOffset, TextAbstraction::GlyphIndex fromGlyphIndex, TextAbstraction::GlyphIndex toGlyphIndex );
+  Devel::PixelBuffer CreateImageBuffer(const unsigned int bufferWidth, const unsigned int bufferHeight, Typesetter::Style style, bool ignoreHorizontalAlignment, Pixel::Format pixelFormat, int horizontalOffset, int verticalOffset, TextAbstraction::GlyphIndex fromGlyphIndex, TextAbstraction::GlyphIndex toGlyphIndex);
 
   /**
    * @brief Combine the two RGBA image buffers together.
@@ -165,10 +161,9 @@ private:
    * @return The combined image buffer with the text.
    *
    */
-  Devel::PixelBuffer CombineImageBuffer( Devel::PixelBuffer topPixelBuffer, Devel::PixelBuffer bottomPixelBuffer, const unsigned int bufferWidth, const unsigned int bufferHeightbool );
+  Devel::PixelBuffer CombineImageBuffer(Devel::PixelBuffer topPixelBuffer, Devel::PixelBuffer bottomPixelBuffer, const unsigned int bufferWidth, const unsigned int bufferHeightbool);
 
 protected:
-
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
    *
@@ -177,8 +172,7 @@ protected:
   virtual ~Typesetter();
 
 private:
-
-   ViewModel* mModel;
+  ViewModel* mModel;
 };
 
 } // namespace Text
index a3a1a30..48a8335 100644 (file)
-static const char *glyphy_common_glsl =
-"/*\n"
-" * Copyright 2012 Google, Inc. All Rights Reserved.\n"
-" *\n"
-" * Licensed under the Apache License, Version 2.0 (the \"License\");\n"
-" * you may not use this file except in compliance with the License.\n"
-" * You may obtain a copy of the License at\n"
-" *\n"
-" *     http://www.apache.org/licenses/LICENSE-2.0\n"
-" *\n"
-" * Unless required by applicable law or agreed to in writing, software\n"
-" * distributed under the License is distributed on an \"AS IS\" BASIS,\n"
-" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"
-" * See the License for the specific language governing permissions and\n"
-" * limitations under the License.\n"
-" *\n"
-" * Google Author(s): Behdad Esfahbod, Maysum Panju\n"
-" */\n"
-"\n"
-"\n"
-"#ifndef GLYPHY_INFINITY\n"
-"#  define GLYPHY_INFINITY 1e9\n"
-"#endif\n"
-"#ifndef GLYPHY_EPSILON\n"
-"#  define GLYPHY_EPSILON  1e-5\n"
-"#endif\n"
-"\n"
-"#ifndef GLYPHY_RGBA\n"
-"#  ifdef GLYPHY_BGRA\n"
-"#    define GLYPHY_RGBA(v) glyphy_bgra (v)\n"
-"#  else\n"
-"#    define GLYPHY_RGBA(v) glyphy_rgba (v)\n"
-"#  endif\n"
-"#endif\n"
-"\n"
-"vec4\n"
-"glyphy_rgba (const vec4 v)\n"
-"{\n"
-"  return v.rgba;\n"
-"}\n"
-"\n"
-"vec4\n"
-"glyphy_bgra (const vec4 v)\n"
-"{\n"
-"  return v.bgra;\n"
-"}\n"
-"\n"
-"\n"
-"struct glyphy_arc_t {\n"
-"  vec2  p0;\n"
-"  vec2  p1;\n"
-"  float d;\n"
-"};\n"
-"\n"
-"struct glyphy_arc_endpoint_t {\n"
-"  /* Second arc endpoint */\n"
-"  vec2  p;\n"
-"  /* Infinity if this endpoint does not form an arc with the previous\n"
-"   * endpoint.  Ie. a \"move_to\".  Test with glyphy_isinf().\n"
-"   * Arc depth otherwise.  */\n"
-"  float d;\n"
-"};\n"
-"\n"
-"struct glyphy_arc_list_t {\n"
-"  /* Number of endpoints in the list.\n"
-"   * Will be zero if we're far away inside or outside, in which case side is set.\n"
-"   * Will be -1 if this arc-list encodes a single line, in which case line_* are set. */\n"
-"  int num_endpoints;\n"
-"\n"
-"  /* If num_endpoints is zero, this specifies whether we are inside (-1)\n"
-"   * or outside (+1).  Otherwise we're unsure (0). */\n"
-"  int side;\n"
-"  /* Offset to the arc-endpoints from the beginning of the glyph blob */\n"
-"  int offset;\n"
-"\n"
-"  /* A single line is all we care about.  It's right here. */\n"
-"  float line_angle;\n"
-"  float line_distance; /* From nominal glyph center */\n"
-"};\n"
-"\n"
-"bool\n"
-"glyphy_isinf (const float v)\n"
-"{\n"
-"  return abs (v) >= GLYPHY_INFINITY * .5;\n"
-"}\n"
-"\n"
-"bool\n"
-"glyphy_iszero (const float v)\n"
-"{\n"
-"  return abs (v) <= GLYPHY_EPSILON * 2.;\n"
-"}\n"
-"\n"
-"vec2\n"
-"glyphy_ortho (const vec2 v)\n"
-"{\n"
-"  return vec2 (-v.y, v.x);\n"
-"}\n"
-"\n"
-"int\n"
-"glyphy_float_to_byte (const float v)\n"
-"{\n"
-"  return int (v * (256. - GLYPHY_EPSILON));\n"
-"}\n"
-"\n"
-"ivec4\n"
-"glyphy_vec4_to_bytes (const vec4 v)\n"
-"{\n"
-"  return ivec4 (v * (256. - GLYPHY_EPSILON));\n"
-"}\n"
-"\n"
-"ivec2\n"
-"glyphy_float_to_two_nimbles (const float v)\n"
-"{\n"
-"  int f = glyphy_float_to_byte (v);\n"
-"  return ivec2 (f / 16, int(mod (float(f), 16.)));\n"
-"}\n"
-"\n"
-"/* returns tan (2 * atan (d)) */\n"
-"float\n"
-"glyphy_tan2atan (const float d)\n"
-"{\n"
-"  return 2. * d / (1. - d * d);\n"
-"}\n"
-"\n"
-"glyphy_arc_endpoint_t\n"
-"glyphy_arc_endpoint_decode (const vec4 v, const ivec2 nominal_size)\n"
-"{\n"
-"  vec2 p = (vec2 (glyphy_float_to_two_nimbles (v.a)) + v.gb) / 16.;\n"
-"  float d = v.r;\n"
-"  if (d == 0.)\n"
-"    d = GLYPHY_INFINITY;\n"
-"  else\n"
-"#define GLYPHY_MAX_D .5\n"
-"    d = float(glyphy_float_to_byte (d) - 128) * GLYPHY_MAX_D / 127.;\n"
-"#undef GLYPHY_MAX_D\n"
-"  return glyphy_arc_endpoint_t (p * vec2(nominal_size), d);\n"
-"}\n"
-"\n"
-"vec2\n"
-"glyphy_arc_center (const glyphy_arc_t a)\n"
-"{\n"
-"  return mix (a.p0, a.p1, .5) +\n"
-"       glyphy_ortho (a.p1 - a.p0) / (2. * glyphy_tan2atan (a.d));\n"
-"}\n"
-"\n"
-"bool\n"
-"glyphy_arc_wedge_contains (const glyphy_arc_t a, const vec2 p)\n"
-"{\n"
-"  float d2 = glyphy_tan2atan (a.d);\n"
-"  return dot (p - a.p0, (a.p1 - a.p0) * mat2(1,  d2, -d2, 1)) >= 0. &&\n"
-"       dot (p - a.p1, (a.p1 - a.p0) * mat2(1, -d2,  d2, 1)) <= 0.;\n"
-"}\n"
-"\n"
-"float\n"
-"glyphy_arc_wedge_signed_dist_shallow (const glyphy_arc_t a, const vec2 p)\n"
-"{\n"
-"  vec2 v = normalize (a.p1 - a.p0);\n"
-"  float line_d = dot (p - a.p0, glyphy_ortho (v));\n"
-"  if (a.d == 0.)\n"
-"    return line_d;\n"
-"\n"
-"  float d0 = dot ((p - a.p0), v);\n"
-"  if (d0 < 0.)\n"
-"    return sign (line_d) * distance (p, a.p0);\n"
-"  float d1 = dot ((a.p1 - p), v);\n"
-"  if (d1 < 0.)\n"
-"    return sign (line_d) * distance (p, a.p1);\n"
-"  float r = 2. * a.d * (d0 * d1) / (d0 + d1);\n"
-"  if (r * line_d > 0.)\n"
-"    return sign (line_d) * min (abs (line_d + r), min (distance (p, a.p0), distance (p, a.p1)));\n"
-"  return line_d + r;\n"
-"}\n"
-"\n"
-"float\n"
-"glyphy_arc_wedge_signed_dist (const glyphy_arc_t a, const vec2 p)\n"
-"{\n"
-"  if (abs (a.d) <= .03)\n"
-"    return glyphy_arc_wedge_signed_dist_shallow (a, p);\n"
-"  vec2 c = glyphy_arc_center (a);\n"
-"  return sign (a.d) * (distance (a.p0, c) - distance (p, c));\n"
-"}\n"
-"\n"
-"float\n"
-"glyphy_arc_extended_dist (const glyphy_arc_t a, const vec2 p)\n"
-"{\n"
-"  /* Note: this doesn't handle points inside the wedge. */\n"
-"  vec2 m = mix (a.p0, a.p1, .5);\n"
-"  float d2 = glyphy_tan2atan (a.d);\n"
-"  if (dot (p - m, a.p1 - m) < 0.)\n"
-"    return dot (p - a.p0, normalize ((a.p1 - a.p0) * mat2(+d2, -1, +1, +d2)));\n"
-"  else\n"
-"    return dot (p - a.p1, normalize ((a.p1 - a.p0) * mat2(-d2, -1, +1, -d2)));\n"
-"}\n"
-"\n"
-"int\n"
-"glyphy_arc_list_offset (const vec2 p, const ivec2 nominal_size)\n"
-"{\n"
-"  ivec2 cell = ivec2 (clamp (floor (p), vec2 (0.,0.), vec2(nominal_size - 1)));\n"
-"  return cell.y * nominal_size.x + cell.x;\n"
-"}\n"
-"\n"
-"glyphy_arc_list_t\n"
-"glyphy_arc_list_decode (const vec4 v, const ivec2 nominal_size)\n"
-"{\n"
-"  glyphy_arc_list_t l;\n"
-"  ivec4 iv = glyphy_vec4_to_bytes (v);\n"
-"  l.side = 0; /* unsure */\n"
-"  if (iv.r == 0) { /* arc-list encoded */\n"
-"    l.offset = (iv.g * 256) + iv.b;\n"
-"    l.num_endpoints = iv.a;\n"
-"    if (l.num_endpoints == 255) {\n"
-"      l.num_endpoints = 0;\n"
-"      l.side = -1;\n"
-"    } else if (l.num_endpoints == 0)\n"
-"      l.side = +1;\n"
-"  } else { /* single line encoded */\n"
-"    l.num_endpoints = -1;\n"
-/*"    l.line_distance = float(((iv.r - 128) * 256 + iv.g) - 0x4000) / float (0x1FFF)\n"
-"                    * max (float (nominal_size.x), float (nominal_size.y));\n"
-"    l.line_angle = float(-((iv.b * 256 + iv.a) - 0x8000)) / float (0x7FFF) * 3.14159265358979;\n"*/
-/*"    l.line_distance = float(((iv.r - 128) * 256 + iv.g) - 16384) / 8191.0 \n"
-"                    * max (float (nominal_size.x), float (nominal_size.y));\n"
-"    l.line_angle = float(-((iv.b * 256 + iv.a) - 32768)) / 32767. * 3.14159;\n"*/
-
-"    l.line_distance = ( float(iv.r)/32. + 0.01*float(iv.g)/82.0 - 6.) \n"
-"                    * max (float (nominal_size.x), float (nominal_size.y));\n"
-"    l.line_angle = ( -float(iv.b)/40.74 - float( iv.a )*0.0001 )-3.142;\n"
-"  }\n"
-"  return l;\n"
-"}\n"
-;
+static const char* glyphy_common_glsl =
+  "/*\n"
+  " * Copyright 2012 Google, Inc. All Rights Reserved.\n"
+  " *\n"
+  " * Licensed under the Apache License, Version 2.0 (the \"License\");\n"
+  " * you may not use this file except in compliance with the License.\n"
+  " * You may obtain a copy of the License at\n"
+  " *\n"
+  " *     http://www.apache.org/licenses/LICENSE-2.0\n"
+  " *\n"
+  " * Unless required by applicable law or agreed to in writing, software\n"
+  " * distributed under the License is distributed on an \"AS IS\" BASIS,\n"
+  " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"
+  " * See the License for the specific language governing permissions and\n"
+  " * limitations under the License.\n"
+  " *\n"
+  " * Google Author(s): Behdad Esfahbod, Maysum Panju\n"
+  " */\n"
+  "\n"
+  "\n"
+  "#ifndef GLYPHY_INFINITY\n"
+  "#  define GLYPHY_INFINITY 1e9\n"
+  "#endif\n"
+  "#ifndef GLYPHY_EPSILON\n"
+  "#  define GLYPHY_EPSILON  1e-5\n"
+  "#endif\n"
+  "\n"
+  "#ifndef GLYPHY_RGBA\n"
+  "#  ifdef GLYPHY_BGRA\n"
+  "#    define GLYPHY_RGBA(v) glyphy_bgra (v)\n"
+  "#  else\n"
+  "#    define GLYPHY_RGBA(v) glyphy_rgba (v)\n"
+  "#  endif\n"
+  "#endif\n"
+  "\n"
+  "vec4\n"
+  "glyphy_rgba (const vec4 v)\n"
+  "{\n"
+  "  return v.rgba;\n"
+  "}\n"
+  "\n"
+  "vec4\n"
+  "glyphy_bgra (const vec4 v)\n"
+  "{\n"
+  "  return v.bgra;\n"
+  "}\n"
+  "\n"
+  "\n"
+  "struct glyphy_arc_t {\n"
+  "  vec2  p0;\n"
+  "  vec2  p1;\n"
+  "  float d;\n"
+  "};\n"
+  "\n"
+  "struct glyphy_arc_endpoint_t {\n"
+  "  /* Second arc endpoint */\n"
+  "  vec2  p;\n"
+  "  /* Infinity if this endpoint does not form an arc with the previous\n"
+  "   * endpoint.  Ie. a \"move_to\".  Test with glyphy_isinf().\n"
+  "   * Arc depth otherwise.  */\n"
+  "  float d;\n"
+  "};\n"
+  "\n"
+  "struct glyphy_arc_list_t {\n"
+  "  /* Number of endpoints in the list.\n"
+  "   * Will be zero if we're far away inside or outside, in which case side is set.\n"
+  "   * Will be -1 if this arc-list encodes a single line, in which case line_* are set. */\n"
+  "  int num_endpoints;\n"
+  "\n"
+  "  /* If num_endpoints is zero, this specifies whether we are inside (-1)\n"
+  "   * or outside (+1).  Otherwise we're unsure (0). */\n"
+  "  int side;\n"
+  "  /* Offset to the arc-endpoints from the beginning of the glyph blob */\n"
+  "  int offset;\n"
+  "\n"
+  "  /* A single line is all we care about.  It's right here. */\n"
+  "  float line_angle;\n"
+  "  float line_distance; /* From nominal glyph center */\n"
+  "};\n"
+  "\n"
+  "bool\n"
+  "glyphy_isinf (const float v)\n"
+  "{\n"
+  "  return abs (v) >= GLYPHY_INFINITY * .5;\n"
+  "}\n"
+  "\n"
+  "bool\n"
+  "glyphy_iszero (const float v)\n"
+  "{\n"
+  "  return abs (v) <= GLYPHY_EPSILON * 2.;\n"
+  "}\n"
+  "\n"
+  "vec2\n"
+  "glyphy_ortho (const vec2 v)\n"
+  "{\n"
+  "  return vec2 (-v.y, v.x);\n"
+  "}\n"
+  "\n"
+  "int\n"
+  "glyphy_float_to_byte (const float v)\n"
+  "{\n"
+  "  return int (v * (256. - GLYPHY_EPSILON));\n"
+  "}\n"
+  "\n"
+  "ivec4\n"
+  "glyphy_vec4_to_bytes (const vec4 v)\n"
+  "{\n"
+  "  return ivec4 (v * (256. - GLYPHY_EPSILON));\n"
+  "}\n"
+  "\n"
+  "ivec2\n"
+  "glyphy_float_to_two_nimbles (const float v)\n"
+  "{\n"
+  "  int f = glyphy_float_to_byte (v);\n"
+  "  return ivec2 (f / 16, int(mod (float(f), 16.)));\n"
+  "}\n"
+  "\n"
+  "/* returns tan (2 * atan (d)) */\n"
+  "float\n"
+  "glyphy_tan2atan (const float d)\n"
+  "{\n"
+  "  return 2. * d / (1. - d * d);\n"
+  "}\n"
+  "\n"
+  "glyphy_arc_endpoint_t\n"
+  "glyphy_arc_endpoint_decode (const vec4 v, const ivec2 nominal_size)\n"
+  "{\n"
+  "  vec2 p = (vec2 (glyphy_float_to_two_nimbles (v.a)) + v.gb) / 16.;\n"
+  "  float d = v.r;\n"
+  "  if (d == 0.)\n"
+  "    d = GLYPHY_INFINITY;\n"
+  "  else\n"
+  "#define GLYPHY_MAX_D .5\n"
+  "    d = float(glyphy_float_to_byte (d) - 128) * GLYPHY_MAX_D / 127.;\n"
+  "#undef GLYPHY_MAX_D\n"
+  "  return glyphy_arc_endpoint_t (p * vec2(nominal_size), d);\n"
+  "}\n"
+  "\n"
+  "vec2\n"
+  "glyphy_arc_center (const glyphy_arc_t a)\n"
+  "{\n"
+  "  return mix (a.p0, a.p1, .5) +\n"
+  "     glyphy_ortho (a.p1 - a.p0) / (2. * glyphy_tan2atan (a.d));\n"
+  "}\n"
+  "\n"
+  "bool\n"
+  "glyphy_arc_wedge_contains (const glyphy_arc_t a, const vec2 p)\n"
+  "{\n"
+  "  float d2 = glyphy_tan2atan (a.d);\n"
+  "  return dot (p - a.p0, (a.p1 - a.p0) * mat2(1,  d2, -d2, 1)) >= 0. &&\n"
+  "     dot (p - a.p1, (a.p1 - a.p0) * mat2(1, -d2,  d2, 1)) <= 0.;\n"
+  "}\n"
+  "\n"
+  "float\n"
+  "glyphy_arc_wedge_signed_dist_shallow (const glyphy_arc_t a, const vec2 p)\n"
+  "{\n"
+  "  vec2 v = normalize (a.p1 - a.p0);\n"
+  "  float line_d = dot (p - a.p0, glyphy_ortho (v));\n"
+  "  if (a.d == 0.)\n"
+  "    return line_d;\n"
+  "\n"
+  "  float d0 = dot ((p - a.p0), v);\n"
+  "  if (d0 < 0.)\n"
+  "    return sign (line_d) * distance (p, a.p0);\n"
+  "  float d1 = dot ((a.p1 - p), v);\n"
+  "  if (d1 < 0.)\n"
+  "    return sign (line_d) * distance (p, a.p1);\n"
+  "  float r = 2. * a.d * (d0 * d1) / (d0 + d1);\n"
+  "  if (r * line_d > 0.)\n"
+  "    return sign (line_d) * min (abs (line_d + r), min (distance (p, a.p0), distance (p, a.p1)));\n"
+  "  return line_d + r;\n"
+  "}\n"
+  "\n"
+  "float\n"
+  "glyphy_arc_wedge_signed_dist (const glyphy_arc_t a, const vec2 p)\n"
+  "{\n"
+  "  if (abs (a.d) <= .03)\n"
+  "    return glyphy_arc_wedge_signed_dist_shallow (a, p);\n"
+  "  vec2 c = glyphy_arc_center (a);\n"
+  "  return sign (a.d) * (distance (a.p0, c) - distance (p, c));\n"
+  "}\n"
+  "\n"
+  "float\n"
+  "glyphy_arc_extended_dist (const glyphy_arc_t a, const vec2 p)\n"
+  "{\n"
+  "  /* Note: this doesn't handle points inside the wedge. */\n"
+  "  vec2 m = mix (a.p0, a.p1, .5);\n"
+  "  float d2 = glyphy_tan2atan (a.d);\n"
+  "  if (dot (p - m, a.p1 - m) < 0.)\n"
+  "    return dot (p - a.p0, normalize ((a.p1 - a.p0) * mat2(+d2, -1, +1, +d2)));\n"
+  "  else\n"
+  "    return dot (p - a.p1, normalize ((a.p1 - a.p0) * mat2(-d2, -1, +1, -d2)));\n"
+  "}\n"
+  "\n"
+  "int\n"
+  "glyphy_arc_list_offset (const vec2 p, const ivec2 nominal_size)\n"
+  "{\n"
+  "  ivec2 cell = ivec2 (clamp (floor (p), vec2 (0.,0.), vec2(nominal_size - 1)));\n"
+  "  return cell.y * nominal_size.x + cell.x;\n"
+  "}\n"
+  "\n"
+  "glyphy_arc_list_t\n"
+  "glyphy_arc_list_decode (const vec4 v, const ivec2 nominal_size)\n"
+  "{\n"
+  "  glyphy_arc_list_t l;\n"
+  "  ivec4 iv = glyphy_vec4_to_bytes (v);\n"
+  "  l.side = 0; /* unsure */\n"
+  "  if (iv.r == 0) { /* arc-list encoded */\n"
+  "    l.offset = (iv.g * 256) + iv.b;\n"
+  "    l.num_endpoints = iv.a;\n"
+  "    if (l.num_endpoints == 255) {\n"
+  "      l.num_endpoints = 0;\n"
+  "      l.side = -1;\n"
+  "    } else if (l.num_endpoints == 0)\n"
+  "      l.side = +1;\n"
+  "  } else { /* single line encoded */\n"
+  "    l.num_endpoints = -1;\n"
+  /*"    l.line_distance = float(((iv.r - 128) * 256 + iv.g) - 0x4000) / float (0x1FFF)\n"
+  "                    * max (float (nominal_size.x), float (nominal_size.y));\n"
+  "    l.line_angle = float(-((iv.b * 256 + iv.a) - 0x8000)) / float (0x7FFF) * 3.14159265358979;\n"*/
+  /*"    l.line_distance = float(((iv.r - 128) * 256 + iv.g) - 16384) / 8191.0 \n"
+  "                    * max (float (nominal_size.x), float (nominal_size.y));\n"
+  "    l.line_angle = float(-((iv.b * 256 + iv.a) - 32768)) / 32767. * 3.14159;\n"*/
+  "    l.line_distance = ( float(iv.r)/32. + 0.01*float(iv.g)/82.0 - 6.) \n"
+  "                    * max (float (nominal_size.x), float (nominal_size.y));\n"
+  "    l.line_angle = ( -float(iv.b)/40.74 - float( iv.a )*0.0001 )-3.142;\n"
+  "  }\n"
+  "  return l;\n"
+  "}\n";
index 5de751f..37b1b13 100644 (file)
-static const char *glyphy_sdf_glsl =
-"/*\n"
-" * Copyright 2012 Google, Inc. All Rights Reserved.\n"
-" *\n"
-" * Licensed under the Apache License, Version 2.0 (the \"License\");\n"
-" * you may not use this file except in compliance with the License.\n"
-" * You may obtain a copy of the License at\n"
-" *\n"
-" *     http://www.apache.org/licenses/LICENSE-2.0\n"
-" *\n"
-" * Unless required by applicable law or agreed to in writing, software\n"
-" * distributed under the License is distributed on an \"AS IS\" BASIS,\n"
-" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"
-" * See the License for the specific language governing permissions and\n"
-" * limitations under the License.\n"
-" *\n"
-" * Google Author(s): Behdad Esfahbod, Maysum Panju\n"
-" */\n"
-"\n"
-"#ifndef GLYPHY_TEXTURE1D_FUNC\n"
-"#define GLYPHY_TEXTURE1D_FUNC glyphy_texture1D_func\n"
-"#endif\n"
-"#ifndef GLYPHY_TEXTURE1D_EXTRA_DECLS\n"
-"#define GLYPHY_TEXTURE1D_EXTRA_DECLS\n"
-"#endif\n"
-"#ifndef GLYPHY_TEXTURE1D_EXTRA_ARGS\n"
-"#define GLYPHY_TEXTURE1D_EXTRA_ARGS\n"
-"#endif\n"
-"\n"
-"#ifndef GLYPHY_SDF_TEXTURE1D_FUNC\n"
-"#define GLYPHY_SDF_TEXTURE1D_FUNC GLYPHY_TEXTURE1D_FUNC\n"
-"#endif\n"
-"#ifndef GLYPHY_SDF_TEXTURE1D_EXTRA_DECLS\n"
-"#define GLYPHY_SDF_TEXTURE1D_EXTRA_DECLS GLYPHY_TEXTURE1D_EXTRA_DECLS\n"
-"#endif\n"
-"#ifndef GLYPHY_SDF_TEXTURE1D_EXTRA_ARGS\n"
-"#define GLYPHY_SDF_TEXTURE1D_EXTRA_ARGS GLYPHY_TEXTURE1D_EXTRA_ARGS\n"
-"#endif\n"
-"#ifndef GLYPHY_SDF_TEXTURE1D\n"
-"#define GLYPHY_SDF_TEXTURE1D(offset) GLYPHY_RGBA(GLYPHY_SDF_TEXTURE1D_FUNC (offset GLYPHY_TEXTURE1D_EXTRA_ARGS))\n"
-"#endif\n"
-"\n"
-"#ifndef GLYPHY_MAX_NUM_ENDPOINTS\n"
-"#define GLYPHY_MAX_NUM_ENDPOINTS 32\n"
-"#endif\n"
-"\n"
-"glyphy_arc_list_t\n"
-"glyphy_arc_list (const vec2 p, const ivec2 nominal_size GLYPHY_SDF_TEXTURE1D_EXTRA_DECLS)\n"
-"{\n"
-"  int cell_offset = glyphy_arc_list_offset (p, nominal_size);\n"
-"  vec4 arc_list_data = GLYPHY_SDF_TEXTURE1D (cell_offset);\n"
-"  return glyphy_arc_list_decode (arc_list_data, nominal_size);\n"
-"}\n"
-"\n"
-"float\n"
-"glyphy_sdf (const vec2 p, const ivec2 nominal_size GLYPHY_SDF_TEXTURE1D_EXTRA_DECLS)\n"
-"{\n"
-"  glyphy_arc_list_t arc_list = glyphy_arc_list (p, nominal_size  GLYPHY_SDF_TEXTURE1D_EXTRA_ARGS);\n"
-"\n"
-"  /* Short-circuits */\n"
-"  if (arc_list.num_endpoints == 0) {\n"
-"    /* far-away cell */\n"
-"    return GLYPHY_INFINITY * float(arc_list.side);\n"
-"  } if (arc_list.num_endpoints == -1) {\n"
-"    /* single-line */\n"
-"    float angle = arc_list.line_angle;\n"
-"    vec2 n = vec2 (cos (angle), sin (angle));\n"
-"    return dot (p - (vec2(nominal_size) * .5), n) - arc_list.line_distance;\n"
-"  }\n"
-"\n"
-"  float side = float(arc_list.side);\n"
-"  float min_dist = GLYPHY_INFINITY;\n"
-"  glyphy_arc_t closest_arc;\n"
-"\n"
-"  glyphy_arc_endpoint_t endpoint_prev, endpoint;\n"
-"  endpoint_prev = glyphy_arc_endpoint_decode (GLYPHY_SDF_TEXTURE1D (arc_list.offset), nominal_size);\n"
-"  for (int i = 1; i < GLYPHY_MAX_NUM_ENDPOINTS; i++)\n"
-"  {\n"
-"    if (i >= arc_list.num_endpoints) {\n"
-"      break;\n"
-"    }\n"
-"    endpoint = glyphy_arc_endpoint_decode (GLYPHY_SDF_TEXTURE1D (arc_list.offset + i), nominal_size);\n"
-"    glyphy_arc_t a = glyphy_arc_t (endpoint_prev.p, endpoint.p, endpoint.d);\n"
-"    endpoint_prev = endpoint;\n"
-"    if (glyphy_isinf (a.d)) continue;\n"
-"\n"
-"    if (glyphy_arc_wedge_contains (a, p))\n"
-"    {\n"
-"      float sdist = glyphy_arc_wedge_signed_dist (a, p);\n"
-"      float udist = abs (sdist) * (1. - GLYPHY_EPSILON);\n"
-"      if (udist <= min_dist) {\n"
-"       min_dist = udist;\n"
-"       side = sign (sdist);"
-"      }\n"
-"    } else {\n"
-"      float udist = min (distance (p, a.p0), distance (p, a.p1));\n"
-"      if (udist < min_dist) {\n"
-"       min_dist = udist;\n"
-"       side = 0.; /* unsure */\n"
-"       closest_arc = a;\n"
-"      } else if (side == 0. && udist == min_dist) {\n"
-"       /* If this new distance is the same as the current minimum,\n"
-"        * compare extended distances.  Take the sign from the arc\n"
-"        * with larger extended distance. */\n"
-"       float old_ext_dist = glyphy_arc_extended_dist (closest_arc, p);\n"
-"       float new_ext_dist = glyphy_arc_extended_dist (a, p);\n"
-"\n"
-"       float ext_dist = abs (new_ext_dist) <= abs (old_ext_dist) ?\n"
-"                        old_ext_dist : new_ext_dist;\n"
-"\n"
-"#ifdef GLYPHY_SDF_PSEUDO_DISTANCE\n"
-"       /* For emboldening and stuff: */\n"
-"       min_dist = abs (ext_dist);\n"
-"#endif\n"
-"       side = sign (ext_dist);\n"
-"      }\n"
-"    }\n"
-"  }\n"
-"\n"
-"  if (side == 0.) {\n"
-"    // Technically speaking this should not happen, but it does.  So try to fix it.\n"
-"    float ext_dist = glyphy_arc_extended_dist (closest_arc, p);\n"
-"    side = sign (ext_dist);\n"
-"  }\n"
-"\n"
-"  return min_dist * side;\n"
-"}\n"
-"\n"
-"float\n"
-"glyphy_point_dist (const vec2 p, const ivec2 nominal_size GLYPHY_SDF_TEXTURE1D_EXTRA_DECLS)\n"
-"{\n"
-"  glyphy_arc_list_t arc_list = glyphy_arc_list (p, nominal_size  GLYPHY_SDF_TEXTURE1D_EXTRA_ARGS);\n"
-"\n"
-"  float side = float(arc_list.side);\n"
-"  float min_dist = GLYPHY_INFINITY;\n"
-"\n"
-"  if (arc_list.num_endpoints == 0)\n"
-"    return min_dist;\n"
-"\n"
-"  glyphy_arc_endpoint_t endpoint;\n"
-"  for (int i = 0; i < GLYPHY_MAX_NUM_ENDPOINTS; i++)\n"
-"  {\n"
-"    if (i >= arc_list.num_endpoints) {\n"
-"      break;\n"
-"    }\n"
-"    endpoint = glyphy_arc_endpoint_decode (GLYPHY_SDF_TEXTURE1D (arc_list.offset + i), nominal_size);\n"
-"    if (glyphy_isinf (endpoint.d)) continue;\n"
-"    min_dist = min (min_dist, distance (p, endpoint.p));\n"
-"  }\n"
-"  return min_dist;\n"
-"}\n"
-;
+static const char* glyphy_sdf_glsl =
+  "/*\n"
+  " * Copyright 2012 Google, Inc. All Rights Reserved.\n"
+  " *\n"
+  " * Licensed under the Apache License, Version 2.0 (the \"License\");\n"
+  " * you may not use this file except in compliance with the License.\n"
+  " * You may obtain a copy of the License at\n"
+  " *\n"
+  " *     http://www.apache.org/licenses/LICENSE-2.0\n"
+  " *\n"
+  " * Unless required by applicable law or agreed to in writing, software\n"
+  " * distributed under the License is distributed on an \"AS IS\" BASIS,\n"
+  " * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"
+  " * See the License for the specific language governing permissions and\n"
+  " * limitations under the License.\n"
+  " *\n"
+  " * Google Author(s): Behdad Esfahbod, Maysum Panju\n"
+  " */\n"
+  "\n"
+  "#ifndef GLYPHY_TEXTURE1D_FUNC\n"
+  "#define GLYPHY_TEXTURE1D_FUNC glyphy_texture1D_func\n"
+  "#endif\n"
+  "#ifndef GLYPHY_TEXTURE1D_EXTRA_DECLS\n"
+  "#define GLYPHY_TEXTURE1D_EXTRA_DECLS\n"
+  "#endif\n"
+  "#ifndef GLYPHY_TEXTURE1D_EXTRA_ARGS\n"
+  "#define GLYPHY_TEXTURE1D_EXTRA_ARGS\n"
+  "#endif\n"
+  "\n"
+  "#ifndef GLYPHY_SDF_TEXTURE1D_FUNC\n"
+  "#define GLYPHY_SDF_TEXTURE1D_FUNC GLYPHY_TEXTURE1D_FUNC\n"
+  "#endif\n"
+  "#ifndef GLYPHY_SDF_TEXTURE1D_EXTRA_DECLS\n"
+  "#define GLYPHY_SDF_TEXTURE1D_EXTRA_DECLS GLYPHY_TEXTURE1D_EXTRA_DECLS\n"
+  "#endif\n"
+  "#ifndef GLYPHY_SDF_TEXTURE1D_EXTRA_ARGS\n"
+  "#define GLYPHY_SDF_TEXTURE1D_EXTRA_ARGS GLYPHY_TEXTURE1D_EXTRA_ARGS\n"
+  "#endif\n"
+  "#ifndef GLYPHY_SDF_TEXTURE1D\n"
+  "#define GLYPHY_SDF_TEXTURE1D(offset) GLYPHY_RGBA(GLYPHY_SDF_TEXTURE1D_FUNC (offset GLYPHY_TEXTURE1D_EXTRA_ARGS))\n"
+  "#endif\n"
+  "\n"
+  "#ifndef GLYPHY_MAX_NUM_ENDPOINTS\n"
+  "#define GLYPHY_MAX_NUM_ENDPOINTS 32\n"
+  "#endif\n"
+  "\n"
+  "glyphy_arc_list_t\n"
+  "glyphy_arc_list (const vec2 p, const ivec2 nominal_size GLYPHY_SDF_TEXTURE1D_EXTRA_DECLS)\n"
+  "{\n"
+  "  int cell_offset = glyphy_arc_list_offset (p, nominal_size);\n"
+  "  vec4 arc_list_data = GLYPHY_SDF_TEXTURE1D (cell_offset);\n"
+  "  return glyphy_arc_list_decode (arc_list_data, nominal_size);\n"
+  "}\n"
+  "\n"
+  "float\n"
+  "glyphy_sdf (const vec2 p, const ivec2 nominal_size GLYPHY_SDF_TEXTURE1D_EXTRA_DECLS)\n"
+  "{\n"
+  "  glyphy_arc_list_t arc_list = glyphy_arc_list (p, nominal_size  GLYPHY_SDF_TEXTURE1D_EXTRA_ARGS);\n"
+  "\n"
+  "  /* Short-circuits */\n"
+  "  if (arc_list.num_endpoints == 0) {\n"
+  "    /* far-away cell */\n"
+  "    return GLYPHY_INFINITY * float(arc_list.side);\n"
+  "  } if (arc_list.num_endpoints == -1) {\n"
+  "    /* single-line */\n"
+  "    float angle = arc_list.line_angle;\n"
+  "    vec2 n = vec2 (cos (angle), sin (angle));\n"
+  "    return dot (p - (vec2(nominal_size) * .5), n) - arc_list.line_distance;\n"
+  "  }\n"
+  "\n"
+  "  float side = float(arc_list.side);\n"
+  "  float min_dist = GLYPHY_INFINITY;\n"
+  "  glyphy_arc_t closest_arc;\n"
+  "\n"
+  "  glyphy_arc_endpoint_t endpoint_prev, endpoint;\n"
+  "  endpoint_prev = glyphy_arc_endpoint_decode (GLYPHY_SDF_TEXTURE1D (arc_list.offset), nominal_size);\n"
+  "  for (int i = 1; i < GLYPHY_MAX_NUM_ENDPOINTS; i++)\n"
+  "  {\n"
+  "    if (i >= arc_list.num_endpoints) {\n"
+  "      break;\n"
+  "    }\n"
+  "    endpoint = glyphy_arc_endpoint_decode (GLYPHY_SDF_TEXTURE1D (arc_list.offset + i), nominal_size);\n"
+  "    glyphy_arc_t a = glyphy_arc_t (endpoint_prev.p, endpoint.p, endpoint.d);\n"
+  "    endpoint_prev = endpoint;\n"
+  "    if (glyphy_isinf (a.d)) continue;\n"
+  "\n"
+  "    if (glyphy_arc_wedge_contains (a, p))\n"
+  "    {\n"
+  "      float sdist = glyphy_arc_wedge_signed_dist (a, p);\n"
+  "      float udist = abs (sdist) * (1. - GLYPHY_EPSILON);\n"
+  "      if (udist <= min_dist) {\n"
+  "       min_dist = udist;\n"
+  "       side = sign (sdist);"
+  "      }\n"
+  "    } else {\n"
+  "      float udist = min (distance (p, a.p0), distance (p, a.p1));\n"
+  "      if (udist < min_dist) {\n"
+  "       min_dist = udist;\n"
+  "       side = 0.; /* unsure */\n"
+  "       closest_arc = a;\n"
+  "      } else if (side == 0. && udist == min_dist) {\n"
+  "       /* If this new distance is the same as the current minimum,\n"
+  "        * compare extended distances.  Take the sign from the arc\n"
+  "        * with larger extended distance. */\n"
+  "       float old_ext_dist = glyphy_arc_extended_dist (closest_arc, p);\n"
+  "       float new_ext_dist = glyphy_arc_extended_dist (a, p);\n"
+  "\n"
+  "       float ext_dist = abs (new_ext_dist) <= abs (old_ext_dist) ?\n"
+  "                        old_ext_dist : new_ext_dist;\n"
+  "\n"
+  "#ifdef GLYPHY_SDF_PSEUDO_DISTANCE\n"
+  "       /* For emboldening and stuff: */\n"
+  "       min_dist = abs (ext_dist);\n"
+  "#endif\n"
+  "       side = sign (ext_dist);\n"
+  "      }\n"
+  "    }\n"
+  "  }\n"
+  "\n"
+  "  if (side == 0.) {\n"
+  "    // Technically speaking this should not happen, but it does.  So try to fix it.\n"
+  "    float ext_dist = glyphy_arc_extended_dist (closest_arc, p);\n"
+  "    side = sign (ext_dist);\n"
+  "  }\n"
+  "\n"
+  "  return min_dist * side;\n"
+  "}\n"
+  "\n"
+  "float\n"
+  "glyphy_point_dist (const vec2 p, const ivec2 nominal_size GLYPHY_SDF_TEXTURE1D_EXTRA_DECLS)\n"
+  "{\n"
+  "  glyphy_arc_list_t arc_list = glyphy_arc_list (p, nominal_size  GLYPHY_SDF_TEXTURE1D_EXTRA_ARGS);\n"
+  "\n"
+  "  float side = float(arc_list.side);\n"
+  "  float min_dist = GLYPHY_INFINITY;\n"
+  "\n"
+  "  if (arc_list.num_endpoints == 0)\n"
+  "    return min_dist;\n"
+  "\n"
+  "  glyphy_arc_endpoint_t endpoint;\n"
+  "  for (int i = 0; i < GLYPHY_MAX_NUM_ENDPOINTS; i++)\n"
+  "  {\n"
+  "    if (i >= arc_list.num_endpoints) {\n"
+  "      break;\n"
+  "    }\n"
+  "    endpoint = glyphy_arc_endpoint_decode (GLYPHY_SDF_TEXTURE1D (arc_list.offset + i), nominal_size);\n"
+  "    if (glyphy_isinf (endpoint.d)) continue;\n"
+  "    min_dist = min (min_dist, distance (p, endpoint.p));\n"
+  "  }\n"
+  "  return min_dist;\n"
+  "}\n";
index a7d2061..4a16cd2 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_GLYPHY_SHADER_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief A Shader based on GLyphy authored by Behdad Esfahbod & Maysum Panju.
  *
@@ -39,13 +36,12 @@ namespace Text
 class GlyphyShader : public Shader
 {
 public:
-
   /**
    * @brief Create the blob atlas.
    *
    * @param[in] atlasInfo The metrics of the texture atlas storing vector data.
    */
-  static GlyphyShader New( const Vector4& atlasInfo );
+  static GlyphyShader New(const Vector4& atlasInfo);
 
   /**
    * @brief Create an uninitialized GlyphyShader handle.
@@ -60,9 +56,7 @@ public:
   ~GlyphyShader();
 
 private: // Not intended for application developer
-
-  GlyphyShader( Shader handle );
-
+  GlyphyShader(Shader handle);
 };
 
 } // namespace Text
index 4a7e75b..8726ae9 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_VECTOR_BASED_RENDERER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief A vector-based renderer
  *
@@ -37,7 +34,6 @@ namespace Text
 class VectorBasedRenderer : public Renderer
 {
 public:
-
   /**
    * @brief Create the renderer.
    */
@@ -46,14 +42,13 @@ public:
   /**
    * @copydoc Renderer::Render()
    */
-  virtual Actor Render( ViewInterface& view,
-                        Actor textControl,  // Functionality not supported but defined in interface
-                        Property::Index animatablePropertyIndex, // Functionality not supported but defined in interface
-                        float& alignmentOffset,
-                        int depth );
+  virtual Actor Render(ViewInterface&  view,
+                       Actor           textControl,             // Functionality not supported but defined in interface
+                       Property::Index animatablePropertyIndex, // Functionality not supported but defined in interface
+                       float&          alignmentOffset,
+                       int             depth);
 
 protected:
-
   /**
    * @brief Constructor.
    */
@@ -65,15 +60,13 @@ protected:
   virtual ~VectorBasedRenderer();
 
 private:
-
   // Undefined
-  VectorBasedRenderer( const VectorBasedRenderer& handle );
+  VectorBasedRenderer(const VectorBasedRenderer& handle);
 
   // Undefined
-  VectorBasedRenderer& operator=( const VectorBasedRenderer& handle );
+  VectorBasedRenderer& operator=(const VectorBasedRenderer& handle);
 
 private:
-
   struct Impl;
   Impl* mImpl;
 };
index c9a7590..d58848a 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_VECTOR_BLOB_ATLAS_SHARE_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief A singleton for sharing atlases containing vector data
  *
@@ -37,7 +34,6 @@ namespace Text
 class VectorBlobAtlasShare : public BaseHandle
 {
 public:
-
   /**
    * @brief Create a VectorBlobAtlasShare handle.
    *
@@ -75,11 +71,9 @@ public:
   VectorBlobAtlas* GetNewAtlas();
 
 private:
-
   class Impl;
 
-  explicit DALI_INTERNAL VectorBlobAtlasShare( VectorBlobAtlasShare::Impl* impl );
-
+  explicit DALI_INTERNAL VectorBlobAtlasShare(VectorBlobAtlasShare::Impl* impl);
 };
 
 } // namespace Text
index 592d4e0..5900696 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_VECTOR_BLOB_ATLAS_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/text-abstraction/text-abstraction-definitions.h>
 #include <dali/public-api/object/ref-object.h>
 #include <dali/public-api/rendering/shader.h>
-#include <dali/public-api/rendering/texture.h>
 #include <dali/public-api/rendering/texture-set.h>
-#include <dali/devel-api/text-abstraction/text-abstraction-definitions.h>
+#include <dali/public-api/rendering/texture.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/text/text-definitions.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 typedef Dali::TextAbstraction::VectorBlob VectorBlob;
 
 struct BlobCoordinate
@@ -51,7 +48,6 @@ struct BlobCoordinate
 class VectorBlobAtlas : public RefObject
 {
 public:
-
   /**
    * @brief Create a blob atlas.
    *
@@ -61,10 +57,10 @@ public:
    * @param[in] itemHeightQuantum The item height quantum.
    * When blobs are added to columns in the atlas, the Y position is advanced by a multiple of this value.
    */
-  VectorBlobAtlas( unsigned int textureWidth,
-                   unsigned int textureHeight,
-                   unsigned int itemWidth,
-                   unsigned int itemHeightQuantum );
+  VectorBlobAtlas(unsigned int textureWidth,
+                  unsigned int textureHeight,
+                  unsigned int itemWidth,
+                  unsigned int itemHeightQuantum);
 
   /**
    * @brief Query whether the atlas is full.
@@ -82,9 +78,9 @@ public:
    * Otherwise coords will not be written into.
    * @return True if the glyph was found.
    */
-  bool FindGlyph( FontId fontId,
-                  GlyphIndex glyphIndex,
-                  BlobCoordinate* coords );
+  bool FindGlyph(FontId          fontId,
+                 GlyphIndex      glyphIndex,
+                 BlobCoordinate* coords);
 
   /**
    * @brief Add a glyph to the atlas.
@@ -98,13 +94,13 @@ public:
    * @param[out] coords An array of 4 UV coordinates will be returned.
    * @return True if the glyph was added. Otherwise the atlas is now full.
    */
-  bool AddGlyph( unsigned int fontId,
-                 unsigned int glyphIndex,
-                 VectorBlob* blob,
-                 unsigned int length,
-                 unsigned int nominalWidth,
-                 unsigned int nominalHeight,
-                 BlobCoordinate* coords );
+  bool AddGlyph(unsigned int    fontId,
+                unsigned int    glyphIndex,
+                VectorBlob*     blob,
+                unsigned int    length,
+                unsigned int    nominalWidth,
+                unsigned int    nominalHeight,
+                BlobCoordinate* coords);
 
   /**
    * @brief Get the info required by the GLyphy shader.
@@ -113,7 +109,7 @@ public:
    */
   Vector4 GetInfo() const
   {
-    return Vector4( mTextureWidth, mTextureHeight, mItemWidth, mItemHeightQuantum );
+    return Vector4(mTextureWidth, mTextureHeight, mItemWidth, mItemHeightQuantum);
   }
 
   /**
@@ -127,7 +123,6 @@ public:
   }
 
 private:
-
   /**
    * @brief Helper for uploading data to the texture atlas.
    *
@@ -137,14 +132,13 @@ private:
    * @param[in] height The height of the data to upload.
    * @param[in] blob The blob of data to upload.
    */
-  void TexSubImage( unsigned int offsetX,
-                    unsigned int offsetY,
-                    unsigned int width,
-                    unsigned int height,
-                    VectorBlob* blob );
+  void TexSubImage(unsigned int offsetX,
+                   unsigned int offsetY,
+                   unsigned int width,
+                   unsigned int height,
+                   VectorBlob*  blob);
 
 private:
-
   unsigned int mTextureWidth;
   unsigned int mTextureHeight;
 
@@ -170,8 +164,8 @@ private:
     BlobCoordinate coords[4];
   };
 
-  std::vector< Key >  mItemLookup;
-  std::vector< Item > mItemCache;
+  std::vector<Key>  mItemLookup;
+  std::vector<Item> mItemCache;
 
   bool mIsFull;
 };
old mode 100755 (executable)
new mode 100644 (file)
index 1b81e7a..a84810a
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_VIEW_MODEL_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/common/dali-vector.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/text/text-enumerations.h>
-#include <dali-toolkit/internal/text/text-model-interface.h>
 #include <dali-toolkit/devel-api/text/text-enumerations-devel.h>
+#include <dali-toolkit/internal/text/text-model-interface.h>
+#include <dali-toolkit/public-api/text/text-enumerations.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief Responsible of creating and store temporary modifications of the text model.
  * i.e. The elide of text.
@@ -49,7 +46,7 @@ public:
    *
    * @param[in] model Pointer to the text's model interface.
    */
-  ViewModel( const ModelInterface* const model );
+  ViewModel(const ModelInterface* const model);
 
   /**
    * @brief Virtual destructor.
@@ -191,7 +188,7 @@ public:
   /**
    * @copydoc ModelInterface::GetUnderlineRuns()
    */
-  void GetUnderlineRuns( GlyphRun* underlineRuns, UnderlineRunIndex index, Length numberOfRuns ) const override;
+  void GetUnderlineRuns(GlyphRun* underlineRuns, UnderlineRunIndex index, Length numberOfRuns) const override;
 
   /**
    * @copydoc ModelInterface::GetOutlineColor()
@@ -213,7 +210,7 @@ public:
    */
   bool IsBackgroundEnabled() const override;
 
-/**
+  /**
    * @brief Does the text elide.
    *
    * It stores a copy of the visible glyphs and removes as many glyphs as needed
old mode 100755 (executable)
new mode 100644 (file)
index ce0698f..acdd7a7
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_SCRIPT_RUN_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief Run of characters with the same script.
  */
 struct ScriptRun
 {
-  CharacterRun characterRun; ///< The initial character index and the number of characters of the run.
-  Script       script;       ///< Script of the run.
+  CharacterRun characterRun;  ///< The initial character index and the number of characters of the run.
+  Script       script;        ///< Script of the run.
   bool         isRightToLeft; ///< Whether is right to left direction
 };
 
index a60865a..305329f 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_SEGMENTATION_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 class LogicalModel;
 
 /**
@@ -49,10 +46,10 @@ class LogicalModel;
  * @param[in] numberOfCharacters The number of characters.
  * @param[out] lineBreakInfo The line break info
  */
-void SetLineBreakInfo( const Vector<Character>& text,
-                       CharacterIndex startIndex,
-                       Length numberOfCharacters,
-                       Vector<LineBreakInfo>& lineBreakInfo );
+void SetLineBreakInfo(const Vector<Character>& text,
+                      CharacterIndex           startIndex,
+                      Length                   numberOfCharacters,
+                      Vector<LineBreakInfo>&   lineBreakInfo);
 
 /**
  * Sets word break info.
@@ -65,10 +62,10 @@ void SetLineBreakInfo( const Vector<Character>& text,
  * @param[in] numberOfCharacters The number of characters.
  * @param[out] wordBreakInfo The word break info.
  */
-void SetWordBreakInfo( const Vector<Character>& text,
-                       CharacterIndex startIndex,
-                       Length numberOfCharacters,
-                       Vector<WordBreakInfo>& wordBreakInfo );
+void SetWordBreakInfo(const Vector<Character>& text,
+                      CharacterIndex           startIndex,
+                      Length                   numberOfCharacters,
+                      Vector<WordBreakInfo>&   wordBreakInfo);
 
 } // namespace Text
 
index b38b0a0..549031b 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_SHAPER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 class LogicalModel;
 class VisualModel;
 
@@ -52,17 +49,17 @@ class VisualModel;
  * @param[out] charactersPerGlyph Vector containing the number of characters per glyph.
  * @param[out] newParagraphGlyphs Vector containing the indices to the new paragraph glyphs.
  */
-void ShapeText( const Vector<Character>& text,
-                const Vector<LineBreakInfo>& lineBreakInfo,
-                const Vector<ScriptRun>& scripts,
-                const Vector<FontRun>& fonts,
-                CharacterIndex startCharacterIndex,
-                GlyphIndex startGlyphIndex,
-                Length numberOfCharacters,
-                Vector<GlyphInfo>& glyphs,
-                Vector<CharacterIndex>& glyphToCharacterMap,
-                Vector<Length>& charactersPerGlyph,
-                Vector<GlyphIndex>& newParagraphGlyphs );
+void ShapeText(const Vector<Character>&     text,
+               const Vector<LineBreakInfo>& lineBreakInfo,
+               const Vector<ScriptRun>&     scripts,
+               const Vector<FontRun>&       fonts,
+               CharacterIndex               startCharacterIndex,
+               GlyphIndex                   startGlyphIndex,
+               Length                       numberOfCharacters,
+               Vector<GlyphInfo>&           glyphs,
+               Vector<CharacterIndex>&      glyphToCharacterMap,
+               Vector<Length>&              charactersPerGlyph,
+               Vector<GlyphIndex>&          newParagraphGlyphs);
 
 } // namespace Text
 
index ce5af88..8e69be5 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_CONTROL_INTERFACE_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief An interface that the Text::Controller uses to request a text relayout.
  */
 class ControlInterface
 {
 public:
-
   /**
    * @brief Virtual destructor.
    */
   virtual ~ControlInterface()
-  {}
+  {
+  }
 
   /**
    * @brief Called to request a text relayout.
index 51d1648..67902fb 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_CONTROLLER_EVENT_HANDLER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/input-method-context.h>
 #include <dali/public-api/events/gesture-enumerations.h>
 #include <dali/public-api/events/key-event.h>
 #include <dali/public-api/math/vector2.h>
-#include <dali/devel-api/adaptor-framework/input-method-context.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/controls/text-controls/text-selection-popup.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 struct Controller::EventHandler
 {
   static void KeyboardFocusGainEvent(Controller& controller);
@@ -52,7 +49,11 @@ struct Controller::EventHandler
   static void TextInsertedEvent(Controller& controller);
   static void TextDeletedEvent(Controller& controller);
   static bool DeleteEvent(Controller& controller, int keyCode);
-  static InputMethodContext::CallbackData OnInputMethodContextEvent(Controller& controller, InputMethodContext& inputMethodContext, const InputMethodContext::EventData& inputMethodContextEvent);
+
+  static InputMethodContext::CallbackData OnInputMethodContextEvent(Controller&                          controller,
+                                                                    InputMethodContext&                  inputMethodContext,
+                                                                    const InputMethodContext::EventData& inputMethodContextEvent);
+
   static void PasteClipboardItemEvent(Controller& controller);
   static void DecorationEvent(Controller& controller, HandleType handleType, HandleState state, float x, float y);
   static void TextPopupButtonTouched(Controller& controller, Dali::Toolkit::TextSelectionPopup::Buttons button);
index 7399fdd..e1e9dbb 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_CONTROLLER_IMPL_EVENT_HANDLER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * Contains all the event handling methods for Text::Controller::Impl
  */
@@ -89,7 +86,7 @@ struct ControllerImplEventHandler
    * @param controllerImpl A reference to Controller::Impl
    * @param event The event
    */
-  static void OnSelectEvent(Controller::Impl& controllerImpl, const Event& event );
+  static void OnSelectEvent(Controller::Impl& controllerImpl, const Event& event);
 
   /**
    * @brief Called by Controller::Impl when a select all event is received.
@@ -108,7 +105,6 @@ struct ControllerImplEventHandler
   static void OnSelectNoneEvent(Controller::Impl& controllerImpl);
 
 private:
-
   /**
    * @brief Called by OnHandleEvent when we are in the Pressed state.
    *
old mode 100755 (executable)
new mode 100644 (file)
index db02721..414faf5
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_CONTROLLER_IMPL_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/rendering/shader.h>
 
 // INTERNAL INCLUDES
+#include <dali-toolkit/devel-api/styling/style-manager-devel.h>
 #include <dali-toolkit/internal/text/input-style.h>
 #include <dali-toolkit/internal/text/text-controller.h>
 #include <dali-toolkit/internal/text/text-model.h>
 #include <dali-toolkit/internal/text/text-view.h>
 #include <dali-toolkit/public-api/styling/style-manager.h>
-#include <dali-toolkit/devel-api/styling/style-manager-devel.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
-const float DEFAULT_TEXTFIT_MIN = 10.f;
-const float DEFAULT_TEXTFIT_MAX = 100.f;
-const float DEFAULT_TEXTFIT_STEP = 1.f;
+const float DEFAULT_TEXTFIT_MIN     = 10.f;
+const float DEFAULT_TEXTFIT_MAX     = 100.f;
+const float DEFAULT_TEXTFIT_STEP    = 1.f;
 const float DEFAULT_FONT_SIZE_SCALE = 1.f;
 
 //Forward declarations
@@ -72,21 +69,21 @@ struct Event
 
   union Param
   {
-    int mInt;
+    int          mInt;
     unsigned int mUint;
-    float mFloat;
-    bool mBool;
+    float        mFloat;
+    bool         mBool;
   };
 
-  Event( Type eventType )
-  : type( eventType )
+  Event(Type eventType)
+  : type(eventType)
   {
     p1.mInt = 0;
     p2.mInt = 0;
     p3.mInt = 0;
   }
 
-  Type type;
+  Type  type;
   Param p1;
   Param p2;
   Param p3;
@@ -108,13 +105,13 @@ struct EventData
     TEXT_PANNING
   };
 
-  EventData( DecoratorPtr decorator, InputMethodContext& inputMethodContext );
+  EventData(DecoratorPtr decorator, InputMethodContext& inputMethodContext);
 
   ~EventData() = default;
 
-  static bool IsEditingState( State stateToCheck )
+  static bool IsEditingState(State stateToCheck)
   {
-    return ( stateToCheck == EDITING || stateToCheck == EDITING_WITH_POPUP || stateToCheck == EDITING_WITH_GRAB_HANDLE || stateToCheck == EDITING_WITH_PASTE_POPUP );
+    return (stateToCheck == EDITING || stateToCheck == EDITING_WITH_POPUP || stateToCheck == EDITING_WITH_GRAB_HANDLE || stateToCheck == EDITING_WITH_PASTE_POPUP);
   }
 
   DecoratorPtr       mDecorator;               ///< Pointer to the decorator.
@@ -128,63 +125,63 @@ struct EventData
    * This is used to delay handling events until after the model has been updated.
    * The number of updates to the model is minimized to improve performance.
    */
-  std::vector<Event> mEventQueue;              ///< The queue of touch events etc.
+  std::vector<Event> mEventQueue; ///< The queue of touch events etc.
 
   Vector<InputStyle::Mask> mInputStyleChangedQueue; ///< Queue of changes in the input style. Used to emit the signal in the iddle callback.
 
-  InputStyle         mInputStyle;              ///< The style to be set to the new inputed text.
+  InputStyle mInputStyle; ///< The style to be set to the new inputed text.
 
-  State              mPreviousState;           ///< Stores the current state before it's updated with the new one.
-  State              mState;                   ///< Selection mode, edit mode etc.
+  State mPreviousState; ///< Stores the current state before it's updated with the new one.
+  State mState;         ///< Selection mode, edit mode etc.
 
-  CharacterIndex     mPrimaryCursorPosition;   ///< Index into logical model for primary cursor.
-  CharacterIndex     mLeftSelectionPosition;   ///< Index into logical model for left selection handle.
-  CharacterIndex     mRightSelectionPosition;  ///< Index into logical model for right selection handle.
+  CharacterIndex mPrimaryCursorPosition;  ///< Index into logical model for primary cursor.
+  CharacterIndex mLeftSelectionPosition;  ///< Index into logical model for left selection handle.
+  CharacterIndex mRightSelectionPosition; ///< Index into logical model for right selection handle.
 
-  CharacterIndex     mPreEditStartPosition;    ///< Used to remove the pre-edit text if necessary.
-  Length             mPreEditLength;           ///< Used to remove the pre-edit text if necessary.
+  CharacterIndex mPreEditStartPosition; ///< Used to remove the pre-edit text if necessary.
+  Length         mPreEditLength;        ///< Used to remove the pre-edit text if necessary.
 
-  float              mCursorHookPositionX;     ///< Used to move the cursor with the keys or when scrolling the text vertically with the handles.
+  float mCursorHookPositionX; ///< Used to move the cursor with the keys or when scrolling the text vertically with the handles.
 
   Controller::NoTextTap::Action mDoubleTapAction; ///< Action to be done when there is a double tap on top of 'no text'
   Controller::NoTextTap::Action mLongPressAction; ///< Action to be done when there is a long press on top of 'no text'
 
-  bool mIsShowingPlaceholderText        : 1;   ///< True if the place-holder text is being displayed.
-  bool mPreEditFlag                     : 1;   ///< True if the model contains text in pre-edit state.
-  bool mDecoratorUpdated                : 1;   ///< True if the decorator was updated during event processing.
-  bool mCursorBlinkEnabled              : 1;   ///< True if cursor should blink when active.
-  bool mGrabHandleEnabled               : 1;   ///< True if grab handle is enabled.
-  bool mGrabHandlePopupEnabled          : 1;   ///< True if the grab handle popu-up should be shown.
-  bool mSelectionEnabled                : 1;   ///< True if selection handles, highlight etc. are enabled.
-  bool mUpdateCursorHookPosition        : 1;   ///< True if the cursor hook position must be updated. Used to move the cursor with the keys 'up' and 'down'.
-  bool mUpdateCursorPosition            : 1;   ///< True if the visual position of the cursor must be recalculated.
-  bool mUpdateGrabHandlePosition        : 1;   ///< True if the visual position of the grab handle must be recalculated.
-  bool mUpdateLeftSelectionPosition     : 1;   ///< True if the visual position of the left selection handle must be recalculated.
-  bool mUpdateRightSelectionPosition    : 1;   ///< True if the visual position of the right selection handle must be recalculated.
-  bool mIsLeftHandleSelected            : 1;   ///< Whether is the left handle the one which is selected.
-  bool mIsRightHandleSelected           : 1;   ///< Whether is the right handle the one which is selected.
-  bool mUpdateHighlightBox              : 1;   ///< True if the text selection high light box must be updated.
-  bool mScrollAfterUpdatePosition       : 1;   ///< Whether to scroll after the cursor position is updated.
-  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 mPasswordInput                   : 1;   ///< True if password input is enabled.
-  bool mCheckScrollAmount               : 1;   ///< Whether to check scrolled amount after updating the position
-  bool mIsPlaceholderPixelSize          : 1;   ///< True if the placeholder font size is set as pixel size.
-  bool mIsPlaceholderElideEnabled       : 1;   ///< True if the placeholder text's elide is enabled.
-  bool mPlaceholderEllipsisFlag         : 1;   ///< True if the text controller sets the placeholder ellipsis.
-  bool mShiftSelectionFlag              : 1;   ///< True if the text selection using Shift key is enabled.
-  bool mUpdateAlignment                 : 1;   ///< True if the whole text needs to be full aligned..
-  bool mEditingEnabled                  : 1;   ///< True if the editing is enabled, false otherwise.
+  bool mIsShowingPlaceholderText : 1;     ///< True if the place-holder text is being displayed.
+  bool mPreEditFlag : 1;                  ///< True if the model contains text in pre-edit state.
+  bool mDecoratorUpdated : 1;             ///< True if the decorator was updated during event processing.
+  bool mCursorBlinkEnabled : 1;           ///< True if cursor should blink when active.
+  bool mGrabHandleEnabled : 1;            ///< True if grab handle is enabled.
+  bool mGrabHandlePopupEnabled : 1;       ///< True if the grab handle popu-up should be shown.
+  bool mSelectionEnabled : 1;             ///< True if selection handles, highlight etc. are enabled.
+  bool mUpdateCursorHookPosition : 1;     ///< True if the cursor hook position must be updated. Used to move the cursor with the keys 'up' and 'down'.
+  bool mUpdateCursorPosition : 1;         ///< True if the visual position of the cursor must be recalculated.
+  bool mUpdateGrabHandlePosition : 1;     ///< True if the visual position of the grab handle must be recalculated.
+  bool mUpdateLeftSelectionPosition : 1;  ///< True if the visual position of the left selection handle must be recalculated.
+  bool mUpdateRightSelectionPosition : 1; ///< True if the visual position of the right selection handle must be recalculated.
+  bool mIsLeftHandleSelected : 1;         ///< Whether is the left handle the one which is selected.
+  bool mIsRightHandleSelected : 1;        ///< Whether is the right handle the one which is selected.
+  bool mUpdateHighlightBox : 1;           ///< True if the text selection high light box must be updated.
+  bool mScrollAfterUpdatePosition : 1;    ///< Whether to scroll after the cursor position is updated.
+  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 mPasswordInput : 1;                ///< True if password input is enabled.
+  bool mCheckScrollAmount : 1;            ///< Whether to check scrolled amount after updating the position
+  bool mIsPlaceholderPixelSize : 1;       ///< True if the placeholder font size is set as pixel size.
+  bool mIsPlaceholderElideEnabled : 1;    ///< True if the placeholder text's elide is enabled.
+  bool mPlaceholderEllipsisFlag : 1;      ///< True if the text controller sets the placeholder ellipsis.
+  bool mShiftSelectionFlag : 1;           ///< True if the text selection using Shift key is enabled.
+  bool mUpdateAlignment : 1;              ///< True if the whole text needs to be full aligned..
+  bool mEditingEnabled : 1;               ///< True if the editing is enabled, false otherwise.
 };
 
 struct ModifyEvent
 {
   enum Type
   {
-    TEXT_REPLACED,    ///< The entire text was replaced
-    TEXT_INSERTED,    ///< Insert characters at the current cursor position
-    TEXT_DELETED      ///< Characters were deleted
+    TEXT_REPLACED, ///< The entire text was replaced
+    TEXT_INSERTED, ///< Insert characters at the current cursor position
+    TEXT_DELETED   ///< Characters were deleted
   };
 
   Type type;
@@ -194,26 +191,26 @@ struct FontDefaults
 {
   FontDefaults()
   : mFontDescription(),
-    mDefaultPointSize( 0.f ),
-    mFitPointSize( 0.f ),
-    mFontId( 0u ),
-    familyDefined( false ),
-    weightDefined( false ),
-    widthDefined( false ),
-    slantDefined( false ),
-    sizeDefined( false )
+    mDefaultPointSize(0.f),
+    mFitPointSize(0.f),
+    mFontId(0u),
+    familyDefined(false),
+    weightDefined(false),
+    widthDefined(false),
+    slantDefined(false),
+    sizeDefined(false)
   {
     // Initially use the default platform font
     TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
-    fontClient.GetDefaultPlatformFontDescription( mFontDescription );
+    fontClient.GetDefaultPlatformFontDescription(mFontDescription);
   }
 
-  FontId GetFontId( TextAbstraction::FontClient& fontClient, float fontPointSize )
+  FontId GetFontId(TextAbstraction::FontClient& fontClient, float fontPointSize)
   {
-    if( !mFontId )
+    if(!mFontId)
     {
-      const PointSize26Dot6 pointSize = static_cast<PointSize26Dot6>( fontPointSize * 64.f );
-      mFontId = fontClient.GetFontId( mFontDescription, pointSize );
+      const PointSize26Dot6 pointSize = static_cast<PointSize26Dot6>(fontPointSize * 64.f);
+      mFontId                         = fontClient.GetFontId(mFontDescription, pointSize);
     }
 
     return mFontId;
@@ -221,13 +218,13 @@ struct FontDefaults
 
   TextAbstraction::FontDescription mFontDescription;  ///< The default font's description.
   float                            mDefaultPointSize; ///< The default font's point size.
-  float                            mFitPointSize; ///< The fit font's point size.
+  float                            mFitPointSize;     ///< The fit font's point size.
   FontId                           mFontId;           ///< The font's id of the default font.
-  bool familyDefined:1; ///< Whether the default font's family name is defined.
-  bool weightDefined:1; ///< Whether the default font's weight is defined.
-  bool  widthDefined:1; ///< Whether the default font's width is defined.
-  bool  slantDefined:1; ///< Whether the default font's slant is defined.
-  bool   sizeDefined:1; ///< Whether the default font's point size is defined.
+  bool                             familyDefined : 1; ///< Whether the default font's family name is defined.
+  bool                             weightDefined : 1; ///< Whether the default font's weight is defined.
+  bool                             widthDefined : 1;  ///< Whether the default font's width is defined.
+  bool                             slantDefined : 1;  ///< Whether the default font's slant is defined.
+  bool                             sizeDefined : 1;   ///< Whether the default font's point size is defined.
 };
 
 /**
@@ -238,51 +235,53 @@ struct FontDefaults
 struct TextUpdateInfo
 {
   TextUpdateInfo()
-  : mCharacterIndex( 0u ),
-    mNumberOfCharactersToRemove( 0u ),
-    mNumberOfCharactersToAdd( 0u ),
-    mPreviousNumberOfCharacters( 0u ),
-    mParagraphCharacterIndex( 0u ),
-    mRequestedNumberOfCharacters( 0u ),
-    mStartGlyphIndex( 0u ),
-    mStartLineIndex( 0u ),
-    mEstimatedNumberOfLines( 0u ),
-    mClearAll( true ),
-    mFullRelayoutNeeded( true ),
-    mIsLastCharacterNewParagraph( false )
-  {}
+  : mCharacterIndex(0u),
+    mNumberOfCharactersToRemove(0u),
+    mNumberOfCharactersToAdd(0u),
+    mPreviousNumberOfCharacters(0u),
+    mParagraphCharacterIndex(0u),
+    mRequestedNumberOfCharacters(0u),
+    mStartGlyphIndex(0u),
+    mStartLineIndex(0u),
+    mEstimatedNumberOfLines(0u),
+    mClearAll(true),
+    mFullRelayoutNeeded(true),
+    mIsLastCharacterNewParagraph(false)
+  {
+  }
 
   ~TextUpdateInfo()
-  {}
+  {
+  }
 
-  CharacterIndex    mCharacterIndex;                ///< Index to the first character to be updated.
-  Length            mNumberOfCharactersToRemove;    ///< The number of characters to be removed.
-  Length            mNumberOfCharactersToAdd;       ///< The number of characters to be added.
-  Length            mPreviousNumberOfCharacters;    ///< The number of characters before the text update.
+  CharacterIndex mCharacterIndex;             ///< Index to the first character to be updated.
+  Length         mNumberOfCharactersToRemove; ///< The number of characters to be removed.
+  Length         mNumberOfCharactersToAdd;    ///< The number of characters to be added.
+  Length         mPreviousNumberOfCharacters; ///< The number of characters before the text update.
 
-  CharacterIndex    mParagraphCharacterIndex;       ///< Index of the first character of the first paragraph to be updated.
-  Length            mRequestedNumberOfCharacters;   ///< The requested number of characters.
-  GlyphIndex        mStartGlyphIndex;
-  LineIndex         mStartLineIndex;
-  Length            mEstimatedNumberOfLines;         ///< The estimated number of lines. Used to avoid reallocations when layouting.
+  CharacterIndex mParagraphCharacterIndex;     ///< Index of the first character of the first paragraph to be updated.
+  Length         mRequestedNumberOfCharacters; ///< The requested number of characters.
+  GlyphIndex     mStartGlyphIndex;
+  LineIndex      mStartLineIndex;
+  Length         mEstimatedNumberOfLines; ///< The estimated number of lines. Used to avoid reallocations when layouting.
 
-  bool              mClearAll:1;                    ///< Whether the whole text is cleared. i.e. when the text is reset.
-  bool              mFullRelayoutNeeded:1;          ///< Whether a full re-layout is needed. i.e. when a new size is set to the text control.
-  bool              mIsLastCharacterNewParagraph:1; ///< Whether the last character is a new paragraph character.
+  bool mClearAll : 1;                    ///< Whether the whole text is cleared. i.e. when the text is reset.
+  bool mFullRelayoutNeeded : 1;          ///< Whether a full re-layout is needed. i.e. when a new size is set to the text control.
+  bool mIsLastCharacterNewParagraph : 1; ///< Whether the last character is a new paragraph character.
 
   void Clear()
   {
     // Clear all info except the mPreviousNumberOfCharacters member.
-    mCharacterIndex = static_cast<CharacterIndex>( -1 );
-    mNumberOfCharactersToRemove = 0u;
-    mNumberOfCharactersToAdd = 0u;
-    mParagraphCharacterIndex = 0u;
+    mCharacterIndex              = static_cast<CharacterIndex>(-1);
+    mNumberOfCharactersToRemove  = 0u;
+    mNumberOfCharactersToAdd     = 0u;
+    mParagraphCharacterIndex     = 0u;
     mRequestedNumberOfCharacters = 0u;
-    mStartGlyphIndex = 0u;
-    mStartLineIndex = 0u;
-    mEstimatedNumberOfLines = 0u;
-    mClearAll = false;
-    mFullRelayoutNeeded = false;
+    mStartGlyphIndex             = 0u;
+    mStartLineIndex              = 0u;
+    mEstimatedNumberOfLines      = 0u;
+    mClearAll                    = false;
+    mFullRelayoutNeeded          = false;
     mIsLastCharacterNewParagraph = false;
   }
 };
@@ -313,68 +312,68 @@ struct OutlineDefaults
 
 struct Controller::Impl
 {
-  Impl( ControlInterface* controlInterface,
-        EditableControlInterface* editableControlInterface,
-        SelectableControlInterface* selectableControlInterface )
-  : mControlInterface( controlInterface ),
-    mEditableControlInterface( editableControlInterface ),
-    mSelectableControlInterface( selectableControlInterface ),
+  Impl(ControlInterface*           controlInterface,
+       EditableControlInterface*   editableControlInterface,
+       SelectableControlInterface* selectableControlInterface)
+  : mControlInterface(controlInterface),
+    mEditableControlInterface(editableControlInterface),
+    mSelectableControlInterface(selectableControlInterface),
     mModel(),
-    mFontDefaults( NULL ),
-    mUnderlineDefaults( NULL ),
-    mShadowDefaults( NULL ),
-    mEmbossDefaults( NULL ),
-    mOutlineDefaults( NULL ),
-    mEventData( NULL ),
+    mFontDefaults(NULL),
+    mUnderlineDefaults(NULL),
+    mShadowDefaults(NULL),
+    mEmbossDefaults(NULL),
+    mOutlineDefaults(NULL),
+    mEventData(NULL),
     mFontClient(),
     mClipboard(),
     mView(),
     mMetrics(),
     mModifyEvents(),
-    mTextColor( Color::BLACK ),
+    mTextColor(Color::BLACK),
     mTextUpdateInfo(),
-    mOperationsPending( NO_OPERATION ),
-    mMaximumNumberOfCharacters( 50u ),
-    mHiddenInput( NULL ),
-    mRecalculateNaturalSize( true ),
-    mMarkupProcessorEnabled( false ),
-    mClipboardHideEnabled( true ),
-    mIsAutoScrollEnabled( false ),
-    mUpdateTextDirection( true ),
-    mIsTextDirectionRTL( false ),
-    mUnderlineSetByString( false ),
-    mShadowSetByString( false ),
-    mOutlineSetByString( false ),
-    mFontStyleSetByString( false ),
-    mShouldClearFocusOnEscape( true ),
-    mLayoutDirection( LayoutDirection::LEFT_TO_RIGHT ),
-    mTextFitMinSize( DEFAULT_TEXTFIT_MIN ),
-    mTextFitMaxSize( DEFAULT_TEXTFIT_MAX ),
-    mTextFitStepSize( DEFAULT_TEXTFIT_STEP ),
-    mTextFitEnabled( false ),
-    mFontSizeScale( DEFAULT_FONT_SIZE_SCALE )
+    mOperationsPending(NO_OPERATION),
+    mMaximumNumberOfCharacters(50u),
+    mHiddenInput(NULL),
+    mRecalculateNaturalSize(true),
+    mMarkupProcessorEnabled(false),
+    mClipboardHideEnabled(true),
+    mIsAutoScrollEnabled(false),
+    mUpdateTextDirection(true),
+    mIsTextDirectionRTL(false),
+    mUnderlineSetByString(false),
+    mShadowSetByString(false),
+    mOutlineSetByString(false),
+    mFontStyleSetByString(false),
+    mShouldClearFocusOnEscape(true),
+    mLayoutDirection(LayoutDirection::LEFT_TO_RIGHT),
+    mTextFitMinSize(DEFAULT_TEXTFIT_MIN),
+    mTextFitMaxSize(DEFAULT_TEXTFIT_MAX),
+    mTextFitStepSize(DEFAULT_TEXTFIT_STEP),
+    mTextFitEnabled(false),
+    mFontSizeScale(DEFAULT_FONT_SIZE_SCALE)
   {
     mModel = Model::New();
 
     mFontClient = TextAbstraction::FontClient::Get();
-    mClipboard = Clipboard::Get();
+    mClipboard  = Clipboard::Get();
 
-    mView.SetVisualModel( mModel->mVisualModel );
+    mView.SetVisualModel(mModel->mVisualModel);
 
     // Use this to access FontClient i.e. to get down-scaled Emoji metrics.
-    mMetrics = Metrics::New( mFontClient );
-    mLayoutEngine.SetMetrics( mMetrics );
+    mMetrics = Metrics::New(mFontClient);
+    mLayoutEngine.SetMetrics(mMetrics);
 
     // Set the text properties to default
-    mModel->mVisualModel->SetUnderlineEnabled( false );
-    mModel->mVisualModel->SetUnderlineHeight( 0.0f );
+    mModel->mVisualModel->SetUnderlineEnabled(false);
+    mModel->mVisualModel->SetUnderlineHeight(0.0f);
 
     Toolkit::StyleManager styleManager = Toolkit::StyleManager::Get();
-    if( styleManager )
+    if(styleManager)
     {
-      bool temp;
-      Property::Map config = Toolkit::DevelStyleManager::GetConfigurations( styleManager );
-      if( config["clearFocusOnEscape"].Get( temp ) )
+      bool          temp;
+      Property::Map config = Toolkit::DevelStyleManager::GetConfigurations(styleManager);
+      if(config["clearFocusOnEscape"].Get(temp))
       {
         mShouldClearFocusOnEscape = temp;
       }
@@ -403,9 +402,9 @@ struct Controller::Impl
   /**
    * @brief Request a relayout using the ControlInterface.
    */
-  void QueueModifyEvent( ModifyEvent::Type type )
+  void QueueModifyEvent(ModifyEvent::Type type)
   {
-    if( ModifyEvent::TEXT_REPLACED == type)
+    if(ModifyEvent::TEXT_REPLACED == type)
     {
       // Cancel previously queued inserts etc.
       mModifyEvents.Clear();
@@ -413,7 +412,7 @@ struct Controller::Impl
 
     ModifyEvent event;
     event.type = type;
-    mModifyEvents.PushBack( event );
+    mModifyEvents.PushBack(event);
 
     // The event will be processed during relayout
     RequestRelayout();
@@ -429,15 +428,14 @@ struct Controller::Impl
    */
   bool IsPlaceholderAvailable() const
   {
-    return ( mEventData &&
-             ( !mEventData->mPlaceholderTextInactive.empty() ||
-               !mEventData->mPlaceholderTextActive.empty() )
-           );
+    return (mEventData &&
+            (!mEventData->mPlaceholderTextInactive.empty() ||
+             !mEventData->mPlaceholderTextActive.empty()));
   }
 
   bool IsShowingPlaceholderText() const
   {
-    return ( mEventData && mEventData->mIsShowingPlaceholderText );
+    return (mEventData && mEventData->mIsShowingPlaceholderText);
   }
 
   /**
@@ -445,13 +443,13 @@ struct Controller::Impl
    */
   bool IsFocusedPlaceholderAvailable() const
   {
-    return ( mEventData && !mEventData->mPlaceholderTextActive.empty() );
+    return (mEventData && !mEventData->mPlaceholderTextActive.empty());
   }
 
   bool IsShowingRealText() const
   {
-    return ( !IsShowingPlaceholderText() &&
-             0u != mModel->mLogicalModel->mText.Count() );
+    return (!IsShowingPlaceholderText() &&
+            0u != mModel->mLogicalModel->mText.Count());
   }
 
   /**
@@ -459,31 +457,31 @@ struct Controller::Impl
    */
   void PlaceholderCleared()
   {
-    if( mEventData )
+    if(mEventData)
     {
       mEventData->mIsShowingPlaceholderText = false;
 
       // Remove mPlaceholderTextColor
-      mModel->mVisualModel->SetTextColor( mTextColor );
+      mModel->mVisualModel->SetTextColor(mTextColor);
     }
   }
 
   void ClearPreEditFlag()
   {
-    if( mEventData )
+    if(mEventData)
     {
-      mEventData->mPreEditFlag = false;
+      mEventData->mPreEditFlag          = false;
       mEventData->mPreEditStartPosition = 0;
-      mEventData->mPreEditLength = 0;
+      mEventData->mPreEditLength        = 0;
     }
   }
 
   void ResetInputMethodContext()
   {
-    if( mEventData )
+    if(mEventData)
     {
       // Reset incase we are in a pre-edit state.
-      if( mEventData->mInputMethodContext )
+      if(mEventData->mInputMethodContext)
       {
         mEventData->mInputMethodContext.Reset(); // Will trigger a message ( commit, get surrounding )
       }
@@ -516,7 +514,7 @@ struct Controller::Impl
    *
    * @return The number of consecutive white spaces.
    */
-  Length GetNumberOfWhiteSpaces( CharacterIndex index ) const;
+  Length GetNumberOfWhiteSpaces(CharacterIndex index) const;
 
   /**
    * @brief Retrieve any text previously set starting from the given @p index.
@@ -526,17 +524,17 @@ struct Controller::Impl
    *
    * @see Dali::Toolkit::Text::Controller::GetText()
    */
-  void GetText( CharacterIndex index, std::string& text ) const;
+  void GetText(CharacterIndex index, std::string& text) const;
 
   bool IsClipboardEmpty()
   {
-    bool result( mClipboard && mClipboard.NumberOfItems() );
+    bool result(mClipboard && mClipboard.NumberOfItems());
     return !result; // If NumberOfItems greater than 0, return false
   }
 
   bool IsClipboardVisible()
   {
-    bool result( mClipboard && mClipboard.IsVisible() );
+    bool result(mClipboard && mClipboard.IsVisible());
     return result;
   }
 
@@ -546,14 +544,14 @@ struct Controller::Impl
    *
    * @param[out] numberOfCharacters The number of characters to be updated.
    */
-  void CalculateTextUpdateIndices( Length& numberOfCharacters );
+  void CalculateTextUpdateIndices(Length& numberOfCharacters);
 
   /**
    * @brief Helper to clear completely the parts of the model specified by the given @p operations.
    *
    * @note It never clears the text stored in utf32.
    */
-  void ClearFullModelData( OperationsMask operations );
+  void ClearFullModelData(OperationsMask operations);
 
   /**
    * @brief Helper to clear completely the parts of the model related with the characters specified by the given @p operations.
@@ -564,7 +562,7 @@ struct Controller::Impl
    * @param[in] endIndex Index to the last character to be cleared.
    * @param[in] operations The operations required.
    */
-  void ClearCharacterModelData( CharacterIndex startIndex, CharacterIndex endIndex, OperationsMask operations );
+  void ClearCharacterModelData(CharacterIndex startIndex, CharacterIndex endIndex, OperationsMask operations);
 
   /**
    * @brief Helper to clear completely the parts of the model related with the glyphs specified by the given @p operations.
@@ -576,7 +574,7 @@ struct Controller::Impl
    * @param[in] endIndex Index to the last character to be cleared.
    * @param[in] operations The operations required.
    */
-  void ClearGlyphModelData( CharacterIndex startIndex, CharacterIndex endIndex, OperationsMask operations );
+  void ClearGlyphModelData(CharacterIndex startIndex, CharacterIndex endIndex, OperationsMask operations);
 
   /**
    * @brief Helper to clear the parts of the model specified by the given @p operations and from @p startIndex to @p endIndex.
@@ -587,7 +585,7 @@ struct Controller::Impl
    * @param[in] endIndex Index to the last character to be cleared.
    * @param[in] operations The operations required.
    */
-  void ClearModelData( CharacterIndex startIndex, CharacterIndex endIndex, OperationsMask operations );
+  void ClearModelData(CharacterIndex startIndex, CharacterIndex endIndex, OperationsMask operations);
 
   /**
    * @brief Updates the logical and visual models. Updates the style runs in the visual model when the text's styles changes.
@@ -601,14 +599,14 @@ struct Controller::Impl
    *
    * @return @e true if the model has been modified.
    */
-  bool UpdateModel( OperationsMask operationsRequired );
+  bool UpdateModel(OperationsMask operationsRequired);
 
   /**
    * @brief Retreieves the default style.
    *
    * @param[out] inputStyle The default style.
    */
-  void RetrieveDefaultInputStyle( InputStyle& inputStyle );
+  void RetrieveDefaultInputStyle(InputStyle& inputStyle);
 
   /**
    * @brief Retrieve the line height of the default font.
@@ -623,12 +621,12 @@ struct Controller::Impl
   /**
    * @copydoc Text::Controller::SetPrimaryCursorPosition()
    */
-  bool SetPrimaryCursorPosition( CharacterIndex index );
+  bool SetPrimaryCursorPosition(CharacterIndex index);
 
   /**
    * @copydoc Text::SelectableControlInterface::SetTextSelectionRange()
    */
-  void SetTextSelectionRange(const uint32_t *pStart, const uint32_t *pEndf);
+  void SetTextSelectionRange(const uint32_t* pStart, const uint32_t* pEndf);
 
   /**
    * @copydoc Text::SelectableControlInterface::GetTextSelectionRange()
@@ -643,7 +641,7 @@ struct Controller::Impl
   /**
    * @copydoc Text::EditableControlInterface::SetEditable()
    */
-  void SetEditable( bool editable );
+  void SetEditable(bool editable);
 
   /**
    * @brief Retrieves the selected text. It removes the text if the @p deleteAfterRetrieval parameter is @e true.
@@ -651,11 +649,11 @@ struct Controller::Impl
    * @param[out] selectedText The selected text encoded in utf8.
    * @param[in] deleteAfterRetrieval Whether the text should be deleted after retrieval.
    */
-  void RetrieveSelection( std::string& selectedText, bool deleteAfterRetrieval );
+  void RetrieveSelection(std::string& selectedText, bool deleteAfterRetrieval);
 
-  void SetSelection( int start, int end );
+  void SetSelection(int start, int end);
 
-  std::pair< int, int > GetSelectionIndexes() const;
+  std::pair<int, int> GetSelectionIndexes() const;
 
   void ShowClipboard();
 
@@ -663,18 +661,18 @@ struct Controller::Impl
 
   void SetClipboardHideEnable(bool enable);
 
-  bool CopyStringToClipboard( const std::string& source );
+  bool CopyStringToClipboard(const std::string& source);
 
-  void SendSelectionToClipboard( bool deleteAfterSending );
+  void SendSelectionToClipboard(bool deleteAfterSending);
 
   void RequestGetTextFromClipboard();
 
   void RepositionSelectionHandles();
-  void RepositionSelectionHandles( float visualX, float visualY, Controller::NoTextTap::Action action );
+  void RepositionSelectionHandles(float visualX, float visualY, Controller::NoTextTap::Action action);
 
   void SetPopupButtons();
 
-  void ChangeState( EventData::State newState );
+  void ChangeState(EventData::State newState);
 
   /**
    * @brief Calculates the cursor's position for a given character index in the logical order.
@@ -685,8 +683,8 @@ struct Controller::Impl
    * @param[in] logical The logical cursor position (in characters). 0 is just before the first character, a value equal to the number of characters is just after the last character.
    * @param[out] cursorInfo The line's height, the cursor's height, the cursor's position and whether there is an alternative cursor.
    */
-  void GetCursorPosition( CharacterIndex logical,
-                          CursorInfo& cursorInfo );
+  void GetCursorPosition(CharacterIndex logical,
+                         CursorInfo&    cursorInfo);
 
   /**
    * @brief Calculates the new cursor index.
@@ -698,7 +696,7 @@ struct Controller::Impl
    *
    * @return The new cursor index.
    */
-  CharacterIndex CalculateNewCursorIndex( CharacterIndex index ) const;
+  CharacterIndex CalculateNewCursorIndex(CharacterIndex index) const;
 
   /**
    * @brief Updates the cursor position.
@@ -710,7 +708,7 @@ struct Controller::Impl
    * @param[in] cursorInfo Contains the selection handle position in Actor's coords.
    *
    */
-  void UpdateCursorPosition( const CursorInfo& cursorInfo );
+  void UpdateCursorPosition(const CursorInfo& cursorInfo);
 
   /**
    * @brief Updates the position of the given selection handle. It transforms the handle's position into decorator's coords.
@@ -718,22 +716,22 @@ struct Controller::Impl
    * @param[in] handleType One of the selection handles.
    * @param[in] cursorInfo Contains the selection handle position in Actor's coords.
    */
-  void UpdateSelectionHandle( HandleType handleType,
-                              const CursorInfo& cursorInfo );
+  void UpdateSelectionHandle(HandleType        handleType,
+                             const CursorInfo& cursorInfo);
 
   /**
    * @biref Clamps the horizontal scrolling to get the control always filled with text.
    *
    * @param[in] layoutSize The size of the laid out text.
    */
-  void ClampHorizontalScroll( const Vector2& layoutSize );
+  void ClampHorizontalScroll(const Vector2& layoutSize);
 
   /**
    * @biref Clamps the vertical scrolling to get the control always filled with text.
    *
    * @param[in] layoutSize The size of the laid out text.
    */
-  void ClampVerticalScroll( const Vector2& layoutSize );
+  void ClampVerticalScroll(const Vector2& layoutSize);
 
   /**
    * @brief Scrolls the text to make a position visible.
@@ -746,19 +744,19 @@ struct Controller::Impl
    * This method is called after inserting text, moving the cursor with the grab handle or the keypad,
    * or moving the selection handles.
    */
-  void ScrollToMakePositionVisible( const Vector2& position, float lineHeight );
+  void ScrollToMakePositionVisible(const Vector2& position, float lineHeight);
 
   /**
    * @brief Scrolls the text to make the cursor visible.
    *
    * This method is called after deleting text.
    */
-  void ScrollTextToMatchCursor( const CursorInfo& cursorInfo );
+  void ScrollTextToMatchCursor(const CursorInfo& cursorInfo);
 
   /**
    * @brief Scrolls the text to make primary cursor visible.
    */
-  void ScrollTextToMatchCursor( );
+  void ScrollTextToMatchCursor();
 
   /**
    * @brief Create an actor that renders the text background color
@@ -768,69 +766,67 @@ struct Controller::Impl
   Actor CreateBackgroundActor();
 
 public:
-
   /**
    * @brief Gets implementation from the controller handle.
    * @param controller The text controller
    * @return The implementation of the Controller
    */
-  static Impl& GetImplementation( Text::Controller& controller )
+  static Impl& GetImplementation(Text::Controller& controller)
   {
     return *controller.mImpl;
   }
 
 private:
   // Declared private and left undefined to avoid copies.
-  Impl( const Impl& );
+  Impl(const Impl&);
   // Declared private and left undefined to avoid copies.
-  Impl& operator=( const Impl& );
+  Impl& operator=(const Impl&);
 
 public:
-
-  ControlInterface* mControlInterface;     ///< Reference to the text controller.
-  EditableControlInterface* mEditableControlInterface; ///< Reference to the editable text controller.
+  ControlInterface*           mControlInterface;           ///< Reference to the text controller.
+  EditableControlInterface*   mEditableControlInterface;   ///< Reference to the editable text controller.
   SelectableControlInterface* mSelectableControlInterface; ///< Reference to the selectable text controller.
-  ModelPtr mModel;                         ///< Pointer to the text's model.
-  FontDefaults* mFontDefaults;             ///< Avoid allocating this when the user does not specify a font.
-  UnderlineDefaults* mUnderlineDefaults;   ///< Avoid allocating this when the user does not specify underline parameters.
-  ShadowDefaults* mShadowDefaults;         ///< Avoid allocating this when the user does not specify shadow parameters.
-  EmbossDefaults* mEmbossDefaults;         ///< Avoid allocating this when the user does not specify emboss parameters.
-  OutlineDefaults* mOutlineDefaults;       ///< Avoid allocating this when the user does not specify outline parameters.
-  EventData* mEventData;                   ///< Avoid allocating everything for text input until EnableTextInput().
-  TextAbstraction::FontClient mFontClient; ///< Handle to the font client.
-  Clipboard mClipboard;                    ///< Handle to the system clipboard
-  View mView;                              ///< The view interface to the rendering back-end.
-  MetricsPtr mMetrics;                     ///< A wrapper around FontClient used to get metrics & potentially down-scaled Emoji metrics.
-  Layout::Engine mLayoutEngine;            ///< The layout engine.
-  Vector<ModifyEvent> mModifyEvents;       ///< Temporary stores the text set until the next relayout.
-  Vector4 mTextColor;                      ///< The regular text color
-  TextUpdateInfo mTextUpdateInfo;          ///< Info of the characters updated.
-  OperationsMask mOperationsPending;       ///< Operations pending to be done to layout the text.
-  Length mMaximumNumberOfCharacters;       ///< Maximum number of characters that can be inserted.
-  HiddenText* mHiddenInput;                ///< Avoid allocating this when the user does not specify hidden input mode.
-  Vector2 mTextFitContentSize;             ///< Size of Text fit content
-
-  bool mRecalculateNaturalSize:1;          ///< Whether the natural size needs to be recalculated.
-  bool mMarkupProcessorEnabled:1;          ///< Whether the mark-up procesor is enabled.
-  bool mClipboardHideEnabled:1;            ///< Whether the ClipboardHide function work or not
-  bool mIsAutoScrollEnabled:1;             ///< Whether auto text scrolling is enabled.
-  bool mUpdateTextDirection:1;             ///< Whether the text direction needs to be updated.
-  CharacterDirection mIsTextDirectionRTL:1;  ///< Whether the text direction is right to left or not
-
-  bool mUnderlineSetByString:1;            ///< Set when underline is set by string (legacy) instead of map
-  bool mShadowSetByString:1;               ///< Set when shadow is set by string (legacy) instead of map
-  bool mOutlineSetByString:1;              ///< Set when outline is set by string (legacy) instead of map
-  bool mFontStyleSetByString:1;            ///< Set when font style is set by string (legacy) instead of map
-  bool mShouldClearFocusOnEscape:1;        ///< Whether text control should clear key input focus
-  LayoutDirection::Type mLayoutDirection;  ///< Current system language direction
-
-  Shader mShaderBackground;                ///< The shader for text background.
-
-  float mTextFitMinSize;                   ///< Minimum Font Size for text fit. Default 10
-  float mTextFitMaxSize;                   ///< Maximum Font Size for text fit. Default 100
-  float mTextFitStepSize;                  ///< Step Size for font intervalse. Default 1
-  bool  mTextFitEnabled : 1;               ///< Whether the text's fit is enabled.
-  float mFontSizeScale;                    ///< Scale value for Font Size. Default 1.0
+  ModelPtr                    mModel;                      ///< Pointer to the text's model.
+  FontDefaults*               mFontDefaults;               ///< Avoid allocating this when the user does not specify a font.
+  UnderlineDefaults*          mUnderlineDefaults;          ///< Avoid allocating this when the user does not specify underline parameters.
+  ShadowDefaults*             mShadowDefaults;             ///< Avoid allocating this when the user does not specify shadow parameters.
+  EmbossDefaults*             mEmbossDefaults;             ///< Avoid allocating this when the user does not specify emboss parameters.
+  OutlineDefaults*            mOutlineDefaults;            ///< Avoid allocating this when the user does not specify outline parameters.
+  EventData*                  mEventData;                  ///< Avoid allocating everything for text input until EnableTextInput().
+  TextAbstraction::FontClient mFontClient;                 ///< Handle to the font client.
+  Clipboard                   mClipboard;                  ///< Handle to the system clipboard
+  View                        mView;                       ///< The view interface to the rendering back-end.
+  MetricsPtr                  mMetrics;                    ///< A wrapper around FontClient used to get metrics & potentially down-scaled Emoji metrics.
+  Layout::Engine              mLayoutEngine;               ///< The layout engine.
+  Vector<ModifyEvent>         mModifyEvents;               ///< Temporary stores the text set until the next relayout.
+  Vector4                     mTextColor;                  ///< The regular text color
+  TextUpdateInfo              mTextUpdateInfo;             ///< Info of the characters updated.
+  OperationsMask              mOperationsPending;          ///< Operations pending to be done to layout the text.
+  Length                      mMaximumNumberOfCharacters;  ///< Maximum number of characters that can be inserted.
+  HiddenText*                 mHiddenInput;                ///< Avoid allocating this when the user does not specify hidden input mode.
+  Vector2                     mTextFitContentSize;         ///< Size of Text fit content
+
+  bool               mRecalculateNaturalSize : 1; ///< Whether the natural size needs to be recalculated.
+  bool               mMarkupProcessorEnabled : 1; ///< Whether the mark-up procesor is enabled.
+  bool               mClipboardHideEnabled : 1;   ///< Whether the ClipboardHide function work or not
+  bool               mIsAutoScrollEnabled : 1;    ///< Whether auto text scrolling is enabled.
+  bool               mUpdateTextDirection : 1;    ///< Whether the text direction needs to be updated.
+  CharacterDirection mIsTextDirectionRTL : 1;     ///< Whether the text direction is right to left or not
+
+  bool                  mUnderlineSetByString : 1;     ///< Set when underline is set by string (legacy) instead of map
+  bool                  mShadowSetByString : 1;        ///< Set when shadow is set by string (legacy) instead of map
+  bool                  mOutlineSetByString : 1;       ///< Set when outline is set by string (legacy) instead of map
+  bool                  mFontStyleSetByString : 1;     ///< Set when font style is set by string (legacy) instead of map
+  bool                  mShouldClearFocusOnEscape : 1; ///< Whether text control should clear key input focus
+  LayoutDirection::Type mLayoutDirection;              ///< Current system language direction
+
+  Shader mShaderBackground; ///< The shader for text background.
+
+  float mTextFitMinSize;     ///< Minimum Font Size for text fit. Default 10
+  float mTextFitMaxSize;     ///< Maximum Font Size for text fit. Default 100
+  float mTextFitStepSize;    ///< Step Size for font intervalse. Default 1
+  bool  mTextFitEnabled : 1; ///< Whether the text's fit is enabled.
+  float mFontSizeScale;      ///< Scale value for Font Size. Default 1.0
 
 private:
   friend ControllerImplEventHandler;
index 066ac49..f76bc41 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_CONTROLLER_INPUT_FONT_HANDLER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 struct Controller::InputFontHandler
 {
-  static void SetInputFontFamily(Controller& controller, const std::string& fontFamily);
+  static void               SetInputFontFamily(Controller& controller, const std::string& fontFamily);
   static const std::string& GetInputFontFamily(const Controller& controller);
-  static void SetInputFontWeight(const Controller& controller, FontWeight weight);
-  static bool IsInputFontWeightDefined(const Controller& controller);
-  static FontWeight GetInputFontWeight(const Controller& controller);
-  static void SetInputFontWidth(Controller& controller, FontWidth width);
-  static bool IsInputFontWidthDefined(const Controller& controller);
-  static FontWidth GetInputFontWidth(const Controller& controller);
-  static void SetInputFontSlant(Controller& controller, FontSlant slant);
-  static bool IsInputFontSlantDefined(const Controller& controller);
-  static FontSlant GetInputFontSlant(const Controller& controller);
-  static void SetInputFontPointSize(Controller& controller, float size);
-  static float GetInputFontPointSize(const Controller& controller);
+  static void               SetInputFontWeight(const Controller& controller, FontWeight weight);
+  static bool               IsInputFontWeightDefined(const Controller& controller);
+  static FontWeight         GetInputFontWeight(const Controller& controller);
+  static void               SetInputFontWidth(Controller& controller, FontWidth width);
+  static bool               IsInputFontWidthDefined(const Controller& controller);
+  static FontWidth          GetInputFontWidth(const Controller& controller);
+  static void               SetInputFontSlant(Controller& controller, FontSlant slant);
+  static bool               IsInputFontSlantDefined(const Controller& controller);
+  static FontSlant          GetInputFontSlant(const Controller& controller);
+  static void               SetInputFontPointSize(Controller& controller, float size);
+  static float              GetInputFontPointSize(const Controller& controller);
 };
 
 } // namespace Text
index 74ee933..c69e003 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_CONTROLLER_PLACEHOLDER_HANDLER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 struct Controller::PlaceholderHandler
 {
-  static void SetPlaceholderTextElideEnabled(Controller& controller, bool enabled);
-  static bool IsPlaceholderTextElideEnabled(const Controller& controller);
-  static void SetPlaceholderText(Controller& controller, PlaceholderType type, const std::string& text);
-  static void GetPlaceholderText(const Controller& controller, PlaceholderType type, std::string& text);
-  static void SetPlaceholderFontFamily(Controller& controller, const std::string& placeholderTextFontFamily);
+  static void               SetPlaceholderTextElideEnabled(Controller& controller, bool enabled);
+  static bool               IsPlaceholderTextElideEnabled(const Controller& controller);
+  static void               SetPlaceholderText(Controller& controller, PlaceholderType type, const std::string& text);
+  static void               GetPlaceholderText(const Controller& controller, PlaceholderType type, std::string& text);
+  static void               SetPlaceholderFontFamily(Controller& controller, const std::string& placeholderTextFontFamily);
   static const std::string& GetPlaceholderFontFamily(const Controller& controller);
-  static void SetPlaceholderTextFontWeight(Controller& controller, FontWeight weight);
-  static bool IsPlaceholderTextFontWeightDefined(const Controller& controller);
-  static FontWeight GetPlaceholderTextFontWeight(const Controller& controller);
-  static void SetPlaceholderTextFontWidth(Controller& controller, FontWidth width);
-  static bool IsPlaceholderTextFontWidthDefined(const Controller& controller);
-  static FontWidth GetPlaceholderTextFontWidth(const Controller& controller);
-  static void SetPlaceholderTextFontSlant(Controller& controller, FontSlant slant);
-  static bool IsPlaceholderTextFontSlantDefined(const Controller& controller);
-  static FontSlant GetPlaceholderTextFontSlant(const Controller& controller);
-  static void SetPlaceholderTextFontSize(Controller& controller, float fontSize, FontSizeType type);
-  static float GetPlaceholderTextFontSize(const Controller& controller, FontSizeType type );
-  static void SetPlaceholderTextColor(Controller& controller, const Vector4& textColor );
-  static const Vector4& GetPlaceholderTextColor(const Controller& controller);
-  static void SetPlaceholderProperty(Controller& controller, const Property::Map& map );
-  static void GetPlaceholderProperty(Controller& controller, Property::Map& map);
-  static void ShowPlaceholderText(Controller& controller);
+  static void               SetPlaceholderTextFontWeight(Controller& controller, FontWeight weight);
+  static bool               IsPlaceholderTextFontWeightDefined(const Controller& controller);
+  static FontWeight         GetPlaceholderTextFontWeight(const Controller& controller);
+  static void               SetPlaceholderTextFontWidth(Controller& controller, FontWidth width);
+  static bool               IsPlaceholderTextFontWidthDefined(const Controller& controller);
+  static FontWidth          GetPlaceholderTextFontWidth(const Controller& controller);
+  static void               SetPlaceholderTextFontSlant(Controller& controller, FontSlant slant);
+  static bool               IsPlaceholderTextFontSlantDefined(const Controller& controller);
+  static FontSlant          GetPlaceholderTextFontSlant(const Controller& controller);
+  static void               SetPlaceholderTextFontSize(Controller& controller, float fontSize, FontSizeType type);
+  static float              GetPlaceholderTextFontSize(const Controller& controller, FontSizeType type);
+  static void               SetPlaceholderTextColor(Controller& controller, const Vector4& textColor);
+  static const Vector4&     GetPlaceholderTextColor(const Controller& controller);
+  static void               SetPlaceholderProperty(Controller& controller, const Property::Map& map);
+  static void               GetPlaceholderProperty(Controller& controller, Property::Map& map);
+  static void               ShowPlaceholderText(Controller& controller);
 };
 
 } // namespace Text
index 4c62d89..d2d8670 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_CONTROLLER_RELAYOUTER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * Contains all the relayouting related methods for Text::Controller
  */
@@ -94,7 +91,7 @@ struct Controller::Relayouter
    * @param[in/out] layoutSize The Layout size which can be updated depending on the result of the performed operations
    * @return
    */
-  static bool DoRelayout(Controller& controller, const Size& size, OperationsMask operationsRequired, Size& layoutSize );
+  static bool DoRelayout(Controller& controller, const Size& size, OperationsMask operationsRequired, Size& layoutSize);
 
   /**
    * @brief Called by the Controller to calculate the veritcal offset give the control size.
index 147ccb9..ba7e3b9 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_UPDATER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@
  *
  */
 
-
 // EXTERNAL INCLUDES
 #include <string>
 
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief Methods that update the text
  */
index 5d8c021..40286ef 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_CONTROLLER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/events/gesture.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/text/text-enumerations.h>
-#include <dali-toolkit/devel-api/controls/text-controls/text-selection-popup-callback-interface.h>
 #include <dali-toolkit/devel-api/controls/text-controls/text-label-devel.h>
+#include <dali-toolkit/devel-api/controls/text-controls/text-selection-popup-callback-interface.h>
 #include <dali-toolkit/devel-api/text/text-enumerations-devel.h>
 #include <dali-toolkit/internal/text/decorator/text-decorator.h>
-#include <dali-toolkit/internal/text/layouts/layout-engine.h>
 #include <dali-toolkit/internal/text/hidden-text.h>
+#include <dali-toolkit/internal/text/layouts/layout-engine.h>
 #include <dali-toolkit/internal/text/text-model-interface.h>
 #include <dali-toolkit/internal/text/text-selectable-control-interface.h>
+#include <dali-toolkit/public-api/text/text-enumerations.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 class Controller;
 class ControlInterface;
 class EditableControlInterface;
 class View;
 class RenderingController;
 
-  /**
+/**
    * @brief Text selection operations .
    */
-  enum SelectionType
-  {
-    INTERACTIVE        = 0x0000,
-    ALL                = 0x0001,
-    NONE               = 0x0002
-  };
+enum SelectionType
+{
+  INTERACTIVE = 0x0000,
+  ALL         = 0x0001,
+  NONE        = 0x0002
+};
 
 typedef IntrusivePtr<Controller> ControllerPtr;
 
@@ -74,7 +71,6 @@ typedef IntrusivePtr<Controller> ControllerPtr;
 class Controller : public RefObject, public Decorator::ControllerInterface, public TextSelectionPopupCallbackInterface, public HiddenText::Observer
 {
 public: // Enumerated types.
-
   /**
    * @brief Text related operations to be done in the relayout process.
    */
@@ -139,8 +135,8 @@ public: // Enumerated types.
    */
   enum FontSizeType
   {
-    POINT_SIZE,   // The size of font in points.
-    PIXEL_SIZE    // The size of font in pixels.
+    POINT_SIZE, // The size of font in points.
+    PIXEL_SIZE  // The size of font in pixels.
   };
 
   struct NoTextTap
@@ -166,7 +162,6 @@ public: // Enumerated types.
   };
 
 public: // Constructor.
-
   /**
    * @brief Create a new instance of a Controller.
    *
@@ -181,7 +176,7 @@ public: // Constructor.
    *
    * @return A pointer to a new Controller.
    */
-  static ControllerPtr New( ControlInterface* controlInterface );
+  static ControllerPtr New(ControlInterface* controlInterface);
 
   /**
    * @brief Create a new instance of a Controller.
@@ -192,12 +187,11 @@ public: // Constructor.
    *
    * @return A pointer to a new Controller.
    */
-  static ControllerPtr New( ControlInterface* controlInterface,
-                            EditableControlInterface* editableControlInterface,
-                            SelectableControlInterface* selectableControlInterface );
+  static ControllerPtr New(ControlInterface*           controlInterface,
+                           EditableControlInterface*   editableControlInterface,
+                           SelectableControlInterface* selectableControlInterface);
 
 public: // Configure the text controller.
-
   /**
    * @brief Called to enable text input.
    *
@@ -205,14 +199,14 @@ public: // Configure the text controller.
    * @param[in] decorator Used to create cursor, selection handle decorations etc.
    * @param[in] inputMethodContext Used to manager ime.
    */
-  void EnableTextInput( DecoratorPtr decorator, InputMethodContext& inputMethodContext );
+  void EnableTextInput(DecoratorPtr decorator, InputMethodContext& inputMethodContext);
 
   /**
    * @brief Used to switch between bitmap & vector based glyphs
    *
    * @param[in] glyphType The type of glyph; note that metrics for bitmap & vector based glyphs are different.
    */
-  void SetGlyphType( TextAbstraction::GlyphType glyphType );
+  void SetGlyphType(TextAbstraction::GlyphType glyphType);
 
   /**
    * @brief Enables/disables the mark-up processor.
@@ -221,7 +215,7 @@ public: // Configure the text controller.
    *
    * @param[in] enable Whether to enable the mark-up processor.
    */
-  void SetMarkupProcessorEnabled( bool enable );
+  void SetMarkupProcessorEnabled(bool enable);
 
   /**
    * @brief Retrieves whether the mark-up processor is enabled.
@@ -239,7 +233,7 @@ public: // Configure the text controller.
    *
    * @param[in] enable Whether to enable the auto scrolling
    */
-  void SetAutoScrollEnabled( bool enable );
+  void SetAutoScrollEnabled(bool enable);
 
   /**
    * @brief Retrieves whether auto text scrolling is enabled.
@@ -268,7 +262,7 @@ public: // Configure the text controller.
    *
    * @param[in] enable Whether to enable the horizontal scrolling.
    */
-  void SetHorizontalScrollEnabled( bool enable );
+  void SetHorizontalScrollEnabled(bool enable);
 
   /**
    * @brief Retrieves whether the horizontal scrolling is enabled.
@@ -282,7 +276,7 @@ public: // Configure the text controller.
    *
    * @param[in] enable Whether to enable the vertical scrolling.
    */
-  void SetVerticalScrollEnabled( bool enable );
+  void SetVerticalScrollEnabled(bool enable);
 
   /**
    * @brief Retrieves whether the verticall scrolling is enabled.
@@ -296,7 +290,7 @@ public: // Configure the text controller.
    *
    * @param[in] enable Whether to enable the smooth handle panning.
    */
-  void SetSmoothHandlePanEnabled( bool enable );
+  void SetSmoothHandlePanEnabled(bool enable);
 
   /**
    * @brief Retrieves whether the smooth handle panning is enabled.
@@ -310,7 +304,7 @@ public: // Configure the text controller.
    *
    * @param[in] maxCharacters maximum number of characters to be accepted
    */
-  void SetMaximumNumberOfCharacters( Length maxCharacters );
+  void SetMaximumNumberOfCharacters(Length maxCharacters);
 
   /**
    * @brief Sets the maximum number of characters that can be inserted into the TextModel
@@ -325,7 +319,7 @@ public: // Configure the text controller.
    * @note Only editable controls should calls this.
    * @param[in] enabled Whether the cursor should blink or not.
    */
-  void SetEnableCursorBlink( bool enable );
+  void SetEnableCursorBlink(bool enable);
 
   /**
    * @brief Query whether cursor blink is enabled.
@@ -339,7 +333,7 @@ public: // Configure the text controller.
    *
    * @param[in] enable \e true enables the multi-line (by default)
    */
-  void SetMultiLineEnabled( bool enable );
+  void SetMultiLineEnabled(bool enable);
 
   /**
    * @return Whether the multi-line layout is enabled.
@@ -351,7 +345,7 @@ public: // Configure the text controller.
    *
    * @param[in] alignment The horizontal alignment.
    */
-  void SetHorizontalAlignment( HorizontalAlignment::Type alignment );
+  void SetHorizontalAlignment(HorizontalAlignment::Type alignment);
 
   /**
    * @copydoc ModelInterface::GetHorizontalAlignment()
@@ -363,7 +357,7 @@ public: // Configure the text controller.
    *
    * @param[in] alignment The vertical alignment.
    */
-  void SetVerticalAlignment( VerticalAlignment::Type alignment );
+  void SetVerticalAlignment(VerticalAlignment::Type alignment);
 
   /**
    * @copydoc ModelInterface::GetVerticalAlignment()
@@ -374,7 +368,7 @@ public: // Configure the text controller.
    * @brief Sets the text's wrap mode
    * @param[in] text wrap mode The unit of wrapping
    */
-  void SetLineWrapMode( Text::LineWrap::Mode textWarpMode );
+  void SetLineWrapMode(Text::LineWrap::Mode textWarpMode);
 
   /**
    * @brief Retrieve text wrap mode previously set.
@@ -387,7 +381,7 @@ public: // Configure the text controller.
    *
    * @param[in] enabled Whether to enable the text elide.
    */
-  void SetTextElideEnabled( bool enabled );
+  void SetTextElideEnabled(bool enabled);
 
   /**
    * @copydoc ModelInterface::IsTextElideEnabled()
@@ -414,7 +408,7 @@ public: // Configure the text controller.
    * @param[in] minimum size value.
    * @param[in] type The font size type is point size or pixel size
    */
-  void SetTextFitMinSize( float pointSize, FontSizeType type );
+  void SetTextFitMinSize(float pointSize, FontSizeType type);
 
   /**
    * @brief Retrieves the minimum point size valid for text fit.
@@ -429,7 +423,7 @@ public: // Configure the text controller.
    * @param[in] maximum size value.
    * @param[in] type The font size type is point size or pixel size
    */
-  void SetTextFitMaxSize( float pointSize, FontSizeType type );
+  void SetTextFitMaxSize(float pointSize, FontSizeType type);
 
   /**
    * @brief Retrieves the maximum point size valid for text fit.
@@ -444,7 +438,7 @@ public: // Configure the text controller.
    * @param[in] step size value.
    * @param[in] type The font size type is point size or pixel size
    */
-  void SetTextFitStepSize( float step, FontSizeType type );
+  void SetTextFitStepSize(float step, FontSizeType type);
 
   /**
    * @brief Retrieves the step point size valid for text fit.
@@ -471,7 +465,7 @@ public: // Configure the text controller.
    * @brief Enable or disable the placeholder text elide.
    * @param enabled Whether to enable the placeholder text elide.
    */
-  void SetPlaceholderTextElideEnabled( bool enabled );
+  void SetPlaceholderTextElideEnabled(bool enabled);
 
   /**
    * @brief Whether the placeholder text elide property is enabled.
@@ -483,7 +477,7 @@ public: // Configure the text controller.
    * @brief Enable or disable the text selection.
    * @param[in] enabled Whether to enable the text selection.
    */
-  void SetSelectionEnabled( bool enabled );
+  void SetSelectionEnabled(bool enabled);
 
   /**
    * @brief Whether the text selection is enabled or not.
@@ -495,7 +489,7 @@ public: // Configure the text controller.
    * @brief Enable or disable the text selection using Shift key.
    * @param enabled Whether to enable the text selection using Shift key
    */
-  void SetShiftSelectionEnabled( bool enabled );
+  void SetShiftSelectionEnabled(bool enabled);
 
   /**
    * @brief Whether the text selection using Shift key is enabled or not.
@@ -508,7 +502,7 @@ public: // Configure the text controller.
    *
    * @param[in] enabled Whether to enable the grab handles
    */
-  void SetGrabHandleEnabled( bool enabled );
+  void SetGrabHandleEnabled(bool enabled);
 
   /**
    * @brief Returns whether the grab handles are enabled.
@@ -522,7 +516,7 @@ public: // Configure the text controller.
    *
    * @param[in] enabled Whether to enable the grab handles
    */
-  void SetGrabHandlePopupEnabled( bool enabled );
+  void SetGrabHandlePopupEnabled(bool enabled);
 
   /**
    * @brief Returns whether the grab handles are enabled.
@@ -538,7 +532,7 @@ public: // Configure the text controller.
    *
    * @param[in] passwordInput True if password input is enabled.
    */
-  void SetInputModePassword( bool passwordInput );
+  void SetInputModePassword(bool passwordInput);
 
   /**
    * @brief Returns whether the input mode type is set as password.
@@ -552,7 +546,7 @@ public: // Configure the text controller.
    *
    * @param[in] action The action to do.
    */
-  void SetNoTextDoubleTapAction( NoTextTap::Action action );
+  void SetNoTextDoubleTapAction(NoTextTap::Action action);
 
   /**
    * @brief Retrieves the action when there is a double tap event on top of a text area with no text.
@@ -566,7 +560,7 @@ public: // Configure the text controller.
    *
    * @param[in] action The action to do.
    */
-  void SetNoTextLongPressAction( NoTextTap::Action action );
+  void SetNoTextLongPressAction(NoTextTap::Action action);
 
   /**
    * @brief Retrieves the action when there is a long press event on top of a text area with no text.
@@ -585,7 +579,7 @@ public: // Configure the text controller.
    * Set method underline setting were set by
    * @param[in] bool, true if set by string
    */
-  void UnderlineSetByString( bool setByString );
+  void UnderlineSetByString(bool setByString);
 
   /**
    * @brief Query if shadow settings were provided by string or map
@@ -597,7 +591,7 @@ public: // Configure the text controller.
    * Set method shadow setting were set by
    * @param[in] bool, true if set by string
    */
-  void ShadowSetByString( bool setByString );
+  void ShadowSetByString(bool setByString);
 
   /**
    * @brief Query if outline settings were provided by string or map
@@ -609,7 +603,7 @@ public: // Configure the text controller.
    * Set method outline setting were set by
    * @param[in] bool, true if set by string
    */
-  void OutlineSetByString( bool setByString );
+  void OutlineSetByString(bool setByString);
 
   /**
    * @brief Query if font style settings were provided by string or map
@@ -621,24 +615,23 @@ public: // Configure the text controller.
    * Set method font style setting were set by
    * @param[in] bool, true if set by string
    */
-  void FontStyleSetByString( bool setByString );
+  void FontStyleSetByString(bool setByString);
 
 public: // Update.
-
   /**
    * @brief Replaces any text previously set.
    *
    * @note This will be converted into UTF-32 when stored in the text model.
    * @param[in] text A string of UTF-8 characters.
    */
-  void SetText( const std::string& text );
+  void SetText(const std::string& text);
 
   /**
    * @brief Retrieve any text previously set.
    *
    * @param[out] text A string of UTF-8 characters.
    */
-  void GetText( std::string& text ) const;
+  void GetText(std::string& text) const;
 
   /**
    * @brief Replaces any placeholder text previously set.
@@ -646,7 +639,7 @@ public: // Update.
    * @param[in] type Different placeholder-text can be shown when the control is active/inactive.
    * @param[in] text A string of UTF-8 characters.
    */
-  void SetPlaceholderText( PlaceholderType type, const std::string& text );
+  void SetPlaceholderText(PlaceholderType type, const std::string& text);
 
   /**
    * @brief Retrieve any placeholder text previously set.
@@ -654,54 +647,53 @@ public: // Update.
    * @param[in] type Different placeholder-text can be shown when the control is active/inactive.
    * @param[out] A string of UTF-8 characters.
    */
-  void GetPlaceholderText( PlaceholderType type, std::string& text ) const;
+  void GetPlaceholderText(PlaceholderType type, std::string& text) const;
 
   /**
    * @ brief Update the text after a font change
    * @param[in] newDefaultFont The new font to change to
    */
-  void UpdateAfterFontChange( const std::string& newDefaultFont );
+  void UpdateAfterFontChange(const std::string& newDefaultFont);
 
   /**
    * @brief The method acquires currently selected text
    * @param selectedText variable to place selected text in
    */
-  void RetrieveSelection( std::string& selectedText ) const;
+  void RetrieveSelection(std::string& selectedText) const;
 
   /**
    * @brief The method sets selection in given range
    * @param start index of first character
    * @param end   index of first character after selection
    */
-  void SetSelection( int start, int end );
+  void SetSelection(int start, int end);
 
   /**
    * @brief This method retrieve indexes of current selection
    *
    * @return a pair, where first element is left index of selection and second is the right one
    */
-  std::pair< int, int > GetSelectionIndexes() const;
+  std::pair<int, int> GetSelectionIndexes() const;
 
   /**
    * Place string in system clipboard
    * @param source std::string
    */
-  void CopyStringToClipboard( const std::string& source );
+  void CopyStringToClipboard(const std::string& source);
 
   /**
    * Place currently selected text in system clipboard
    * @param deleteAfterSending flag pointing if text should be deleted after sending to clipboard
    */
-  void SendSelectionToClipboard( bool deleteAfterSending );
+  void SendSelectionToClipboard(bool deleteAfterSending);
 
 public: // Default style & Input style
-
   /**
    * @brief Set the default font family.
    *
    * @param[in] defaultFontFamily The default font family.
    */
-  void SetDefaultFontFamily( const std::string& defaultFontFamily );
+  void SetDefaultFontFamily(const std::string& defaultFontFamily);
 
   /**
    * @brief Retrieve the default font family.
@@ -714,7 +706,7 @@ public: // Default style & Input style
    * @brief Sets the placeholder text font family.
    * @param[in] placeholderTextFontFamily The placeholder text font family.
    */
-  void SetPlaceholderFontFamily( const std::string& placeholderTextFontFamily );
+  void SetPlaceholderFontFamily(const std::string& placeholderTextFontFamily);
 
   /**
    * @brief Retrieves the placeholder text font family.
@@ -728,7 +720,7 @@ public: // Default style & Input style
    *
    * @param[in] weight The font weight.
    */
-  void SetDefaultFontWeight( FontWeight weight );
+  void SetDefaultFontWeight(FontWeight weight);
 
   /**
    * @brief Whether the font's weight has been defined.
@@ -747,7 +739,7 @@ public: // Default style & Input style
    *
    * @param[in] weight The font weight
    */
-  void SetPlaceholderTextFontWeight( FontWeight weight );
+  void SetPlaceholderTextFontWeight(FontWeight weight);
 
   /**
    * @brief Whether the font's weight has been defined.
@@ -768,7 +760,7 @@ public: // Default style & Input style
    *
    * @param[in] width The font width.
    */
-  void SetDefaultFontWidth( FontWidth width );
+  void SetDefaultFontWidth(FontWidth width);
 
   /**
    * @brief Whether the font's width has been defined.
@@ -787,7 +779,7 @@ public: // Default style & Input style
    *
    * @param[in] width The font width
    */
-  void SetPlaceholderTextFontWidth( FontWidth width );
+  void SetPlaceholderTextFontWidth(FontWidth width);
 
   /**
    * @brief Whether the font's width has been defined.
@@ -808,7 +800,7 @@ public: // Default style & Input style
    *
    * @param[in] slant The font slant.
    */
-  void SetDefaultFontSlant( FontSlant slant );
+  void SetDefaultFontSlant(FontSlant slant);
 
   /**
    * @brief Whether the font's slant has been defined.
@@ -827,7 +819,7 @@ public: // Default style & Input style
    *
    * @param[in] slant The font slant
    */
-  void SetPlaceholderTextFontSlant( FontSlant slant );
+  void SetPlaceholderTextFontSlant(FontSlant slant);
 
   /**
    * @brief Whether the font's slant has been defined.
@@ -849,7 +841,7 @@ public: // Default style & Input style
    * @param[in] fontSize The default font size
    * @param[in] type The font size type is point size or pixel size
    */
-  void SetDefaultFontSize( float fontSize, FontSizeType type );
+  void SetDefaultFontSize(float fontSize, FontSizeType type);
 
   /**
    * @brief Retrieve the default point size.
@@ -857,14 +849,14 @@ public: // Default style & Input style
    * @param[in] type The font size type
    * @return The default point size.
    */
-  float GetDefaultFontSize( FontSizeType type ) const;
+  float GetDefaultFontSize(FontSizeType type) const;
 
   /**
    * @brief Set the font size scale.
    *
    * @param[in] scale The font size scale
    */
-  void SetFontSizeScale( float scale );
+  void SetFontSizeScale(float scale);
 
   /**
    * @brief Get the font size scale.
@@ -878,21 +870,21 @@ public: // Default style & Input style
    * @param[in] fontSize The placeholder text font size
    * @param[in] type The font size type is point size or pixel size
    */
-  void SetPlaceholderTextFontSize( float fontSize, FontSizeType type );
+  void SetPlaceholderTextFontSize(float fontSize, FontSizeType type);
 
   /**
    * @brief Retrieves the Placeholder text font size.
    * @param[in] type The font size type
    * @return The placeholder font size
    */
-  float GetPlaceholderTextFontSize( FontSizeType type ) const;
+  float GetPlaceholderTextFontSize(FontSizeType type) const;
 
   /**
    * @brief Sets the text's default color.
    *
    * @param color The default color.
    */
-  void SetDefaultColor( const Vector4& color );
+  void SetDefaultColor(const Vector4& color);
 
   /**
    * @brief Retrieves the text's default color.
@@ -906,7 +898,7 @@ public: // Default style & Input style
    *
    * @param textColor The text color
    */
-  void SetPlaceholderTextColor( const Vector4& textColor );
+  void SetPlaceholderTextColor(const Vector4& textColor);
 
   /**
    * @brief Retrieve the text color
@@ -920,7 +912,7 @@ public: // Default style & Input style
    *
    * @param[in] shadowOffset The shadow offset, 0,0 indicates no shadow.
    */
-  void SetShadowOffset( const Vector2& shadowOffset );
+  void SetShadowOffset(const Vector2& shadowOffset);
 
   /**
    * @brief Retrieve the shadow offset.
@@ -934,7 +926,7 @@ public: // Default style & Input style
    *
    * @param[in] shadowColor The shadow color.
    */
-  void SetShadowColor( const Vector4& shadowColor );
+  void SetShadowColor(const Vector4& shadowColor);
 
   /**
    * @brief Retrieve the shadow color.
@@ -948,7 +940,7 @@ public: // Default style & Input style
    *
    * @param[in] shadowBlurRadius The shadow blur radius, 0,0 indicates no blur.
    */
-  void SetShadowBlurRadius( const float& shadowBlurRadius );
+  void SetShadowBlurRadius(const float& shadowBlurRadius);
 
   /**
    * @brief Retrieve the shadow blur radius.
@@ -962,7 +954,7 @@ public: // Default style & Input style
    *
    * @param[in] color color of underline.
    */
-  void SetUnderlineColor( const Vector4& color );
+  void SetUnderlineColor(const Vector4& color);
 
   /**
    * @brief Retrieve the underline color.
@@ -976,7 +968,7 @@ public: // Default style & Input style
    *
    * @param[in] enabled The underline enabled flag.
    */
-  void SetUnderlineEnabled( bool enabled );
+  void SetUnderlineEnabled(bool enabled);
 
   /**
    * @brief Returns whether the text is underlined or not.
@@ -990,7 +982,7 @@ public: // Default style & Input style
    *
    * @param[in] height The height in pixels of the underline
    */
-  void SetUnderlineHeight( float height );
+  void SetUnderlineHeight(float height);
 
   /**
    * @brief Retrieves the override height of an underline, 0 indicates height is supplied by font metrics
@@ -1004,7 +996,7 @@ public: // Default style & Input style
    *
    * @param[in] color color of outline.
    */
-  void SetOutlineColor( const Vector4& color );
+  void SetOutlineColor(const Vector4& color);
 
   /**
    * @brief Retrieve the outline color.
@@ -1018,7 +1010,7 @@ public: // Default style & Input style
    *
    * @param[in] width The width in pixels of the outline, 0 indicates no outline
    */
-  void SetOutlineWidth( uint16_t width );
+  void SetOutlineWidth(uint16_t width);
 
   /**
    * @brief Retrieves the width of an outline
@@ -1032,7 +1024,7 @@ public: // Default style & Input style
    *
    * @param[in] color color of background.
    */
-  void SetBackgroundColor( const Vector4& color );
+  void SetBackgroundColor(const Vector4& color);
 
   /**
    * @brief Retrieve the background color.
@@ -1046,7 +1038,7 @@ public: // Default style & Input style
    *
    * @param[in] enabled The background enabled flag.
    */
-  void SetBackgroundEnabled( bool enabled );
+  void SetBackgroundEnabled(bool enabled);
 
   /**
    * @brief Returns whether to enable text background or not.
@@ -1062,7 +1054,7 @@ public: // Default style & Input style
    *
    * @param[in] embossProperties The emboss's properties string.
    */
-  void SetDefaultEmbossProperties( const std::string& embossProperties );
+  void SetDefaultEmbossProperties(const std::string& embossProperties);
 
   /**
    * @brief Retrieves the emboss's properties string.
@@ -1078,7 +1070,7 @@ public: // Default style & Input style
    *
    * @param[in] outlineProperties The outline's properties string.
    */
-  void SetDefaultOutlineProperties( const std::string& outlineProperties );
+  void SetDefaultOutlineProperties(const std::string& outlineProperties);
 
   /**
    * @brief Retrieves the outline's properties string.
@@ -1094,7 +1086,7 @@ public: // Default style & Input style
    *
    * @return True if lineSpacing has been updated, false otherwise
    */
-  bool SetDefaultLineSpacing( float lineSpacing );
+  bool SetDefaultLineSpacing(float lineSpacing);
 
   /**
    * @brief Retrieves the default line spacing.
@@ -1110,7 +1102,7 @@ public: // Default style & Input style
    *
    * @return True if lineSize has been updated, false otherwise
    */
-  bool SetDefaultLineSize( float lineSize );
+  bool SetDefaultLineSize(float lineSize);
 
   /**
    * @brief Retrieves the default line size.
@@ -1124,7 +1116,7 @@ public: // Default style & Input style
    *
    * @param[in] color The input text's color.
    */
-  void SetInputColor( const Vector4& color );
+  void SetInputColor(const Vector4& color);
 
   /**
    * @brief Retrieves the input text's color.
@@ -1138,7 +1130,7 @@ public: // Default style & Input style
    *
    * @param[in] fontFamily The text's font family name.
    */
-  void SetInputFontFamily( const std::string& fontFamily );
+  void SetInputFontFamily(const std::string& fontFamily);
 
   /**
    * @brief Retrieves the input text's font family name.
@@ -1152,7 +1144,7 @@ public: // Default style & Input style
    *
    * @param[in] weight The input font's weight.
    */
-  void SetInputFontWeight( FontWeight weight );
+  void SetInputFontWeight(FontWeight weight);
 
   /**
    * @return Whether the font's weight has been defined.
@@ -1171,7 +1163,7 @@ public: // Default style & Input style
    *
    * @param[in] width The input font's width.
    */
-  void SetInputFontWidth( FontWidth width );
+  void SetInputFontWidth(FontWidth width);
 
   /**
    * @return Whether the font's width has been defined.
@@ -1190,7 +1182,7 @@ public: // Default style & Input style
    *
    * @param[in] slant The input font's slant.
    */
-  void SetInputFontSlant( FontSlant slant );
+  void SetInputFontSlant(FontSlant slant);
 
   /**
    * @return Whether the font's slant has been defined.
@@ -1209,7 +1201,7 @@ public: // Default style & Input style
    *
    * @param[in] size The input font's point size.
    */
-  void SetInputFontPointSize( float size );
+  void SetInputFontPointSize(float size);
 
   /**
    * @brief Retrieves the input font's point size.
@@ -1223,7 +1215,7 @@ public: // Default style & Input style
    *
    * @param[in] lineSpacing The line spacing.
    */
-  void SetInputLineSpacing( float lineSpacing );
+  void SetInputLineSpacing(float lineSpacing);
 
   /**
    * @brief Retrieves the input line spacing.
@@ -1239,7 +1231,7 @@ public: // Default style & Input style
    *
    * @param[in] shadowProperties The shadow's properties string.
    */
-  void SetInputShadowProperties( const std::string& shadowProperties );
+  void SetInputShadowProperties(const std::string& shadowProperties);
 
   /**
    * @brief Retrieves the input shadow's properties string.
@@ -1255,7 +1247,7 @@ public: // Default style & Input style
    *
    * @param[in] underlineProperties The underline's properties string.
    */
-  void SetInputUnderlineProperties( const std::string& underlineProperties );
+  void SetInputUnderlineProperties(const std::string& underlineProperties);
 
   /**
    * @brief Retrieves the input underline's properties string.
@@ -1271,7 +1263,7 @@ public: // Default style & Input style
    *
    * @param[in] embossProperties The emboss's properties string.
    */
-  void SetInputEmbossProperties( const std::string& embossProperties );
+  void SetInputEmbossProperties(const std::string& embossProperties);
 
   /**
    * @brief Retrieves the input emboss's properties string.
@@ -1287,7 +1279,7 @@ public: // Default style & Input style
    *
    * @param[in] outlineProperties The outline's properties string.
    */
-  void SetInputOutlineProperties( const std::string& outlineProperties );
+  void SetInputOutlineProperties(const std::string& outlineProperties);
 
   /**
    * @brief Retrieves the input outline's properties string.
@@ -1301,10 +1293,9 @@ public: // Default style & Input style
    *
    * @param[in] controlInterface The control's interface.
    */
-  void SetControlInterface( ControlInterface* controlInterface );
+  void SetControlInterface(ControlInterface* controlInterface);
 
 public: // Queries & retrieves.
-
   /**
    * @brief Return the layout engine.
    *
@@ -1327,26 +1318,26 @@ public: // Queries & retrieves.
   /**
    * @copydoc Control::GetHeightForWidth()
    */
-  float GetHeightForWidth( float width );
+  float GetHeightForWidth(float width);
 
   /**
    * @brief Calculates the point size for text for given layout()
    */
-  void FitPointSizeforLayout( Size layoutSize );
+  void FitPointSizeforLayout(Size layoutSize);
 
   /**
    * @brief Checks if the point size fits within the layout size.
    *
    * @return Whether the point size fits within the layout size.
    */
-  bool CheckForTextFit( float pointSize, Size& layoutSize );
+  bool CheckForTextFit(float pointSize, Size& layoutSize);
 
   /**
    * @brief Retrieves the text's number of lines for a given width.
    * @param[in] width The width of the text's area.
    * @ return The number of lines.
    */
-  int GetLineCount( float width );
+  int GetLineCount(float width);
 
   /**
    * @brief Retrieves the text's model.
@@ -1372,31 +1363,31 @@ public: // Queries & retrieves.
    *
    * @return Whether the text scroll position is changed or not after last update.
    */
-  bool GetTextScrollInfo( float& scrollPosition, float& controlHeight, float& layoutHeight );
+  bool GetTextScrollInfo(float& scrollPosition, float& controlHeight, float& layoutHeight);
 
   /**
    * @brief Used to set the hidden input option
    */
-  void SetHiddenInputOption( const Property::Map& options );
+  void SetHiddenInputOption(const Property::Map& options);
 
   /**
    * @brief Used to get the hidden input option
    */
-  void GetHiddenInputOption( Property::Map& options );
+  void GetHiddenInputOption(Property::Map& options);
 
   /**
    * @brief Sets the Placeholder Properties.
    *
    * @param[in] map The placeholder property map
    */
-  void SetPlaceholderProperty( const Property::Map& map );
+  void SetPlaceholderProperty(const Property::Map& map);
 
   /**
    * @brief Retrieves the Placeholder Property map.
    *
    * @param[out] map The property map
    */
-  void GetPlaceholderProperty( Property::Map& map );
+  void GetPlaceholderProperty(Property::Map& map);
 
   /**
    * @brief Checks text direction.
@@ -1414,7 +1405,7 @@ public: // Queries & retrieves.
    * @brief Sets vertical line alignment
    * @param[in] alignment The vertical line alignment for the text
    */
-  void SetVerticalLineAlignment( Toolkit::DevelText::VerticalLineAlignment::Type alignment );
+  void SetVerticalLineAlignment(Toolkit::DevelText::VerticalLineAlignment::Type alignment);
 
   /**
    * @brief Retrieves ignoreSpaceAfterText value from model
@@ -1426,7 +1417,7 @@ public: // Queries & retrieves.
    * @brief Sets ignoreSpaceAfterText value to model
    * @param[in] ignore The value of ignoreSpacesAfterText for the text
    */
-  void SetIgnoreSpacesAfterText( bool ignore );
+  void SetIgnoreSpacesAfterText(bool ignore);
 
   /**
    * @brief Retrieves matchSystemLanguageDirection value from model
@@ -1438,13 +1429,13 @@ public: // Queries & retrieves.
    * @brief Sets matchSystemLanguageDirection value to model
    * @param[in] match The value of matchSystemLanguageDirection for the text
    */
-  void SetMatchSystemLanguageDirection( bool match );
+  void SetMatchSystemLanguageDirection(bool match);
 
   /**
    * @brief Sets layoutDirection value
    * @param[in] layoutDirection The value of system language direction
    */
-  void SetLayoutDirection( Dali::LayoutDirection::Type layoutDirection );
+  void SetLayoutDirection(Dali::LayoutDirection::Type layoutDirection);
 
   /**
    * @brief Retrieves if showing real text or not.
@@ -1453,7 +1444,6 @@ public: // Queries & retrieves.
   bool IsShowingRealText() const;
 
 public: // Relayout.
-
   /**
    * @brief Triggers a relayout which updates View (if necessary).
    *
@@ -1463,7 +1453,7 @@ public: // Relayout.
    *
    * @return Whether the text model or decorations were updated.
    */
-  UpdateTextType Relayout( const Size& size, Dali::LayoutDirection::Type layoutDirection = Dali::LayoutDirection::LEFT_TO_RIGHT );
+  UpdateTextType Relayout(const Size& size, Dali::LayoutDirection::Type layoutDirection = Dali::LayoutDirection::LEFT_TO_RIGHT);
 
   /**
    * @brief Request a relayout using the ControlInterface.
@@ -1471,7 +1461,6 @@ public: // Relayout.
   void RequestRelayout();
 
 public: // Input style change signals.
-
   /**
    * @return Whether the queue of input style changed signals is empty.
    */
@@ -1486,7 +1475,6 @@ public: // Input style change signals.
   void ProcessInputStyleChangedSignals();
 
 public: // Text-input Event Queuing.
-
   /**
    * @brief Called by editable UI controls when keyboard focus is gained.
    */
@@ -1503,7 +1491,7 @@ public: // Text-input Event Queuing.
    * @param[in] event The key event.
    * @param[in] type Used to distinguish between regular key events and InputMethodContext events.
    */
-  bool KeyEvent( const Dali::KeyEvent& event );
+  bool KeyEvent(const Dali::KeyEvent& event);
 
   /**
    * @brief Called by editable UI controls when a tap gesture occurs.
@@ -1511,7 +1499,7 @@ public: // Text-input Event Queuing.
    * @param[in] x The x position relative to the top-left of the parent control.
    * @param[in] y The y position relative to the top-left of the parent control.
    */
-  void TapEvent( unsigned int tapCount, float x, float y );
+  void TapEvent(unsigned int tapCount, float x, float y);
 
   /**
    * @brief Called by editable UI controls when a pan gesture occurs.
@@ -1519,7 +1507,7 @@ public: // Text-input Event Queuing.
    * @param[in] state The state of the gesture.
    * @param[in] displacement This distance panned since the last pan gesture.
    */
-  void PanEvent( GestureState state, const Vector2& displacement );
+  void PanEvent(GestureState state, const Vector2& displacement);
 
   /**
    * @brief Called by editable UI controls when a long press gesture occurs.
@@ -1528,7 +1516,7 @@ public: // Text-input Event Queuing.
    * @param[in] x The x position relative to the top-left of the parent control.
    * @param[in] y The y position relative to the top-left of the parent control.
    */
-  void LongPressEvent( GestureState state, float x, float y );
+  void LongPressEvent(GestureState state, float x, float y);
 
   /**
    * @brief Used to get the Primary cursor position.
@@ -1543,7 +1531,7 @@ public: // Text-input Event Queuing.
    * @param[in] index for the Primary cursor position.
    * @return[in] true if cursor position changed, false otherwise.
    */
-  bool SetPrimaryCursorPosition( CharacterIndex index );
+  bool SetPrimaryCursorPosition(CharacterIndex index);
 
   /**
    * @brief Creates a selection event.
@@ -1554,12 +1542,12 @@ public: // Text-input Event Queuing.
    * @param[in] y The y position relative to the top-left of the parent control.
    * @param[in] selection type like the whole text is selected or unselected.
    */
-  void SelectEvent( float x, float y, SelectionType selection );
+  void SelectEvent(float x, float y, SelectionType selection);
 
   /**
    * @copydoc Text::SelectableControlInterface::SetTextSelectionRange()
    */
-  void SetTextSelectionRange(const uint32_t *start, const uint32_t *end);
+  void SetTextSelectionRange(const uint32_t* start, const uint32_t* end);
 
   /**
    * @copydoc Text::SelectableControlInterface::GetTextSelectionRange()
@@ -1589,12 +1577,12 @@ public: // Text-input Event Queuing.
   /**
    * @copydoc Text::EditableControlInterface::SetEditable()
    */
-  virtual void SetEditable( bool editable );
+  virtual void SetEditable(bool editable);
 
   /**
    * @copydoc Dali::Toolkit::Internal::TextEditor::ScrollBy()
    */
-  virtual void ScrollBy( Vector2 scroll );
+  virtual void ScrollBy(Vector2 scroll);
 
   /**
    * @copydoc Dali::Toolkit::Internal::TextEditor::GetHorizontalScrollPosition()
@@ -1613,7 +1601,7 @@ public: // Text-input Event Queuing.
    * @param[in] inputMethodContextEvent The event received.
    * @return A data struture indicating if update is needed, cursor position and current text.
    */
-  InputMethodContext::CallbackData OnInputMethodContextEvent( InputMethodContext& inputMethodContext, const InputMethodContext::EventData& inputMethodContextEvent );
+  InputMethodContext::CallbackData OnInputMethodContextEvent(InputMethodContext& inputMethodContext, const InputMethodContext::EventData& inputMethodContextEvent);
 
   /**
    * @brief Event from Clipboard notifying an Item has been selected for pasting
@@ -1639,7 +1627,7 @@ public: // Text-input Event Queuing.
    *
    * @param[in] cursorIndex Where to place the cursor.
    */
-  void ResetCursorPosition( CharacterIndex cursorIndex );
+  void ResetCursorPosition(CharacterIndex cursorIndex);
 
   /**
    * @brief The method acquires current position of cursor
@@ -1648,51 +1636,47 @@ public: // Text-input Event Queuing.
   CharacterIndex GetCursorPosition();
 
 protected: // Inherit from Text::Decorator::ControllerInterface.
-
   /**
    * @copydoc Dali::Toolkit::Text::Decorator::ControllerInterface::GetTargetSize()
    */
-  void GetTargetSize( Vector2& targetSize ) override;
+  void GetTargetSize(Vector2& targetSize) override;
 
   /**
    * @copydoc Dali::Toolkit::Text::Decorator::ControllerInterface::AddDecoration()
    */
-  void AddDecoration( Actor& actor, bool needsClipping ) override;
+  void AddDecoration(Actor& actor, bool needsClipping) override;
 
   /**
    * @copydoc Dali::Toolkit::Text::Decorator::ControllerInterface::DecorationEvent()
    */
-  void DecorationEvent( HandleType handle, HandleState state, float x, float y ) override;
+  void DecorationEvent(HandleType handle, HandleState state, float x, float y) override;
 
 protected: // Inherit from TextSelectionPopup::TextPopupButtonCallbackInterface.
-
   /**
    * @copydoc Dali::Toolkit::TextSelectionPopup::TextPopupButtonCallbackInterface::TextPopupButtonTouched()
    */
-  void TextPopupButtonTouched( Dali::Toolkit::TextSelectionPopup::Buttons button ) override;
+  void TextPopupButtonTouched(Dali::Toolkit::TextSelectionPopup::Buttons button) override;
 
 protected: // Inherit from HiddenText.
-
   /**
    * @brief Invoked from HiddenText when showing time of the last character was expired
    */
   void DisplayTimeExpired() override;
 
 private: // Update.
-
   /**
    * @brief Called by editable UI controls when key events are received.
    *
    * @param[in] text The text to insert.
    * @param[in] type Used to distinguish between regular key events and InputMethodContext events.
    */
-  void InsertText( const std::string& text, InsertType type );
+  void InsertText(const std::string& text, InsertType type);
 
   /**
    * @brief Paste given string into Text model
    * @param[in] stringToPaste this string will be inserted into the text model
    */
-  void PasteText( const std::string& stringToPaste );
+  void PasteText(const std::string& stringToPaste);
 
   /**
    * @brief Remove a given number of characters
@@ -1706,9 +1690,9 @@ private: // Update.
    * @param[in] type Whether to update the input style.
    * @return True if the remove was successful.
    */
-  bool RemoveText( int cursorOffset,
-                   int numberOfCharacters,
-                   UpdateInputStyleType type  );
+  bool RemoveText(int                  cursorOffset,
+                  int                  numberOfCharacters,
+                  UpdateInputStyleType type);
 
   /**
    * @brief Checks if text is selected and if so removes it.
@@ -1717,7 +1701,6 @@ private: // Update.
   bool RemoveSelectedText();
 
 private: // Relayout.
-
   /**
    * @brief Lays-out the text.
    *
@@ -1727,19 +1710,18 @@ private: // Relayout.
    * @param[in] operations The layout operations which need to be done.
    * @param[out] layoutSize The size of the laid-out text.
    */
-  bool DoRelayout( const Size& size,
-                   OperationsMask operations,
-                   Size& layoutSize );
+  bool DoRelayout(const Size&    size,
+                  OperationsMask operations,
+                  Size&          layoutSize);
 
   /**
    * @brief Calulates the vertical offset to align the text inside the bounding box.
    *
    * @param[in] size The size of the bounding box.
    */
-  void CalculateVerticalOffset( const Size& size );
+  void CalculateVerticalOffset(const Size& size);
 
 private: // Events.
-
   /**
    * @brief Process queued events which modify the model.
    */
@@ -1766,10 +1748,9 @@ private: // Events.
    * @param[in] keyCode The keycode for the key pressed
    * @return True if a character was deleted.
    */
-  bool DeleteEvent( int keyCode );
+  bool DeleteEvent(int keyCode);
 
 private: // Helpers.
-
   /**
    * @brief Used to remove the text included the placeholder text.
    */
@@ -1796,7 +1777,6 @@ private: // Helpers.
   void ResetScrollPosition();
 
 private: // Private contructors & copy operator.
-
   /**
    * @brief Private constructor.
    */
@@ -1805,34 +1785,31 @@ private: // Private contructors & copy operator.
   /**
    * @brief Private constructor.
    */
-  Controller( ControlInterface* controlInterface );
+  Controller(ControlInterface* controlInterface);
 
   /**
    * @brief Private constructor.
    */
-  Controller( ControlInterface* controlInterface,
-              EditableControlInterface* editableControlInterface,
-              SelectableControlInterface* selectableControlInterface );
+  Controller(ControlInterface*           controlInterface,
+             EditableControlInterface*   editableControlInterface,
+             SelectableControlInterface* selectableControlInterface);
 
   // Undefined
-  Controller( const Controller& handle );
+  Controller(const Controller& handle);
 
   // Undefined
-  Controller& operator=( const Controller& handle );
+  Controller& operator=(const Controller& handle);
 
 protected: // Destructor.
-
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
    */
   virtual ~Controller();
 
 public:
-
   struct Impl; ///< Made public for testing purposes
 
 private:
-
   struct EventHandler;
   struct InputFontHandler;
   struct PlaceholderHandler;
old mode 100755 (executable)
new mode 100644 (file)
index 6ea207b..7cbc279
@@ -2,7 +2,7 @@
 #define DALI_TEXT_ABSTRACTION_TEXT_TYPE_DEFINITIONS_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <dali/devel-api/text-abstraction/text-abstraction-definitions.h>
 #include <dali/devel-api/text-abstraction/font-list.h>
 #include <dali/devel-api/text-abstraction/font-metrics.h>
 #include <dali/devel-api/text-abstraction/glyph-info.h>
 #include <dali/devel-api/text-abstraction/script.h>
+#include <dali/devel-api/text-abstraction/text-abstraction-definitions.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 typedef TextAbstraction::FontId             FontId;             ///< The unique identifier for a font face (generated by FontClient).
 typedef TextAbstraction::FontWidth::Type    FontWidth;          ///< The font's width.
 typedef TextAbstraction::FontWeight::Type   FontWeight;         ///< The font's weight.
@@ -54,14 +51,14 @@ typedef TextAbstraction::CharacterDirection CharacterDirection; ///< The charact
 typedef TextAbstraction::ColorBlendingMode  ColorBlendingMode;  ///< Defines how a color is blended.
 typedef TextAbstraction::ColorIndex         ColorIndex;         ///< An index into an array of colors.
 
-typedef uint32_t                         GlyphIndex;                ///< An index into an array of glyphs.
-typedef uint32_t                         ScriptRunIndex;            ///< An index into an array of script runs.
-typedef uint32_t                         FontRunIndex;              ///< An index into an array of font runs.
-typedef uint32_t                         UnderlineRunIndex;         ///< An index into an array of underline runs.
-typedef uint32_t                         BidirectionalRunIndex;     ///< An index into an array of bidirectional info.
-typedef uint32_t                         BidirectionalLineRunIndex; ///< An index into an array of bidirectional line info.
-typedef uint32_t                         LineIndex;                 ///< An index into an array of lines.
-typedef uint32_t                         ParagraphRunIndex;         ///< An index into an array of paragraphs.
+typedef uint32_t GlyphIndex;                ///< An index into an array of glyphs.
+typedef uint32_t ScriptRunIndex;            ///< An index into an array of script runs.
+typedef uint32_t FontRunIndex;              ///< An index into an array of font runs.
+typedef uint32_t UnderlineRunIndex;         ///< An index into an array of underline runs.
+typedef uint32_t BidirectionalRunIndex;     ///< An index into an array of bidirectional info.
+typedef uint32_t BidirectionalLineRunIndex; ///< An index into an array of bidirectional line info.
+typedef uint32_t LineIndex;                 ///< An index into an array of lines.
+typedef uint32_t ParagraphRunIndex;         ///< An index into an array of paragraphs.
 
 } // namespace Text
 
index 6239a68..0f55494 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_EDITABLE_CONTROL_INTERFACE_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 class Actor;
 
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief An interface that the Text::Controller uses to notify about text changes and add decoration to the text control.
  */
 class EditableControlInterface
 {
 public:
-
   /**
    * @brief Virtual destructor.
    */
   virtual ~EditableControlInterface()
-  {}
+  {
+  }
 
   /**
    * @brief Called to signal that text has been inserted.
    */
-  virtual void TextInserted( unsigned int position, unsigned int length, const std::string &content ) = 0;
+  virtual void TextInserted(unsigned int position, unsigned int length, const std::string& content) = 0;
 
   /**
    * @brief Called to signal that text has been deleted.
    */
-  virtual void TextDeleted( unsigned int position, unsigned int length, const std::string &content ) = 0;
+  virtual void TextDeleted(unsigned int position, unsigned int length, const std::string& content) = 0;
 
   /**
    * @brief Called to signal that caret (cursor position) has been moved.
    */
-  virtual void CaretMoved( unsigned int position ) = 0;
+  virtual void CaretMoved(unsigned int position) = 0;
 
   /**
    * @brief Called to signal that text has been inserted or deleted.
@@ -75,7 +72,7 @@ public:
    *
    * @param[in] inputStyleMask Mask with the bits of the input style that has changed.
    */
-  virtual void InputStyleChanged( InputStyle::Mask inputStyleMask ) = 0;
+  virtual void InputStyleChanged(InputStyle::Mask inputStyleMask) = 0;
 
   /**
    * @brief Add a decoration.
@@ -83,7 +80,7 @@ public:
    * @param[in] decoration The actor displaying a decoration.
    * @param[in] needsClipping Whether the actor needs clipping.
    */
-  virtual void AddDecoration( Actor& actor, bool needsClipping ) = 0;
+  virtual void AddDecoration(Actor& actor, bool needsClipping) = 0;
 
   /**
    * @brief Editable status (on/off).
@@ -97,7 +94,7 @@ public:
    *
    * @param[in] editable The editable status.
    */
-  virtual void SetEditable( bool editable ) = 0;
+  virtual void SetEditable(bool editable) = 0;
 };
 
 } // namespace Text
old mode 100755 (executable)
new mode 100644 (file)
index a64d26f..fcc2381
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_TEXT_EFFECTS_STYLE_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 namespace EffectStyle
 {
-  enum Type
-  {
-    DEFAULT, ///< The default text effect style.
-    INPUT    ///< The input text effect style.
-  };
+enum Type
+{
+  DEFAULT, ///< The default text effect style.
+  INPUT    ///< The input text effect style.
+};
 };
 
 /**
@@ -48,11 +45,11 @@ namespace EffectStyle
  * @param[out] offsetDefined Whether the shadow's offset is defined.
  * @param[out] offset The shadow's offset.
  */
-bool ParseShadowProperties( const Property::Map& shadowProperties,
-                            bool& colorDefined,
-                            Vector4& color,
-                            bool& offsetDefined,
-                            Vector2& offset );
+bool ParseShadowProperties(const Property::Map& shadowProperties,
+                           bool&                colorDefined,
+                           Vector4&             color,
+                           bool&                offsetDefined,
+                           Vector2&             offset);
 
 /**
  * @brief Parses the underline properties.
@@ -64,12 +61,12 @@ bool ParseShadowProperties( const Property::Map& shadowProperties,
  * @param[out] heightDefined Whether the underline's height is defined.
  * @param[out] height The underline's height.
  */
-bool ParseUnderlineProperties( const Property::Map& underlineProperties,
-                               bool& enabled,
-                               bool& colorDefined,
-                               Vector4& color,
-                               bool& heightDefined,
-                               float& height );
+bool ParseUnderlineProperties(const Property::Map& underlineProperties,
+                              bool&                enabled,
+                              bool&                colorDefined,
+                              Vector4&             color,
+                              bool&                heightDefined,
+                              float&               height);
 
 /**
  * @brief Parses the outline properties.
@@ -80,12 +77,11 @@ bool ParseUnderlineProperties( const Property::Map& underlineProperties,
  * @param[out] widthDefined Whether the outline's width is defined.
  * @param[out] width The outline's width.
  */
-bool ParseOutlineProperties( const Property::Map& outlineProperties,
-                               bool& colorDefined,
-                               Vector4& color,
-                               bool& widthDefined,
-                               unsigned int& width );
-
+bool ParseOutlineProperties(const Property::Map& outlineProperties,
+                            bool&                colorDefined,
+                            Vector4&             color,
+                            bool&                widthDefined,
+                            unsigned int&        width);
 
 /**
  * @brief Parses the background properties.
@@ -95,10 +91,10 @@ bool ParseOutlineProperties( const Property::Map& outlineProperties,
  * @param[out] colorDefined Whether the background color is defined.
  * @param[out] color The background color.
  */
-bool ParseBackgroundProperties( const Property::Map& backgroundProperties,
-                                bool& enabled,
-                                bool& colorDefined,
-                                Vector4& color );
+bool ParseBackgroundProperties(const Property::Map& backgroundProperties,
+                               bool&                enabled,
+                               bool&                colorDefined,
+                               Vector4&             color);
 
 /**
  * @brief Sets the underline properties.
@@ -109,7 +105,7 @@ bool ParseBackgroundProperties( const Property::Map& backgroundProperties,
  *
  * @return Whether the underline properties have been updated.
  */
-bool SetUnderlineProperties( ControllerPtr controller, const Property::Value& value, EffectStyle::Type type );
+bool SetUnderlineProperties(ControllerPtr controller, const Property::Value& value, EffectStyle::Type type);
 
 /**
  * @brief Retrieves the underline's properties.
@@ -118,7 +114,7 @@ bool SetUnderlineProperties( ControllerPtr controller, const Property::Value& va
  * @param[out] value The value of the underline's properties.
  * @param[in] type Whether the property is for the default underline or the input underline.
  */
-void GetUnderlineProperties( ControllerPtr controller, Property::Value& value, EffectStyle::Type type );
+void GetUnderlineProperties(ControllerPtr controller, Property::Value& value, EffectStyle::Type type);
 
 /**
  * @brief Sets the shadow properties.
@@ -129,7 +125,7 @@ void GetUnderlineProperties( ControllerPtr controller, Property::Value& value, E
  *
  * @return Whether the shadow properties have been updated.
  */
-bool SetShadowProperties( ControllerPtr controller, const Property::Value& value, EffectStyle::Type type );
+bool SetShadowProperties(ControllerPtr controller, const Property::Value& value, EffectStyle::Type type);
 
 /**
  * @brief Retrieves the shadow's properties.
@@ -138,7 +134,7 @@ bool SetShadowProperties( ControllerPtr controller, const Property::Value& value
  * @param[out] value The value of the shadow's properties.
  * @param[in] type Whether the property is for the default shadow or the input shadow.
  */
-void GetShadowProperties( ControllerPtr controller, Property::Value& value, EffectStyle::Type type );
+void GetShadowProperties(ControllerPtr controller, Property::Value& value, EffectStyle::Type type);
 
 /**
  * @brief Sets the emboss properties.
@@ -149,7 +145,7 @@ void GetShadowProperties( ControllerPtr controller, Property::Value& value, Effe
  *
  * @return Whether the emboss properties have been updated.
  */
-bool SetEmbossProperties( ControllerPtr controller, const Property::Value& value, EffectStyle::Type type );
+bool SetEmbossProperties(ControllerPtr controller, const Property::Value& value, EffectStyle::Type type);
 
 /**
  * @brief Retrieves the emboss's properties.
@@ -158,7 +154,7 @@ bool SetEmbossProperties( ControllerPtr controller, const Property::Value& value
  * @param[out] value The value of the emboss's properties.
  * @param[in] type Whether the property is for the default emboss or the input emboss.
  */
-void GetEmbossProperties( ControllerPtr controller, Property::Value& value, EffectStyle::Type type );
+void GetEmbossProperties(ControllerPtr controller, Property::Value& value, EffectStyle::Type type);
 
 /**
  * @brief Sets the outline properties.
@@ -169,7 +165,7 @@ void GetEmbossProperties( ControllerPtr controller, Property::Value& value, Effe
  *
  * @return Whether the outline properties have been updated.
  */
-bool SetOutlineProperties( ControllerPtr controller, const Property::Value& value, EffectStyle::Type type );
+bool SetOutlineProperties(ControllerPtr controller, const Property::Value& value, EffectStyle::Type type);
 
 /**
  * @brief Retrieves the outline's properties.
@@ -178,7 +174,7 @@ bool SetOutlineProperties( ControllerPtr controller, const Property::Value& valu
  * @param[out] value The value of the outline's properties.
  * @param[in] type Whether the property is for the default outline or the input outline.
  */
-void GetOutlineProperties( ControllerPtr controller, Property::Value& value, EffectStyle::Type type );
+void GetOutlineProperties(ControllerPtr controller, Property::Value& value, EffectStyle::Type type);
 
 /**
  * @brief Sets the background properties.
@@ -189,7 +185,7 @@ void GetOutlineProperties( ControllerPtr controller, Property::Value& value, Eff
  *
  * @return Whether the background properties have been updated.
  */
-bool SetBackgroundProperties( ControllerPtr controller, const Property::Value& value, EffectStyle::Type type );
+bool SetBackgroundProperties(ControllerPtr controller, const Property::Value& value, EffectStyle::Type type);
 
 /**
  * @brief Retrieves the background's properties.
@@ -198,7 +194,7 @@ bool SetBackgroundProperties( ControllerPtr controller, const Property::Value& v
  * @param[out] value The value of the underline's properties.
  * @param[in] type Whether the property is for the default background or the input background.
  */
-void GetBackgroundProperties( ControllerPtr controller, Property::Value& value, EffectStyle::Type type );
+void GetBackgroundProperties(ControllerPtr controller, Property::Value& value, EffectStyle::Type type);
 
 } // namespace Text
 
index 61428fa..bb72e98 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_ENUMERATION_IMPL_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief Get the alignment from the provided property value.
  * @param[in] propertyValue The source value (which can be a Property::INTEGER or Property::STRING type)
  * @param[out] alignment The resulting alignment from the given source
  * @return true if the resulting alignment has been updated
  */
-bool GetHorizontalAlignmentEnumeration( const Property::Value& propertyValue, Toolkit::Text::HorizontalAlignment::Type& alignment );
+bool GetHorizontalAlignmentEnumeration(const Property::Value& propertyValue, Toolkit::Text::HorizontalAlignment::Type& alignment);
 
 /**
  * @brief Get the alignment from the provided property value.
@@ -47,7 +44,7 @@ bool GetHorizontalAlignmentEnumeration( const Property::Value& propertyValue, To
  * @param[out] alignment The resulting alignment from the given source
  * @return true if the resulting alignment has been updated
  */
-bool GetVerticalAlignmentEnumeration( const Property::Value& propertyValue, Toolkit::Text::VerticalAlignment::Type& alignment );
+bool GetVerticalAlignmentEnumeration(const Property::Value& propertyValue, Toolkit::Text::VerticalAlignment::Type& alignment);
 
 /**
  * @brief Get the line-wrap-mode from the provided property value.
@@ -55,21 +52,21 @@ bool GetVerticalAlignmentEnumeration( const Property::Value& propertyValue, Tool
  * @param[out] alignment The resulting lineWrapMode from the given source
  * @return true if the resulting lineWrapMode has been updated
  */
-bool GetLineWrapModeEnumeration( const Property::Value& propertyValue, Toolkit::Text::LineWrap::Mode& lineWrapMode );
+bool GetLineWrapModeEnumeration(const Property::Value& propertyValue, Toolkit::Text::LineWrap::Mode& lineWrapMode);
 
 /**
  * @brief Get the alignment string from the provided alignment string.
  * @param[in] alignment the Text::HORIZONTAL enum source
  * @return the string equivalent
  */
-const char* GetHorizontalAlignmentString( const Toolkit::Text::HorizontalAlignment::Type& alignment );
+const char* GetHorizontalAlignmentString(const Toolkit::Text::HorizontalAlignment::Type& alignment);
 
 /**
  * @brief Get the alignment string from the provided alignment string.
  * @param[in] alignment the Text::VerticalAlignment enum source
  * @return the string equivalent
  */
-const char* GetVerticalAlignmentString( const Toolkit::Text::VerticalAlignment::Type& alignment );
+const char* GetVerticalAlignmentString(const Toolkit::Text::VerticalAlignment::Type& alignment);
 
 } // namespace Text
 
index e53d754..c85ec58 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_TEXT_FONT_STYLE_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 const Scripting::StringEnum FONT_WEIGHT_STRING_TABLE[] =
-{
-  { "thin", TextAbstraction::FontWeight::THIN },
-  { "ultraLight", TextAbstraction::FontWeight::ULTRA_LIGHT },
-  { "extraLight", TextAbstraction::FontWeight::EXTRA_LIGHT },
-  { "light", TextAbstraction::FontWeight::LIGHT },
-  { "demiLight", TextAbstraction::FontWeight::DEMI_LIGHT },
-  { "semiLight", TextAbstraction::FontWeight::SEMI_LIGHT },
-  { "book", TextAbstraction::FontWeight::BOOK },
-  { "normal", TextAbstraction::FontWeight::NORMAL },
-  { "regular", TextAbstraction::FontWeight::REGULAR },
-  { "medium", TextAbstraction::FontWeight::MEDIUM },
-  { "demiBold", TextAbstraction::FontWeight::DEMI_BOLD },
-  { "semiBold", TextAbstraction::FontWeight::SEMI_BOLD },
-  { "bold", TextAbstraction::FontWeight::BOLD },
-  { "ultraBold", TextAbstraction::FontWeight::ULTRA_BOLD },
-  { "extraBold", TextAbstraction::FontWeight::EXTRA_BOLD },
-  { "black", TextAbstraction::FontWeight::BLACK },
-  { "heavy", TextAbstraction::FontWeight::HEAVY },
-  { "extraBlack", TextAbstraction::FontWeight::EXTRA_BLACK }
-};
-const unsigned int FONT_WEIGHT_STRING_TABLE_COUNT = sizeof( FONT_WEIGHT_STRING_TABLE ) / sizeof( FONT_WEIGHT_STRING_TABLE[0] );
+  {
+    {"thin", TextAbstraction::FontWeight::THIN},
+    {"ultraLight", TextAbstraction::FontWeight::ULTRA_LIGHT},
+    {"extraLight", TextAbstraction::FontWeight::EXTRA_LIGHT},
+    {"light", TextAbstraction::FontWeight::LIGHT},
+    {"demiLight", TextAbstraction::FontWeight::DEMI_LIGHT},
+    {"semiLight", TextAbstraction::FontWeight::SEMI_LIGHT},
+    {"book", TextAbstraction::FontWeight::BOOK},
+    {"normal", TextAbstraction::FontWeight::NORMAL},
+    {"regular", TextAbstraction::FontWeight::REGULAR},
+    {"medium", TextAbstraction::FontWeight::MEDIUM},
+    {"demiBold", TextAbstraction::FontWeight::DEMI_BOLD},
+    {"semiBold", TextAbstraction::FontWeight::SEMI_BOLD},
+    {"bold", TextAbstraction::FontWeight::BOLD},
+    {"ultraBold", TextAbstraction::FontWeight::ULTRA_BOLD},
+    {"extraBold", TextAbstraction::FontWeight::EXTRA_BOLD},
+    {"black", TextAbstraction::FontWeight::BLACK},
+    {"heavy", TextAbstraction::FontWeight::HEAVY},
+    {"extraBlack", TextAbstraction::FontWeight::EXTRA_BLACK}};
+const unsigned int FONT_WEIGHT_STRING_TABLE_COUNT = sizeof(FONT_WEIGHT_STRING_TABLE) / sizeof(FONT_WEIGHT_STRING_TABLE[0]);
 
 const Scripting::StringEnum FONT_WIDTH_STRING_TABLE[] =
-{
-  { "ultraCondensed", TextAbstraction::FontWidth::ULTRA_CONDENSED },
-  { "extraCondensed", TextAbstraction::FontWidth::EXTRA_CONDENSED },
-  { "condensed", TextAbstraction::FontWidth::CONDENSED },
-  { "semiCondensed", TextAbstraction::FontWidth::SEMI_CONDENSED },
-  { "normal", TextAbstraction::FontWidth::NORMAL },
-  { "semiExpanded", TextAbstraction::FontWidth::SEMI_EXPANDED },
-  { "expanded", TextAbstraction::FontWidth::EXPANDED },
-  { "extraExpanded", TextAbstraction::FontWidth::EXTRA_EXPANDED },
-  { "ultraExpanded", TextAbstraction::FontWidth::ULTRA_EXPANDED },
+  {
+    {"ultraCondensed", TextAbstraction::FontWidth::ULTRA_CONDENSED},
+    {"extraCondensed", TextAbstraction::FontWidth::EXTRA_CONDENSED},
+    {"condensed", TextAbstraction::FontWidth::CONDENSED},
+    {"semiCondensed", TextAbstraction::FontWidth::SEMI_CONDENSED},
+    {"normal", TextAbstraction::FontWidth::NORMAL},
+    {"semiExpanded", TextAbstraction::FontWidth::SEMI_EXPANDED},
+    {"expanded", TextAbstraction::FontWidth::EXPANDED},
+    {"extraExpanded", TextAbstraction::FontWidth::EXTRA_EXPANDED},
+    {"ultraExpanded", TextAbstraction::FontWidth::ULTRA_EXPANDED},
 };
-const unsigned int FONT_WIDTH_STRING_TABLE_COUNT = sizeof( FONT_WIDTH_STRING_TABLE ) / sizeof( FONT_WIDTH_STRING_TABLE[0] );
+const unsigned int FONT_WIDTH_STRING_TABLE_COUNT = sizeof(FONT_WIDTH_STRING_TABLE) / sizeof(FONT_WIDTH_STRING_TABLE[0]);
 
 const Scripting::StringEnum FONT_SLANT_STRING_TABLE[] =
-{
-  { "normal", TextAbstraction::FontSlant::NORMAL },
-  { "roman", TextAbstraction::FontSlant::ROMAN },
-  { "italic", TextAbstraction::FontSlant::ITALIC },
-  { "oblique", TextAbstraction::FontSlant::OBLIQUE }
-};
-const unsigned int FONT_SLANT_STRING_TABLE_COUNT = sizeof( FONT_SLANT_STRING_TABLE ) / sizeof( FONT_SLANT_STRING_TABLE[0] );
+  {
+    {"normal", TextAbstraction::FontSlant::NORMAL},
+    {"roman", TextAbstraction::FontSlant::ROMAN},
+    {"italic", TextAbstraction::FontSlant::ITALIC},
+    {"oblique", TextAbstraction::FontSlant::OBLIQUE}};
+const unsigned int FONT_SLANT_STRING_TABLE_COUNT = sizeof(FONT_SLANT_STRING_TABLE) / sizeof(FONT_SLANT_STRING_TABLE[0]);
 
 namespace FontStyle
 {
-  enum Type
-  {
-    DEFAULT,      ///< The default font's style.
-    INPUT,        ///< The input font's style.
-    PLACEHOLDER   ///< The placeholder text font's style.
-  };
+enum Type
+{
+  DEFAULT,    ///< The default font's style.
+  INPUT,      ///< The input font's style.
+  PLACEHOLDER ///< The placeholder text font's style.
+};
 };
 
 /**
@@ -95,7 +90,7 @@ namespace FontStyle
  * @param[in] controller The text's controller.
  * @param[in] value The value of the font's family.
  */
-void SetFontFamilyProperty( ControllerPtr controller, const Property::Value& value );
+void SetFontFamilyProperty(ControllerPtr controller, const Property::Value& value);
 
 /**
  * @brief Sets the font's style property.
@@ -105,7 +100,7 @@ void SetFontFamilyProperty( ControllerPtr controller, const Property::Value& val
  * @param[in] type Whether the property is for the default font's style, the input font's style or the placeholder font's style.
  *
  */
-void SetFontStyleProperty( ControllerPtr controller, const Property::Value& value, FontStyle::Type type );
+void SetFontStyleProperty(ControllerPtr controller, const Property::Value& value, FontStyle::Type type);
 
 /**
  * @brief Retrieves the font's style property.
@@ -114,7 +109,7 @@ void SetFontStyleProperty( ControllerPtr controller, const Property::Value& valu
  * @param[out] value The value of the font's style.
  * @param[in] type Whether the property is for the default font's style, the input font's style or the placeholder font's style.
  */
-void GetFontStyleProperty( ControllerPtr controller, Property::Value& value, FontStyle::Type type );
+void GetFontStyleProperty(ControllerPtr controller, Property::Value& value, FontStyle::Type type);
 
 /**
  * @brief Converts a weight string into @e FontWeight.
@@ -123,7 +118,7 @@ void GetFontStyleProperty( ControllerPtr controller, Property::Value& value, Fon
  *
  * @return The @e FontWeight value corresponding to the string.
  */
-FontWeight StringToWeight( const char* const weightStr );
+FontWeight StringToWeight(const char* const weightStr);
 
 /**
  * @brief Converts a width string into @e FontWidth.
@@ -132,7 +127,7 @@ FontWeight StringToWeight( const char* const weightStr );
  *
  * @return The @e FontWidth value corresponding to the string.
  */
-FontWidth StringToWidth( const char* const widthStr );
+FontWidth StringToWidth(const char* const widthStr);
 
 /**
  * @brief Converts a slant string into @e FontSlant.
@@ -141,7 +136,7 @@ FontWidth StringToWidth( const char* const widthStr );
  *
  * @return The @e FontSlant value corresponding to the string.
  */
-FontSlant StringToSlant( const char* const slantStr );
+FontSlant StringToSlant(const char* const slantStr);
 } // namespace Text
 
 } // namespace Toolkit
index 6c6d3c5..3eaf9f0 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TEXT_ABSTRACTION_TEXT_IO_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics 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,8 @@
  */
 
 // EXTERNAL INCLUDES
-#include <iosfwd>
 #include <dali/public-api/common/dali-vector.h>
+#include <iosfwd>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/text/font-run.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief Print a vector of characters.
  *
@@ -44,7 +41,7 @@ namespace Text
  * @param [in] text The text to print.
  * @return The output stream operator.
  */
-std::ostream& operator<< (std::ostream& o, const Vector<Character>& text);
+std::ostream& operator<<(std::ostream& o, const Vector<Character>& text);
 
 /**
  * @brief Print a vector of script runs.
@@ -53,7 +50,7 @@ std::ostream& operator<< (std::ostream& o, const Vector<Character>& text);
  * @param [in] scriptRuns The script runs to print.
  * @return The output stream operator.
  */
-std::ostream& operator<< (std::ostream& o, const Vector<ScriptRun>& scriptRuns);
+std::ostream& operator<<(std::ostream& o, const Vector<ScriptRun>& scriptRuns);
 
 /**
  * @brief Print a vector of font runs.
@@ -62,7 +59,7 @@ std::ostream& operator<< (std::ostream& o, const Vector<ScriptRun>& scriptRuns);
  * @param [in] fontRuns The font runs to print.
  * @return The output stream operator.
  */
-std::ostream& operator<< (std::ostream& o, const Vector<FontRun>& fontRuns);
+std::ostream& operator<<(std::ostream& o, const Vector<FontRun>& fontRuns);
 
 /**
  * @brief Print a vector of line runs.
@@ -71,7 +68,7 @@ std::ostream& operator<< (std::ostream& o, const Vector<FontRun>& fontRuns);
  * @param [in] lineRuns The line runs to print.
  * @return The output stream operator.
  */
-std::ostream& operator<< (std::ostream& o, const Vector<LineRun>& lineRuns);
+std::ostream& operator<<(std::ostream& o, const Vector<LineRun>& lineRuns);
 
 } // namespace Text
 
old mode 100755 (executable)
new mode 100644 (file)
index 812ba7c..aafd430
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_MODEL_INTERFACE_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/math/vector2.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/text/text-enumerations.h>
+#include <dali-toolkit/devel-api/text/text-enumerations-devel.h>
 #include <dali-toolkit/internal/text/line-run.h>
 #include <dali-toolkit/internal/text/script-run.h>
 #include <dali-toolkit/internal/text/text-definitions.h>
-#include <dali-toolkit/devel-api/text/text-enumerations-devel.h>
+#include <dali-toolkit/public-api/text/text-enumerations.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief Interface class used to retrieve the text's model from the text-controller.
  */
@@ -47,7 +44,8 @@ public:
    * @brief Virtual destructor.
    */
   virtual ~ModelInterface()
-  {}
+  {
+  }
 
   /**
    * @brief Retrives the control's size.
@@ -238,7 +236,7 @@ public:
    * @param[in] index Index of the first underline run to be copied.
    * @param[in] numberOfRuns Number of underline runs to be copied.
    */
-  virtual void GetUnderlineRuns( GlyphRun* underlineRuns, UnderlineRunIndex index, Length numberOfRuns ) const = 0;
+  virtual void GetUnderlineRuns(GlyphRun* underlineRuns, UnderlineRunIndex index, Length numberOfRuns) const = 0;
 
   /**
    * @brief Retrieve the outline color.
@@ -267,7 +265,6 @@ public:
    * @return The background state.
    */
   virtual bool IsBackgroundEnabled() const = 0;
-
 };
 
 } // namespace Text
old mode 100755 (executable)
new mode 100644 (file)
index 219aae8..d52809c
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_MODEL_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/object/ref-object.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/text/text-enumerations.h>
 #include <dali-toolkit/internal/text/logical-model-impl.h>
 #include <dali-toolkit/internal/text/text-model-interface.h>
 #include <dali-toolkit/internal/text/visual-model-impl.h>
+#include <dali-toolkit/public-api/text/text-enumerations.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 // Forward declarations.
 class Model;
 
@@ -46,9 +43,7 @@ typedef IntrusivePtr<Model> ModelPtr;
  */
 class Model : public RefObject, public ModelInterface
 {
-
 public: // Constructor.
-
   /**
    * @brief Create a new instance of a text Model.
    *
@@ -57,7 +52,6 @@ public: // Constructor.
   static ModelPtr New();
 
 public:
-
   /**
    * @copydoc ModelInterface::GetControlSize()
    */
@@ -191,7 +185,7 @@ public:
   /**
    * @copydoc ModelInterface::GetUnderlineRuns()
    */
-  void GetUnderlineRuns( GlyphRun* underlineRuns, UnderlineRunIndex index, Length numberOfRuns ) const override;
+  void GetUnderlineRuns(GlyphRun* underlineRuns, UnderlineRunIndex index, Length numberOfRuns) const override;
 
   /**
    * @copydoc ModelInterface::GetOutlineColor()
@@ -214,42 +208,40 @@ public:
   bool IsBackgroundEnabled() const override;
 
 private: // Private contructors & copy operator.
-
   /**
    * @brief Private constructor.
    */
   Model();
 
   // Undefined.
-  Model( const Model& handle );
+  Model(const Model& handle);
 
   // Undefined.
-  Model& operator=( const Model& handle );
+  Model& operator=(const Model& handle);
 
 protected:
-
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
    */
   virtual ~Model();
 
 public:
-  LogicalModelPtr             mLogicalModel;        ///< Pointer to the logical model.
-  VisualModelPtr              mVisualModel;         ///< Pointer to the visual model.
+  LogicalModelPtr mLogicalModel; ///< Pointer to the logical model.
+  VisualModelPtr  mVisualModel;  ///< Pointer to the visual model.
   /**
    * 0,0 means that the top-left corner of the layout matches the top-left corner of the UI control.
    * 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
-  HorizontalAlignment::Type                 mHorizontalAlignment;     ///< The layout's horizontal alignment.
-  VerticalAlignment::Type                   mVerticalAlignment;       ///< The layout's vertical alignment.
-  DevelText::VerticalLineAlignment::Type    mVerticalLineAlignment;   ///< The layout's vertical line alignment.
-  Text::LineWrap::Mode                      mLineWrapMode;            ///< The text wrap mode
-  float                                     mAlignmentOffset;         ///< The alignment offset.
-  bool                                      mElideEnabled:1;          ///< Whether the text's elide is enabled.
-  bool                                      mIgnoreSpacesAfterText:1; ///< Whether ignoring spaces after text or not. Default is true.
-  bool                                      mMatchSystemLanguageDirection:1; ///< Whether match align for system language direction or not. Default is false.
+  Vector2                                mScrollPosition;                   ///< The text is offset by this position when scrolling.
+  Vector2                                mScrollPositionLast;               ///< The last offset value of mScrollPosition
+  HorizontalAlignment::Type              mHorizontalAlignment;              ///< The layout's horizontal alignment.
+  VerticalAlignment::Type                mVerticalAlignment;                ///< The layout's vertical alignment.
+  DevelText::VerticalLineAlignment::Type mVerticalLineAlignment;            ///< The layout's vertical line alignment.
+  Text::LineWrap::Mode                   mLineWrapMode;                     ///< The text wrap mode
+  float                                  mAlignmentOffset;                  ///< The alignment offset.
+  bool                                   mElideEnabled : 1;                 ///< Whether the text's elide is enabled.
+  bool                                   mIgnoreSpacesAfterText : 1;        ///< Whether ignoring spaces after text or not. Default is true.
+  bool                                   mMatchSystemLanguageDirection : 1; ///< Whether match align for system language direction or not. Default is false.
 };
 
 } // namespace Text
index 5af8c55..780c3a7 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_RUN_CONTAINER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief Clears the runs starting from the given character index.
  *
@@ -39,22 +36,22 @@ namespace Text
  * @param[out] startRemoveIndex The index to the first run to be removed.
  * @param[out] endRemoveIndex The index to the last run to be removed.
  */
-template< typename T >
-void ClearCharacterRuns( CharacterIndex startIndex,
-                         CharacterIndex endIndex,
-                         Vector<T>& runs,
-                         uint32_t& startRemoveIndex,
-                         uint32_t& endRemoveIndex )
+template<typename T>
+void ClearCharacterRuns(CharacterIndex startIndex,
+                        CharacterIndex endIndex,
+                        Vector<T>&     runs,
+                        uint32_t&      startRemoveIndex,
+                        uint32_t&      endRemoveIndex)
 {
   T* runsBuffer = runs.Begin();
-  T* run = runsBuffer;
+  T* run        = runsBuffer;
 
   const Length length = runs.Count();
-  Length index = 0u;
-  for( index = 0u; index < length; ++index )
+  Length       index  = 0u;
+  for(index = 0u; index < length; ++index)
   {
-    if( ( run->characterRun.characterIndex <= endIndex ) &&
-        ( startIndex < run->characterRun.characterIndex + run->characterRun.numberOfCharacters ) )
+    if((run->characterRun.characterIndex <= endIndex) &&
+       (startIndex < run->characterRun.characterIndex + run->characterRun.numberOfCharacters))
     {
       // Run found.
 
@@ -66,11 +63,11 @@ void ClearCharacterRuns( CharacterIndex startIndex,
     ++run;
   }
 
-  run = ( runsBuffer + startRemoveIndex );
-  for( index = startRemoveIndex; index < length; ++index )
+  run = (runsBuffer + startRemoveIndex);
+  for(index = startRemoveIndex; index < length; ++index)
   {
-    if( ( run->characterRun.characterIndex > endIndex ) ||
-        ( startIndex >= run->characterRun.characterIndex + run->characterRun.numberOfCharacters ) )
+    if((run->characterRun.characterIndex > endIndex) ||
+       (startIndex >= run->characterRun.characterIndex + run->characterRun.numberOfCharacters))
     {
       // Run found. Nothing else to do.
       break;
@@ -84,9 +81,9 @@ void ClearCharacterRuns( CharacterIndex startIndex,
 
   // Update the character index of the next runs.
   run = runsBuffer;
-  for( Length index = 0u; index < length; ++index )
+  for(Length index = 0u; index < length; ++index)
   {
-    if( run->characterRun.characterIndex > startIndex )
+    if(run->characterRun.characterIndex > startIndex)
     {
       run->characterRun.characterIndex -= numberOfCharactersRemoved;
     }
@@ -102,22 +99,22 @@ void ClearCharacterRuns( CharacterIndex startIndex,
  * @param[in] endIndex The ending character index used to remove runs.
  * @param[in,out] runs The text's runs.
  */
-template< typename T >
-void ClearCharacterRuns( CharacterIndex startIndex,
-                         CharacterIndex endIndex,
-                         Vector<T>& runs )
+template<typename T>
+void ClearCharacterRuns(CharacterIndex startIndex,
+                        CharacterIndex endIndex,
+                        Vector<T>&     runs)
 {
   uint32_t startRemoveIndex = runs.Count();
-  uint32_t endRemoveIndex = startRemoveIndex;
-  ClearCharacterRuns( startIndex,
-                      endIndex,
-                      runs,
-                      startRemoveIndex,
-                      endRemoveIndex );
+  uint32_t endRemoveIndex   = startRemoveIndex;
+  ClearCharacterRuns(startIndex,
+                     endIndex,
+                     runs,
+                     startRemoveIndex,
+                     endRemoveIndex);
 
   // Remove all remaining runs.
   T* runBuffer = runs.Begin();
-  runs.Erase( runBuffer + startRemoveIndex, runBuffer + endRemoveIndex );
+  runs.Erase(runBuffer + startRemoveIndex, runBuffer + endRemoveIndex);
 }
 
 /**
@@ -133,19 +130,19 @@ void ClearCharacterRuns( CharacterIndex startIndex,
  * @param[in,out] runs The text's style runs.
  * @param[out] removedRuns The text's style removed runs.
  */
-template< typename T >
-void UpdateCharacterRuns( CharacterIndex index,
-                          int numberOfCharacters,
-                          Length totalNumberOfCharacters,
-                          Vector<T>& runs,
-                          Vector<T>& removedRuns )
+template<typename T>
+void UpdateCharacterRuns(CharacterIndex index,
+                         int            numberOfCharacters,
+                         Length         totalNumberOfCharacters,
+                         Vector<T>&     runs,
+                         Vector<T>&     removedRuns)
 {
-  if( 0 > numberOfCharacters )
+  if(0 > numberOfCharacters)
   {
     // Remove characters.
     const Length numberOfRemovedCharacters = -numberOfCharacters;
 
-    if( ( 0u == index ) && ( numberOfRemovedCharacters == totalNumberOfCharacters ) )
+    if((0u == index) && (numberOfRemovedCharacters == totalNumberOfCharacters))
     {
       // Set the removed runs.
       removedRuns = runs;
@@ -161,8 +158,8 @@ void UpdateCharacterRuns( CharacterIndex index,
     // Temporary vector used to remove runs.
     Vector<T> tempRuns;
     // Reserve some space for the temporary vector.
-    tempRuns.Reserve( size );
-    removedRuns.Reserve( size );
+    tempRuns.Reserve(size);
+    removedRuns.Reserve(size);
 
     // Whether any run has to be removed.
     bool runsRemoved = false;
@@ -171,47 +168,47 @@ void UpdateCharacterRuns( CharacterIndex index,
     const CharacterIndex lastIndex = index + numberOfRemovedCharacters - 1u;
 
     // Update the style runs
-    for( typename Vector<T>::Iterator it = runs.Begin(),
-           endIt = runs.End();
-         it != endIt;
-         ++it )
+    for(typename Vector<T>::Iterator it    = runs.Begin(),
+                                     endIt = runs.End();
+        it != endIt;
+        ++it)
     {
       T& run = *it;
 
-      if (run.characterRun.numberOfCharacters == 0)
-       continue;
+      if(run.characterRun.numberOfCharacters == 0)
+        continue;
 
       const CharacterIndex lastRunIndex = run.characterRun.characterIndex + run.characterRun.numberOfCharacters - 1u;
 
-      if( lastRunIndex < index )
+      if(lastRunIndex < index)
       {
         // The style run is not affected by the removed text.
-        tempRuns.PushBack( run );
+        tempRuns.PushBack(run);
         continue;
       }
 
-      if( ( index <= run.characterRun.characterIndex ) &&
-          ( lastIndex >= lastRunIndex ) )
+      if((index <= run.characterRun.characterIndex) &&
+         (lastIndex >= lastRunIndex))
       {
         // Add the removed run into the vector.
-        removedRuns.PushBack( run );
+        removedRuns.PushBack(run);
 
         // All the characters are removed.
         runsRemoved = true;
       }
       else
       {
-        if( lastIndex < run.characterRun.characterIndex )
+        if(lastIndex < run.characterRun.characterIndex)
         {
           // Just move the character index.
           run.characterRun.characterIndex -= numberOfRemovedCharacters;
         }
         else
         {
-          if( run.characterRun.characterIndex < index )
+          if(run.characterRun.characterIndex < index)
           {
             // Remove characters starting from a character within the run.
-            run.characterRun.numberOfCharacters -= std::min( numberOfRemovedCharacters, 1u + lastRunIndex - index );
+            run.characterRun.numberOfCharacters -= std::min(numberOfRemovedCharacters, 1u + lastRunIndex - index);
           }
           else
           {
@@ -221,12 +218,12 @@ void UpdateCharacterRuns( CharacterIndex index,
           }
         }
 
-        tempRuns.PushBack( run );
+        tempRuns.PushBack(run);
       }
     }
 
     // Copy the temporary vector if there are runs removed.
-    if( runsRemoved )
+    if(runsRemoved)
     {
       runs = tempRuns;
     }
@@ -236,27 +233,27 @@ void UpdateCharacterRuns( CharacterIndex index,
     // Add characters.
 
     // Update the style runs
-    for( typename Vector<T>::Iterator it = runs.Begin(),
-           endIt = runs.End();
-         it != endIt;
-         ++it )
+    for(typename Vector<T>::Iterator it    = runs.Begin(),
+                                     endIt = runs.End();
+        it != endIt;
+        ++it)
     {
       T& run = *it;
 
-      if (run.characterRun.numberOfCharacters == 0)
-       continue;
+      if(run.characterRun.numberOfCharacters == 0)
+        continue;
 
       // Update the number of characters of the style run.
 
-      if( ( 0u == index ) && ( 0u == run.characterRun.characterIndex ) )
+      if((0u == index) && (0u == run.characterRun.characterIndex))
       {
         run.characterRun.numberOfCharacters += numberOfCharacters;
       }
-      else if( index <= run.characterRun.characterIndex )
+      else if(index <= run.characterRun.characterIndex)
       {
         run.characterRun.characterIndex += numberOfCharacters;
       }
-      else if( index <= run.characterRun.characterIndex + run.characterRun.numberOfCharacters )
+      else if(index <= run.characterRun.characterIndex + run.characterRun.numberOfCharacters)
       {
         run.characterRun.numberOfCharacters += numberOfCharacters;
       }
@@ -273,22 +270,22 @@ void UpdateCharacterRuns( CharacterIndex index,
  * @param[out] startRemoveIndex The index to the first run to be removed.
  * @param[out] endRemoveIndex The index to the last run to be removed.
  */
-template< typename T >
-void ClearGlyphRuns( GlyphIndex startIndex,
-                     GlyphIndex endIndex,
-                     Vector<T>& runs,
-                     uint32_t& startRemoveIndex,
-                     uint32_t& endRemoveIndex )
+template<typename T>
+void ClearGlyphRuns(GlyphIndex startIndex,
+                    GlyphIndex endIndex,
+                    Vector<T>& runs,
+                    uint32_t&  startRemoveIndex,
+                    uint32_t&  endRemoveIndex)
 {
   T* runsBuffer = runs.Begin();
-  T* run = runsBuffer;
+  T* run        = runsBuffer;
 
   const Length length = runs.Count();
-  Length index = 0u;
-  for( index = 0u; index < length; ++index )
+  Length       index  = 0u;
+  for(index = 0u; index < length; ++index)
   {
-    if( ( run->glyphRun.glyphIndex <= endIndex ) &&
-        ( startIndex < run->glyphRun.glyphIndex + run->glyphRun.numberOfGlyphs ) )
+    if((run->glyphRun.glyphIndex <= endIndex) &&
+       (startIndex < run->glyphRun.glyphIndex + run->glyphRun.numberOfGlyphs))
     {
       // Run found.
 
@@ -299,11 +296,11 @@ void ClearGlyphRuns( GlyphIndex startIndex,
     ++run;
   }
 
-  run = ( runsBuffer + startRemoveIndex );
-  for( index = startRemoveIndex; index < length; ++index )
+  run = (runsBuffer + startRemoveIndex);
+  for(index = startRemoveIndex; index < length; ++index)
   {
-    if( ( run->glyphRun.glyphIndex > endIndex ) ||
-        ( startIndex >= run->glyphRun.glyphIndex + run->glyphRun.numberOfGlyphs ) )
+    if((run->glyphRun.glyphIndex > endIndex) ||
+       (startIndex >= run->glyphRun.glyphIndex + run->glyphRun.numberOfGlyphs))
     {
       // Run found. Nothing else to do.
       break;
@@ -318,10 +315,9 @@ void ClearGlyphRuns( GlyphIndex startIndex,
 
   // Update the glyph index of the next runs.
   run = runsBuffer;
-  for( Length index = 0u; index < length; ++index )
+  for(Length index = 0u; index < length; ++index)
   {
-
-    if( run->glyphRun.glyphIndex > startIndex )
+    if(run->glyphRun.glyphIndex > startIndex)
     {
       run->glyphRun.glyphIndex -= numberOfGlyphsRemoved;
     }
@@ -335,22 +331,22 @@ void ClearGlyphRuns( GlyphIndex startIndex,
  * @param[in] endIndex The ending glyph index used to remove runs.
  * @param[in,out] runs The text's runs.
  */
-template< typename T >
-void ClearGlyphRuns( GlyphIndex startIndex,
-                     GlyphIndex endIndex,
-                     Vector<T>& runs )
+template<typename T>
+void ClearGlyphRuns(GlyphIndex startIndex,
+                    GlyphIndex endIndex,
+                    Vector<T>& runs)
 {
   uint32_t startRemoveIndex = runs.Count();
-  uint32_t endRemoveIndex = startRemoveIndex;
-  ClearGlyphRuns( startIndex,
-                  endIndex,
-                  runs,
-                  startRemoveIndex,
-                  endRemoveIndex );
+  uint32_t endRemoveIndex   = startRemoveIndex;
+  ClearGlyphRuns(startIndex,
+                 endIndex,
+                 runs,
+                 startRemoveIndex,
+                 endRemoveIndex);
 
   // Remove all remaining runs.
   T* runBuffer = runs.Begin();
-  runs.Erase( runBuffer + startRemoveIndex, runBuffer + endRemoveIndex );
+  runs.Erase(runBuffer + startRemoveIndex, runBuffer + endRemoveIndex);
 }
 
 } // namespace Text
index 9cecc36..0181382 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_SCROLLER_INTERFACE_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 class Actor;
 
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief An interface used by the text-controls which implement auto-scrolling
  */
 class ScrollerInterface
 {
 public:
-
   /**
    * @brief Virtual destructor.
    */
   virtual ~ScrollerInterface()
-  {}
+  {
+  }
 
   /**
    * @brief Called when the scrolling finishes
index 16e350a..b93c2d2 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_SCROLLER_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/rendering/renderer.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/text/text-enumerations.h>
-#include <dali-toolkit/public-api/controls/text-controls/text-label.h>
 #include <dali-toolkit/internal/text/text-definitions.h>
+#include <dali-toolkit/public-api/controls/text-controls/text-label.h>
+#include <dali-toolkit/public-api/text/text-enumerations.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 class TextScroller;
 class ScrollerInterface;
 
@@ -49,14 +46,13 @@ typedef IntrusivePtr<TextScroller> TextScrollerPtr;
 class TextScroller : public RefObject, public ConnectionTracker
 {
 public:
-
   /**
    * @brief Text Scrolling helper, used to automatically scroll text, SetParameters should be called before scrolling is needed.
    * CleanUp removes the Scrolling actors from stage whilst keeping the Scroller object alive and preserving Speed, Gap and Loop count.
    *
    * @param[in] scrollerInterface scroller interface
    */
-  static TextScrollerPtr New( ScrollerInterface& scrollerInterface );
+  static TextScrollerPtr New(ScrollerInterface& scrollerInterface);
 
   /**
    * @brief Set parameters relating to source required for scrolling
@@ -71,13 +67,13 @@ public:
    * @param[in] horizontalAlignment horizontal alignment of the text
    * @param[in] verticalAlignment vertical alignment of the text
    */
-  void SetParameters( Actor scrollingTextActor, Dali::Renderer renderer, TextureSet textureSet, const Size& controlSize, const Size& textureSize, const float wrapGap, CharacterDirection direction, HorizontalAlignment::Type horizontalAlignment, VerticalAlignment::Type verticalAlignment );
+  void SetParameters(Actor scrollingTextActor, Dali::Renderer renderer, TextureSet textureSet, const Size& controlSize, const Size& textureSize, const float wrapGap, CharacterDirection direction, HorizontalAlignment::Type horizontalAlignment, VerticalAlignment::Type verticalAlignment);
 
   /**
    * @brief Set the gap distance to elapse before the text wraps around
    * @param[in] gap distance to elapse
    */
-  void SetGap( int gap );
+  void SetGap(int gap);
 
   /**
    * @brief Get the distance before scrolling wraps
@@ -89,7 +85,7 @@ public:
    * @brief Set speed the text should scroll
    * @param[in] scrollSpeed pixels per second
    */
-  void SetSpeed( int scrollSpeed );
+  void SetSpeed(int scrollSpeed);
 
   /**
    * @brief Get the speed of text scrolling
@@ -101,7 +97,7 @@ public:
    * @brief Set the number of times the text scrolling should loop, can stop current scrolling by passing in 0;
    * @param[in] loopCount number of times the scrolled text should loop, 0 to stop scrolling
    */
-  void SetLoopCount( int loopCount );
+  void SetLoopCount(int loopCount);
 
   /**
    * @brief Get the number of loops
@@ -113,7 +109,7 @@ public:
    * @brief Set the delay time of scroll animation loop
    * @param[in] float delay time seconds of loops
    */
-  void SetLoopDelay( float delay );
+  void SetLoopDelay(float delay);
 
   /**
    * @brief Get the delay time of scroll
@@ -125,7 +121,7 @@ public:
    * @brief Set the mode of scrolling stop
    * @param[in] stopMode type when text scrolling is stoped.
    */
-  void SetStopMode( TextLabel::AutoScrollStopMode::Type stopMode );
+  void SetStopMode(TextLabel::AutoScrollStopMode::Type stopMode);
 
   /**
    * @brief Stop the auto scrolling.
@@ -139,11 +135,10 @@ public:
   TextLabel::AutoScrollStopMode::Type GetStopMode() const;
 
 private: // Implementation
-
   /**
    * Constructor
    */
-  TextScroller( ScrollerInterface& scrollerInterface );
+  TextScroller(ScrollerInterface& scrollerInterface);
 
   /**
    * Destructor
@@ -151,16 +146,16 @@ private: // Implementation
   ~TextScroller();
 
   // Undefined
-  TextScroller( const TextScroller& handle );
+  TextScroller(const TextScroller& handle);
 
   // Undefined
-  TextScroller& operator=( const TextScroller& handle );
+  TextScroller& operator=(const TextScroller& handle);
 
   /**
    * @brief Callback for end of animation
    * @param[in] animation Animation handle
    */
-  void AutoScrollAnimationFinished( Dali::Animation& animation );
+  void AutoScrollAnimationFinished(Dali::Animation& animation);
 
   /**
    * @brief variables required to set up scrolling animation
@@ -169,22 +164,21 @@ private: // Implementation
    * @param[in] scrollDuration duration of aninmation
    * @param[in] loopCount number of times to loop the scrolling text
    */
-  void StartScrolling( Actor scrollingTextActor, float scrollAmount, float scrollDuration, int loopCount );
+  void StartScrolling(Actor scrollingTextActor, float scrollAmount, float scrollDuration, int loopCount);
 
 private:
-
-  ScrollerInterface& mScrollerInterface;        // Interface implemented by control that requires scrolling
-  Property::Index    mScrollDeltaIndex;         // Property used by shader to represent distance to scroll
-  Animation          mScrollAnimation;          // Animation used to update the mScrollDeltaIndex
-  Dali::Renderer     mRenderer;                 // Renderer used to render the text
-  Shader             mShader;                   // Shader originally used by the renderer while not scrolling
-  TextureSet         mTextureSet;               // Texture originally used by the renderer while not scrolling
-
-  int   mScrollSpeed;                                   ///< Speed which text should automatically scroll at
-  int   mLoopCount;                                     ///< Number of time the text should scroll
-  float mLoopDelay;                                     ///< Time delay of loop start
-  float mWrapGap;                                       ///< Gap before text wraps around when scrolling
-  TextLabel::AutoScrollStopMode::Type  mStopMode;       ///< Stop mode of scrolling text, when loop count is 0.
+  ScrollerInterface& mScrollerInterface; // Interface implemented by control that requires scrolling
+  Property::Index    mScrollDeltaIndex;  // Property used by shader to represent distance to scroll
+  Animation          mScrollAnimation;   // Animation used to update the mScrollDeltaIndex
+  Dali::Renderer     mRenderer;          // Renderer used to render the text
+  Shader             mShader;            // Shader originally used by the renderer while not scrolling
+  TextureSet         mTextureSet;        // Texture originally used by the renderer while not scrolling
+
+  int                                 mScrollSpeed; ///< Speed which text should automatically scroll at
+  int                                 mLoopCount;   ///< Number of time the text should scroll
+  float                               mLoopDelay;   ///< Time delay of loop start
+  float                               mWrapGap;     ///< Gap before text wraps around when scrolling
+  TextLabel::AutoScrollStopMode::Type mStopMode;    ///< Stop mode of scrolling text, when loop count is 0.
 
 }; // TextScroller class
 
@@ -195,4 +189,3 @@ private:
 } // namespace Dali
 
 #endif // DALI_TOOLKIT_TEXT_SCROLLER_H
-
index 65a35ca..da19108 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_SELECTABLE_CONTROL_INTERFACE_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
-using  Uint32Pair = std::pair<uint32_t,uint32_t>;
-using  string = std::string;
+using Uint32Pair = std::pair<uint32_t, uint32_t>;
+using string     = std::string;
 namespace Text
 {
-
 /**
  * @brief An interface that the Text::Controller used for text selection functionality.
  */
 class SelectableControlInterface
 {
 public:
-
   /**
    * @brief Virtual destructor.
    */
@@ -46,7 +42,7 @@ public:
    * @param start start selection position (pass NULL to ignore).
    * @param end end selection position (pass NULL to ignore).
    */
-  virtual void SetTextSelectionRange(const uint32_t *start, const uint32_t *end) = 0;
+  virtual void SetTextSelectionRange(const uint32_t* start, const uint32_t* end) = 0;
 
   /**
    * @brief Called to return the selection postions in the texts.
index 2988c85..62032fd 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_SELECTION_HANDLE_CONTROLLER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/internal/text/decorator/text-decorator.h>
 #include <dali-toolkit/internal/text/cursor-helper-functions.h>
+#include <dali-toolkit/internal/text/decorator/text-decorator.h>
 #include <dali-toolkit/internal/text/text-controller.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief Updates the Selection Handles.
  */
index f6a005a..ff93c9e 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_VERTICAL_SCROLLER_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 class TextVerticalScroller;
 
 typedef IntrusivePtr<TextVerticalScroller> TextVerticalScrollerPtr;
@@ -43,7 +40,6 @@ typedef IntrusivePtr<TextVerticalScroller> TextVerticalScrollerPtr;
 class TextVerticalScroller : public RefObject, public ConnectionTracker
 {
 public:
-
   /**
    * @brief Text Scrolling helper, used to automatically scroll text, StartScroll should be called when scrolling is needed.
    *
@@ -57,13 +53,13 @@ public:
    * @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 );
+  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 );
+  void SetDuration(float duration);
 
 private: // Implementation
   /**
@@ -77,12 +73,11 @@ private: // Implementation
   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
+  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
 
old mode 100755 (executable)
new mode 100644 (file)
index 4aad47b..1a04135
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_VIEW_INTERFACE_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 struct Vector2;
 struct Vector4;
 
 namespace Toolkit
 {
-
 namespace Text
 {
-
 struct GlyphRun;
 
 /**
@@ -46,7 +43,6 @@ struct GlyphRun;
 class ViewInterface
 {
 public:
-
   /**
    * @brief Constructor.
    */
@@ -93,11 +89,11 @@ public:
    *
    * @return The number of glyphs.
    */
-  virtual Length GetGlyphs( GlyphInfo* glyphs,
-                            Vector2* glyphPositions,
-                            float& minLineOffset,
-                            GlyphIndex glyphIndex,
-                            Length numberOfGlyphs ) const = 0;
+  virtual Length GetGlyphs(GlyphInfo* glyphs,
+                           Vector2*   glyphPositions,
+                           float&     minLineOffset,
+                           GlyphIndex glyphIndex,
+                           Length     numberOfGlyphs) const = 0;
 
   /**
    * @brief Retrieves the vector of colors.
@@ -183,9 +179,9 @@ public:
    * @param[in] index Index of the first underline run to be copied.
    * @param[in] numberOfRuns Number of underline runs to be copied.
    */
-  virtual void GetUnderlineRuns( GlyphRun* underlineRuns,
-                                 UnderlineRunIndex index,
-                                 Length numberOfRuns ) const = 0;
+  virtual void GetUnderlineRuns(GlyphRun*         underlineRuns,
+                                UnderlineRunIndex index,
+                                Length            numberOfRuns) const = 0;
 
   /**
    * @brief Retrieve the outline color.
@@ -200,7 +196,6 @@ public:
    * @return The width of the outline.
    */
   virtual uint16_t GetOutlineWidth() const = 0;
-
 };
 
 } // namespace Text
old mode 100755 (executable)
new mode 100644 (file)
index e600940..cc82820
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_VIEW_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 /**
  * @brief View provides an interface between the Text layout engine and rendering back-end.
  */
 class View : public ViewInterface
 {
 public:
-
   /**
    * @brief Create a new instance of a View.
    */
@@ -53,7 +49,7 @@ public:
    *
    * @param[in] visualModel The visual model used by the View.
    */
-  void SetVisualModel( VisualModelPtr visualModel );
+  void SetVisualModel(VisualModelPtr visualModel);
 
   /**
    * @copydoc Dali::Toolkit::Text::ViewInterface::GetControlSize()
@@ -73,11 +69,11 @@ public:
   /**
    * @copydoc Dali::Toolkit::Text::ViewInterface::GetGlyphs()
    */
-  virtual Length GetGlyphs( GlyphInfo* glyphs,
-                            Vector2* glyphPositions,
-                            float& minLineOffset,
-                            GlyphIndex glyphIndex,
-                            Length numberOfGlyphs ) const;
+  virtual Length GetGlyphs(GlyphInfo* glyphs,
+                           Vector2*   glyphPositions,
+                           float&     minLineOffset,
+                           GlyphIndex glyphIndex,
+                           Length     numberOfGlyphs) const;
 
   /**
    * @copydoc Dali::Toolkit::Text::ViewInterface::GetColors()
@@ -137,9 +133,9 @@ public:
   /**
    * @copydoc Dali::Toolkit::Text::ViewInterface::GetUnderlineRuns()
    */
-  virtual void GetUnderlineRuns( GlyphRun* underlineRuns,
-                                 UnderlineRunIndex index,
-                                 Length numberOfRuns ) const;
+  virtual void GetUnderlineRuns(GlyphRun*         underlineRuns,
+                                UnderlineRunIndex index,
+                                Length            numberOfRuns) const;
 
   /**
    * @copydoc Dali::Toolkit::Text::ViewInterface::GetOutlineColor()
@@ -152,15 +148,13 @@ public:
   uint16_t GetOutlineWidth() const override;
 
 private:
-
   // Undefined
-  View( const View& handle );
+  View(const View& handle);
 
   // Undefined
-  View& operator=( const View& handle );
+  View& operator=(const View& handle);
 
 private:
-
   struct Impl;
   Impl* mImpl;
 };
old mode 100755 (executable)
new mode 100644 (file)
index 853e946..371b666
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_VISUAL_MODEL_IMPL_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/object/ref-object.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/internal/text/line-run.h>
 #include <dali-toolkit/internal/text/color-run.h>
+#include <dali-toolkit/internal/text/line-run.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
-
 class VisualModel;
 typedef IntrusivePtr<VisualModel> VisualModelPtr;
 
@@ -51,7 +48,6 @@ typedef IntrusivePtr<VisualModel> VisualModelPtr;
 class VisualModel : public RefObject
 {
 public:
-
   /**
    * @brief Create a new instance of a VisualModel.
    *
@@ -70,9 +66,9 @@ public:
    * @param[in] startGlyphIndex The glyph from where the conversion table is created.
    * @param[in] numberOfCharacters The number of characters.
    */
-  void CreateCharacterToGlyphTable( CharacterIndex startIndex,
-                                    GlyphIndex startGlyphIndex,
-                                    Length numberOfCharacters );
+  void CreateCharacterToGlyphTable(CharacterIndex startIndex,
+                                   GlyphIndex     startGlyphIndex,
+                                   Length         numberOfCharacters);
 
   /**
    * @brief Creates an array containing the number of glyphs per character.
@@ -81,9 +77,9 @@ public:
    * @param[in] startGlyphIndex The glyph from where the conversion table is created.
    * @param[in] numberOfCharacters The number of characters.
    */
-  void CreateGlyphsPerCharacterTable( CharacterIndex startIndex,
-                                      GlyphIndex startGlyphIndex,
-                                      Length numberOfCharacters );
+  void CreateGlyphsPerCharacterTable(CharacterIndex startIndex,
+                                     GlyphIndex     startGlyphIndex,
+                                     Length         numberOfCharacters);
 
   /**
    * @brief Retrieves glyphs in the given buffer.
@@ -93,9 +89,9 @@ public:
    * @param[in] glyphIndex Index to the first glyph.
    * @param[in] numberOfGlyphs Number of glyphs to be copied.
    */
-  void GetGlyphs( GlyphInfo* glyphs,
-                  GlyphIndex glyphIndex,
-                  Length numberOfGlyphs ) const;
+  void GetGlyphs(GlyphInfo* glyphs,
+                 GlyphIndex glyphIndex,
+                 Length     numberOfGlyphs) const;
 
   // Position interface
 
@@ -107,9 +103,9 @@ public:
    * @param[in] glyphIndex Index to the first glyph position.
    * @param[in] numberOfGlyphs The number of positions to be copied.
    */
-  void GetGlyphPositions( Vector2* glyphPositions,
-                          GlyphIndex glyphIndex,
-                          Length numberOfGlyphs ) const;
+  void GetGlyphPositions(Vector2*   glyphPositions,
+                         GlyphIndex glyphIndex,
+                         Length     numberOfGlyphs) const;
 
   // Line interface.
 
@@ -121,10 +117,10 @@ public:
    * @param[out] firstLine Index to the line containing the glyph index.
    * @param[out] numberOfLines The number of lines.
    */
-  void GetNumberOfLines( GlyphIndex glyphIndex,
-                         Length numberOfGlyphs,
-                         LineIndex& firstLine,
-                         Length& numberOfLines ) const;
+  void GetNumberOfLines(GlyphIndex glyphIndex,
+                        Length     numberOfGlyphs,
+                        LineIndex& firstLine,
+                        Length&    numberOfLines) const;
 
   /**
    * @brief Retrieves the lines where the given range of glyphs is laid out.
@@ -135,9 +131,9 @@ public:
    * @param[in] glyphIndex Index to the first glyphs of the range.
    * @param[in] numberOfGlyphs Number of glyphs in the range.
    */
-  void GetLinesOfGlyphRange( LineRun* lines,
-                             GlyphIndex glyphIndex,
-                             Length numberOfGlyphs ) const;
+  void GetLinesOfGlyphRange(LineRun*   lines,
+                            GlyphIndex glyphIndex,
+                            Length     numberOfGlyphs) const;
 
   /**
    * @brief Retrieves the line index where the character is laid-out.
@@ -146,7 +142,7 @@ public:
    *
    * @return The line index.
    */
-  LineIndex GetLineOfCharacter( CharacterIndex characterIndex );
+  LineIndex GetLineOfCharacter(CharacterIndex characterIndex);
 
   // Underline runs
 
@@ -157,9 +153,9 @@ public:
    * @param[in] index Index of the first underline run to be copied.
    * @param[in] numberOfRuns Number of underline runs to be copied.
    */
-  void GetUnderlineRuns( GlyphRun* underlineRuns,
-                         UnderlineRunIndex index,
-                         Length numberOfRuns ) const;
+  void GetUnderlineRuns(GlyphRun*         underlineRuns,
+                        UnderlineRunIndex index,
+                        Length            numberOfRuns) const;
 
   // Size interface
 
@@ -168,7 +164,7 @@ public:
    *
    * @param[in] size The text's natural size.
    */
-  void SetNaturalSize( const Vector2& size  );
+  void SetNaturalSize(const Vector2& size);
 
   /**
    * @brief Retrieves the natural size.
@@ -182,7 +178,7 @@ public:
    *
    * @param[in] size The text's size.
    */
-  void SetLayoutSize( const Vector2& size );
+  void SetLayoutSize(const Vector2& size);
 
   /**
    * @brief Retrieves the text's layout size.
@@ -196,7 +192,7 @@ public:
    *
    * @param[in] textColor The text's color
    */
-  void SetTextColor( const Vector4& textColor );
+  void SetTextColor(const Vector4& textColor);
 
   /**
    * @brief Retrieve the text's color
@@ -210,7 +206,7 @@ public:
    *
    * @param[in] shadowOffset The shadow offset, 0,0 indicates no shadow.
    */
-  void SetShadowOffset( const Vector2& shadowOffset );
+  void SetShadowOffset(const Vector2& shadowOffset);
 
   /**
    * @brief Retrieves the text's shadow offset.
@@ -224,7 +220,7 @@ public:
    *
    * @param[in] shadowColor The shadow color.
    */
-  void SetShadowColor( const Vector4& shadowColor );
+  void SetShadowColor(const Vector4& shadowColor);
 
   /**
    * @brief Retrieves the text's shadow color.
@@ -238,7 +234,7 @@ public:
    *
    * @param[in] shadowBlurRadius The shadow blur radius, 0,0 indicates no blur.
    */
-  void SetShadowBlurRadius( const float& shadowBlurRadius );
+  void SetShadowBlurRadius(const float& shadowBlurRadius);
 
   /**
    * @brief Retrieve the shadow blur radius.
@@ -252,7 +248,7 @@ public:
    *
    * @param[in] color The text's underline color.
    */
-  void SetUnderlineColor( const Vector4& color );
+  void SetUnderlineColor(const Vector4& color);
 
   /**
    * @brief Retrieves the text's underline color.
@@ -266,7 +262,7 @@ public:
    *
    * @param[in] enabled true if underlined.
    */
-  void SetUnderlineEnabled( bool enabled );
+  void SetUnderlineEnabled(bool enabled);
 
   /**
    * @brief Returns whether the text is underlined or not.
@@ -285,7 +281,7 @@ public:
    *
    * @param[in] height The height in pixels of the underline
    */
-  void SetUnderlineHeight( float height );
+  void SetUnderlineHeight(float height);
 
   /**
    * @brief Retrieves the underline height override
@@ -306,7 +302,7 @@ public:
    *
    * @param[in] color color of outline.
    */
-  void SetOutlineColor( const Vector4& color );
+  void SetOutlineColor(const Vector4& color);
 
   /**
    * @brief Retrieve the outline color.
@@ -320,7 +316,7 @@ public:
    *
    * @param[in] width The width in pixels of the outline, 0 indicates no outline
    */
-  void SetOutlineWidth( uint16_t width );
+  void SetOutlineWidth(uint16_t width);
 
   /**
    * @brief Retrieves the width of an outline
@@ -334,7 +330,7 @@ public:
    *
    * @param[in] color The text's background color.
    */
-  void SetBackgroundColor( const Vector4& color );
+  void SetBackgroundColor(const Vector4& color);
 
   /**
    * @brief Retrieves the text's background color.
@@ -348,7 +344,7 @@ public:
    *
    * @param[in] enabled true if the text has a background.
    */
-  void SetBackgroundEnabled( bool enabled );
+  void SetBackgroundEnabled(bool enabled);
 
   /**
    * @brief Returns whether the text has a background or not.
@@ -358,64 +354,59 @@ public:
   bool IsBackgroundEnabled() const;
 
 protected:
-
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
    */
   virtual ~VisualModel();
 
 private:
-
   /**
    * @brief Private constructor.
    */
   VisualModel();
 
   // Undefined
-  VisualModel( const VisualModel& handle );
+  VisualModel(const VisualModel& handle);
 
   // Undefined
-  VisualModel& operator=( const VisualModel& handle );
+  VisualModel& operator=(const VisualModel& handle);
 
 public:
-
-  Vector<GlyphInfo>      mGlyphs;               ///< For each glyph, the font's id, glyph's index within the font and glyph's metrics.
-  Vector<CharacterIndex> mGlyphsToCharacters;   ///< For each glyph, the index of the first character.
-  Vector<GlyphIndex>     mCharactersToGlyph;    ///< For each character, the index of the first glyph.
-  Vector<Length>         mCharactersPerGlyph;   ///< For each glyph, the number of characters that form the glyph.
-  Vector<Length>         mGlyphsPerCharacter;   ///< For each character, the number of glyphs that are shaped.
-  Vector<Vector2>        mGlyphPositions;       ///< For each glyph, the position.
-  Vector<LineRun>        mLines;                ///< The laid out lines.
-  Vector<GlyphRun>       mUnderlineRuns;        ///< Runs of glyphs that are underlined.
-  Vector<Vector4>        mColors;               ///< Colors of the glyphs.
-  Vector<ColorIndex>     mColorIndices;         ///< Indices to the vector of colors for each glyphs.
-  Vector<Vector4>        mBackgroundColors;     ///< Background colors of the glyphs.
+  Vector<GlyphInfo>      mGlyphs;                 ///< For each glyph, the font's id, glyph's index within the font and glyph's metrics.
+  Vector<CharacterIndex> mGlyphsToCharacters;     ///< For each glyph, the index of the first character.
+  Vector<GlyphIndex>     mCharactersToGlyph;      ///< For each character, the index of the first glyph.
+  Vector<Length>         mCharactersPerGlyph;     ///< For each glyph, the number of characters that form the glyph.
+  Vector<Length>         mGlyphsPerCharacter;     ///< For each character, the number of glyphs that are shaped.
+  Vector<Vector2>        mGlyphPositions;         ///< For each glyph, the position.
+  Vector<LineRun>        mLines;                  ///< The laid out lines.
+  Vector<GlyphRun>       mUnderlineRuns;          ///< Runs of glyphs that are underlined.
+  Vector<Vector4>        mColors;                 ///< Colors of the glyphs.
+  Vector<ColorIndex>     mColorIndices;           ///< Indices to the vector of colors for each glyphs.
+  Vector<Vector4>        mBackgroundColors;       ///< Background colors of the glyphs.
   Vector<ColorIndex>     mBackgroundColorIndices; ///< Indices to the vector of background colors for each glyphs.
 
-  Vector4                mTextColor;            ///< The text color
-  Vector4                mShadowColor;          ///< Color of drop shadow
-  Vector4                mUnderlineColor;       ///< Color of underline
-  Vector4                mOutlineColor;         ///< Color of outline
-  Vector4                mBackgroundColor;      ///< Color of text background
-  Size                   mControlSize;          ///< The size of the UI control.
-  Vector2                mShadowOffset;         ///< Offset for drop shadow, 0 indicates no shadow
-  float                  mUnderlineHeight;      ///< Fixed height for underline to override font metrics.
-  float                  mShadowBlurRadius;     ///< Blur radius of shadow, 0 indicates no blur.
-  uint16_t               mOutlineWidth;         ///< Width of outline.
+  Vector4  mTextColor;        ///< The text color
+  Vector4  mShadowColor;      ///< Color of drop shadow
+  Vector4  mUnderlineColor;   ///< Color of underline
+  Vector4  mOutlineColor;     ///< Color of outline
+  Vector4  mBackgroundColor;  ///< Color of text background
+  Size     mControlSize;      ///< The size of the UI control.
+  Vector2  mShadowOffset;     ///< Offset for drop shadow, 0 indicates no shadow
+  float    mUnderlineHeight;  ///< Fixed height for underline to override font metrics.
+  float    mShadowBlurRadius; ///< Blur radius of shadow, 0 indicates no blur.
+  uint16_t mOutlineWidth;     ///< Width of outline.
 
 private:
-
-  Size                   mNaturalSize;        ///< Size of the text with no line wrapping.
-  Size                   mLayoutSize;         ///< Size of the laid-out text considering the layout properties set.
+  Size mNaturalSize; ///< Size of the text with no line wrapping.
+  Size mLayoutSize;  ///< Size of the laid-out text considering the layout properties set.
 
   // Caches to increase performance in some consecutive operations.
   LineIndex mCachedLineIndex; ///< Used to increase performance in consecutive calls to GetLineOfGlyph() or GetLineOfCharacter() with consecutive glyphs or characters.
 
 public:
-
-  bool                   mUnderlineEnabled:1;   ///< Underline enabled flag
-  bool                   mUnderlineColorSet:1;  ///< Has the underline color been explicitly set?
-  bool                   mBackgroundEnabled:1;   ///< Background enabled flag
+  bool mUnderlineEnabled : 1;  ///< Underline enabled flag
+  bool mUnderlineColorSet : 1; ///< Has the underline color been explicitly set?
+  bool mBackgroundEnabled : 1; ///< Background enabled flag
 };
 
 } // namespace Text
old mode 100755 (executable)
new mode 100644 (file)
index c09d5cd..a5a151c
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXT_XHTML_ENTITIES_H
 
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Text
 {
 /**
@@ -34,7 +32,7 @@ namespace Text
  *
  * @return pointer to UTF8 entity code if namedEntity found in table otherwise NULL
  */
-const char* const NamedEntityToUtf8( const char* const markupText, unsigned int len );
+const char* const NamedEntityToUtf8(const char* const markupText, unsigned int len);
 
 } // namespace Text
 
index 9d6c2d1..ded10ea 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_CROSS_EFFECT_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 class CubeTransitionCrossEffect;
 
 namespace Internal
 {
-
 class CubeTransitionEffect;
 
 class CubeTransitionCrossEffect : public CubeTransitionEffect
 {
-
 public:
-
   /**
    * @copydoc Toolkit::CubeTransitionCrossEffect::New
    */
-  static Toolkit::CubeTransitionCrossEffect New( unsigned int numRows, unsigned int numColumns );
+  static Toolkit::CubeTransitionCrossEffect New(unsigned int numRows, unsigned int numColumns);
 
 protected:
-
-   /**
+  /**
     * @copydoc Toolkit::Internal::CubeTransitionEffect::OnInitialize
     */
-   void OnInitialize() override;
+  void OnInitialize() override;
 
-   /**
+  /**
     * @copydoc Toolkit::Internal::CubeTransitionEffect::OnStartTransition
     */
-   void OnStartTransition( Vector2 panPosition, Vector2 panDisplacement ) override;
+  void OnStartTransition(Vector2 panPosition, Vector2 panDisplacement) override;
 
 private:
-
-   /**
+  /**
     * @brief Construct a new CubeTransitionCrossEffect object
     *
     * @param[in] numRows How many rows of cubes
     * @param[in] numColumns How many columns of cubes
     */
-   CubeTransitionCrossEffect( unsigned int numRows, unsigned int numColumns );
+  CubeTransitionCrossEffect(unsigned int numRows, unsigned int numColumns);
 
-   /**
+  /**
     * @brief Set up animation to an Actor
     * This will also displace the cubes in the z direction by mCubeDisplacement and spread them apart on the xy plane
     * given by the closeness of displacementCentre to the XY plane at 0.
@@ -78,17 +71,16 @@ private:
     * @param[in] angle The angle of the rotation animation
     * @param[in] the centre to "explode" the tiles outwards from
     */
-   void SetupAnimation( unsigned int actorIndex, unsigned int x, unsigned int y, float angle, const Vector3 axis, const Vector3& displacementCentre );
+  void SetupAnimation(unsigned int actorIndex, unsigned int x, unsigned int y, float angle, const Vector3 axis, const Vector3& displacementCentre);
 
 private:
-
-   /**
+  /**
     * The factor that determines how spread apart from each other the cubes will go
     * when they are displaced during the transition animation.
     * The larger the value the more the spread apart the cubes will be.
     * it should be in the range (0.0, +infinity)
     */
-   float  mDisplacementSpreadFactor;
+  float mDisplacementSpreadFactor;
 
 }; //class CubeTransitionCrossEffect
 
@@ -96,22 +88,22 @@ private:
 
 // Helpers for public-api forwarding methods
 
-inline Internal::CubeTransitionCrossEffect& GetImpl( Dali::Toolkit::CubeTransitionCrossEffect& obj )
+inline Internal::CubeTransitionCrossEffect& GetImpl(Dali::Toolkit::CubeTransitionCrossEffect& obj)
 {
-  DALI_ASSERT_ALWAYS( obj );
+  DALI_ASSERT_ALWAYS(obj);
 
   Dali::RefObject& handle = obj.GetImplementation();
 
-  return static_cast< Internal::CubeTransitionCrossEffect& >( handle );
+  return static_cast<Internal::CubeTransitionCrossEffect&>(handle);
 }
 
-inline const Internal::CubeTransitionCrossEffect& GetImpl( const Dali::Toolkit::CubeTransitionCrossEffect& obj )
+inline const Internal::CubeTransitionCrossEffect& GetImpl(const Dali::Toolkit::CubeTransitionCrossEffect& obj)
 {
-  DALI_ASSERT_ALWAYS( obj );
+  DALI_ASSERT_ALWAYS(obj);
 
   const Dali::RefObject& handle = obj.GetImplementation();
 
-  return static_cast< const Internal::CubeTransitionCrossEffect& >( handle );
+  return static_cast<const Internal::CubeTransitionCrossEffect&>(handle);
 }
 
 } // namespace Toolkit
index 65e294f..f31728a 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_EFFECT_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 class CubeTransitionEffect;
 
 namespace Internal
 {
-
 /**
  * CubeTransitionEffect implementation class
  */
 class CubeTransitionEffect : public Control
 {
-
 public:
-
   /**
    * Destructor
    */
@@ -53,7 +48,7 @@ public:
   /**
    * @copydoc Toolkit::CubeTransitionEffect::SetTransitionDuration
    */
-  void SetTransitionDuration( float duration );
+  void SetTransitionDuration(float duration);
 
   /**
    * @copydoc Toolkit::CubeTransitionEffect::GetTransitionDuration
@@ -63,7 +58,7 @@ public:
   /**
    * @copydoc Toolkit::CubeTransitionEffect::SetCubeDisplacement
    */
-  void SetCubeDisplacement( float displacement );
+  void SetCubeDisplacement(float displacement);
 
   /**
    * @copydoc Toolkit::CubeTransitionEffect::GetCubeDisplacement
@@ -78,22 +73,22 @@ public:
   /**
    * @copydoc Toolkit::CubeTransitionEffect::SetCurrentTexture
    */
-  void SetCurrentTexture( Texture texture );
+  void SetCurrentTexture(Texture texture);
 
   /**
    * @copydoc Toolkit::CubeTransitionEffect::SetTargetTexture
    */
-  void SetTargetTexture( Texture texture );
+  void SetTargetTexture(Texture texture);
 
   /**
    * @copydoc Toolkit::CubeTransitionEffect::StartTransition(bool)
    */
-  void StartTransition( bool toNextImage = true );
+  void StartTransition(bool toNextImage = true);
 
   /**
    * @copydoc Toolkit::CubeTransitionEffect::StartTransition(Vector2, Vector2)
    */
-  void StartTransition( Vector2 panPosition, Vector2 panDisplacement );
+  void StartTransition(Vector2 panPosition, Vector2 panDisplacement);
 
   /**
    * @copydoc Toolkit::CubeTransitionEffect::PauseTransition()
@@ -111,7 +106,6 @@ public:
   void StopTransition();
 
 public: //Signal
-
   /**
    * @copydoc Toolkit::CubeTransitionEffect::TransitionCompletedSignal()
    */
@@ -126,13 +120,13 @@ public: //Signal
    * @return True if the signal was connected.
    * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
    */
-  static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
+  static bool DoConnectSignal(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor);
 
 protected:
   /**
    * @copydoc CustomActorImpl::OnSceneConnection()
    */
-  void OnSceneConnection( int depth ) override;
+  void OnSceneConnection(int depth) override;
 
   /**
    * @copydoc CustomActorImpl::OnSceneDisconnection()
@@ -140,14 +134,13 @@ protected:
   void OnSceneDisconnection() override;
 
 protected:
-
   /**
    * Construct a new CubeTransitionEffect object
    * Called in the constructor of subclasses
    * @param[in] numRows How many rows of cubes
    * @param[in] numColumns How many columns of cubes
    */
-  CubeTransitionEffect( unsigned int numRows, unsigned int numColumns );
+  CubeTransitionEffect(unsigned int numRows, unsigned int numColumns);
 
   /**
    * Initialization steps: creating a layer, two groups of tiles,
@@ -155,15 +148,13 @@ protected:
    */
   void Initialize();
 
-
 protected:
-  void SetTargetLeft( unsigned int idx );
-  void SetTargetRight( unsigned int idx );
-  void SetTargetTop( unsigned int idx );
-  void SetTargetBottom( unsigned int idx );
+  void SetTargetLeft(unsigned int idx);
+  void SetTargetRight(unsigned int idx);
+  void SetTargetTop(unsigned int idx);
+  void SetTargetBottom(unsigned int idx);
 
 private:
-
   /**
    * Callback function of transition animation finished
    * Hide transition layer, show current image, and set isAnimating flag to false
@@ -175,7 +166,9 @@ private:
    * This method is called after the CubeTransitionEffect has been initialized.  Derived classes should do
    * any second phase initialization by overriding this method.
    */
-  virtual void OnInitialize() { }
+  virtual void OnInitialize()
+  {
+  }
 
   /**
    * This method is called after the a new transition is activated.
@@ -183,57 +176,64 @@ private:
    * @param[in] panPosition The press down position of panGesture
    * @param[in] panDisplacement The displacement vector of panGesture
    */
-  virtual void OnStartTransition( Vector2 panPosition, Vector2 panDisplacement ) {}
+  virtual void OnStartTransition(Vector2 panPosition, Vector2 panDisplacement)
+  {
+  }
 
   /**
    * This method is called when the transition is forced stop in the middle of animation.
    * Derived classed should set the rotation status of the cubes to the same as the final state when the animation is finished completely.
    * So that the next transition would be started correctly.
    */
-  virtual void OnStopTransition() {}
+  virtual void OnStopTransition()
+  {
+  }
 
-  void OnRelayout( const Vector2& size, RelayoutContainer& container ) override;
+  void OnRelayout(const Vector2& size, RelayoutContainer& container) override;
 
   void ResetToInitialState();
 
-
 protected:
-  typedef std::vector< Actor > ActorArray;
-  enum FACE { TOP, BOTTOM, LEFT, RIGHT };
+  typedef std::vector<Actor> ActorArray;
+  enum FACE
+  {
+    TOP,
+    BOTTOM,
+    LEFT,
+    RIGHT
+  };
 
-  ActorArray                 mBoxes;
-  Vector< FACE >             mBoxType;
-  ActorArray                 mCurrentTiles;
-  ActorArray                 mTargetTiles;
+  ActorArray   mBoxes;
+  Vector<FACE> mBoxType;
+  ActorArray   mCurrentTiles;
+  ActorArray   mTargetTiles;
 
-  Actor                      mBoxRoot;
+  Actor mBoxRoot;
 
-  unsigned int               mRows;
-  unsigned int               mColumns;
+  unsigned int mRows;
+  unsigned int mColumns;
 
-  Renderer                   mCurrentRenderer;
-  Renderer                   mTargetRenderer;
+  Renderer mCurrentRenderer;
+  Renderer mTargetRenderer;
 
-  Texture                    mCurrentTexture;
-  Texture                    mTargetTexture;
+  Texture mCurrentTexture;
+  Texture mTargetTexture;
 
-  Animation                  mAnimation;
+  Animation mAnimation;
 
-  Vector2                    mTileSize;
+  Vector2 mTileSize;
 
-  bool                       mIsAnimating;
-  bool                       mIsPaused;
+  bool mIsAnimating;
+  bool mIsPaused;
 
-  float                      mAnimationDuration;
-  float                      mCubeDisplacement;
+  float mAnimationDuration;
+  float mCubeDisplacement;
 
-  static const Vector4       FULL_BRIGHTNESS;
-  static const Vector4       HALF_BRIGHTNESS;
+  static const Vector4 FULL_BRIGHTNESS;
+  static const Vector4 HALF_BRIGHTNESS;
 
 private:
-
   Toolkit::CubeTransitionEffect::TransitionCompletedSignalType mTransitionCompletedSignal;
-
 };
 
 } // namespace Internal
index 307ecfa..625ce86 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_FOLD_EFFECT_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 class CubeTransitionFoldEffect;
 
 namespace Internal
 {
-
 class CubeTransitionEffect;
 
 class CubeTransitionFoldEffect : public CubeTransitionEffect
 {
-
 public:
-
   /**
    * @copydoc Toolkit::CubeTransitionFoldEffect::New
    */
-  static Toolkit::CubeTransitionFoldEffect New( unsigned int numRows, unsigned int numColumns );
+  static Toolkit::CubeTransitionFoldEffect New(unsigned int numRows, unsigned int numColumns);
 
 protected:
-
-   /**
+  /**
     * @copydoc Toolkit::CubeTransitionEffect::OnInitialize
     */
-   void OnInitialize() override;
+  void OnInitialize() override;
 
-   /**
+  /**
     * @copydoc Toolkit::CubeTransitionEffect::OnStartTransition
     */
-   void OnStartTransition( Vector2 panPosition, Vector2 panDisplacement ) override;
+  void OnStartTransition(Vector2 panPosition, Vector2 panDisplacement) override;
 
 private:
-
-   /**
+  /**
     * Construct a new CubeTransitionFoldEffect object
     * @param[in] numRows How many rows of cubes
     * @param[in] numColumns How many columns of cubes
     */
-   CubeTransitionFoldEffect( unsigned int numRows, unsigned int numColumns );
+  CubeTransitionFoldEffect(unsigned int numRows, unsigned int numColumns);
 
-   /**
+  /**
     * Set up animation to an Actor
     * @param[in] actorIndex The index of the cube in the cube array
     * @param[in] angle The angle of the rotation animation
     */
-   void SetupAnimation( unsigned int actorIndex, unsigned int x, float angle );
+  void SetupAnimation(unsigned int actorIndex, unsigned int x, float angle);
 
 }; //class CubeTransitionFoldEffect
 
@@ -81,22 +74,22 @@ private:
 
 // Helpers for public-api forwarding methods
 
-inline Internal::CubeTransitionFoldEffect& GetImpl( Dali::Toolkit::CubeTransitionFoldEffect& obj )
+inline Internal::CubeTransitionFoldEffect& GetImpl(Dali::Toolkit::CubeTransitionFoldEffect& obj)
 {
-  DALI_ASSERT_ALWAYS( obj );
+  DALI_ASSERT_ALWAYS(obj);
 
   Dali::RefObject& handle = obj.GetImplementation();
 
-  return static_cast< Internal::CubeTransitionFoldEffect& >( handle );
+  return static_cast<Internal::CubeTransitionFoldEffect&>(handle);
 }
 
-inline const Internal::CubeTransitionFoldEffect& GetImpl( const Dali::Toolkit::CubeTransitionFoldEffect& obj )
+inline const Internal::CubeTransitionFoldEffect& GetImpl(const Dali::Toolkit::CubeTransitionFoldEffect& obj)
 {
-  DALI_ASSERT_ALWAYS( obj );
+  DALI_ASSERT_ALWAYS(obj);
 
   const Dali::RefObject& handle = obj.GetImplementation();
 
-  return static_cast< const Internal::CubeTransitionFoldEffect& >( handle );
+  return static_cast<const Internal::CubeTransitionFoldEffect&>(handle);
 }
 
 } // namespace Toolkit
index e640fbd..5b8a744 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_CUBE_TRANSITION_WAVE_EFFECT_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 class CubeTransitionWaveEffect;
 
 namespace Internal
 {
-
 class CubeTransitionEffect;
 
 class CubeTransitionWaveEffect : public CubeTransitionEffect
 {
-
 public:
-
   /**
    * @copydoc Toolkit::CubeTransitionWaveEffect::New
    */
-  static Toolkit::CubeTransitionWaveEffect New(unsigned int numRows, unsigned int numColumns );
+  static Toolkit::CubeTransitionWaveEffect New(unsigned int numRows, unsigned int numColumns);
 
 protected:
-
   /**
    * @copydoc Toolkit::Internal::CubeTransitionEffect::OnInitialize
    */
@@ -57,16 +51,15 @@ protected:
   /**
    * @copydoc Toolkit::Internal::CubeTransitionEffect::OnStartTransition
    */
-  void OnStartTransition( Vector2 panPosition, Vector2 panDisplacement ) override;
+  void OnStartTransition(Vector2 panPosition, Vector2 panDisplacement) override;
 
 private:
-
   /**
    * Construct a new CubeTransitionWaveEffect object
    * @param[in] numRows How many rows of cubes
    * @param[in] numColumns How many columns of cubes
    */
-  CubeTransitionWaveEffect( unsigned int numRows, unsigned int numColumns );
+  CubeTransitionWaveEffect(unsigned int numRows, unsigned int numColumns);
 
   /**
    * The Saddle surface (Hyperbolic paraboloid)function is used to calculate the delay of rotating animation for each cube
@@ -75,7 +68,7 @@ private:
    * @param[in] position The press down position of panGesture
    * @param[in] displacement The displacement vector of panGesture
    */
-  void CalculateSaddleSurfaceParameters( Vector2 position, Vector2 displacement);
+  void CalculateSaddleSurfaceParameters(Vector2 position, Vector2 displacement);
 
   /**
    * Calculate the delay of the animation for each cube
@@ -83,18 +76,17 @@ private:
    * @param[in] y The Y coordinate of the cube
    * @return The delay time of the animation
    */
-  float CalculateDelay( float x, float y, bool forward );
+  float CalculateDelay(float x, float y, bool forward);
 
 private:
-
   //saddle surface(Hyperbolic paraboloid)function, used to calculate the delay time of each cube
   //z = 1.0 + y*y/a/a - x*x/b/b
   //with our selection of parameters(a and b), this value for any cube is between 0.0 and 2.0
-  float                      mSaddleAA; //a*a
-  float                      mSaddleBB; //b*b
-  float                      mSaddleB;  //b
-  Vector2                    mTranslation;
-  Vector2                    mRotation;
+  float   mSaddleAA; //a*a
+  float   mSaddleBB; //b*b
+  float   mSaddleB;  //b
+  Vector2 mTranslation;
+  Vector2 mRotation;
 
 }; // class CubeTransitionWaveEffect
 
@@ -102,22 +94,22 @@ private:
 
 // Helpers for public-api forwarding methods
 
-inline Internal::CubeTransitionWaveEffect& GetImpl( Dali::Toolkit::CubeTransitionWaveEffect& obj )
+inline Internal::CubeTransitionWaveEffect& GetImpl(Dali::Toolkit::CubeTransitionWaveEffect& obj)
 {
-  DALI_ASSERT_ALWAYS( obj );
+  DALI_ASSERT_ALWAYS(obj);
 
   Dali::RefObject& handle = obj.GetImplementation();
 
-  return static_cast< Internal::CubeTransitionWaveEffect& >( handle );
+  return static_cast<Internal::CubeTransitionWaveEffect&>(handle);
 }
 
-inline const Internal::CubeTransitionWaveEffect& GetImpl( const Dali::Toolkit::CubeTransitionWaveEffect& obj )
+inline const Internal::CubeTransitionWaveEffect& GetImpl(const Dali::Toolkit::CubeTransitionWaveEffect& obj)
 {
-  DALI_ASSERT_ALWAYS( obj );
+  DALI_ASSERT_ALWAYS(obj);
 
   const Dali::RefObject& handle = obj.GetImplementation();
 
-  return static_cast< const Internal::CubeTransitionWaveEffect& >( handle );
+  return static_cast<const Internal::CubeTransitionWaveEffect&>(handle);
 }
 
 } // namespace Toolkit
old mode 100755 (executable)
new mode 100644 (file)
index 96ea9ab..70e9925
  */
 
 //EXTERNAL INCLUDES
+#include <dali-toolkit/devel-api/visuals/animated-gradient-visual-properties-devel.h>
+#include <dali/devel-api/common/owner-container.h>
 #include <dali/public-api/common/dali-vector.h>
 #include <dali/public-api/common/intrusive-ptr.h>
-#include <dali/devel-api/common/owner-container.h>
-#include <dali-toolkit/devel-api/visuals/animated-gradient-visual-properties-devel.h>
 
 //INTERNAL INCLUDES
+#include <dali-toolkit/internal/visuals/visual-base-impl.h>
 #include <dali/devel-api/scripting/enum-helper.h>
 #include <dali/devel-api/scripting/scripting.h>
-#include <dali-toolkit/internal/visuals/visual-base-impl.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
 class AnimatedGradientVisual;
-typedef IntrusivePtr< AnimatedGradientVisual > AnimatedGradientVisualPtr;
+typedef IntrusivePtr<AnimatedGradientVisual> AnimatedGradientVisualPtr;
 
 /**
  * This visual which renders smooth transition of colors to the control's quad.
@@ -131,34 +129,32 @@ typedef IntrusivePtr< AnimatedGradientVisual > AnimatedGradientVisualPtr;
 class AnimatedGradientVisual : public Visual::Base
 {
 public:
-
   /**
    * Animation informations what this visual using
    */
   struct GradientAnimationData
   {
-   GradientAnimationData()
-    : index( Property::INVALID_INDEX ),
-      loop_count( 0 ),
-      delay( 0.0f ),
-      forward( false ),
-      auto_mirror( false )
+    GradientAnimationData()
+    : index(Property::INVALID_INDEX),
+      loop_count(0),
+      delay(0.0f),
+      forward(false),
+      auto_mirror(false)
     {
     }
 
     Toolkit::TransitionData transition;
-    Animation animation;
-    Property::Index index;
-    int loop_count;   ///< if < 0, loop unlimited. else, loop loop_count times.
-    float delay;      ///< delay time. if > 0, wait 'delay' seconds. else, play animation at '-delay' seconds.
-    bool forward;     ///< True if AnimationParameter::DirectionType::Type is FORWARD
-    bool auto_mirror; ///< True if AnimationParameter::LoopType::Type is MIRROR
+    Animation               animation;
+    Property::Index         index;
+    int                     loop_count;  ///< if < 0, loop unlimited. else, loop loop_count times.
+    float                   delay;       ///< delay time. if > 0, wait 'delay' seconds. else, play animation at '-delay' seconds.
+    bool                    forward;     ///< True if AnimationParameter::DirectionType::Type is FORWARD
+    bool                    auto_mirror; ///< True if AnimationParameter::LoopType::Type is MIRROR
   };
 
-  using GradientAnimationDataList =  Dali::OwnerContainer< GradientAnimationData* >;
+  using GradientAnimationDataList = Dali::OwnerContainer<GradientAnimationData*>;
 
 public:
-
   /**
    * @brief Create a new animated gradient visual.
    *
@@ -166,28 +162,26 @@ public:
    * @param[in] properties A Property::Map containing settings for this visual
    * @return A smart-pointer to the newly allocated visual
    */
-  static AnimatedGradientVisualPtr New( VisualFactoryCache& factoryCache, const Property::Map& properties );
+  static AnimatedGradientVisualPtr New(VisualFactoryCache& factoryCache, const Property::Map& properties);
 
 private: //from Visual
-
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  void DoCreatePropertyMap( Property::Map& map ) const override;
+  void DoCreatePropertyMap(Property::Map& map) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
+  void DoCreateInstancePropertyMap(Property::Map& map) const override;
 
 protected:
-
   /**
    * @brief Constructor.
    *
    * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
    */
-  AnimatedGradientVisual( VisualFactoryCache& factoryCache );
+  AnimatedGradientVisual(VisualFactoryCache& factoryCache);
 
   /**
    * @brief A reference counted object may only be deleted by calling Unrefecence()
@@ -203,7 +197,7 @@ protected: //from Visual
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  void DoSetProperties( const Property::Map& propertyMap ) override;
+  void DoSetProperties(const Property::Map& propertyMap) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
@@ -213,15 +207,14 @@ protected: //from Visual
   /**
    * @copydoc Visual::Base::DoSetOnScene
    */
-  void DoSetOnScene( Actor& actor ) override;
+  void DoSetOnScene(Actor& actor) override;
 
   /**
    * @copydoc Visual::Base::DoSetOffScene
    */
-  void DoSetOffScene( Actor& actor ) override;
+  void DoSetOffScene(Actor& actor) override;
 
 private:
-
   /**
    * @brief Initialize the default value of properies.
    */
@@ -247,7 +240,7 @@ private:
    *
    * param[in] propertyMap A Property::Map come from DoSetProperties
    */
-  void SetupGradientAnimationData( const Property::Map& propertyMap );
+  void SetupGradientAnimationData(const Property::Map& propertyMap);
 
   /**
    * @brief Create new shader
@@ -257,24 +250,24 @@ private:
   Shader CreateShader();
 
   // Undefined
-  AnimatedGradientVisual( const AnimatedGradientVisual& gradientRenderer );
+  AnimatedGradientVisual(const AnimatedGradientVisual& gradientRenderer);
 
   // Undefined
-  AnimatedGradientVisual& operator=( const AnimatedGradientVisual& gradientRenderer );
+  AnimatedGradientVisual& operator=(const AnimatedGradientVisual& gradientRenderer);
 
 private:
   GradientAnimationDataList mGradientAnimationDataList;
-  Property::Map mValueMap;
+  Property::Map             mValueMap;
 
   Dali::Toolkit::DevelAnimatedGradientVisual::GradientType::Type mGradientType;
-  Dali::Toolkit::DevelAnimatedGradientVisual::UnitType::Type mUnitType;
-  Dali::Toolkit::DevelAnimatedGradientVisual::SpreadType::Type mSpreadType;
+  Dali::Toolkit::DevelAnimatedGradientVisual::UnitType::Type     mUnitType;
+  Dali::Toolkit::DevelAnimatedGradientVisual::SpreadType::Type   mSpreadType;
 };
 
-}//namespace Internal
+} //namespace Internal
 
-}//namespace Toolkit
+} //namespace Toolkit
 
-}//namespace Dali
+} //namespace Dali
 
 #endif
index 3858f6d..6ccdcbb 100644 (file)
  */
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/animated-image-loading.h>
+#include <dali/public-api/adaptor-framework/timer.h>
 #include <dali/public-api/common/dali-vector.h>
 #include <dali/public-api/common/intrusive-ptr.h>
 #include <dali/public-api/math/vector4.h>
 #include <dali/public-api/object/weak-handle.h>
-#include <dali/public-api/adaptor-framework/timer.h>
-#include <dali/devel-api/adaptor-framework/animated-image-loading.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/internal/visuals/visual-base-impl.h>
-#include <dali-toolkit/internal/visuals/visual-url.h>
-#include <dali-toolkit/internal/visuals/animated-image/image-cache.h>
 #include <dali-toolkit/devel-api/visuals/animated-image-visual-actions-devel.h>
 #include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
+#include <dali-toolkit/internal/visuals/animated-image/image-cache.h>
+#include <dali-toolkit/internal/visuals/visual-base-impl.h>
+#include <dali-toolkit/internal/visuals/visual-url.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class ImageVisualShaderFactory;
 class AnimatedImageVisual;
-typedef IntrusivePtr< AnimatedImageVisual > AnimatedImageVisualPtr;
+typedef IntrusivePtr<AnimatedImageVisual> AnimatedImageVisualPtr;
 
 /**
  * The visual which renders an animated image
@@ -85,9 +82,7 @@ class AnimatedImageVisual : public Visual::Base,
                             public ConnectionTracker,
                             public ImageCache::FrameReadyObserver
 {
-
 public:
-
   /**
    * @brief Create the animated image Visual using the image URL.
    *
@@ -97,7 +92,7 @@ public:
    * @param[in] properties A Property::Map containing settings for this visual
    * @return A smart-pointer to the newly allocated visual.
    */
-  static AnimatedImageVisualPtr New( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl, const Property::Map& properties );
+  static AnimatedImageVisualPtr New(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl, const Property::Map& properties);
 
   /**
    * @brief Create the animated image Visual using image URLs.
@@ -108,7 +103,7 @@ public:
    * @param[in] properties A Property::Map containing settings for this visual
    * @return A smart-pointer to the newly allocated visual.
    */
-  static AnimatedImageVisualPtr New( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const Property::Array& imageUrls, const Property::Map& properties );
+  static AnimatedImageVisualPtr New(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const Property::Array& imageUrls, const Property::Map& properties);
 
   /**
    * @brief Create the animated image visual using the image URL.
@@ -117,39 +112,37 @@ public:
    * @param[in] shaderFactory The ImageVisualShaderFactory object
    * @param[in] imageUrl The URL to animated image resource to use
    */
-  static AnimatedImageVisualPtr New( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl );
-
-public:  // from Visual
+  static AnimatedImageVisualPtr New(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl);
 
+public: // from Visual
   /**
    * @copydoc Visual::Base::GetNaturalSize
    */
-  void GetNaturalSize( Vector2& naturalSize ) override;
+  void GetNaturalSize(Vector2& naturalSize) override;
 
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  void DoCreatePropertyMap( Property::Map& map ) const override;
+  void DoCreatePropertyMap(Property::Map& map) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
+  void DoCreateInstancePropertyMap(Property::Map& map) const override;
 
   /**
    * @copydoc Visual::Base::OnDoAction
    */
-  void OnDoAction( const Dali::Property::Index actionName, const Dali::Property::Value& attributes ) override;
+  void OnDoAction(const Dali::Property::Index actionName, const Dali::Property::Value& attributes) override;
 
 protected:
-
   /**
    * @brief Constructor.
    *
    * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
    * @param[in] shaderFactory The ImageVisualShaderFactory object
    */
-  AnimatedImageVisual( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory );
+  AnimatedImageVisual(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory);
 
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
@@ -164,24 +157,24 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  void DoSetProperties( const Property::Map& propertyMap ) override;
+  void DoSetProperties(const Property::Map& propertyMap) override;
 
   /**
    * 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 );
+  void DoSetProperty(Property::Index index, const Property::Value& value);
 
   /**
    * @copydoc Visual::Base::DoSetOnScene
    */
-  void DoSetOnScene( Actor& actor ) override;
+  void DoSetOnScene(Actor& actor) override;
 
   /**
    * @copydoc Visual::Base::DoSetOffScene
    */
-  void DoSetOffScene( Actor& actor ) override;
+  void DoSetOffScene(Actor& actor) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
@@ -204,7 +197,7 @@ private:
    * placement actor, and starts the frame timer
    * @param[in] textureSet The texture set to apply
    */
-  void StartFirstFrame( TextureSet& textureSet );
+  void StartFirstFrame(TextureSet& textureSet);
 
   /**
    * Prepares the texture set for displaying
@@ -215,13 +208,13 @@ private:
    * Set the image size from the texture set
    * @param[in] textureSet The texture set to get the size from
    */
-  void SetImageSize( TextureSet& textureSet );
+  void SetImageSize(TextureSet& textureSet);
 
   /**
    * Called when the next frame is ready.
    * @param[in] textureSet the texture set to apply
    */
-  void FrameReady( TextureSet textureSet ) override;
+  void FrameReady(TextureSet textureSet) override;
 
   /**
    * Display the next frame. It is called when the mFrameDelayTimer ticks.
@@ -233,46 +226,45 @@ private:
    * Initialize the animated image variables.
    * @param[in] imageUrl The url of the animated image
    */
-  void InitializeAnimatedImage( const VisualUrl& imageUrl );
+  void InitializeAnimatedImage(const VisualUrl& imageUrl);
 
   // Undefined
-  AnimatedImageVisual( const AnimatedImageVisual& animatedImageVisual );
+  AnimatedImageVisual(const AnimatedImageVisual& animatedImageVisual);
 
   // Undefined
-  AnimatedImageVisual& operator=( const AnimatedImageVisual& animatedImageVisual );
+  AnimatedImageVisual& operator=(const AnimatedImageVisual& animatedImageVisual);
 
 private:
-
-  Timer mFrameDelayTimer;
-  WeakHandle<Actor> mPlacementActor;
+  Timer                     mFrameDelayTimer;
+  WeakHandle<Actor>         mPlacementActor;
   ImageVisualShaderFactory& mImageVisualShaderFactory;
 
   // Variables for Animated Image player
-  Vector4 mPixelArea;
-  VisualUrl mImageUrl;
+  Vector4                    mPixelArea;
+  VisualUrl                  mImageUrl;
   Dali::AnimatedImageLoading mAnimatedImageLoading; // Only needed for animated image
-  uint32_t mFrameIndexForJumpTo; // Frame index into textureRects
+  uint32_t                   mFrameIndexForJumpTo;  // Frame index into textureRects
 
   // Variables for Multi-Image player
   ImageCache::UrlList* mImageUrls;
-  ImageCache* mImageCache;
-  uint16_t mCacheSize;
-  uint16_t mBatchSize;
-  uint16_t mFrameDelay;
-  int16_t mLoopCount;
-  int16_t mCurrentLoopIndex;
-  uint16_t mUrlIndex;
+  ImageCache*          mImageCache;
+  uint16_t             mCacheSize;
+  uint16_t             mBatchSize;
+  uint16_t             mFrameDelay;
+  int16_t              mLoopCount;
+  int16_t              mCurrentLoopIndex;
+  uint16_t             mUrlIndex;
 
   // Shared variables
-  uint32_t mFrameCount; // Number of frames
+  uint32_t        mFrameCount; // Number of frames
   ImageDimensions mImageSize;
 
-  Dali::WrapMode::Type mWrapModeU:3;
-  Dali::WrapMode::Type mWrapModeV:3;
-  DevelAnimatedImageVisual::Action::Type mActionStatus:3;
-  DevelImageVisual::StopBehavior::Type   mStopBehavior:2;
-  bool mStartFirstFrame:1;
-  bool mIsJumpTo:1;
+  Dali::WrapMode::Type                   mWrapModeU : 3;
+  Dali::WrapMode::Type                   mWrapModeV : 3;
+  DevelAnimatedImageVisual::Action::Type mActionStatus : 3;
+  DevelImageVisual::StopBehavior::Type   mStopBehavior : 2;
+  bool                                   mStartFirstFrame : 1;
+  bool                                   mIsJumpTo : 1;
 };
 
 } // namespace Internal
index 3eaac8a..63212df 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_FIXED_IMAGE_CACHE_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -27,7 +27,6 @@ namespace Toolkit
 {
 namespace Internal
 {
-
 class FixedImageCache : public ImageCache, public TextureUploadObserver
 {
 public:
@@ -41,10 +40,10 @@ public:
    * This will start loading textures immediately, according to the
    * batch and cache sizes. The cache is as large as the number of urls.
    */
-  FixedImageCache( TextureManager&                 textureManager,
-                   UrlList&                        urlList,
-                   ImageCache::FrameReadyObserver& observer,
-                   unsigned int                    batchSize );
+  FixedImageCache(TextureManager&                 textureManager,
+                  UrlList&                        urlList,
+                  ImageCache::FrameReadyObserver& observer,
+                  unsigned int                    batchSize);
 
   ~FixedImageCache() override;
 
@@ -52,7 +51,7 @@ public:
    * Get the Nth frame. If it's not ready, this will trigger the
    * sending of FrameReady() when the image becomes ready.
    */
-  TextureSet Frame( uint32_t frameIndex ) override;
+  TextureSet Frame(uint32_t frameIndex) override;
 
   /**
    * Get the first frame. If it's not ready, this will trigger the
@@ -69,7 +68,7 @@ public:
   /**
    * Get the interval of Nth frame.
    */
-  uint32_t GetFrameInterval( uint32_t frameIndex ) const override;
+  uint32_t GetFrameInterval(uint32_t frameIndex) const override;
 
   /**
    * Get the current rendered frame index.
@@ -96,7 +95,7 @@ private:
   /**
    * Find the matching image frame, and set it to ready
    */
-  void SetImageFrameReady( TextureManager::TextureId textureId );
+  void SetImageFrameReady(TextureManager::TextureId textureId);
 
   /**
    * Get the texture set of the front frame.
@@ -108,7 +107,7 @@ private:
    * Check if the front frame has become ready - if so, inform observer
    * @param[in] wasReady Readiness before call.
    */
-  void CheckFrontFrame( bool wasReady );
+  void CheckFrontFrame(bool wasReady);
 
 protected:
   void UploadComplete(
@@ -117,18 +116,18 @@ protected:
     TextureSet     textureSet,
     bool           useAtlasing,
     const Vector4& atlasRect,
-    bool           premultiplied ) override;
+    bool           premultiplied) override;
 
   void LoadComplete(
-    bool loadSuccess,
+    bool               loadSuccess,
     Devel::PixelBuffer pixelBuffer,
-    const VisualUrl& url,
-    bool preMultiplied ) override;
+    const VisualUrl&   url,
+    bool               preMultiplied) override;
 
 private:
   std::vector<UrlStore>& mImageUrls;
-  std::vector<bool> mReadyFlags;
-  unsigned int      mFront;
+  std::vector<bool>      mReadyFlags;
+  unsigned int           mFront;
 };
 
 } //namespace Internal
index adb6e58..f21d707 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_IMAGE_CACHE_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,8 +18,8 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali-toolkit/internal/visuals/texture-upload-observer.h>
 #include <dali-toolkit/internal/visuals/texture-manager-impl.h>
+#include <dali-toolkit/internal/visuals/texture-upload-observer.h>
 
 namespace Dali
 {
@@ -27,7 +27,6 @@ namespace Toolkit
 {
 namespace Internal
 {
-
 class ImageCache : public TextureManager::LifecycleObserver
 {
 public:
@@ -41,13 +40,13 @@ public:
      * Informs observer when the next texture set is ready to display
      * @param[in] textureSet The ready texture set
      */
-    virtual void FrameReady( TextureSet textureSet ) = 0;
+    virtual void FrameReady(TextureSet textureSet) = 0;
   };
 
   struct UrlStore
   {
     TextureManager::TextureId mTextureId = TextureManager::INVALID_TEXTURE_ID;
-    std::string mUrl;
+    std::string               mUrl;
   };
 
   /**
@@ -66,9 +65,9 @@ public:
    * This will start loading textures immediately, according to the
    * batch and cache sizes. The cache is as large as the number of urls.
    */
-  ImageCache( TextureManager&                 textureManager,
-              ImageCache::FrameReadyObserver& observer,
-              unsigned int                    batchSize );
+  ImageCache(TextureManager&                 textureManager,
+             ImageCache::FrameReadyObserver& observer,
+             unsigned int                    batchSize);
 
   virtual ~ImageCache();
 
@@ -88,12 +87,12 @@ public:
    * Get the Nth frame. If it's not ready, this will trigger the
    * sending of FrameReady() when the image becomes ready.
    */
-  virtual TextureSet Frame( uint32_t frameIndex ) = 0;
+  virtual TextureSet Frame(uint32_t frameIndex) = 0;
 
   /**
    * Get the interval of Nth frame.
    */
-  virtual uint32_t GetFrameInterval( uint32_t frameIndex ) const = 0;
+  virtual uint32_t GetFrameInterval(uint32_t frameIndex) const = 0;
 
   /**
    * Get the current rendered frame index.
@@ -107,20 +106,19 @@ public:
   virtual int32_t GetTotalFrameCount() const = 0;
 
 private:
-
   /**
    * Called before the texture manager is destroyed.
    */
   void TextureManagerDestroyed() final;
 
 protected:
-  TextureManager&        mTextureManager;
-  FrameReadyObserver&    mObserver;
-  unsigned int           mBatchSize;
-  unsigned int           mUrlIndex;
-  bool                   mWaitingForReadyFrame:1;
-  bool                   mRequestingLoad:1;
-  bool                   mTextureManagerAlive:1;
+  TextureManager&     mTextureManager;
+  FrameReadyObserver& mObserver;
+  unsigned int        mBatchSize;
+  unsigned int        mUrlIndex;
+  bool                mWaitingForReadyFrame : 1;
+  bool                mRequestingLoad : 1;
+  bool                mTextureManagerAlive : 1;
 };
 
 } //namespace Internal
index 595adc0..b1b4afc 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_ROLLING_ANIMATED_IMAGE_CACHE_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <dali/devel-api/adaptor-framework/animated-image-loading.h>
-#include <dali/devel-api/common/circular-queue.h>
 #include <dali-toolkit/internal/visuals/animated-image/image-cache.h>
 #include <dali-toolkit/internal/visuals/texture-manager-impl.h>
+#include <dali/devel-api/adaptor-framework/animated-image-loading.h>
+#include <dali/devel-api/common/circular-queue.h>
 
 namespace Dali
 {
@@ -29,7 +29,6 @@ namespace Toolkit
 {
 namespace Internal
 {
-
 /**
  * Class to manage a rolling cache of Animated images, where the cache size
  * is smaller than the total number of images.
@@ -53,13 +52,13 @@ public:
    * This will start loading textures immediately, according to the
    * batch and cache sizes.
    */
-  RollingAnimatedImageCache( TextureManager&                 textureManager,
-                             AnimatedImageLoading&           animatedImageLoader,
-                             uint32_t                        frameCount,
-                             ImageCache::FrameReadyObserver& observer,
-                             uint16_t                        cacheSize,
-                             uint16_t                        batchSize,
-                             bool                            isSynchronousLoading );
+  RollingAnimatedImageCache(TextureManager&                 textureManager,
+                            AnimatedImageLoading&           animatedImageLoader,
+                            uint32_t                        frameCount,
+                            ImageCache::FrameReadyObserver& observer,
+                            uint16_t                        cacheSize,
+                            uint16_t                        batchSize,
+                            bool                            isSynchronousLoading);
 
   /**
    * Destructor
@@ -70,7 +69,7 @@ public:
    * Get the Nth frame. If it's not ready, this will trigger the
    * sending of FrameReady() when the image becomes ready.
    */
-  TextureSet Frame( uint32_t frameIndex ) override;
+  TextureSet Frame(uint32_t frameIndex) override;
 
   /**
    * Get the first frame. If it's not ready, this will trigger the
@@ -87,7 +86,7 @@ public:
   /**
    * Get the interval of Nth frame.
    */
-  uint32_t GetFrameInterval( uint32_t frameIndex ) const override;
+  uint32_t GetFrameInterval(uint32_t frameIndex) const override;
 
   /**
    * Get the current rendered frame index.
@@ -109,7 +108,7 @@ private:
   /**
    * Request to Load a frame
    */
-  void RequestFrameLoading( uint32_t frameIndex );
+  void RequestFrameLoading(uint32_t frameIndex);
 
   /**
    * Load the next batch of images
@@ -119,7 +118,7 @@ private:
   /**
    * Find the matching image frame, and set it to ready
    */
-  void SetImageFrameReady( TextureManager::TextureId textureId );
+  void SetImageFrameReady(TextureManager::TextureId textureId);
 
   /**
    * Get the texture set of the front frame.
@@ -130,13 +129,13 @@ private:
   /**
    * Get the texture id of the given index
    */
-  TextureManager::TextureId GetCachedTextureId( int index ) const;
+  TextureManager::TextureId GetCachedTextureId(int index) const;
 
   /**
    * Check if the front frame has become ready - if so, inform observer
    * @param[in] wasReady Readiness before call.
    */
-  void CheckFrontFrame( bool wasReady );
+  void CheckFrontFrame(bool wasReady);
 
 protected:
   void UploadComplete(
@@ -145,13 +144,13 @@ protected:
     TextureSet     textureSet,
     bool           useAtlasing,
     const Vector4& atlasRect,
-    bool           preMultiplied ) override;
+    bool           preMultiplied) override;
 
   void LoadComplete(
-    bool loadSuccess,
+    bool               loadSuccess,
     Devel::PixelBuffer pixelBuffer,
-    const VisualUrl& url,
-    bool preMultiplied ) override;
+    const VisualUrl&   url,
+    bool               preMultiplied) override;
 
 private:
   /**
@@ -160,19 +159,19 @@ private:
   struct ImageFrame
   {
     unsigned int mFrameNumber = 0u;
-    bool mReady = false;
+    bool         mReady       = false;
   };
 
-  Dali::AnimatedImageLoading  mAnimatedImageLoading;
-  uint32_t                    mFrameCount;
-  int                         mFrameIndex;
-  int                         mCacheSize;
-  std::vector<UrlStore>       mImageUrls;
-  std::vector<int32_t>        mIntervals;
-  std::vector<uint32_t>       mLoadWaitingQueue;
-  CircularQueue<ImageFrame>   mQueue;
-  bool                        mIsSynchronousLoading;
-  bool                        mOnLoading;
+  Dali::AnimatedImageLoading mAnimatedImageLoading;
+  uint32_t                   mFrameCount;
+  int                        mFrameIndex;
+  int                        mCacheSize;
+  std::vector<UrlStore>      mImageUrls;
+  std::vector<int32_t>       mIntervals;
+  std::vector<uint32_t>      mLoadWaitingQueue;
+  CircularQueue<ImageFrame>  mQueue;
+  bool                       mIsSynchronousLoading;
+  bool                       mOnLoading;
 };
 
 } // namespace Internal
index f33a7b3..1fcbe88 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_ROLLING_IMAGE_CACHE_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics 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,9 +19,9 @@
 
 // EXTERNAL INCLUDES
 
-#include <dali/devel-api/common/circular-queue.h>
 #include <dali-toolkit/internal/visuals/animated-image/image-cache.h>
 #include <dali-toolkit/internal/visuals/texture-manager-impl.h>
+#include <dali/devel-api/common/circular-queue.h>
 
 namespace Dali
 {
@@ -29,7 +29,6 @@ namespace Toolkit
 {
 namespace Internal
 {
-
 /**
  * Class to manage a rolling cache of images, where the cache size
  * is smaller than the total number of images.
@@ -48,11 +47,11 @@ public:
    * This will start loading textures immediately, according to the
    * batch and cache sizes.
    */
-  RollingImageCache( TextureManager&                 textureManager,
-                     UrlList&                        urlList,
-                     ImageCache::FrameReadyObserver& observer,
-                     uint16_t                        cacheSize,
-                     uint16_t                        batchSize );
+  RollingImageCache(TextureManager&                 textureManager,
+                    UrlList&                        urlList,
+                    ImageCache::FrameReadyObserver& observer,
+                    uint16_t                        cacheSize,
+                    uint16_t                        batchSize);
 
   /**
    * Destructor
@@ -63,7 +62,7 @@ public:
    * Get the Nth frame. If it's not ready, this will trigger the
    * sending of FrameReady() when the image becomes ready.
    */
-  TextureSet Frame( uint32_t frameIndex ) override;
+  TextureSet Frame(uint32_t frameIndex) override;
 
   /**
    * Get the first frame. If it's not ready, this will trigger the
@@ -80,7 +79,7 @@ public:
   /**
    * Get the interval of Nth frame.
    */
-  uint32_t GetFrameInterval( uint32_t frameIndex ) const override;
+  uint32_t GetFrameInterval(uint32_t frameIndex) const override;
 
   /**
    * Get the current rendered frame index.
@@ -107,7 +106,7 @@ private:
   /**
    * Find the matching image frame, and set it to ready
    */
-  void SetImageFrameReady( TextureManager::TextureId textureId );
+  void SetImageFrameReady(TextureManager::TextureId textureId);
 
   /**
    * Get the texture set of the front frame.
@@ -118,13 +117,13 @@ private:
   /**
    * Get the texture id of the given index
    */
-  TextureManager::TextureId GetCachedTextureId( int index ) const;
+  TextureManager::TextureId GetCachedTextureId(int index) const;
 
   /**
    * Check if the front frame has become ready - if so, inform observer
    * @param[in] wasReady Readiness before call.
    */
-  void CheckFrontFrame( bool wasReady );
+  void CheckFrontFrame(bool wasReady);
 
 protected:
   void UploadComplete(
@@ -133,13 +132,13 @@ protected:
     TextureSet     textureSet,
     bool           useAtlasing,
     const Vector4& atlasRect,
-    bool           preMultiplied ) override;
+    bool           preMultiplied) override;
 
   void LoadComplete(
-    bool loadSuccess,
+    bool               loadSuccess,
     Devel::PixelBuffer pixelBuffer,
-    const VisualUrl& url,
-    bool preMultiplied ) override;
+    const VisualUrl&   url,
+    bool               preMultiplied) override;
 
 private:
   /**
@@ -148,10 +147,10 @@ private:
   struct ImageFrame
   {
     unsigned int mUrlIndex = 0u;
-    bool mReady = false;
+    bool         mReady    = false;
   };
 
-  std::vector<UrlStore>& mImageUrls;
+  std::vector<UrlStore>&    mImageUrls;
   CircularQueue<ImageFrame> mQueue;
 };
 
index 9afd18e..0270268 100644 (file)
  */
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/actors/actor-devel.h>
+#include <dali/public-api/adaptor-framework/window.h>
 #include <dali/public-api/common/intrusive-ptr.h>
-#include <dali/public-api/object/weak-handle.h>
 #include <dali/public-api/object/property-notification.h>
-#include <dali/public-api/adaptor-framework/window.h>
-#include <dali/devel-api/actors/actor-devel.h>
+#include <dali/public-api/object/weak-handle.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/internal/visuals/visual-base-impl.h>
-#include <dali-toolkit/internal/visuals/visual-url.h>
 #include <dali-toolkit/devel-api/visuals/animated-vector-image-visual-actions-devel.h>
-#include <dali-toolkit/internal/visuals/animated-vector-image/vector-animation-task.h>
 #include <dali-toolkit/internal/visuals/animated-vector-image/vector-animation-manager.h>
+#include <dali-toolkit/internal/visuals/animated-vector-image/vector-animation-task.h>
+#include <dali-toolkit/internal/visuals/visual-base-impl.h>
+#include <dali-toolkit/internal/visuals/visual-url.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class ImageVisualShaderFactory;
 class AnimatedVectorImageVisual;
-using AnimatedVectorImageVisualPtr = IntrusivePtr< AnimatedVectorImageVisual >;
+using AnimatedVectorImageVisualPtr = IntrusivePtr<AnimatedVectorImageVisual>;
 
 /**
  * The visual which renders an animated vector image using VectorAnimationRenderer.
@@ -56,10 +53,9 @@ using AnimatedVectorImageVisualPtr = IntrusivePtr< AnimatedVectorImageVisual >;
  * | url                      | STRING           |
  *
  */
-class AnimatedVectorImageVisual: public Visual::Base, public ConnectionTracker, public VectorAnimationManager::LifecycleObserver
+class AnimatedVectorImageVisual : public Visual::Base, public ConnectionTracker, public VectorAnimationManager::LifecycleObserver
 {
 public:
-
   /**
    * @brief Create the AnimatedVectorImageVisual using the image URL.
    *
@@ -69,7 +65,7 @@ public:
    * @param[in] properties A Property::Map containing settings for this visual
    * @return A smart-pointer to the newly allocated visual.
    */
-  static AnimatedVectorImageVisualPtr New( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl, const Property::Map& properties );
+  static AnimatedVectorImageVisualPtr New(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl, const Property::Map& properties);
 
   /**
    * @brief Create the AnimatedVectorImageVisual using the image URL.
@@ -79,24 +75,23 @@ public:
    * @param[in] imageUrl The URL to an animated vector image to use
    * @return A smart-pointer to the newly allocated visual.
    */
-  static AnimatedVectorImageVisualPtr New( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl );
-
-public:  // from Visual
+  static AnimatedVectorImageVisualPtr New(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl);
 
+public: // from Visual
   /**
    * @copydoc Visual::Base::GetNaturalSize
    */
-  void GetNaturalSize( Vector2& naturalSize ) override;
+  void GetNaturalSize(Vector2& naturalSize) override;
 
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  void DoCreatePropertyMap( Property::Map& map ) const override;
+  void DoCreatePropertyMap(Property::Map& map) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
+  void DoCreateInstancePropertyMap(Property::Map& map) const override;
 
 protected: // From VectorAnimationManager::LifecycleObserver:
   /**
@@ -105,7 +100,6 @@ protected: // From VectorAnimationManager::LifecycleObserver:
   void VectorAnimationManagerDestroyed() override;
 
 protected:
-
   /**
    * @brief Constructor.
    *
@@ -113,7 +107,7 @@ protected:
    * @param[in] shaderFactory The ImageVisualShaderFactory object
    * @param[in] imageUrl The URL to an animated vector image to use
    */
-  AnimatedVectorImageVisual( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl );
+  AnimatedVectorImageVisual(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl);
 
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
@@ -128,17 +122,17 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  void DoSetProperties( const Property::Map& propertyMap ) override;
+  void DoSetProperties(const Property::Map& propertyMap) override;
 
   /**
    * @copydoc Visual::Base::DoSetOnScene
    */
-  void DoSetOnScene( Actor& actor ) override;
+  void DoSetOnScene(Actor& actor) override;
 
   /**
    * @copydoc Visual::Base::DoSetOffScene
    */
-  void DoSetOffScene( Actor& actor ) override;
+  void DoSetOffScene(Actor& actor) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
@@ -148,16 +142,15 @@ protected:
   /**
    * @copydoc Visual::Base::OnDoAction
    */
-  void OnDoAction( const Property::Index actionId, const Property::Value& attributes ) override;
+  void OnDoAction(const Property::Index actionId, const Property::Value& attributes) override;
 
 private:
-
   /**
    * 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 );
+  void DoSetProperty(Property::Index index, const Property::Value& value);
 
   /**
    * @brief Called when the texture upload is completed.
@@ -192,22 +185,22 @@ private:
   /**
    * @brief Callback when the world scale factor changes.
    */
-  void OnScaleNotification( PropertyNotification& source );
+  void OnScaleNotification(PropertyNotification& source);
 
   /**
    * @brief Callback when the size changes.
    */
-  void OnSizeNotification( PropertyNotification& source );
+  void OnSizeNotification(PropertyNotification& source);
 
   /**
    * @brief Callback when the visibility of the actor is changed.
    */
-  void OnControlVisibilityChanged( Actor actor, bool visible, DevelActor::VisibilityChange::Type type );
+  void OnControlVisibilityChanged(Actor actor, bool visible, DevelActor::VisibilityChange::Type type);
 
   /**
    * @brief Callback when the visibility of the window is changed.
    */
-  void OnWindowVisibilityChanged( Window window, bool visible );
+  void OnWindowVisibilityChanged(Window window, bool visible);
 
   /**
    * @brief Callback when the event is processed.
@@ -215,26 +208,26 @@ private:
   void OnProcessEvents();
 
   // Undefined
-  AnimatedVectorImageVisual( const AnimatedVectorImageVisual& visual ) = delete;
+  AnimatedVectorImageVisual(const AnimatedVectorImageVisual& visual) = delete;
 
   // Undefined
-  AnimatedVectorImageVisual& operator=( const AnimatedVectorImageVisual& visual ) = delete;
+  AnimatedVectorImageVisual& operator=(const AnimatedVectorImageVisual& visual) = delete;
 
 private:
-  VisualUrl                                    mUrl;
-  VectorAnimationTask::AnimationData           mAnimationData;
-  VectorAnimationTaskPtr                       mVectorAnimationTask;
-  ImageVisualShaderFactory&                    mImageVisualShaderFactory;
-  PropertyNotification                         mScaleNotification;
-  PropertyNotification                         mSizeNotification;
-  Vector2                                      mVisualSize;
-  Vector2                                      mVisualScale;
-  WeakHandle< Actor >                          mPlacementActor;
-  DevelImageVisual::PlayState::Type            mPlayState;
-  CallbackBase*                                mEventCallback;    // Not owned
-  bool                                         mRendererAdded;
-  bool                                         mCoreShutdown;
-  bool                                         mRedrawInScalingDown;
+  VisualUrl                          mUrl;
+  VectorAnimationTask::AnimationData mAnimationData;
+  VectorAnimationTaskPtr             mVectorAnimationTask;
+  ImageVisualShaderFactory&          mImageVisualShaderFactory;
+  PropertyNotification               mScaleNotification;
+  PropertyNotification               mSizeNotification;
+  Vector2                            mVisualSize;
+  Vector2                            mVisualScale;
+  WeakHandle<Actor>                  mPlacementActor;
+  DevelImageVisual::PlayState::Type  mPlayState;
+  CallbackBase*                      mEventCallback; // Not owned
+  bool                               mRendererAdded;
+  bool                               mCoreShutdown;
+  bool                               mRedrawInScalingDown;
 };
 
 } // namespace Internal
index 7fbc3ca..c52b800 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_VECTOR_ANIMATION_MANAGER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/signals/callback.h>
-#include <dali/public-api/common/vector-wrapper.h>
 #include <dali/integration-api/processor-interface.h>
+#include <dali/public-api/common/vector-wrapper.h>
+#include <dali/public-api/signals/callback.h>
 #include <memory>
 
 // INTERNAL INCLUDES
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class VectorAnimationThread;
 
 /**
  * @brief Vector animation manager
  */
-class VectorAnimationManager: public Integration::Processor
+class VectorAnimationManager : public Integration::Processor
 {
 public:
   struct LifecycleObserver
@@ -62,13 +59,13 @@ public:
    * Add a lifecycle observer
    * @param[in] observer The object watching this one
    */
-  void AddObserver( LifecycleObserver& observer );
+  void AddObserver(LifecycleObserver& observer);
 
   /**
    * Remove a lifecycle observer
    * @param[in] observer The object watching this one
    */
-  void RemoveObserver( LifecycleObserver& observer );
+  void RemoveObserver(LifecycleObserver& observer);
 
   /**
    * Get the vector animation thread.
@@ -82,36 +79,33 @@ public:
    * @param callback The callback to register
    * @note Ownership of the callback is passed onto this class.
    */
-  void RegisterEventCallback( CallbackBase* callback );
+  void RegisterEventCallback(CallbackBase* callback);
 
   /**
    * @brief Unregister a previously registered callback
    *
    * @param callback The callback to unregister
    */
-  void UnregisterEventCallback( CallbackBase* callback );
+  void UnregisterEventCallback(CallbackBase* callback);
 
 protected: // Implementation of Processor
-
   /**
    * @copydoc Dali::Integration::Processor::Process()
    */
   void Process() override;
 
 private:
-
   // Undefined
-  VectorAnimationManager( const VectorAnimationManager& manager ) = delete;
+  VectorAnimationManager(const VectorAnimationManager& manager) = delete;
 
   // Undefined
-  VectorAnimationManager& operator=( const VectorAnimationManager& manager ) = delete;
+  VectorAnimationManager& operator=(const VectorAnimationManager& manager) = delete;
 
 private:
-
-  std::vector< CallbackBase* >             mEventCallbacks;
-  std::vector<LifecycleObserver*>         mLifecycleObservers;
-  std::unique_ptr< VectorAnimationThread > mVectorAnimationThread;
-  bool                                     mProcessorRegistered;
+  std::vector<CallbackBase*>             mEventCallbacks;
+  std::vector<LifecycleObserver*>        mLifecycleObservers;
+  std::unique_ptr<VectorAnimationThread> mVectorAnimationThread;
+  bool                                   mProcessorRegistered;
 };
 
 } // namespace Internal
index e9c6902..702a718 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_VECTOR_ANIMATION_TASK_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/object/property-array.h>
 #include <dali/devel-api/adaptor-framework/event-thread-callback.h>
 #include <dali/devel-api/adaptor-framework/vector-animation-renderer.h>
 #include <dali/devel-api/threading/conditional-wait.h>
-#include <memory>
+#include <dali/public-api/object/property-array.h>
 #include <chrono>
+#include <memory>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class VisualFactoryCache;
 class VectorAnimationThread;
 class VectorAnimationTask;
-typedef IntrusivePtr< VectorAnimationTask > VectorAnimationTaskPtr;
+typedef IntrusivePtr<VectorAnimationTask> VectorAnimationTaskPtr;
 
 /**
  * The task of the vector animation.
@@ -48,7 +45,6 @@ typedef IntrusivePtr< VectorAnimationTask > VectorAnimationTaskPtr;
 class VectorAnimationTask : public RefObject
 {
 public:
-
   using UploadCompletedSignalType = Dali::VectorAnimationRenderer::UploadCompletedSignalType;
 
   /**
@@ -71,29 +67,29 @@ public:
   struct AnimationData
   {
     AnimationData()
-    : resendFlag( 0 ),
+    : resendFlag(0),
       playRange(),
       playState(),
-      stopBehavior( DevelImageVisual::StopBehavior::CURRENT_FRAME ),
-      loopingMode( DevelImageVisual::LoopingMode::RESTART ),
-      currentFrame( 0 ),
-      width( 0 ),
-      height( 0 ),
-      loopCount( -1 )
+      stopBehavior(DevelImageVisual::StopBehavior::CURRENT_FRAME),
+      loopingMode(DevelImageVisual::LoopingMode::RESTART),
+      currentFrame(0),
+      width(0),
+      height(0),
+      loopCount(-1)
     {
     }
 
-    AnimationData& operator= ( const AnimationData& rhs )
+    AnimationData& operator=(const AnimationData& rhs)
     {
       resendFlag |= rhs.resendFlag; // OR resend flag
-      playRange = rhs.playRange;
-      playState = rhs.playState;
+      playRange    = rhs.playRange;
+      playState    = rhs.playState;
       stopBehavior = rhs.stopBehavior;
-      loopingMode = rhs.loopingMode;
+      loopingMode  = rhs.loopingMode;
       currentFrame = rhs.currentFrame;
-      width = rhs.width;
-      height = rhs.height;
-      loopCount = rhs.loopCount;
+      width        = rhs.width;
+      height       = rhs.height;
+      loopCount    = rhs.loopCount;
       return *this;
     }
 
@@ -114,7 +110,7 @@ public:
    * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
    * @param[in] url The url of the vector animation file
    */
-  VectorAnimationTask( VisualFactoryCache& factoryCache, const std::string& url );
+  VectorAnimationTask(VisualFactoryCache& factoryCache, const std::string& url);
 
   /**
    * @brief Destructor.
@@ -131,26 +127,26 @@ public:
    *
    * @param[in] renderer The renderer used to display the result image
    */
-  void SetRenderer( Renderer renderer );
+  void SetRenderer(Renderer renderer);
 
   /**
    * @brief Sets data to specify animation playback.
    * @param[in] data The animation data
    */
-  void SetAnimationData( const AnimationData& data );
+  void SetAnimationData(const AnimationData& data);
 
   /**
    * @brief This callback is called after the animation is finished.
    * @param[in] callback The animation finished callback
    */
-  void SetAnimationFinishedCallback( EventThreadCallback* callback );
+  void SetAnimationFinishedCallback(EventThreadCallback* callback);
 
   /**
    * @brief Gets the playing range in frame number.
    * @param[out] startFrame The frame number to specify minimum progress.
    * @param[out] endFrame The frame number to specify maximum progress.
    */
-  void GetPlayRange( uint32_t& startFrame, uint32_t& endFrame );
+  void GetPlayRange(uint32_t& startFrame, uint32_t& endFrame);
 
   /**
    * @brief Retrieves the current frame number of the animation.
@@ -168,13 +164,13 @@ public:
    * @brief Gets the default size of the file,.
    * @return The default size of the file
    */
-  void GetDefaultSize( uint32_t& width, uint32_t& height ) const;
+  void GetDefaultSize(uint32_t& width, uint32_t& height) const;
 
   /**
    * @brief Gets the layer information of all the child layers.
    * @param[out] map The layer information
    */
-  void GetLayerInfo( Property::Map& map ) const;
+  void GetLayerInfo(Property::Map& map) const;
 
   /**
    * @brief Connect to this signal to be notified when the texture upload is completed.
@@ -192,16 +188,15 @@ public:
    * @brief Calculates the time for the next frame rasterization.
    * @return The time for the next frame rasterization.
    */
-  std::chrono::time_point< std::chrono::system_clock > CalculateNextFrameTime( bool renderNow );
+  std::chrono::time_point<std::chrono::system_clock> CalculateNextFrameTime(bool renderNow);
 
   /**
    * @brief Gets the time for the next frame rasterization.
    * @return The time for the next frame rasterization.
    */
-  std::chrono::time_point< std::chrono::system_clock > GetNextFrameTime();
+  std::chrono::time_point<std::chrono::system_clock> GetNextFrameTime();
 
 private:
-
   /**
    * @brief Initializes the vector renderer.
    */
@@ -228,44 +223,44 @@ private:
    * @param[in] width The target image width
    * @param[in] height The target image height
    */
-  void SetSize( uint32_t width, uint32_t height );
+  void SetSize(uint32_t width, uint32_t height);
 
   /**
    * @brief Enable looping for 'count' repeats. -1 means to repeat forever.
    * @param[in] count The number of times to loop
    */
-  void SetLoopCount( int32_t count );
+  void SetLoopCount(int32_t count);
 
   /**
    * @brief Set the playing range in frame number.
    * @param[in] playRange The array to specify minimum and maximum progress.
    * The animation will play between those values.
    */
-  void SetPlayRange( const Property::Array& playRange );
+  void SetPlayRange(const Property::Array& playRange);
 
   /**
    * @brief Sets the current frame number of the animation.
    * @param[in] frameNumber The new frame number between [0, the maximum frame number] or between the play range if specified.
    */
-  void SetCurrentFrameNumber( uint32_t frameNumber );
+  void SetCurrentFrameNumber(uint32_t frameNumber);
 
   /**
    * @brief Sets the stop behavior of the animation. This is performed when the animation is stopped.
    * @param[in] stopBehavior The stop behavior
    */
-  void SetStopBehavior( DevelImageVisual::StopBehavior::Type stopBehavior );
+  void SetStopBehavior(DevelImageVisual::StopBehavior::Type stopBehavior);
 
   /**
    * @brief Sets the looping mode.
    * Animation plays forwards and then restarts from the beginning or runs backwards again.
    * @param[in] loopingMode The looping mode
    */
-  void SetLoopingMode( DevelImageVisual::LoopingMode::Type loopingMode );
+  void SetLoopingMode(DevelImageVisual::LoopingMode::Type loopingMode);
 
   /**
    * @brief Gets the frame number when the animation is stopped according to the stop behavior.
    */
-  uint32_t GetStoppedFrame( uint32_t startFrame, uint32_t endFrame, uint32_t currentFrame );
+  uint32_t GetStoppedFrame(uint32_t startFrame, uint32_t endFrame, uint32_t currentFrame);
 
   /**
    * @brief Applies the animation data set by the main thread.
@@ -273,47 +268,46 @@ private:
   void ApplyAnimationData();
 
   // Undefined
-  VectorAnimationTask( const VectorAnimationTask& task ) = delete;
+  VectorAnimationTask(const VectorAnimationTask& task) = delete;
 
   // Undefined
-  VectorAnimationTask& operator=( const VectorAnimationTask& task ) = delete;
+  VectorAnimationTask& operator=(const VectorAnimationTask& task) = delete;
 
 private:
-
   enum class PlayState
   {
-    STOPPING,  ///< The animation is stopping
-    STOPPED,   ///< The animation has stopped
-    PLAYING,   ///< The animation is playing
-    PAUSED     ///< The animation is paused
+    STOPPING, ///< The animation is stopping
+    STOPPED,  ///< The animation has stopped
+    PLAYING,  ///< The animation is playing
+    PAUSED    ///< The animation is paused
   };
 
-  std::string                            mUrl;
-  VectorAnimationRenderer                mVectorRenderer;
-  AnimationData                          mAnimationData[2];
-  VectorAnimationThread&                 mVectorAnimationThread;
-  ConditionalWait                        mConditionalWait;
-  std::unique_ptr< EventThreadCallback > mAnimationFinishedTrigger;
-  PlayState                              mPlayState;
-  DevelImageVisual::StopBehavior::Type   mStopBehavior;
-  DevelImageVisual::LoopingMode::Type    mLoopingMode;
-  std::chrono::time_point< std::chrono::system_clock > mNextFrameStartTime;
-  int64_t                                mFrameDurationNanoSeconds;
-  float                                  mFrameRate;
-  uint32_t                               mCurrentFrame;
-  uint32_t                               mTotalFrame;
-  uint32_t                               mStartFrame;
-  uint32_t                               mEndFrame;
-  uint32_t                               mWidth;
-  uint32_t                               mHeight;
-  uint32_t                               mAnimationDataIndex;
-  int32_t                                mLoopCount;
-  int32_t                                mCurrentLoop;
-  bool                                   mForward;
-  bool                                   mUpdateFrameNumber;
-  bool                                   mNeedAnimationFinishedTrigger;
-  bool                                   mAnimationDataUpdated;
-  bool                                   mDestroyTask;
+  std::string                                        mUrl;
+  VectorAnimationRenderer                            mVectorRenderer;
+  AnimationData                                      mAnimationData[2];
+  VectorAnimationThread&                             mVectorAnimationThread;
+  ConditionalWait                                    mConditionalWait;
+  std::unique_ptr<EventThreadCallback>               mAnimationFinishedTrigger;
+  PlayState                                          mPlayState;
+  DevelImageVisual::StopBehavior::Type               mStopBehavior;
+  DevelImageVisual::LoopingMode::Type                mLoopingMode;
+  std::chrono::time_point<std::chrono::system_clock> mNextFrameStartTime;
+  int64_t                                            mFrameDurationNanoSeconds;
+  float                                              mFrameRate;
+  uint32_t                                           mCurrentFrame;
+  uint32_t                                           mTotalFrame;
+  uint32_t                                           mStartFrame;
+  uint32_t                                           mEndFrame;
+  uint32_t                                           mWidth;
+  uint32_t                                           mHeight;
+  uint32_t                                           mAnimationDataIndex;
+  int32_t                                            mLoopCount;
+  int32_t                                            mCurrentLoop;
+  bool                                               mForward;
+  bool                                               mUpdateFrameNumber;
+  bool                                               mNeedAnimationFinishedTrigger;
+  bool                                               mAnimationDataUpdated;
+  bool                                               mDestroyTask;
 };
 
 } // namespace Internal
index b6cce85..86fec43 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_VECTOR_ANIMATION_THREAD_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <memory>
-#include <dali/public-api/signals/connection-tracker.h>
 #include <dali/devel-api/threading/conditional-wait.h>
 #include <dali/devel-api/threading/thread.h>
 #include <dali/integration-api/adaptor-framework/log-factory-interface.h>
+#include <dali/public-api/signals/connection-tracker.h>
+#include <memory>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/helpers/round-robin-container-view.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * The main animation thread for vector animations
  */
 class VectorAnimationThread : public Thread
 {
 public:
-
   /**
    * @brief Constructor.
    */
@@ -60,13 +56,13 @@ public:
    *
    * @param[in] task The task added to the thread.
    */
-  void AddTask( VectorAnimationTaskPtr task );
+  void AddTask(VectorAnimationTaskPtr task);
 
   /**
    * @brief Called when the rasterization is completed from the rasterize thread.
    * @param task The completed task
    */
-  void OnTaskCompleted( VectorAnimationTaskPtr task, bool stopped );
+  void OnTaskCompleted(VectorAnimationTaskPtr task, bool stopped);
 
   /**
    * @brief Called when the sleep thread is awaken.
@@ -74,21 +70,18 @@ public:
   void OnAwakeFromSleep();
 
 protected:
-
   /**
    * @brief The entry function of the animation thread.
    */
   void Run() override;
 
 private:
-
   /**
    * Rasterizes the tasks.
    */
   void Rasterize();
 
 private:
-
   /**
    * @brief Helper class to keep the relation between VectorRasterizeThread and corresponding container
    */
@@ -100,32 +93,31 @@ private:
      *
      * @param[in] animationThread Reference to the VectorAnimationThread
      */
-    RasterizeHelper( VectorAnimationThread& animationThread );
+    RasterizeHelper(VectorAnimationThread& animationThread);
 
     /**
      * @brief Rasterizes the task.
      *
      * @param[in] task The task to rasterize.
      */
-    void Rasterize( VectorAnimationTaskPtr task );
+    void Rasterize(VectorAnimationTaskPtr task);
 
   public:
-    RasterizeHelper( const RasterizeHelper& ) = delete;
-    RasterizeHelper& operator=( const RasterizeHelper& ) = delete;
+    RasterizeHelper(const RasterizeHelper&) = delete;
+    RasterizeHelper& operator=(const RasterizeHelper&) = delete;
 
-    RasterizeHelper( RasterizeHelper&& rhs );
-    RasterizeHelper& operator=( RasterizeHelper&& rhs ) = delete;
+    RasterizeHelper(RasterizeHelper&& rhs);
+    RasterizeHelper& operator=(RasterizeHelper&& rhs) = delete;
 
   private:
-
     /**
      * @brief Main constructor that used by all other constructors
      */
-    RasterizeHelper( std::unique_ptr< VectorRasterizeThread > rasterizer, VectorAnimationThread& animationThread );
+    RasterizeHelper(std::unique_ptr<VectorRasterizeThread> rasterizer, VectorAnimationThread& animationThread);
 
   private:
-    std::unique_ptr< VectorRasterizeThread > mRasterizer;
-    VectorAnimationThread&                   mAnimationThread;
+    std::unique_ptr<VectorRasterizeThread> mRasterizer;
+    VectorAnimationThread&                 mAnimationThread;
   };
 
   /**
@@ -134,11 +126,10 @@ private:
   class SleepThread : public Thread
   {
   public:
-
     /**
      * @brief Constructor.
      */
-    SleepThread( CallbackBase* callback );
+    SleepThread(CallbackBase* callback);
 
     /**
      * @brief Destructor.
@@ -148,49 +139,44 @@ private:
     /**
      * @brief Sleeps untile the specified time point.
      */
-    void SleepUntil( std::chrono::time_point< std::chrono::system_clock > timeToSleepUntil );
+    void SleepUntil(std::chrono::time_point<std::chrono::system_clock> timeToSleepUntil);
 
   protected:
-
     /**
      * @brief The entry function of the animation thread.
      */
     void Run() override;
 
   private:
-
-    SleepThread( const SleepThread& thread ) = delete;
-    SleepThread& operator=( const SleepThread& thread ) = delete;
+    SleepThread(const SleepThread& thread) = delete;
+    SleepThread& operator=(const SleepThread& thread) = delete;
 
   private:
-    ConditionalWait                  mConditionalWait;
-    std::unique_ptr< CallbackBase >  mAwakeCallback;
-    std::chrono::time_point< std::chrono::system_clock > mSleepTimePoint;
-    const Dali::LogFactoryInterface& mLogFactory;
-    bool                             mNeedToSleep;
-    bool                             mDestroyThread;
+    ConditionalWait                                    mConditionalWait;
+    std::unique_ptr<CallbackBase>                      mAwakeCallback;
+    std::chrono::time_point<std::chrono::system_clock> mSleepTimePoint;
+    const Dali::LogFactoryInterface&                   mLogFactory;
+    bool                                               mNeedToSleep;
+    bool                                               mDestroyThread;
   };
 
 private:
-
   // Undefined
-  VectorAnimationThread( const VectorAnimationThread& thread ) = delete;
+  VectorAnimationThread(const VectorAnimationThread& thread) = delete;
 
   // Undefined
-  VectorAnimationThread& operator=( const VectorAnimationThread& thread ) = delete;
+  VectorAnimationThread& operator=(const VectorAnimationThread& thread) = delete;
 
 private:
-
-  std::vector< VectorAnimationTaskPtr >      mAnimationTasks;
-  std::vector< VectorAnimationTaskPtr >      mCompletedTasks;
-  std::vector< VectorAnimationTaskPtr >      mWorkingTasks;
-  RoundRobinContainerView< RasterizeHelper > mRasterizers;
-  SleepThread                                mSleepThread;
-  ConditionalWait                            mConditionalWait;
-  bool                                       mNeedToSleep;
-  bool                                       mDestroyThread;
-  const Dali::LogFactoryInterface&           mLogFactory;
-
+  std::vector<VectorAnimationTaskPtr>      mAnimationTasks;
+  std::vector<VectorAnimationTaskPtr>      mCompletedTasks;
+  std::vector<VectorAnimationTaskPtr>      mWorkingTasks;
+  RoundRobinContainerView<RasterizeHelper> mRasterizers;
+  SleepThread                              mSleepThread;
+  ConditionalWait                          mConditionalWait;
+  bool                                     mNeedToSleep;
+  bool                                     mDestroyThread;
+  const Dali::LogFactoryInterface&         mLogFactory;
 };
 
 } // namespace Internal
index 6315d4d..25bd4e5 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_VECTOR_IMAGE_RASTERIZE_THREAD_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <vector>
-#include <memory>
 #include <dali/devel-api/threading/conditional-wait.h>
 #include <dali/devel-api/threading/thread.h>
 #include <dali/integration-api/adaptor-framework/log-factory-interface.h>
+#include <memory>
+#include <vector>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/visuals/animated-vector-image/vector-animation-task.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * The worker thread for vector image rasterization.
  */
 class VectorRasterizeThread : public Thread
 {
 public:
-
   /**
    * @brief Constructor.
    */
@@ -57,17 +53,16 @@ public:
    * The callback is called from the rasterize thread after the rasterization is completed.
    * @param[in] callBack  The function to call.
    */
-  void SetCompletedCallback( CallbackBase* callback );
+  void SetCompletedCallback(CallbackBase* callback);
 
   /**
    * Add a task to rasterize.
    *
    * @param[in] task The task to rasterize
    */
-  void AddTask( VectorAnimationTaskPtr task );
+  void AddTask(VectorAnimationTaskPtr task);
 
 protected:
-
   /**
    * @brief The entry function of the worker thread.
    *        It rasterizes the vector image.
@@ -75,29 +70,25 @@ protected:
   void Run() override;
 
 private:
-
   /**
    * Rasterizes the tasks.
    */
   void Rasterize();
 
 private:
-
   // Undefined
-  VectorRasterizeThread( const VectorRasterizeThread& thread ) = delete;
+  VectorRasterizeThread(const VectorRasterizeThread& thread) = delete;
 
   // Undefined
-  VectorRasterizeThread& operator=( const VectorRasterizeThread& thread ) = delete;
+  VectorRasterizeThread& operator=(const VectorRasterizeThread& thread) = delete;
 
 private:
-
-  std::vector< VectorAnimationTaskPtr > mRasterizeTasks;
-  ConditionalWait                       mConditionalWait;
-  std::unique_ptr< CallbackBase >       mCompletedCallback;
-  bool                                  mDestroyThread;  ///< Whether the thread be destroyed
-  bool                                  mIsThreadStarted;
-  const Dali::LogFactoryInterface&      mLogFactory; ///< The log factory
-
+  std::vector<VectorAnimationTaskPtr> mRasterizeTasks;
+  ConditionalWait                     mConditionalWait;
+  std::unique_ptr<CallbackBase>       mCompletedCallback;
+  bool                                mDestroyThread; ///< Whether the thread be destroyed
+  bool                                mIsThreadStarted;
+  const Dali::LogFactoryInterface&    mLogFactory; ///< The log factory
 };
 
 } // namespace Internal
index 9a8b1c5..4746351 100644 (file)
 #include <dali/public-api/common/intrusive-ptr.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/internal/visuals/visual-base-impl.h>
 #include <dali-toolkit/devel-api/visuals/arc-visual-properties-devel.h>
+#include <dali-toolkit/internal/visuals/visual-base-impl.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class ArcVisual;
-typedef IntrusivePtr< ArcVisual > ArcVisualPtr;
+typedef IntrusivePtr<ArcVisual> ArcVisualPtr;
 
 /**
  * The visual which renders an arc to the control's quad
@@ -49,10 +46,9 @@ typedef IntrusivePtr< ArcVisual > ArcVisualPtr;
  * | SWEEP_ANGLE     | FLOAT       |
  * | CAP             | INTEGER     |
  */
-class ArcVisual: public Visual::Base
+class ArcVisual : public Visual::Base
 {
 public:
-
   /**
    * @brief Create a new arc visual.
    *
@@ -60,28 +56,26 @@ public:
    * @param[in] properties A Property::Map containing settings for this visual
    * @return A smart-pointer to the newly allocated visual.
    */
-  static ArcVisualPtr New( VisualFactoryCache& factoryCache, const Property::Map& properties );
-
-public:  // from Visual
+  static ArcVisualPtr New(VisualFactoryCache& factoryCache, const Property::Map& properties);
 
+public: // from Visual
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  void DoCreatePropertyMap( Property::Map& map ) const override;
+  void DoCreatePropertyMap(Property::Map& map) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
+  void DoCreateInstancePropertyMap(Property::Map& map) const override;
 
 protected:
-
   /**
    * @brief Constructor.
    *
    * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
    */
-  ArcVisual( VisualFactoryCache& factoryCache );
+  ArcVisual(VisualFactoryCache& factoryCache);
 
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
@@ -96,12 +90,12 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  void DoSetProperties( const Property::Map& propertyMap ) override;
+  void DoSetProperties(const Property::Map& propertyMap) override;
 
   /**
    * @copydoc Visual::Base::DoSetOnScene
    */
-  void DoSetOnScene( Actor& actor ) override;
+  void DoSetOnScene(Actor& actor) override;
 
   /**
    * @copydoc Visual::Base::DoSetOffScene
@@ -116,27 +110,25 @@ protected:
   /**
    * @copydoc Visual::Base::OnDoAction
    */
-  void OnDoAction( const Property::Index actionId, const Property::Value& attributes ) override;
+  void OnDoAction(const Property::Index actionId, const Property::Value& attributes) override;
 
 private:
-
   // Undefined
-  ArcVisual( const ArcVisual& arcVisual ) = delete;
+  ArcVisual(const ArcVisual& arcVisual) = delete;
 
   // Undefined
-  ArcVisual& operator=( const ArcVisual& arcVisual ) = delete;
+  ArcVisual& operator=(const ArcVisual& arcVisual) = delete;
 
 private:
-
-  float mThickness;                    ///< The thickness of the arc.
-  float mRadius;                       ///< The radius of the arc.
-  float mStartAngle;                   ///< The start angle of the arc.
-  float mSweepAngle;                   ///< The sweep angle of the arc.
-  Property::Index mRadiusIndex;        ///< The index of the radius property.
-  Property::Index mThicknessIndex;     ///< The index of the thickness property.
-  Property::Index mStartAngleIndex;    ///< The index of the start angle property.
-  Property::Index mSweepAngleIndex;    ///< The index of the sweep angle property.
-  DevelArcVisual::Cap::Type mCapType;  ///< The cap type.
+  float                     mThickness;       ///< The thickness of the arc.
+  float                     mRadius;          ///< The radius of the arc.
+  float                     mStartAngle;      ///< The start angle of the arc.
+  float                     mSweepAngle;      ///< The sweep angle of the arc.
+  Property::Index           mRadiusIndex;     ///< The index of the radius property.
+  Property::Index           mThicknessIndex;  ///< The index of the thickness property.
+  Property::Index           mStartAngleIndex; ///< The index of the start angle property.
+  Property::Index           mSweepAngleIndex; ///< The index of the sweep angle property.
+  DevelArcVisual::Cap::Type mCapType;         ///< The cap type.
 };
 
 } // namespace Internal
index 15cb5bf..42ebe69 100644 (file)
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/rendering/geometry.h>
 #include <dali/public-api/common/intrusive-ptr.h>
+#include <dali/public-api/rendering/geometry.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/visuals/visual-base-impl.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class BorderVisual;
-typedef IntrusivePtr< BorderVisual > BorderVisualPtr;
+typedef IntrusivePtr<BorderVisual> BorderVisualPtr;
 
 /**
  * The visual which renders a solid color to the control's quad border fixed to a specified size.
@@ -51,7 +48,6 @@ typedef IntrusivePtr< BorderVisual > BorderVisualPtr;
 class BorderVisual : public Visual::Base
 {
 public:
-
   /**
    * @brief Create a new border visual.
    *
@@ -59,16 +55,15 @@ public:
    * @param[in] properties A Property::Map containing settings for this visual
    * @return A smart-pointer to the newly allocated visual.
    */
-  static BorderVisualPtr New( VisualFactoryCache& factoryCache, const Property::Map& properties );
+  static BorderVisualPtr New(VisualFactoryCache& factoryCache, const Property::Map& properties);
 
 protected:
-
   /**
    * @brief Constructor.
    *
    * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
    */
-  BorderVisual( VisualFactoryCache& factoryCache );
+  BorderVisual(VisualFactoryCache& factoryCache);
 
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
@@ -83,22 +78,22 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  void DoSetProperties( const Property::Map& propertyMap ) override;
+  void DoSetProperties(const Property::Map& propertyMap) override;
 
   /**
    * @copydoc Visual::Base::DoSetOnScene
    */
-  void DoSetOnScene( Actor& actor ) override;
+  void DoSetOnScene(Actor& actor) override;
 
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  void DoCreatePropertyMap( Property::Map& map ) const override;
+  void DoCreatePropertyMap(Property::Map& map) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
+  void DoCreateInstancePropertyMap(Property::Map& map) const override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
@@ -106,7 +101,6 @@ protected:
   void OnSetTransform() override;
 
 private:
-
   /**
    * Request the border shader from the factory cache. If fail, create tha shader and add it to cache.
    * @return The border shader.
@@ -124,16 +118,15 @@ private:
    * @param[in] index The index key of the value
    * @param[in] value The value
    */
-  void DoSetProperty( Property::Index index, const Property::Value& value );
+  void DoSetProperty(Property::Index index, const Property::Value& value);
 
   // Undefined
-  BorderVisual( const BorderVisual& borderRenderer );
+  BorderVisual(const BorderVisual& borderRenderer);
 
   // Undefined
-  BorderVisual& operator=( const BorderVisual& borderRenderer );
+  BorderVisual& operator=(const BorderVisual& borderRenderer);
 
 private:
-
   Vector4 mBorderColor;
   float   mBorderSize;
 
index 11e43d3..ba9a590 100644 (file)
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class ColorVisual;
-typedef IntrusivePtr< ColorVisual > ColorVisualPtr;
+typedef IntrusivePtr<ColorVisual> ColorVisualPtr;
 
 /**
  * The visual which renders a solid color to the control's quad
@@ -45,10 +42,9 @@ typedef IntrusivePtr< ColorVisual > ColorVisualPtr;
  * |-----------------|-------------|
  * | mixColor        | VECTOR4     |
  */
-class ColorVisual: public Visual::Base
+class ColorVisual : public Visual::Base
 {
 public:
-
   /**
    * @brief Create a new color visual.
    *
@@ -56,28 +52,26 @@ public:
    * @param[in] properties A Property::Map containing settings for this visual
    * @return A smart-pointer to the newly allocated visual.
    */
-  static ColorVisualPtr New( VisualFactoryCache& factoryCache, const Property::Map& properties );
-
-public:  // from Visual
+  static ColorVisualPtr New(VisualFactoryCache& factoryCache, const Property::Map& properties);
 
+public: // from Visual
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  void DoCreatePropertyMap( Property::Map& map ) const override;
+  void DoCreatePropertyMap(Property::Map& map) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
+  void DoCreateInstancePropertyMap(Property::Map& map) const override;
 
 protected:
-
   /**
    * @brief Constructor.
    *
    * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
    */
-  ColorVisual( VisualFactoryCache& factoryCache );
+  ColorVisual(VisualFactoryCache& factoryCache);
 
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
@@ -92,12 +86,12 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  void DoSetProperties( const Property::Map& propertyMap ) override;
+  void DoSetProperties(const Property::Map& propertyMap) override;
 
   /**
    * @copydoc Visual::Base::DoSetOnScene
    */
-  void DoSetOnScene( Actor& actor ) override;
+  void DoSetOnScene(Actor& actor) override;
 
   /**
    * @copydoc Visual::Base::DoSetOffScene
@@ -112,7 +106,7 @@ protected:
   /**
    * @copydoc Visual::Base::OnDoAction
    */
-  void OnDoAction( const Property::Index actionId, const Property::Value& attributes ) override;
+  void OnDoAction(const Property::Index actionId, const Property::Value& attributes) override;
 
   /**
    * @copydoc Visual::Base::UpdateShader
@@ -125,7 +119,6 @@ protected:
   Dali::Property OnGetPropertyObject(Dali::Property::Key key) override;
 
 private:
-
   /**
    * @brief Get a shader for the current properties.
    * @return The shader for the current properties.
@@ -133,12 +126,11 @@ private:
   Shader GetShader();
 
 private:
-
   // Undefined
-  ColorVisual( const ColorVisual& colorRenderer );
+  ColorVisual(const ColorVisual& colorRenderer);
 
   // Undefined
-  ColorVisual& operator=( const ColorVisual& colorRenderer );
+  ColorVisual& operator=(const ColorVisual& colorRenderer);
 
 private:
   float           mBlurRadius;          ///< The blur radius
index fdd458b..0dde8b4 100644 (file)
@@ -22,8 +22,8 @@
 #include <dali/public-api/common/intrusive-ptr.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/internal/visuals/visual-base-impl.h>
 #include <dali-toolkit/internal/visuals/gradient/gradient.h>
+#include <dali-toolkit/internal/visuals/visual-base-impl.h>
 
 namespace Dali
 {
@@ -31,13 +31,11 @@ class Vector2;
 
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class Gradient;
 class GradientVisual;
-typedef IntrusivePtr< GradientVisual > GradientVisualPtr;
+typedef IntrusivePtr<GradientVisual> GradientVisualPtr;
 
 /**
  * The visual which renders smooth transition of colors to the control's quad.
@@ -71,10 +69,9 @@ typedef IntrusivePtr< GradientVisual > GradientVisualPtr;
  * Valid values for spreadMethod are 'pad', 'repeat' and 'reflect.'
  * If not provided, 'objectBoundingBox' is used as default gradient units, and 'pad' is used as default spread method.
  */
-class GradientVisual: public Visual::Base
+class GradientVisual : public Visual::Base
 {
 public:
-
   /**
    * Types of the gradient
    */
@@ -91,28 +88,26 @@ public:
    * @param[in] properties A Property::Map containing settings for this visual
    * @return A smart-pointer to the newly allocated visual.
    */
-  static GradientVisualPtr New( VisualFactoryCache& factoryCache, const Property::Map& properties );
-
-public:  // from Visual
+  static GradientVisualPtr New(VisualFactoryCache& factoryCache, const Property::Map& properties);
 
+public: // from Visual
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  void DoCreatePropertyMap( Property::Map& map ) const override;
+  void DoCreatePropertyMap(Property::Map& map) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
+  void DoCreateInstancePropertyMap(Property::Map& map) const override;
 
 protected:
-
   /**
    * @brief Constructor.
    *
    * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
    */
-  GradientVisual( VisualFactoryCache& factoryCache );
+  GradientVisual(VisualFactoryCache& factoryCache);
 
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
@@ -127,7 +122,7 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  void DoSetProperties( const Property::Map& propertyMap ) override;
+  void DoSetProperties(const Property::Map& propertyMap) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
@@ -137,7 +132,7 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetOnScene
    */
-  void DoSetOnScene( Actor& actor ) override;
+  void DoSetOnScene(Actor& actor) override;
 
   /**
    * @copydoc Visual::Base::UpdateShader
@@ -145,7 +140,6 @@ protected:
   void UpdateShader() override;
 
 private:
-
   /**
    * New a gradient object with the given property map.
    *
@@ -169,17 +163,16 @@ private:
   static void GetStopOffsets(const Property::Value* value, Vector<float>& stopOffsets);
 
   // Undefined
-  GradientVisual( const GradientVisual& gradientVisual );
+  GradientVisual(const GradientVisual& gradientVisual);
 
   // Undefined
-  GradientVisual& operator=( const GradientVisual& gradientVisual );
+  GradientVisual& operator=(const GradientVisual& gradientVisual);
 
 private:
-
-  Matrix3 mGradientTransform;
+  Matrix3                mGradientTransform;
   IntrusivePtr<Gradient> mGradient;
-  Type mGradientType;
-  bool mIsOpaque; ///< Set to false if any of the stop colors are not opaque
+  Type                   mGradientType;
+  bool                   mIsOpaque; ///< Set to false if any of the stop colors are not opaque
 };
 
 } // namespace Internal
index f6e77ba..f1b154e 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_GRADIENT_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 class Vector4;
 
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * Gradients consist of continuously smooth color transitions along a vector from one color to another,
  * possibly followed by additional transitions along the same vector to other colors.
@@ -45,27 +42,27 @@ namespace Internal
 class Gradient : public RefObject
 {
 public:
-
   /**
    * The stop node tells the gradient what color it should be at certain position.
    */
   struct GradientStop
   {
-    GradientStop( float offset, const Vector4& color )
-    : mOffset( offset ), mStopColor( color )
-    {}
+    GradientStop(float offset, const Vector4& color)
+    : mOffset(offset),
+      mStopColor(color)
+    {
+    }
 
     bool operator<(const GradientStop& rhs) const
     {
       return mOffset < rhs.mOffset;
     }
 
-    float   mOffset;     // A value ranging from 0 to 1 to indicate where the gradient stop is placed.
-    Vector4 mStopColor;  // The color to use at this gradient stop
+    float   mOffset;    // A value ranging from 0 to 1 to indicate where the gradient stop is placed.
+    Vector4 mStopColor; // The color to use at this gradient stop
   };
 
 public:
-
   /**
    * Add a gradient stop.
    *
@@ -84,7 +81,7 @@ public:
    * Set the coordinate system used by the gradient attributes.
    * @param[in] gradientUnits The the attributes are defined using the current user coordinate system or the bounding box of the shape.
    */
-  void SetGradientUnits( Toolkit::GradientVisual::Units::Type gradientUnits );
+  void SetGradientUnits(Toolkit::GradientVisual::Units::Type gradientUnits);
 
   /**
    * Get the coordinate system used by the gradient attributes.
@@ -98,7 +95,7 @@ public:
    *
    * @param[in] spread The method to fill the remainder of target region which is outside the gradient bounds
    */
-  void SetSpreadMethod( Toolkit::GradientVisual::SpreadMethod::Type spread );
+  void SetSpreadMethod(Toolkit::GradientVisual::SpreadMethod::Type spread);
 
   /**
    * Get the filling method for the the remainder of target region which is outside the gradient boun.
@@ -119,7 +116,6 @@ public:
   Dali::Texture GenerateLookupTexture();
 
 private:
-
   /**
    * Estimate the resolution of the lookup texture.
    * Note: Only call this function after the gradient stops are sorted in order.
@@ -127,7 +123,6 @@ private:
   unsigned int EstimateTextureResolution();
 
 protected:
-
   /**
    * Construct a new Gradient object
    * Called in the constructor of subclasses
@@ -140,18 +135,16 @@ protected:
   virtual ~Gradient();
 
   // Undefined
-  Gradient( const Gradient& gradient );
+  Gradient(const Gradient& gradient);
 
   // Undefined
-  Gradient& operator=( const Gradient& handle );
+  Gradient& operator=(const Gradient& handle);
 
 protected:
-
   Vector<GradientStop>                        mGradientStops;
   Matrix3                                     mAlignmentTransform;
   Toolkit::GradientVisual::Units::Type        mGradientUnits;
   Toolkit::GradientVisual::SpreadMethod::Type mSpreadMethod;
-
 };
 
 } // namespace Internal
index 187c244..28ab7cc 100644 (file)
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * Linear gradients change color evenly along a straight line.
  * The gradient is defined by an axis (the gradient line) at any specified angles.
@@ -38,13 +35,12 @@ namespace Internal
 class LinearGradient : public Gradient
 {
 public:
-
   /**
    * Constructor.
    * @param[in] startPosition The starting point onto which the 0% gradient stops are mapped.
    * @param[in] endPosition The ending point r onto which the 100% gradient stops are mapped.
    */
-  LinearGradient( const Vector2& startPosition, const Vector2& endPosition );
+  LinearGradient(const Vector2& startPosition, const Vector2& endPosition);
 
   /**
    * Destructor.
@@ -56,7 +52,7 @@ public:
    * @param[in] startPosition The starting point of the gradient vector.
    * @param[in] endPosition The ending point of the gradient vector.
    */
-  void SetStartAndEndPosition( const Vector2& startPosition, const Vector2& endPosition );
+  void SetStartAndEndPosition(const Vector2& startPosition, const Vector2& endPosition);
 
   /**
    * Get the stating point of the gradient vector.
@@ -71,15 +67,13 @@ public:
   const Vector2& GetEndPosition() const;
 
 private:
-
   // Undefined
-  LinearGradient( const LinearGradient& gradient );
+  LinearGradient(const LinearGradient& gradient);
 
   // Undefined
-  LinearGradient& operator=( const LinearGradient& handle );
+  LinearGradient& operator=(const LinearGradient& handle);
 
 private:
-
   Vector2 mStartPosition;
   Vector2 mEndPosition;
 };
index 6e2e35e..6276281 100644 (file)
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * Radial gradients change color circularly.
  * The color transition starts from the center of the circle and distribute outwardly.
@@ -38,13 +35,12 @@ namespace Internal
 class RadialGradient : public Gradient
 {
 public:
-
   /**
    * Contructor.
    * @param[in] center The center of the gradient circle onto which the 0% gradient stop is mapped.
    * @param[in] radius The radius of the outmost circle onto which the 100% gradient stop is mapped.
    */
-  RadialGradient( const Vector2& center, float radius );
+  RadialGradient(const Vector2& center, float radius);
 
   /**
    * Destructor.
@@ -56,7 +52,7 @@ public:
    * @param[in] center The center of the gradient circle onto which the 0% gradient stop is mapped.
    * @param[in] radius The radius of the outmost circle onto which the 100% gradient stop is mapped.
    */
-  void SetCenterAndRadius( const Vector2& center, float radius );
+  void SetCenterAndRadius(const Vector2& center, float radius);
 
   /**
    * Get the center of the gradient circle.
@@ -71,15 +67,13 @@ public:
   float GetRadius() const;
 
 private:
-
   // Undefined
-  RadialGradient( const RadialGradient& gradient );
+  RadialGradient(const RadialGradient& gradient);
 
   // Undefined
-  RadialGradient& operator=( const RadialGradient& handle );
+  RadialGradient& operator=(const RadialGradient& handle);
 
 private:
-
   Vector2 mCenter;
   float   mRadius;
 };
index 45e2a54..3c2f52c 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_IMAGE_ATLAS_MANAGER_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <string>
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/object/ref-object.h>
 #include <dali/public-api/rendering/texture-set.h>
+#include <string>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/image-loader/image-atlas.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 class AtlasUploadObserver;
 
 namespace Internal
 {
-
 /**
  * The manager for automatic image atlasing. Owned by VisualFactory
  */
 class ImageAtlasManager : public RefObject
 {
 public:
-  typedef std::vector< Toolkit::ImageAtlas > AtlasContainer;
-  typedef std::vector< TextureSet > TextureSetContainer;
+  typedef std::vector<Toolkit::ImageAtlas> AtlasContainer;
+  typedef std::vector<TextureSet>          TextureSetContainer;
 
 public:
-
   /**
    * Construtor
    *
@@ -70,12 +66,12 @@ public:
    * @param [in] atlasUploadObserver The object to observe the uploading state inside ImageAtlas.
    * @return The texture set containing the image.
    */
-  TextureSet Add( Vector4& textureRect,
-                  const std::string& url,
-                  ImageDimensions& size,
-                  FittingMode::Type fittingMode = FittingMode::DEFAULT,
-                  bool orientationCorrection = true,
-                  AtlasUploadObserver* atlasUploadObserver = NULL );
+  TextureSet Add(Vector4&             textureRect,
+                 const std::string&   url,
+                 ImageDimensions&     size,
+                 FittingMode::Type    fittingMode           = FittingMode::DEFAULT,
+                 bool                 orientationCorrection = true,
+                 AtlasUploadObserver* atlasUploadObserver   = NULL);
   /**
    * @brief Add a pixel buffer to the atlas
    *
@@ -83,8 +79,8 @@ public:
    * @param [in] pixelData The pixel data.
    * @return The texture set containing the image.
    */
-  TextureSet Add( Vector4& textureRect,
-                  PixelData pixelData );
+  TextureSet Add(Vector4&  textureRect,
+                 PixelData pixelData);
 
   /**
    * Remove the image at the given rectangle from the texture set.
@@ -92,14 +88,14 @@ public:
    * @param [in] textureSet The texture set containing the atlas image.
    * @param [in] textureRect The texture area to be removed.
    */
-  void Remove( TextureSet textureSet, const Vector4& textureRect );
+  void Remove(TextureSet textureSet, const Vector4& textureRect);
 
   /**
    * @brief Set the broken image which is used to replace the image if loading fails.
    *
    * @param[in] brokenImageUrl The url of the broken image.
    */
-  void SetBrokenImage( const std::string& brokenImageUrl );
+  void SetBrokenImage(const std::string& brokenImageUrl);
 
   /**
    * @brief Get shader
@@ -107,7 +103,6 @@ public:
   Shader GetShader() const;
 
 private:
-
   /**
    * @brief Create a new atlas.
    *
@@ -116,7 +111,6 @@ private:
   void CreateNewAtlas();
 
 protected:
-
   /**
    * Destructor
    */
@@ -132,16 +126,13 @@ protected:
    */
   ImageAtlasManager& operator=(const ImageAtlasManager& rhs);
 
-
 private:
-
-  AtlasContainer    mAtlasList;
+  AtlasContainer      mAtlasList;
   TextureSetContainer mTextureSetList;
-  std::string       mBrokenImageUrl;
-
+  std::string         mBrokenImageUrl;
 };
 
-} // name Internal
+} // namespace Internal
 
 } // namespace Toolkit
 
index 6d38fbd..8ed50a6 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_IMAGE_VISUAL_SHADER_FACTORY_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * ImageVisualShaderFactory is an object that provides and shares shaders between image visuals
  */
 class ImageVisualShaderFactory
 {
 public:
-
-public:
-
   /**
    * @brief Constructor
    */
@@ -58,7 +52,7 @@ public:
    * @param[in] defaultTextureWrapping Whether the default texture wrap mode is applied.
    * @param[in] roundedCorner Whether the rounded corder is applied.
    */
-  Shader GetShader( VisualFactoryCache& factoryCache, bool atlasing, bool defaultTextureWrapping, bool roundedCorner );
+  Shader GetShader(VisualFactoryCache& factoryCache, bool atlasing, bool defaultTextureWrapping, bool roundedCorner);
 
   /**
    * Request the default vertex shader source.
@@ -73,7 +67,6 @@ public:
   std::string_view GetFragmentShaderSource();
 
 protected:
-
   /**
    * Undefined copy constructor.
    */
index f40cf70..598660f 100644 (file)
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/image-loader/atlas-upload-observer.h>
+#include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
 #include <dali-toolkit/internal/visuals/texture-upload-observer.h>
 #include <dali-toolkit/internal/visuals/visual-base-impl.h>
 #include <dali-toolkit/internal/visuals/visual-url.h>
-#include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
 #include <dali-toolkit/public-api/visuals/image-visual-properties.h>
 
 namespace Dali
 {
-
 class NativeImage;
 
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class ImageVisualShaderFactory;
 class ImageVisual;
-typedef IntrusivePtr< ImageVisual > ImageVisualPtr;
+typedef IntrusivePtr<ImageVisual> ImageVisualPtr;
 
 /**
  * The visual which renders an image to a quad geometry
@@ -110,10 +107,9 @@ typedef IntrusivePtr< ImageVisual > ImageVisualPtr;
  * If the Visual is in a LayerUI it will pixel align the image, using a Layer3D will disable pixel alignment.
  * Changing layer behaviour between LayerUI to Layer3D whilst the visual is already staged will not have an effect.
  */
-class ImageVisual: public Visual::Base, public ConnectionTracker, public AtlasUploadObserver, public TextureUploadObserver
+class ImageVisual : public Visual::Base, public ConnectionTracker, public AtlasUploadObserver, public TextureUploadObserver
 {
 public:
-
   /**
    * @brief Create a new image visual with a URL.
    *
@@ -128,13 +124,13 @@ public:
    * @param[in] samplingMode The SamplingMode of the resource to load
    * @return A smart-pointer to the newly allocated visual.
    */
-  static ImageVisualPtr New( VisualFactoryCache& factoryCache,
-                             ImageVisualShaderFactory& shaderFactory,
-                             const VisualUrl& imageUrl,
-                             const Property::Map& properties,
-                             ImageDimensions size = ImageDimensions(),
-                             FittingMode::Type fittingMode = FittingMode::DEFAULT,
-                             Dali::SamplingMode::Type samplingMode = SamplingMode::BOX_THEN_LINEAR );
+  static ImageVisualPtr New(VisualFactoryCache&       factoryCache,
+                            ImageVisualShaderFactory& shaderFactory,
+                            const VisualUrl&          imageUrl,
+                            const Property::Map&      properties,
+                            ImageDimensions           size         = ImageDimensions(),
+                            FittingMode::Type         fittingMode  = FittingMode::DEFAULT,
+                            Dali::SamplingMode::Type  samplingMode = SamplingMode::BOX_THEN_LINEAR);
 
   /**
    * @brief Create a new image visual with a URL.
@@ -149,37 +145,35 @@ public:
    * @param[in] samplingMode The SamplingMode of the resource to load
    * @return A smart-pointer to the newly allocated visual.
    */
-  static ImageVisualPtr New( VisualFactoryCache& factoryCache,
-                             ImageVisualShaderFactory& shaderFactory,
-                             const VisualUrl& imageUrl,
-                             ImageDimensions size = ImageDimensions(),
-                             FittingMode::Type fittingMode = FittingMode::DEFAULT,
-                             Dali::SamplingMode::Type samplingMode = SamplingMode::BOX_THEN_LINEAR );
-
-public:  // from Visual
-
+  static ImageVisualPtr New(VisualFactoryCache&       factoryCache,
+                            ImageVisualShaderFactory& shaderFactory,
+                            const VisualUrl&          imageUrl,
+                            ImageDimensions           size         = ImageDimensions(),
+                            FittingMode::Type         fittingMode  = FittingMode::DEFAULT,
+                            Dali::SamplingMode::Type  samplingMode = SamplingMode::BOX_THEN_LINEAR);
+
+public: // from Visual
   /**
    * @copydoc Visual::Base::GetNaturalSize
    */
-  void GetNaturalSize( Vector2& naturalSize ) override;
+  void GetNaturalSize(Vector2& naturalSize) override;
 
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  void DoCreatePropertyMap( Property::Map& map ) const override;
+  void DoCreatePropertyMap(Property::Map& map) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
+  void DoCreateInstancePropertyMap(Property::Map& map) const override;
 
   /**
    * @copydoc Visual::Base::OnDoAction
    */
-  void OnDoAction( const Dali::Property::Index actionName, const Dali::Property::Value& attributes ) override;
+  void OnDoAction(const Dali::Property::Index actionName, const Dali::Property::Value& attributes) override;
 
 protected:
-
   /**
    * @brief Constructor with a URL.
    *
@@ -192,12 +186,12 @@ protected:
    * @param[in] fittingMode The FittingMode of the resource to load
    * @param[in] samplingMode The SamplingMode of the resource to load
    */
-  ImageVisual( VisualFactoryCache& factoryCache,
-               ImageVisualShaderFactory& shaderFactory,
-               const VisualUrl& imageUrl,
-               ImageDimensions size,
-               FittingMode::Type fittingMode,
-               Dali::SamplingMode::Type samplingMode );
+  ImageVisual(VisualFactoryCache&       factoryCache,
+              ImageVisualShaderFactory& shaderFactory,
+              const VisualUrl&          imageUrl,
+              ImageDimensions           size,
+              FittingMode::Type         fittingMode,
+              Dali::SamplingMode::Type  samplingMode);
 
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
@@ -212,17 +206,17 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  void DoSetProperties( const Property::Map& propertyMap ) override;
+  void DoSetProperties(const Property::Map& propertyMap) override;
 
   /**
    * @copydoc Visual::Base::DoSetOnScene
    */
-  void DoSetOnScene( Actor& actor ) override;
+  void DoSetOnScene(Actor& actor) override;
 
   /**
    * @copydoc Visual::Base::DoSetOffScene
    */
-  void DoSetOffScene( Actor& actor ) override;
+  void DoSetOffScene(Actor& actor) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
@@ -240,7 +234,6 @@ protected:
   void UpdateShader() override;
 
 public:
-
   /**
    * @copydoc AtlasUploadObserver::UploadCompleted
    *
@@ -255,18 +248,18 @@ public:
    * To avoid rendering garbage pixels, renderer should be added to actor after the resources are ready.
    * This callback is the place to add the renderer as it would be called once the loading is finished.
    */
-  void UploadComplete( bool success, int32_t textureId, TextureSet textureSet,
-                       bool usingAtlas, const Vector4& atlasRectangle, bool preMultiplied ) override;
+  void UploadComplete(bool success, int32_t textureId, TextureSet textureSet, bool usingAtlas, const Vector4& atlasRectangle, bool preMultiplied) override;
 
 private:
-
   /**
    * @copydoc TextureUploadObserver::LoadComplete
    *
    * To avoid rendering garbage pixels, renderer should be added to actor after the resources are ready.
    * This callback is the place to add the renderer as it would be called once the PixelBuffer loading is finished.
    */
-  void LoadComplete( bool loadSuccess, Devel::PixelBuffer pixelBuffer, const VisualUrl& url, bool preMultiplied ) override {}
+  void LoadComplete(bool loadSuccess, Devel::PixelBuffer pixelBuffer, const VisualUrl& url, bool preMultiplied) override
+  {
+  }
 
   /**
    * Allocate the mask data when a masking property is defined in the property map
@@ -281,7 +274,7 @@ private:
    * @param[in] orientationCorrection flag determines if orientation correction should be performed
    * @param[in] forceReload flag determines if the texture should be reloaded from its source or use the cached texture.
    */
-  void LoadTexture( bool& atlasing, Vector4& atlasRect, TextureSet& textures, bool orientationCorrection, TextureManager::ReloadPolicy forceReload );
+  void LoadTexture(bool& atlasing, Vector4& atlasRect, TextureSet& textures, bool orientationCorrection, TextureManager::ReloadPolicy forceReload);
 
   /**
    * @brief Checks if atlasing should be attempted
@@ -302,13 +295,13 @@ private:
    * @param[in] attemptAtlasing If true will attempt atlasing, otherwise create unique texture
    * @return the texture set to use
    */
-  TextureSet CreateTextureSet( Vector4& textureRect, bool synchronousLoading, bool attemptAtlasing );
+  TextureSet CreateTextureSet(Vector4& textureRect, bool synchronousLoading, bool attemptAtlasing);
 
   /**
    * Set the value to the uTextureRect uniform
    * @param[in] textureRect The texture rectangular area.
    */
-  void SetTextureRectUniform( const Vector4& textureRect  );
+  void SetTextureRectUniform(const Vector4& textureRect);
 
   /**
    * Remove texture with valid TextureId
@@ -320,7 +313,7 @@ private:
    * @param[in] index The index key of the value
    * @param[in] value The value
    */
-  void DoSetProperty( Property::Index index, const Property::Value& value );
+  void DoSetProperty(Property::Index index, const Property::Value& value);
 
   /**
    * @brief Get a shader for the current properties.
@@ -329,29 +322,28 @@ private:
   Shader GetShader();
 
 private:
-
-  Vector4 mPixelArea;
-  WeakHandle<Actor> mPlacementActor;
-  VisualUrl mImageUrl;
+  Vector4                            mPixelArea;
+  WeakHandle<Actor>                  mPlacementActor;
+  VisualUrl                          mImageUrl;
   TextureManager::MaskingDataPointer mMaskingData;
 
-  Dali::ImageDimensions mDesiredSize;
+  Dali::ImageDimensions     mDesiredSize;
   TextureManager::TextureId mTextureId;
-  TextureSet mTextures;
+  TextureSet                mTextures;
 
   ImageVisualShaderFactory& mImageVisualShaderFactory;
 
-  Dali::FittingMode::Type mFittingMode:3;
-  Dali::SamplingMode::Type mSamplingMode:4;
-  Dali::WrapMode::Type mWrapModeU:3;
-  Dali::WrapMode::Type mWrapModeV:3;
-  Dali::Toolkit::ImageVisual::LoadPolicy::Type mLoadPolicy;
+  Dali::FittingMode::Type                         mFittingMode : 3;
+  Dali::SamplingMode::Type                        mSamplingMode : 4;
+  Dali::WrapMode::Type                            mWrapModeU : 3;
+  Dali::WrapMode::Type                            mWrapModeV : 3;
+  Dali::Toolkit::ImageVisual::LoadPolicy::Type    mLoadPolicy;
   Dali::Toolkit::ImageVisual::ReleasePolicy::Type mReleasePolicy;
-  Vector4 mAtlasRect;
-  Dali::ImageDimensions mAtlasRectSize;
-  TextureManager::LoadState                       mLoadState;       ///< The texture loading state
-  bool mAttemptAtlasing; ///< If true will attempt atlasing, otherwise create unique texture
-  bool mOrientationCorrection; ///< true if the image will have it's orientation corrected.
+  Vector4                                         mAtlasRect;
+  Dali::ImageDimensions                           mAtlasRectSize;
+  TextureManager::LoadState                       mLoadState;             ///< The texture loading state
+  bool                                            mAttemptAtlasing;       ///< If true will attempt atlasing, otherwise create unique texture
+  bool                                            mOrientationCorrection; ///< true if the image will have it's orientation corrected.
 };
 
 } // namespace Internal
index 3cc1d66..d4765e9 100644 (file)
  */
 
 // EXTERNAL INCLUDES
-#include <fstream>
-#include <string.h>
 #include <dali/public-api/common/intrusive-ptr.h>
+#include <string.h>
+#include <fstream>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/visuals/mesh-visual-properties.h>
-#include <dali-toolkit/internal/visuals/visual-base-impl.h>
 #include <dali-toolkit/internal/controls/model3d-view/obj-loader.h>
+#include <dali-toolkit/internal/visuals/visual-base-impl.h>
+#include <dali-toolkit/public-api/visuals/mesh-visual-properties.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class MeshVisual;
-typedef IntrusivePtr< MeshVisual > MeshVisualPtr;
+typedef IntrusivePtr<MeshVisual> MeshVisualPtr;
 
 /**
  * The visual which renders a 3D object to the control's quad
@@ -55,10 +52,9 @@ typedef IntrusivePtr< MeshVisual > MeshVisualPtr;
  * | useSoftNormals  | BOOLEAN     | If true, average normals at points for smooth textures. Default true. |
  * | lightPosition   | VECTOR3     | The position (on stage) of the light                                  |
  */
-class MeshVisual: public Visual::Base
+class MeshVisual : public Visual::Base
 {
 public:
-
   /**
    * @brief Create a new mesh visual.
    *
@@ -66,28 +62,26 @@ public:
    * @param[in] properties A Property::Map containing settings for this visual
    * @return A smart-pointer to the newly allocated visual.
    */
-  static MeshVisualPtr New( VisualFactoryCache& factoryCache, const Property::Map& properties );
-
-public:  // from Visual
+  static MeshVisualPtr New(VisualFactoryCache& factoryCache, const Property::Map& properties);
 
+public: // from Visual
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  void DoCreatePropertyMap( Property::Map& map ) const override;
+  void DoCreatePropertyMap(Property::Map& map) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
+  void DoCreateInstancePropertyMap(Property::Map& map) const override;
 
 protected:
-
   /**
    * @brief Constructor.
    *
    * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
    */
-  MeshVisual( VisualFactoryCache& factoryCache );
+  MeshVisual(VisualFactoryCache& factoryCache);
 
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
@@ -102,7 +96,7 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  void DoSetProperties( const Property::Map& propertyMap ) override;
+  void DoSetProperties(const Property::Map& propertyMap) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
@@ -112,10 +106,9 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetOnScene
    */
-  void DoSetOnScene( Actor& actor ) override;
+  void DoSetOnScene(Actor& actor) override;
 
 private:
-
   /**
    * @brief Provide an empty geometry for the visual to use.
    * @details For use in error cases where the initialisation has failed for varying reasons.
@@ -161,18 +154,16 @@ private:
    * @param[in] index The index key of the value
    * @param[in] value The value
    */
-  void DoSetProperty( Property::Index index, const Property::Value& value );
+  void DoSetProperty(Property::Index index, const Property::Value& value);
 
 private:
-
   // Undefined
-  MeshVisual( const MeshVisual& meshVisual );
+  MeshVisual(const MeshVisual& meshVisual);
 
   // Undefined
-  MeshVisual& operator=( const MeshVisual& meshVisual );
+  MeshVisual& operator=(const MeshVisual& meshVisual);
 
 private:
-
   std::string mObjectUrl;
   std::string mMaterialUrl;
 
@@ -181,15 +172,15 @@ private:
   std::string mGlossTextureUrl;
   std::string mTexturesPath;
 
-  Shader mShader;
-  Geometry mGeometry;
+  Shader     mShader;
+  Geometry   mGeometry;
   TextureSet mTextureSet;
 
   ObjLoader mObjLoader;
-  Vector3 mSceneCenter;
-  Vector3 mSceneSize;
+  Vector3   mSceneCenter;
+  Vector3   mSceneSize;
 
-  Vector3 mLightPosition;
+  Vector3                                 mLightPosition;
   Toolkit::MeshVisual::ShadingMode::Value mShadingMode;
 
   bool mUseTexture;
index 60e6e6b..a807d39 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_NPATCH_DATA_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <string>
-#include <dali/public-api/rendering/texture-set.h>
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
+#include <dali/public-api/rendering/texture-set.h>
+#include <string>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/internal/visuals/texture-manager-impl.h>
 #include <dali-toolkit/devel-api/utility/npatch-utilities.h>
+#include <dali-toolkit/internal/visuals/texture-manager-impl.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class NPatchData : public Dali::Toolkit::TextureUploadObserver
 {
 public:
-  typedef int32_t NPatchDataId;                 ///< The NPatchDataId type. This is used as a handle to refer to a particular Npatch Data.
+  typedef int32_t  NPatchDataId;                ///< The NPatchDataId type. This is used as a handle to refer to a particular Npatch Data.
   static const int INVALID_NPATCH_DATA_ID = -1; ///< Used to represent a null TextureId or error
 
   /**
@@ -52,7 +49,6 @@ public:
   };
 
 public:
-
   /**
    * Constructor
    */
@@ -64,7 +60,6 @@ public:
   ~NPatchData();
 
 public:
-
   /**
    * @brief Set cache data id.
    *
@@ -240,7 +235,6 @@ public:
    */
   LoadingState GetLoadingState() const;
 
-
   /**
    * @brief Retrieve NPatch rendering data.
    *
@@ -254,17 +248,18 @@ public:
    * @param [in] pixelBuffer loaded pixel buffer.
    * @param [in] preMultiplied whether the loaded image is premultiplied or not
    */
-  void SetLoadedNPatchData( Devel::PixelBuffer& pixelBuffer, bool preMultiplied );
+  void SetLoadedNPatchData(Devel::PixelBuffer& pixelBuffer, bool preMultiplied);
 
 private:
-
   /**
    * @copydoc TextureUploadObserver::UploadCompleted
    *
    * To avoid rendering garbage pixels, renderer should be added to actor after the resources are ready.
    * This callback is the place to add the renderer as it would be called once the loading is finished.
    */
-  void UploadComplete( bool loadSuccess, int32_t textureId, TextureSet textureSet, bool useAtlasing, const Vector4& atlasRect, bool preMultiplied ) override {}
+  void UploadComplete(bool loadSuccess, int32_t textureId, TextureSet textureSet, bool useAtlasing, const Vector4& atlasRect, bool preMultiplied) override
+  {
+  }
 
   /**
    * @copydoc TextureUploadObserver::LoadComplete
@@ -272,11 +267,9 @@ private:
    * To avoid rendering garbage pixels, renderer should be added to actor after the resources are ready.
    * This callback is the place to add the renderer as it would be called once the loading is finished.
    */
-  void LoadComplete( bool loadSuccess, Devel::PixelBuffer pixelBuffer, const VisualUrl& url, bool preMultiplied ) override;
-
+  void LoadComplete(bool loadSuccess, Devel::PixelBuffer pixelBuffer, const VisualUrl& url, bool preMultiplied) override;
 
 private:
-
   using ObserverListType = Dali::Vector<TextureUploadObserver*>;
 
   NPatchDataId                 mId;
index b2b4a7c..50c24d3 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_NPATCH_LOADER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <string>
-#include <dali/public-api/rendering/texture-set.h>
-#include <dali/devel-api/common/owner-container.h>
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
+#include <dali/devel-api/common/owner-container.h>
+#include <dali/public-api/rendering/texture-set.h>
+#include <string>
 
 // INTERNAL INCLUDES
+#include <dali-toolkit/devel-api/utility/npatch-utilities.h>
 #include <dali-toolkit/internal/visuals/npatch-data.h>
 #include <dali-toolkit/internal/visuals/texture-manager-impl.h>
-#include <dali-toolkit/devel-api/utility/npatch-utilities.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 /**
  * The manager for loading Npatch textures.
  * It caches them internally for better performance; i.e. to avoid loading and
@@ -49,7 +46,6 @@ namespace Internal
 class NPatchLoader
 {
 public:
-
   /**
    * Constructor
    */
@@ -72,7 +68,7 @@ public:
    * @param [in] synchronousLoading True if the image will be loaded in synchronous time.
    * @return id of the texture.
    */
-  std::size_t Load( TextureManager& textureManager, TextureUploadObserver* textureObserver, const std::string& url, const Rect< int >& border, bool& preMultiplyOnLoad, bool synchronousLoading );
+  std::size_t Load(TextureManager& textureManager, TextureUploadObserver* textureObserver, const std::string& url, const Rect<int>& border, bool& preMultiplyOnLoad, bool synchronousLoading);
 
   /**
    * @brief Set loaded PixelBuffer and its information
@@ -81,7 +77,7 @@ public:
    * @param [in] pixelBuffer of loaded image
    * @param [in] preMultiplied True if the image had pre-multiplied alpha applied
    */
-  void SetNPatchData( std::size_t id, Devel::PixelBuffer& pixelBuffer, bool preMultiplied );
+  void SetNPatchData(std::size_t id, Devel::PixelBuffer& pixelBuffer, bool preMultiplied);
 
   /**
    * @brief Retrieve N patch data matching to an id
@@ -89,7 +85,7 @@ public:
    * @param [out] data const pointer to the NPatchData
    * @return true if data matching to id was really found
    */
-  bool GetNPatchData( const NPatchData::NPatchDataId id, const NPatchData*& data );
+  bool GetNPatchData(const NPatchData::NPatchDataId id, const NPatchData*& data);
 
   /**
    * @brief Remove a texture matching id.
@@ -99,16 +95,14 @@ public:
    * @param [in] id cache data id
    * @param [in] textureObserver The NPatchVisual that requested loading.
    */
-  void Remove( std::size_t id, TextureUploadObserver* textureObserver );
+  void Remove(std::size_t id, TextureUploadObserver* textureObserver);
 
 private:
-
   NPatchData::NPatchDataId GenerateUniqueNPatchDataId();
 
-  int32_t GetCacheIndexFromId( const NPatchData::NPatchDataId id );
+  int32_t GetCacheIndexFromId(const NPatchData::NPatchDataId id);
 
 protected:
-
   /**
    * Undefined copy constructor.
    */
@@ -120,12 +114,11 @@ protected:
   NPatchLoader& operator=(const NPatchLoader& rhs);
 
 private:
-
-  NPatchData::NPatchDataId mCurrentNPatchDataId;
-  OwnerContainer< NPatchData* > mCache;
+  NPatchData::NPatchDataId    mCurrentNPatchDataId;
+  OwnerContainer<NPatchData*> mCache;
 };
 
-} // name Internal
+} // namespace Internal
 
 } // namespace Toolkit
 
index e89d9e0..02db5a4 100644 (file)
 // EXTERNAL INCLUDES
 #include <dali/public-api/common/intrusive-ptr.h>
 #include <dali/public-api/images/image-operations.h>
+#include <dali/public-api/object/weak-handle.h>
 #include <dali/public-api/rendering/geometry.h>
 #include <dali/public-api/rendering/sampler.h>
 #include <dali/public-api/rendering/shader.h>
-#include <dali/public-api/object/weak-handle.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/visuals/image-visual-properties.h>
 #include <dali-toolkit/internal/visuals/texture-upload-observer.h>
 #include <dali-toolkit/internal/visuals/visual-base-impl.h>
 #include <dali-toolkit/internal/visuals/visual-url.h>
+#include <dali-toolkit/public-api/visuals/image-visual-properties.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
 class ImageVisualShaderFactory;
 class NPatchVisual;
-typedef IntrusivePtr< NPatchVisual > NPatchVisualPtr;
+typedef IntrusivePtr<NPatchVisual> NPatchVisualPtr;
 
 /**
  * The visual which renders an 9 patch image to the control's quad
@@ -57,7 +55,7 @@ typedef IntrusivePtr< NPatchVisual > NPatchVisualPtr;
  * | auxiliaryImage           | STRING           |
  * | auxiliaryImageAlpha      | FLOAT            |
  */
-class NPatchVisual: public Visual::Base, public TextureUploadObserver
+class NPatchVisual : public Visual::Base, public TextureUploadObserver
 {
 public:
   /**
@@ -85,25 +83,23 @@ public:
    */
   static NPatchVisualPtr New(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl);
 
-public:  // from Visual
-
+public: // from Visual
   /**
    * @copydoc Visual::Base::GetNaturalSize
    */
-  void GetNaturalSize( Vector2& naturalSize ) override;
+  void GetNaturalSize(Vector2& naturalSize) override;
 
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  void DoCreatePropertyMap( Property::Map& map ) const override;
+  void DoCreatePropertyMap(Property::Map& map) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
+  void DoCreateInstancePropertyMap(Property::Map& map) const override;
 
 protected:
-
   /**
    * @brief Constructor.
    *
@@ -124,17 +120,17 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  void DoSetProperties( const Property::Map& propertyMap ) override;
+  void DoSetProperties(const Property::Map& propertyMap) override;
 
   /**
    * @copydoc Visual::Base::DoSetOnScene
    */
-  void DoSetOnScene( Actor& actor ) override;
+  void DoSetOnScene(Actor& actor) override;
 
   /**
    * @copydoc Visual::Base::DoSetOffScene
    */
-  void DoSetOffScene( Actor& actor ) override;
+  void DoSetOffScene(Actor& actor) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
@@ -142,7 +138,6 @@ protected:
   void OnSetTransform() override;
 
 private:
-
   /**
    * Loads the NPatch image and the Auxiliary image if needed
    */
@@ -172,7 +167,7 @@ private:
    * @param subType to use
    * @return the geometry
    */
-  Geometry GetNinePatchGeometry( VisualFactoryCache::GeometryType subType );
+  Geometry GetNinePatchGeometry(VisualFactoryCache::GeometryType subType);
 
   /**
    * @brief Creates a geometry for the grid size to be used by this visuals' shaders
@@ -180,7 +175,7 @@ private:
    * @param[in] gridSize The grid size of the solid geometry to create
    * @return Returns the created geometry for the grid size
    */
-  Geometry CreateGridGeometry( Uint16Pair gridSize );
+  Geometry CreateGridGeometry(Uint16Pair gridSize);
 
   /**
    * @brief Creates a geometry with the border only for the grid size to be used by this visuals' shaders
@@ -203,7 +198,7 @@ private:
    * @param[in] gridSize The grid size of the solid geometry to create
    * @return Returns the created geometry for the grid size
    */
-  Geometry CreateBorderGeometry( Uint16Pair gridSize );
+  Geometry CreateBorderGeometry(Uint16Pair gridSize);
 
   /**
    * @brief Creates a renderer by using loaded resource.
@@ -211,14 +206,13 @@ private:
   void SetResource();
 
 private:
-
   /**
    * @copydoc TextureUploadObserver::UploadCompleted
    *
    * To avoid rendering garbage pixels, renderer should be added to actor after the resources are ready.
    * This callback is the place to add the renderer as it would be called once the loading is finished.
    */
-  void UploadComplete( bool loadSuccess, int32_t textureId, TextureSet textureSet, bool useAtlasing, const Vector4& atlasRect, bool preMultiplied ) override;
+  void UploadComplete(bool loadSuccess, int32_t textureId, TextureSet textureSet, bool useAtlasing, const Vector4& atlasRect, bool preMultiplied) override;
 
   /**
    * @copydoc TextureUploadObserver::LoadComplete
@@ -226,7 +220,7 @@ private:
    * To avoid rendering garbage pixels, renderer should be added to actor after the resources are ready.
    * This callback is the place to add the renderer as it would be called once the loading is finished.
    */
-  void LoadComplete( bool loadSuccess, Devel::PixelBuffer pixelBuffer, const VisualUrl& url, bool preMultiplied ) override;
+  void LoadComplete(bool loadSuccess, Devel::PixelBuffer pixelBuffer, const VisualUrl& url, bool preMultiplied) override;
 
 private:
   WeakHandle<Actor>                         mPlacementActor; ///< Weakhandle to contain Actor during texture loading
@@ -239,7 +233,7 @@ private:
   bool                                      mBorderOnly;           ///< if only border is desired
   Rect<int>                                 mBorder;               ///< The size of the border
   float                                     mAuxiliaryImageAlpha;  ///< The alpha value for the auxiliary image only
-  Toolkit::ImageVisual::ReleasePolicy::Type mReleasePolicy; ///< The release policy to determine when an image should no longer be cached.
+  Toolkit::ImageVisual::ReleasePolicy::Type mReleasePolicy;        ///< The release policy to determine when an image should no longer be cached.
 };
 
 } // namespace Internal
index a3facd0..6608fef 100644 (file)
 #include <dali/public-api/common/intrusive-ptr.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/visuals/primitive-visual-properties.h>
 #include <dali-toolkit/internal/visuals/visual-base-impl.h>
+#include <dali-toolkit/public-api/visuals/primitive-visual-properties.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class PrimitiveVisual;
-typedef IntrusivePtr< PrimitiveVisual > PrimitiveVisualPtr;
+typedef IntrusivePtr<PrimitiveVisual> PrimitiveVisualPtr;
 
 /**
  * The visual which renders a simple 3D shape to the control's quad
@@ -97,10 +94,9 @@ typedef IntrusivePtr< PrimitiveVisual > PrimitiveVisualPtr;
  * |-----------------|-------------|-----------------------------------------|
  * | lightPosition   | VECTOR3     | The position (on stage) of the light    |
  */
-class PrimitiveVisual: public Visual::Base
+class PrimitiveVisual : public Visual::Base
 {
 public:
-
   /**
    * @brief Create a new primitive visual.
    *
@@ -108,33 +104,31 @@ public:
    * @param[in] properties A Property::Map containing settings for this visual
    * @return A smart-pointer to the newly allocated visual.
    */
-  static PrimitiveVisualPtr New( VisualFactoryCache& factoryCache, const Property::Map& properties );
-
-public:  // from Visual
+  static PrimitiveVisualPtr New(VisualFactoryCache& factoryCache, const Property::Map& properties);
 
+public: // from Visual
   /**
    * @copydoc Visual::Base::GetNaturalSize
    */
-  void GetNaturalSize( Vector2& naturalSize ) override;
+  void GetNaturalSize(Vector2& naturalSize) override;
 
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  void DoCreatePropertyMap( Property::Map& map ) const override;
+  void DoCreatePropertyMap(Property::Map& map) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
+  void DoCreateInstancePropertyMap(Property::Map& map) const override;
 
 protected:
-
   /**
    * @brief Constructor.
    *
    * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
    */
-  PrimitiveVisual( VisualFactoryCache& factoryCache );
+  PrimitiveVisual(VisualFactoryCache& factoryCache);
 
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
@@ -149,12 +143,12 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  void DoSetProperties( const Property::Map& propertyMap ) override;
+  void DoSetProperties(const Property::Map& propertyMap) override;
 
   /**
    * @copydoc Visual::Base::DoSetOnScene
    */
-  void DoSetOnScene( Actor& actor ) override;
+  void DoSetOnScene(Actor& actor) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
@@ -162,16 +156,18 @@ protected:
   void OnSetTransform() override;
 
 private:
-
   //Simple struct to store the position and normal of a single vertex.
   struct Vertex
   {
     Vertex()
-    {}
+    {
+    }
 
-    Vertex( const Vector3& position, const Vector3& normal, const Vector2& textureCoord )
-    : position( position ), normal( normal )
-    {}
+    Vertex(const Vector3& position, const Vector3& normal, const Vector2& textureCoord)
+    : position(position),
+      normal(normal)
+    {
+    }
 
     Vector3 position;
     Vector3 normal;
@@ -204,7 +200,7 @@ private:
    * @param[in] slices The number of slices as you go around the sphere. Affects the smoothness of the surface.
    * @param[in] stacks The number of stacks as you go down the sphere. Affects the smoothness of the surface.
    */
-  void CreateSphere( Vector<Vertex>& vertices, Vector<unsigned short>& indices, int slices, int stacks );
+  void CreateSphere(Vector<Vertex>& vertices, Vector<unsigned short>& indices, int slices, int stacks);
 
   /**
    * @brief Compute the vertices and the triangles for a conic shape.
@@ -215,8 +211,7 @@ private:
    * @param[in] scaleHeight The scale of the height of the object, compared to the other dimensions.
    * @param[in] slices The number of slices as you go around the conic shape. Affects the smoothness of the surface.
    */
-  void CreateConic( Vector<Vertex>& vertices, Vector<unsigned short>& indices, float scaleTopRadius,
-                           float scaleBottomRadius, float scaleHeight, int slices );
+  void CreateConic(Vector<Vertex>& vertices, Vector<unsigned short>& indices, float scaleTopRadius, float scaleBottomRadius, float scaleHeight, int slices);
 
   /**
    * @brief Compute the vertices and the triangles for a bevelled cube.
@@ -226,8 +221,7 @@ private:
    * @param[in] bevelPercentage The ratio of the outer face widths to the cube's width. Between 0.0 and 1.0.
    * @param[in] bevelSmoothness The smoothness of the bevelled edges. Between 0.0 and 1.0.
    */
-  void CreateBevelledCube( Vector<Vertex>& vertices, Vector<unsigned short>& indices, Vector3 dimensions,
-                           float bevelPercentage, float bevelSmoothness );
+  void CreateBevelledCube(Vector<Vertex>& vertices, Vector<unsigned short>& indices, Vector3 dimensions, float bevelPercentage, float bevelSmoothness);
 
   /**
    * @brief Computes look-up tables for sin and cos, over angle divisions of (2 * Pi) / divisions
@@ -236,7 +230,7 @@ private:
    * @param[in] divisions Determines the angle coverage of the table. E.g divisions of '4' will have the sin values 0 = sin(0), 1 = sin(Pi/2), 2 = sin(Pi), 3 = sin(3Pi/2)
    * @Param[in] halfCircle If true, go from 0 to Pi instead of 0 to 2Pi.
    */
-  void ComputeCircleTables( Vector<float>& sinTable, Vector<float>& cosTable, int divisions, bool halfCircle );
+  void ComputeCircleTables(Vector<float>& sinTable, Vector<float>& cosTable, int divisions, bool halfCircle);
 
   /**
    * @brief Compute the vertices for a sphere.
@@ -244,7 +238,7 @@ private:
    * @param[in] slices The number of slices as you go around the sphere. Affects the smoothness of the surface.
    * @param[in] stacks The number of stacks as you go down the sphere. Affects the smoothness of the surface.
    */
-  void ComputeSphereVertices( Vector<Vertex>& vertices, int slices, int stacks );
+  void ComputeSphereVertices(Vector<Vertex>& vertices, int slices, int stacks);
 
   /**
    * @brief Compute the triangles for a sphere.
@@ -252,7 +246,7 @@ private:
    * @param[in] slices The number of slices as you go around the sphere. Affects the smoothness of the surface.
    * @param[in] stacks The number of stacks as you go down the sphere. Affects the smoothness of the surface.
    */
-  void FormSphereTriangles( Vector<unsigned short>& indices, int slices, int stacks );
+  void FormSphereTriangles(Vector<unsigned short>& indices, int slices, int stacks);
 
   /**
    * @brief Compute the vertices for a conical.
@@ -262,8 +256,7 @@ private:
    * @param[in] scaleHeight The scale of the height of the object, compared to the other dimensions.
    * @param[in] slices The number of slices as you go around the conical. Affects the smoothness of the surface.
    */
-  void ComputeConicVertices( Vector<Vertex>& vertices, float scaleTopRadius, float scaleBottomRadius,
-                                    float scaleHeight, int slices );
+  void ComputeConicVertices(Vector<Vertex>& vertices, float scaleTopRadius, float scaleBottomRadius, float scaleHeight, int slices);
 
   /**
    * @brief Compute the triangles for a conic.
@@ -272,21 +265,20 @@ private:
    * @param[in] coneBottom True if the bottom circle has a radius of zero, i.e. the object is an inverted complete cone.
    * @param[in] slices The number of slices as you go around the conic. Affects the smoothness of the surface.
    */
-  void FormConicTriangles( Vector<unsigned short>& indices, float scaleTopRadius, float scaleBottomRadius,
-                                  int slices );
+  void FormConicTriangles(Vector<unsigned short>& indices, float scaleTopRadius, float scaleBottomRadius, int slices);
 
   /**
    * @brief Compute the vertices for a cube.
    * @param[in, out] vertices The vector of vertices.
    * @Param[in] dimensions The dimensions of the object.
    */
-  void ComputeCubeVertices( Vector<Vertex>& vertices, Vector3 dimensions );
+  void ComputeCubeVertices(Vector<Vertex>& vertices, Vector3 dimensions);
 
   /**
    * @brief Compute the triangles for a cube.
    * @param[in, out] indices The vector of triangles, consisting of groups of three vertex indices.
    */
-  void FormCubeTriangles( Vector<unsigned short>& indices );
+  void FormCubeTriangles(Vector<unsigned short>& indices);
 
   /**
    * @brief Compute the vertices for an octahedron (maximumly bevelled cube).
@@ -294,13 +286,13 @@ private:
    * @Param[in] dimensions The dimensions of the object.
    * @Param[in] smoothness Defines how rounded the edges appear under lighting. Between 0.0 and 1.0.
    */
-  void ComputeOctahedronVertices( Vector<Vertex>& vertices, Vector3 dimensions, float smoothness );
+  void ComputeOctahedronVertices(Vector<Vertex>& vertices, Vector3 dimensions, float smoothness);
 
   /**
    * @brief Compute the triangles for an octahedron.
    * @param[in, out] indices The vector of triangles, consisting of groups of three vertex indices.
    */
-  void FormOctahedronTriangles( Vector<unsigned short>& indices );
+  void FormOctahedronTriangles(Vector<unsigned short>& indices);
 
   /**
    * @brief Compute the vertices for a bevelled cube.
@@ -309,28 +301,26 @@ private:
    * @param[in] bevelPercentage The ratio of the outer face widths to the cube's width. Between 0.0 and 1.0.
    * @param[in] bevelSmoothness The smoothness of the bevelled edges. Between 0.0 and 1.0.
    */
-  void ComputeBevelledCubeVertices( Vector<Vertex>& vertices, Vector3 dimensions, float bevelPercentage,
-                                    float bevelSmoothness );
+  void ComputeBevelledCubeVertices(Vector<Vertex>& vertices, Vector3 dimensions, float bevelPercentage, float bevelSmoothness);
 
   /**
    * @brief Compute the triangles for a bevelled cube.
    * @param[in, out] indices The vector of triangles, consisting of groups of three vertex indices.
    */
-  void FormBevelledCubeTriangles( Vector<unsigned short>& indices );
+  void FormBevelledCubeTriangles(Vector<unsigned short>& indices);
 
 private:
-
   // Undefined
-  PrimitiveVisual( const PrimitiveVisual& PrimitiveVisual );
+  PrimitiveVisual(const PrimitiveVisual& PrimitiveVisual);
 
   // Undefined
-  PrimitiveVisual& operator=( const PrimitiveVisual& PrimitiveVisual );
+  PrimitiveVisual& operator=(const PrimitiveVisual& PrimitiveVisual);
 
 private:
-  Shader mShader;
+  Shader   mShader;
   Geometry mGeometry;
 
-  Vector3 mObjectDimensions;     //Dimensions of shape, scaled to be between 0.0 and 1.0.
+  Vector3 mObjectDimensions; //Dimensions of shape, scaled to be between 0.0 and 1.0.
 
   Vector3 mSceneCenter;
   Vector3 mSceneSize;
@@ -339,17 +329,17 @@ private:
   Vector3 mLightPosition;
 
   //Shape properties.
-  Vector3 mScaleDimensions;      ///< Scale of dimensions of bevelled cube and sub-shapes.
-  float   mScaleTopRadius;       ///< Scale of radius of top circle, to use when creating certain objects.
-  float   mScaleBottomRadius;    ///< Scale of radius of bottom circle, to use when creating certain objects.
-  float   mScaleHeight;          ///< Scale of height, to use when creating certain objects.
-  float   mScaleRadius;          ///< Scale of radius, to use when creating certain objects.
-  float   mBevelPercentage;      ///< Used to determine bevel amount when creating certain objects.
-  float   mBevelSmoothness;      ///< Used to determine the smoothness of bevelled edges.
-  int     mSlices;               ///< Number of slices to use when creating certain objects.
-  int     mStacks;               ///< Number of stacks to use when creating certain objects.
-
-  Toolkit::PrimitiveVisual::Shape::Type mPrimitiveType;  //Shape to render, as enum.
+  Vector3 mScaleDimensions;   ///< Scale of dimensions of bevelled cube and sub-shapes.
+  float   mScaleTopRadius;    ///< Scale of radius of top circle, to use when creating certain objects.
+  float   mScaleBottomRadius; ///< Scale of radius of bottom circle, to use when creating certain objects.
+  float   mScaleHeight;       ///< Scale of height, to use when creating certain objects.
+  float   mScaleRadius;       ///< Scale of radius, to use when creating certain objects.
+  float   mBevelPercentage;   ///< Used to determine bevel amount when creating certain objects.
+  float   mBevelSmoothness;   ///< Used to determine the smoothness of bevelled edges.
+  int     mSlices;            ///< Number of slices to use when creating certain objects.
+  int     mStacks;            ///< Number of stacks to use when creating certain objects.
+
+  Toolkit::PrimitiveVisual::Shape::Type mPrimitiveType; //Shape to render, as enum.
 };
 
 } // namespace Internal
index 95e3e86..0e41dd2 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_RENDERING_ADDON_H
 
 /*
-* Copyright (c) 2020 Samsung Electronics Co., Ltd.
+* Copyright (c) 2021 Samsung Electronics Co., Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
@@ -18,8 +18,8 @@
 *
 */
 
-#include <dali/devel-api/common/addon-binder.h>
 #include <dali-toolkit/internal/visuals/npatch/npatch-visual.h>
+#include <dali/devel-api/common/addon-binder.h>
 
 namespace Dali
 {
@@ -27,45 +27,47 @@ namespace Toolkit
 {
 namespace Internal
 {
-
 /**
  * Interface of Overdrawing AddOn
  */
 class RenderingAddOn : public Dali::AddOn::AddOnBinder
 {
   using TextureManager = Dali::Toolkit::Internal::TextureManager;
+
 public:
-  RenderingAddOn() : Dali::AddOn::AddOnBinder( "oo-rendering", 0u )
-  {}
+  RenderingAddOn()
+  : Dali::AddOn::AddOnBinder("oo-rendering", 0u)
+  {
+  }
 
   // Bind AddOn functions
   ADDON_BIND_FUNCTION(
     GetGeometry,
-    Dali::Geometry(TextureManager::TextureId, uint32_t&, uint32_t& ) );
+    Dali::Geometry(TextureManager::TextureId, uint32_t&, uint32_t&));
 
   ADDON_BIND_FUNCTION(
     CreateGeometry,
-    Dali::Geometry( TextureManager::TextureId, const Dali::Devel::PixelBuffer& pixelBuffer ) );
+    Dali::Geometry(TextureManager::TextureId, const Dali::Devel::PixelBuffer& pixelBuffer));
 
   ADDON_BIND_FUNCTION(
     Initialize,
-    void*() );
+    void*());
 
   ADDON_BIND_FUNCTION(
     CreateGeometryGrid,
-    Dali::Geometry( const void*, const Uint16Pair&, uint32_t*) );
+    Dali::Geometry(const void*, const Uint16Pair&, uint32_t*));
 
   ADDON_BIND_FUNCTION(
     SubmitRenderTask,
-    void( Renderer&, const void* ) );
+    void(Renderer&, const void*));
 
   ADDON_BIND_FUNCTION(
     BuildNPatch,
-    void*( const Devel::PixelBuffer&, void*) );
+    void*(const Devel::PixelBuffer&, void*));
 
   ADDON_BIND_FUNCTION(
     DestroyNPatch,
-    void( void* ) );
+    void(void*));
 
   /**
    * Single instance of the addon
@@ -74,7 +76,7 @@ public:
   static RenderingAddOn& Get()
   {
     static RenderingAddOn* addon = nullptr;
-    if( !addon )
+    if(!addon)
     {
       addon = new RenderingAddOn();
       if(addon->IsValid())
@@ -86,8 +88,8 @@ public:
   }
 };
 
-} // Internal
-} // Toolkit
-} // Dali
+} // namespace Internal
+} // namespace Toolkit
+} // namespace Dali
 
 #endif //DALI_CMAKE_RENDERING_ADDON_H
index 86e233f..9e54e61 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_SVG_RASTERIZE_THREAD_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 // EXTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/event-thread-callback.h>
+#include <dali/devel-api/adaptor-framework/vector-image-renderer.h>
 #include <dali/devel-api/threading/conditional-wait.h>
 #include <dali/devel-api/threading/mutex.h>
 #include <dali/devel-api/threading/thread.h>
-#include <dali/public-api/images/pixel-data.h>
+#include <dali/integration-api/adaptor-framework/log-factory-interface.h>
+#include <dali/integration-api/processor-interface.h>
 #include <dali/public-api/common/intrusive-ptr.h>
 #include <dali/public-api/common/vector-wrapper.h>
+#include <dali/public-api/images/pixel-data.h>
 #include <dali/public-api/object/ref-object.h>
 #include <dali/public-api/rendering/texture-set.h>
-#include <dali/devel-api/adaptor-framework/vector-image-renderer.h>
-#include <dali/integration-api/adaptor-framework/log-factory-interface.h>
-#include <dali/integration-api/processor-interface.h>
 #include <memory>
 
 // INTERNAL INCLUDES
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class SvgVisual;
-typedef IntrusivePtr< SvgVisual > SvgVisualPtr;
+typedef IntrusivePtr<SvgVisual> SvgVisualPtr;
 class RasterizingTask;
-typedef IntrusivePtr< RasterizingTask > RasterizingTaskPtr;
+typedef IntrusivePtr<RasterizingTask> RasterizingTaskPtr;
 
 /**
  * The svg rasterizing tasks to be processed in the worker thread.
@@ -109,20 +106,20 @@ public:
 
 private:
   // Undefined
-  RasterizingTask( const RasterizingTask& task );
+  RasterizingTask(const RasterizingTask& task);
 
   // Undefined
-  RasterizingTask& operator=( const RasterizingTask& task );
+  RasterizingTask& operator=(const RasterizingTask& task);
 
 private:
-  SvgVisualPtr    mSvgVisual;
+  SvgVisualPtr        mSvgVisual;
   VectorImageRenderer mVectorRenderer;
-  VisualUrl       mUrl;
-  PixelData       mPixelData;
-  float           mDpi;
-  unsigned int    mWidth;
-  unsigned int    mHeight;
-  bool            mLoadSuccess;
+  VisualUrl           mUrl;
+  PixelData           mPixelData;
+  float               mDpi;
+  unsigned int        mWidth;
+  unsigned int        mHeight;
+  bool                mLoadSuccess;
 };
 
 /**
@@ -131,7 +128,6 @@ private:
 class SvgRasterizeThread : public Thread, Integration::Processor
 {
 public:
-
   /**
    * Constructor.
    *
@@ -142,14 +138,14 @@ public:
   /**
    * Terminate the svg rasterize thread, join and delete.
    */
-  static void TerminateThread( SvgRasterizeThread*& thread );
+  static void TerminateThread(SvgRasterizeThread*& thread);
 
   /**
    * Add a rasterization task into the waiting queue, called by main thread.
    *
    * @param[in] task The task added to the queue.
    */
-  void AddTask( RasterizingTaskPtr task );
+  void AddTask(RasterizingTaskPtr task);
 
   /**
    * Pop the next task out from the completed queue, called by main thread.
@@ -165,7 +161,7 @@ public:
    *
    * @param[in] visual The visual pointer.
    */
-  void RemoveTask( SvgVisual* visual );
+  void RemoveTask(SvgVisual* visual);
 
   /**
    * Delete the parsed SVG image, called by main thread.
@@ -174,15 +170,14 @@ public:
    *
    * @param[in] VectorImage The image to be deleted
    */
-  void DeleteImage( VectorImageRenderer vectorImage );
+  void DeleteImage(VectorImageRenderer vectorImage);
 
-    /**
+  /**
    * @copydoc Dali::Integration::Processor::Process()
    */
   void Process() override;
 
 private:
-
   /**
    * Pop the next task out from the queue.
    *
@@ -195,7 +190,7 @@ private:
    *
    * @param[in] task The task added to the queue.
    */
-  void AddCompletedTask( RasterizingTaskPtr task );
+  void AddCompletedTask(RasterizingTaskPtr task);
 
   /**
    * Applies the rasterized image to material
@@ -209,13 +204,11 @@ private:
   void UnregisterProcessor();
 
 protected:
-
   /**
    * Destructor.
    */
   ~SvgRasterizeThread() override;
 
-
   /**
    * The entry function of the worker thread.
    * It fetches task from the Queue, rasterizes the image and apply to the renderer.
@@ -223,25 +216,23 @@ protected:
   void Run() override;
 
 private:
-
   // Undefined
-  SvgRasterizeThread( const SvgRasterizeThread& thread );
+  SvgRasterizeThread(const SvgRasterizeThread& thread);
 
   // Undefined
-  SvgRasterizeThread& operator=( const SvgRasterizeThread& thread );
+  SvgRasterizeThread& operator=(const SvgRasterizeThread& thread);
 
 private:
-
-  std::vector<RasterizingTaskPtr>  mRasterizeTasks;     //The queue of the tasks waiting to rasterize the SVG image
-  std::vector <RasterizingTaskPtr> mCompletedTasks;     //The queue of the tasks with the SVG rasterization completed
-  Vector <VectorImageRenderer*>    mDeleteSvg;          //The images that the event thread requested to delete
-
-  ConditionalWait            mConditionalWait;
-  Dali::Mutex                mMutex;
-  std::unique_ptr< EventThreadCallback > mTrigger;
-  const Dali::LogFactoryInterface&       mLogFactory;
-  bool                       mIsThreadWaiting;
-  bool                       mProcessorRegistered;
+  std::vector<RasterizingTaskPtr> mRasterizeTasks; //The queue of the tasks waiting to rasterize the SVG image
+  std::vector<RasterizingTaskPtr> mCompletedTasks; //The queue of the tasks with the SVG rasterization completed
+  Vector<VectorImageRenderer*>    mDeleteSvg;      //The images that the event thread requested to delete
+
+  ConditionalWait                      mConditionalWait;
+  Dali::Mutex                          mMutex;
+  std::unique_ptr<EventThreadCallback> mTrigger;
+  const Dali::LogFactoryInterface&     mLogFactory;
+  bool                                 mIsThreadWaiting;
+  bool                                 mProcessorRegistered;
 };
 
 } // namespace Internal
index 5910ff2..2ccd337 100644 (file)
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class ImageVisualShaderFactory;
 class SvgVisual;
-typedef IntrusivePtr< SvgVisual > SvgVisualPtr;
+typedef IntrusivePtr<SvgVisual> SvgVisualPtr;
 
 /**
  * The visual which renders a svg image
@@ -49,10 +46,9 @@ typedef IntrusivePtr< SvgVisual > SvgVisualPtr;
  * | url                      | STRING           |
  *
  */
-class SvgVisual: public Visual::Base
+class SvgVisual : public Visual::Base
 {
 public:
-
   /**
    * @brief Create the SVG Visual using the image URL.
    *
@@ -65,7 +61,7 @@ public:
    * @param[in] properties A Property::Map containing settings for this visual
    * @return A smart-pointer to the newly allocated visual.
    */
-  static SvgVisualPtr New( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl, const Property::Map& properties );
+  static SvgVisualPtr New(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl, const Property::Map& properties);
 
   /**
    * @brief Create the SVG Visual using the image URL.
@@ -78,27 +74,25 @@ public:
    * @param[in] imageUrl The URL to svg resource to use
    * @return A smart-pointer to the newly allocated visual.
    */
-  static SvgVisualPtr New( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl );
-
-public:  // from Visual
+  static SvgVisualPtr New(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl);
 
+public: // from Visual
   /**
    * @copydoc Visual::Base::GetNaturalSize
    */
-  void GetNaturalSize( Vector2& naturalSize ) override;
+  void GetNaturalSize(Vector2& naturalSize) override;
 
   /**
    * @copydoc Visual::Base::CreatePropertyMap
    */
-  void DoCreatePropertyMap( Property::Map& map ) const override;
+  void DoCreatePropertyMap(Property::Map& map) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
+  void DoCreateInstancePropertyMap(Property::Map& map) const override;
 
 protected:
-
   /**
    * @brief Constructor.
    *
@@ -106,7 +100,7 @@ protected:
    * @param[in] shaderFactory The ImageVisualShaderFactory object
    * @param[in] imageUrl The URL to svg resource to use
    */
-  SvgVisual( VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl );
+  SvgVisual(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl);
 
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
@@ -121,17 +115,17 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties
    */
-  void DoSetProperties( const Property::Map& propertyMap ) override;
+  void DoSetProperties(const Property::Map& propertyMap) override;
 
   /**
    * @copydoc Visual::Base::DoSetOnScene
    */
-  void DoSetOnScene( Actor& actor ) override;
+  void DoSetOnScene(Actor& actor) override;
 
   /**
    * @copydoc Visual::Base::DoSetOffScene
    */
-  void DoSetOffScene( Actor& actor ) override;
+  void DoSetOffScene(Actor& actor) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
@@ -144,7 +138,6 @@ protected:
   bool IsResourceReady() const override;
 
 public:
-
   /**
    * @bried Apply the rasterized image to the visual.
    *
@@ -152,7 +145,7 @@ public:
    * @param[in] rasterizedPixelData The pixel buffer with the rasterized pixels
    * @param[in] bool Whether the resource is loaded
    */
-  void ApplyRasterizedImage( VectorImageRenderer vectorImage, PixelData rasterizedPixelData, bool isLoaded );
+  void ApplyRasterizedImage(VectorImageRenderer vectorImage, PixelData rasterizedPixelData, bool isLoaded);
 
 private:
   /**
@@ -165,20 +158,20 @@ private:
    *
    * @param[in] size The target size of the SVG rasterization.
    */
-  void AddRasterizationTask( const Vector2& size );
+  void AddRasterizationTask(const Vector2& size);
 
   /**
    * 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 );
+  void DoSetProperty(Property::Index index, const Property::Value& value);
 
   // Undefined
-  SvgVisual( const SvgVisual& svgRenderer );
+  SvgVisual(const SvgVisual& svgRenderer);
 
   // Undefined
-  SvgVisual& operator=( const SvgVisual& svgRenderer );
+  SvgVisual& operator=(const SvgVisual& svgRenderer);
 
 private:
   ImageVisualShaderFactory& mImageVisualShaderFactory;
@@ -190,7 +183,7 @@ private:
   WeakHandle<Actor>         mPlacementActor;
   Vector2                   mVisualSize;
   bool                      mLoadFailed;
-  bool                      mAttemptAtlasing;  ///< If true will attempt atlasing, otherwise create unique texture
+  bool                      mAttemptAtlasing; ///< If true will attempt atlasing, otherwise create unique texture
 };
 
 } // namespace Internal
old mode 100755 (executable)
new mode 100644 (file)
index 881fc3b..7ae5e4e
 #include <dali/public-api/object/weak-handle.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/internal/visuals/visual-base-impl.h>
 #include <dali-toolkit/internal/text/rendering/text-typesetter.h>
 #include <dali-toolkit/internal/text/text-controller.h>
+#include <dali-toolkit/internal/visuals/visual-base-impl.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class TextVisual;
-typedef IntrusivePtr< TextVisual > TextVisualPtr;
+typedef IntrusivePtr<TextVisual> TextVisualPtr;
 
 /**
  * The visual which renders text
@@ -69,7 +66,6 @@ typedef IntrusivePtr< TextVisual > TextVisualPtr;
 class TextVisual : public Visual::Base
 {
 public:
-
   /**
    * @brief Create a new text visual.
    *
@@ -77,23 +73,23 @@ public:
    * @param[in] properties A Property::Map containing settings for this visual
    * @return A smart-pointer to the newly allocated visual.
    */
-  static TextVisualPtr New( VisualFactoryCache& factoryCache, const Property::Map& properties );
+  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] propertyMap containing string keys or a mix of strings and indexes.
    * @return Property::Map containing index keys.
    */
-  static Property::Map ConvertStringKeysToIndexKeys( const Property::Map& propertyMap );
+  static Property::Map ConvertStringKeysToIndexKeys(const Property::Map& propertyMap);
 
   /**
    * @brief Retrieve the text's controller.
    * @param[in] visual The text visual.
    * @return The text controller
    */
-  static Text::ControllerPtr GetController( Toolkit::Visual::Base visual )
+  static Text::ControllerPtr GetController(Toolkit::Visual::Base visual)
   {
-    return GetVisualObject( visual ).mController;
+    return GetVisualObject(visual).mController;
   };
 
   /**
@@ -101,59 +97,57 @@ public:
    * @param[in] visual The text visual.
    * @param[in] animatablePropertyIndex The index of the animatable property
    */
-  static void SetAnimatableTextColorProperty( Toolkit::Visual::Base visual, Property::Index animatablePropertyIndex )
+  static void SetAnimatableTextColorProperty(Toolkit::Visual::Base visual, Property::Index animatablePropertyIndex)
   {
-    GetVisualObject( visual ).mAnimatableTextColorPropertyIndex = animatablePropertyIndex;
+    GetVisualObject(visual).mAnimatableTextColorPropertyIndex = animatablePropertyIndex;
   };
 
   /**
    * @brief Set the flag to trigger the textures to be initialized and renderer to be added to the control.
    * @param[in] visual The text visual.
    */
-  static void EnableRendererUpdate( Toolkit::Visual::Base visual )
+  static void EnableRendererUpdate(Toolkit::Visual::Base visual)
   {
-    GetVisualObject( visual ).mRendererUpdateNeeded = true;
+    GetVisualObject(visual).mRendererUpdateNeeded = true;
   };
 
   /**
    * @brief Instantly updates the renderer
    * @param[in] visual The text visual.
    */
-  static void UpdateRenderer( Toolkit::Visual::Base visual )
+  static void UpdateRenderer(Toolkit::Visual::Base visual)
   {
-    GetVisualObject( visual ).UpdateRenderer();
+    GetVisualObject(visual).UpdateRenderer();
   };
 
 public: // from Visual::Base
-
   /**
    * @copydoc Visual::Base::GetHeightForWidth()
    */
-  float GetHeightForWidth( float width ) override;
+  float GetHeightForWidth(float width) override;
 
   /**
    * @copydoc Visual::Base::GetNaturalSize()
    */
-  void GetNaturalSize( Vector2& naturalSize ) override;
+  void GetNaturalSize(Vector2& naturalSize) override;
 
   /**
    * @copydoc Visual::Base::CreatePropertyMap()
    */
-  void DoCreatePropertyMap( Property::Map& map ) const override;
+  void DoCreatePropertyMap(Property::Map& map) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
+  void DoCreateInstancePropertyMap(Property::Map& map) const override;
 
 protected:
-
   /**
    * @brief Constructor.
    *
    * @param[in] factoryCache The VisualFactoryCache object
    */
-  TextVisual( VisualFactoryCache& factoryCache );
+  TextVisual(VisualFactoryCache& factoryCache);
 
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
@@ -170,17 +164,17 @@ protected:
   /**
    * @copydoc Visual::Base::DoSetProperties()
    */
-  void DoSetProperties( const Property::Map& propertyMap ) override;
+  void DoSetProperties(const Property::Map& propertyMap) override;
 
   /**
    * @copydoc Visual::Base::DoSetOnScene()
    */
-  void DoSetOnScene( Actor& actor ) override;
+  void DoSetOnScene(Actor& actor) override;
 
   /**
    * @copydoc Visual::Base::DoSetOffScene()
    */
-  void DoSetOffScene( Actor& actor ) override;
+  void DoSetOffScene(Actor& actor) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
@@ -188,46 +182,44 @@ protected:
   void OnSetTransform() override;
 
 private:
-
   struct TilingInfo
   {
     unsigned char* textBuffer;
     unsigned char* styleBuffer;
     unsigned char* maskBuffer;
-    int width;
-    int height;
-    Pixel::Format textPixelFormat;
-    int offsetPosition;
-    Vector2 offSet;
-
-    TilingInfo( int width, int height, Pixel::Format textPixelFormat )
-    : textBuffer( NULL ),
-      styleBuffer( NULL ),
-      maskBuffer( NULL ),
-      width( width ),
-      height( height ),
-      textPixelFormat( textPixelFormat ),
-      offsetPosition( 0 ),
-      offSet( 0.f, 0.f )
+    int            width;
+    int            height;
+    Pixel::Format  textPixelFormat;
+    int            offsetPosition;
+    Vector2        offSet;
+
+    TilingInfo(int width, int height, Pixel::Format textPixelFormat)
+    : textBuffer(NULL),
+      styleBuffer(NULL),
+      maskBuffer(NULL),
+      width(width),
+      height(height),
+      textPixelFormat(textPixelFormat),
+      offsetPosition(0),
+      offSet(0.f, 0.f)
     {
     }
 
     ~TilingInfo()
     {
-      if( textBuffer )
+      if(textBuffer)
       {
-        free( textBuffer );
+        free(textBuffer);
       }
-      if( styleBuffer )
+      if(styleBuffer)
       {
-        free( styleBuffer );
+        free(styleBuffer);
       }
-      if( maskBuffer )
+      if(maskBuffer)
       {
-        free( maskBuffer );
+        free(maskBuffer);
       }
     }
-
   };
 
   /**
@@ -237,7 +229,7 @@ private:
    *
    * @param[in] propertyValue The value to set.
    */
-  void DoSetProperty( Dali::Property::Index index, const Dali::Property::Value& propertyValue );
+  void DoSetProperty(Dali::Property::Index index, const Dali::Property::Value& propertyValue);
 
   /**
    * @brief Updates the text's renderer.
@@ -247,7 +239,7 @@ private:
   /**
    * @brief Removes the text's renderer.
    */
-  void RemoveRenderer( Actor& actor );
+  void RemoveRenderer(Actor& actor);
 
   /**
    * @brief Create a texture in textureSet and add it.
@@ -256,7 +248,7 @@ private:
    * @param[in] sampler The sampler.
    * @param[in] textureSetIndex The Index of TextureSet.
    */
-  void AddTexture( TextureSet& textureSet, PixelData& data, Sampler& sampler, unsigned int textureSetIndex );
+  void AddTexture(TextureSet& textureSet, PixelData& data, Sampler& sampler, unsigned int textureSetIndex);
 
   /**
    * @brief Convert the buffer to pixelData.
@@ -266,7 +258,7 @@ private:
    * @param[in] offsetPosition The The buffer's start position.
    * @param[in] textPixelFormat The PixelForma of text.
    */
-  PixelData ConvertToPixelData( unsigned char* buffer, int width, int height, int offsetPosition, const Pixel::Format textPixelFormat );
+  PixelData ConvertToPixelData(unsigned char* buffer, int width, int height, int offsetPosition, const Pixel::Format textPixelFormat);
 
   /**
    * @brief Create the text's texture.
@@ -277,7 +269,7 @@ private:
    * @param[in] containsColorGlyph Whether the text contains color glyph.
    * @param[in] styleEnabled Whether the text contains any styles (e.g. shadow, underline, etc.).
    */
-  void CreateTextureSet( TilingInfo& info, Renderer& renderer, Sampler& sampler,  bool hasMultipleTextColors, bool containsColorGlyph, bool styleEnabled );
+  void CreateTextureSet(TilingInfo& info, Renderer& renderer, Sampler& sampler, bool hasMultipleTextColors, bool containsColorGlyph, bool styleEnabled);
 
   /**
    * Create renderer of the text for rendering.
@@ -287,8 +279,7 @@ private:
    * @param[in] containsColorGlyph Whether the text contains color glyph.
    * @param[in] styleEnabled Whether the text contains any styles (e.g. shadow, underline, etc.).
    */
-  void AddRenderer( Actor& actor, const Vector2& size, bool hasMultipleTextColors, bool containsColorGlyph, bool styleEnabled );
-
+  void AddRenderer(Actor& actor, const Vector2& size, bool hasMultipleTextColors, bool containsColorGlyph, bool styleEnabled);
 
   /**
    * Get the texture of the text for rendering.
@@ -297,7 +288,7 @@ private:
    * @param[in] containsColorGlyph Whether the text contains color glyph.
    * @param[in] styleEnabled Whether the text contains any styles (e.g. shadow, underline, etc.).
    */
-  TextureSet GetTextTexture( const Vector2& size, bool hasMultipleTextColors, bool containsColorGlyph, bool styleEnabled );
+  TextureSet GetTextTexture(const Vector2& size, bool hasMultipleTextColors, bool containsColorGlyph, bool styleEnabled);
 
   /**
    * Get the text rendering shader.
@@ -306,21 +297,20 @@ private:
    * @param[in] containsColorGlyph Whether the text contains color glyph.
    * @param[in] styleEnabled Whether the text contains any styles (e.g. shadow, underline, etc.).
    */
-  Shader GetTextShader( VisualFactoryCache& factoryCache, bool hasMultipleTextColors, bool containsColorGlyph, bool styleEnabled );
+  Shader GetTextShader(VisualFactoryCache& factoryCache, bool hasMultipleTextColors, bool containsColorGlyph, bool styleEnabled);
 
   /**
    * @brief Retrieve the TextVisual object.
    * @param[in] visual A handle to the TextVisual
    * @return The TextVisual object
    */
-  static TextVisual& GetVisualObject( Toolkit::Visual::Base visual )
+  static TextVisual& GetVisualObject(Toolkit::Visual::Base visual)
   {
-    return static_cast< TextVisual& >( Toolkit::GetImplementation( visual ).GetVisualObject() );
+    return static_cast<TextVisual&>(Toolkit::GetImplementation(visual).GetVisualObject());
   };
 
 private:
-
-  typedef std::vector< Renderer > RendererContainer;
+  typedef std::vector<Renderer> RendererContainer;
 
   /**
    * Used as an alternative to boolean so that it is obvious whether the text contains single or multiple text colors, and emoji and styles.
@@ -330,21 +320,20 @@ private:
     enum Type
     {
       SINGLE_COLOR_TEXT = 0, ///< The text contains single color only.
-      MULTI_COLOR_TEXT = 1,  ///< The text contains multiple colors.
-      NO_EMOJI = 0,          ///< The text contains no emoji.
-      HAS_EMOJI = 1,         ///< The text contains emoji.
-      NO_STYLES = 0,         ///< The text contains contains no styles.
-      HAS_SYLES = 1          ///< The text contains contains styles.
+      MULTI_COLOR_TEXT  = 1, ///< The text contains multiple colors.
+      NO_EMOJI          = 0, ///< The text contains no emoji.
+      HAS_EMOJI         = 1, ///< The text contains emoji.
+      NO_STYLES         = 0, ///< The text contains contains no styles.
+      HAS_SYLES         = 1  ///< The text contains contains styles.
     };
   };
 
-
 private:
-  Text::ControllerPtr mController;                        ///< The text's controller.
-  Text::TypesetterPtr mTypesetter;                        ///< The text's typesetter.
-  WeakHandle<Actor>   mControl;                           ///< The control where the renderer is added.
-  Property::Index     mAnimatableTextColorPropertyIndex;  ///< The index of animatable text color property registered by the control.
-  bool                mRendererUpdateNeeded:1;            ///< The flag to indicate whether the renderer needs to be updated.
+  Text::ControllerPtr mController;                       ///< The text's controller.
+  Text::TypesetterPtr mTypesetter;                       ///< The text's typesetter.
+  WeakHandle<Actor>   mControl;                          ///< The control where the renderer is added.
+  Property::Index     mAnimatableTextColorPropertyIndex; ///< The index of animatable text color property registered by the control.
+  bool                mRendererUpdateNeeded : 1;         ///< The flag to indicate whether the renderer needs to be updated.
   RendererContainer   mRendererList;
 };
 
index 6e17945..089ae92 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_TEXTURE_MANAGER_IMPL_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <deque>
-#include <functional>
-#include <string>
-#include <memory>
+#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
+#include <dali/devel-api/common/owner-container.h>
 #include <dali/public-api/common/dali-vector.h>
 #include <dali/public-api/object/ref-object.h>
-#include <dali/public-api/rendering/texture-set.h>
-#include <dali/devel-api/common/owner-container.h>
-#include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 #include <dali/public-api/rendering/geometry.h>
+#include <dali/public-api/rendering/texture-set.h>
+#include <deque>
+#include <functional>
+#include <memory>
+#include <string>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/image-loader/async-image-loader-devel.h>
 #include <dali-toolkit/devel-api/image-loader/image-atlas.h>
-#include <dali-toolkit/public-api/image-loader/async-image-loader.h>
-#include <dali-toolkit/internal/visuals/texture-upload-observer.h>
-#include <dali-toolkit/internal/visuals/visual-url.h>
 #include <dali-toolkit/internal/helpers/round-robin-container-view.h>
 #include <dali-toolkit/internal/image-loader/async-image-loader-impl.h>
-
+#include <dali-toolkit/internal/visuals/texture-upload-observer.h>
+#include <dali-toolkit/internal/visuals/visual-url.h>
+#include <dali-toolkit/public-api/image-loader/async-image-loader.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
 class ImageAtlasManager;
@@ -60,8 +57,7 @@ typedef IntrusivePtr<ImageAtlasManager> ImageAtlasManagerPtr;
 class TextureManager : public ConnectionTracker
 {
 public:
-
-  typedef int32_t TextureId;       ///< The TextureId type. This is used as a handle to refer to a particular Texture.
+  typedef int32_t  TextureId;               ///< The TextureId type. This is used as a handle to refer to a particular Texture.
   static const int INVALID_TEXTURE_ID = -1; ///< Used to represent a null TextureId or error
 
   /**
@@ -76,7 +72,7 @@ public:
   /**
    * Whether the pixel data should be kept in TextureManager, returned with pixelBuffer or uploaded for rendering
    */
-  enum class StorageType: uint8_t
+  enum class StorageType : uint8_t
   {
     KEEP_PIXEL_BUFFER,
     RETURN_PIXEL_BUFFER,
@@ -86,7 +82,7 @@ public:
   /**
    * Whether the texture should be loaded synchronously or asynchronously.
    */
-  enum class LoadType: uint8_t
+  enum class LoadType : uint8_t
   {
     LOAD_ASYNCHRONOUSLY,
     LOAD_SYNCHRONOUSLY
@@ -95,17 +91,17 @@ public:
   /**
    * @brief The LoadState Enumeration represents the current state of a particular Texture's life-cycle.
    */
-  enum class LoadState: uint8_t
+  enum class LoadState : uint8_t
   {
-    NOT_STARTED,     ///< Default
-    LOADING,         ///< Loading has been started, but not finished.
-    LOAD_FINISHED,   ///< Loading has finished. (for CPU storage only)
-    WAITING_FOR_MASK,///< Loading has finished, but waiting for mask image
-    MASK_APPLYING,   ///< Loading has finished, Mask is applying
-    MASK_APPLIED,    ///< Loading has finished, Mask is applyied by GPU
-    UPLOADED,        ///< Uploaded and ready. (For GPU upload only)
-    CANCELLED,       ///< Removed before loading completed
-    LOAD_FAILED      ///< Async loading failed, e.g. connection problem
+    NOT_STARTED,      ///< Default
+    LOADING,          ///< Loading has been started, but not finished.
+    LOAD_FINISHED,    ///< Loading has finished. (for CPU storage only)
+    WAITING_FOR_MASK, ///< Loading has finished, but waiting for mask image
+    MASK_APPLYING,    ///< Loading has finished, Mask is applying
+    MASK_APPLIED,     ///< Loading has finished, Mask is applyied by GPU
+    UPLOADED,         ///< Uploaded and ready. (For GPU upload only)
+    CANCELLED,        ///< Removed before loading completed
+    LOAD_FAILED       ///< Async loading failed, e.g. connection problem
   };
 
   /**
@@ -113,8 +109,8 @@ public:
    */
   enum class ReloadPolicy
   {
-    CACHED = 0,             ///< Loads cached texture if it exists.
-    FORCED                  ///< Forces reloading of texture.
+    CACHED = 0, ///< Loads cached texture if it exists.
+    FORCED      ///< Forces reloading of texture.
   };
 
   /**
@@ -127,20 +123,18 @@ public:
   };
 
 public:
-
   struct MaskingData
   {
     MaskingData();
     ~MaskingData() = default;
 
-    VisualUrl mAlphaMaskUrl;
+    VisualUrl                 mAlphaMaskUrl;
     TextureManager::TextureId mAlphaMaskId;
-    float mContentScaleFactor;
-    bool mCropToMask;
+    float                     mContentScaleFactor;
+    bool                      mCropToMask;
   };
   using MaskingDataPointer = std::unique_ptr<MaskingData>;
 
-
   /**
    * Class to provide lifecycle event on destruction of texture manager.
    */
@@ -183,13 +177,14 @@ public:
    * @return                          The texture set containing the frame of animated image, or empty if still loading.
    */
 
-  TextureSet LoadAnimatedImageTexture( Dali::AnimatedImageLoading animatedImageLoading,
-                                       uint32_t frameIndex,
-                                       Dali::SamplingMode::Type samplingMode,
-                                       bool synchronousLoading,
-                                       TextureManager::TextureId& textureId,
-                                       Dali::WrapMode::Type wrapModeU, Dali::WrapMode::Type wrapModeV,
-                                       TextureUploadObserver* textureObserver );
+  TextureSet LoadAnimatedImageTexture(Dali::AnimatedImageLoading animatedImageLoading,
+                                      uint32_t                   frameIndex,
+                                      Dali::SamplingMode::Type   samplingMode,
+                                      bool                       synchronousLoading,
+                                      TextureManager::TextureId& textureId,
+                                      Dali::WrapMode::Type       wrapModeU,
+                                      Dali::WrapMode::Type       wrapModeV,
+                                      TextureUploadObserver*     textureObserver);
 
   /**
    * @brief Requests an image load of the given URL to get PixelBuffer.
@@ -211,15 +206,14 @@ public:
    * @return                          The pixel buffer containing the image, or empty if still loading.
    */
 
-  Devel::PixelBuffer LoadPixelBuffer( const VisualUrl& url,
-                                      Dali::ImageDimensions desiredSize,
-                                      Dali::FittingMode::Type fittingMode,
-                                      Dali::SamplingMode::Type samplingMode,
-                                      bool synchronousLoading,
-                                      TextureUploadObserver* textureObserver,
-                                      bool orientationCorrection,
-                                      TextureManager::MultiplyOnLoad& preMultiplyOnLoad );
-
+  Devel::PixelBuffer LoadPixelBuffer(const VisualUrl&                url,
+                                     Dali::ImageDimensions           desiredSize,
+                                     Dali::FittingMode::Type         fittingMode,
+                                     Dali::SamplingMode::Type        samplingMode,
+                                     bool                            synchronousLoading,
+                                     TextureUploadObserver*          textureObserver,
+                                     bool                            orientationCorrection,
+                                     TextureManager::MultiplyOnLoad& preMultiplyOnLoad);
 
   /**
    * @brief Requests an image load of the given URL.
@@ -259,25 +253,25 @@ public:
    * @return                          The texture set containing the image, or empty if still loading.
    */
 
-  TextureSet LoadTexture( const VisualUrl&             url,
-                          Dali::ImageDimensions        desiredSize,
-                          Dali::FittingMode::Type      fittingMode,
-                          Dali::SamplingMode::Type     samplingMode,
-                          MaskingDataPointer&          maskInfo,
-                          bool                         synchronousLoading,
-                          TextureManager::TextureId&   textureId,
-                          Vector4&                     textureRect,
-                          Dali::ImageDimensions&       textureRectSize,
-                          bool&                        atlasingStatus,
-                          bool&                        loadingStatus,
-                          Dali::WrapMode::Type         wrapModeU,
-                          Dali::WrapMode::Type         wrapModeV,
-                          TextureUploadObserver*       textureObserver,
-                          AtlasUploadObserver*         atlasObserver,
-                          ImageAtlasManagerPtr         imageAtlasManager,
-                          bool                         orientationCorrection,
-                          TextureManager::ReloadPolicy reloadPolicy,
-                          MultiplyOnLoad&              preMultiplyOnLoad );
+  TextureSet LoadTexture(const VisualUrl&             url,
+                         Dali::ImageDimensions        desiredSize,
+                         Dali::FittingMode::Type      fittingMode,
+                         Dali::SamplingMode::Type     samplingMode,
+                         MaskingDataPointer&          maskInfo,
+                         bool                         synchronousLoading,
+                         TextureManager::TextureId&   textureId,
+                         Vector4&                     textureRect,
+                         Dali::ImageDimensions&       textureRectSize,
+                         bool&                        atlasingStatus,
+                         bool&                        loadingStatus,
+                         Dali::WrapMode::Type         wrapModeU,
+                         Dali::WrapMode::Type         wrapModeV,
+                         TextureUploadObserver*       textureObserver,
+                         AtlasUploadObserver*         atlasObserver,
+                         ImageAtlasManagerPtr         imageAtlasManager,
+                         bool                         orientationCorrection,
+                         TextureManager::ReloadPolicy reloadPolicy,
+                         MultiplyOnLoad&              preMultiplyOnLoad);
 
   /**
    * @brief Requests an image load of the given URL.
@@ -300,15 +294,15 @@ public:
    * @param[in,out] preMultiplyOnLoad     True if the image color should be multiplied by it's alpha. Set to false if the image has no alpha channel
    * @return                          A TextureId to use as a handle to reference this Texture
    */
-  TextureId RequestLoad( const VisualUrl&                   url,
-                         const ImageDimensions              desiredSize,
-                         FittingMode::Type                  fittingMode,
-                         Dali::SamplingMode::Type           samplingMode,
-                         const UseAtlas                     useAtlasing,
-                         TextureUploadObserver*             observer,
-                         bool                               orientationCorrection,
-                         TextureManager::ReloadPolicy       reloadPolicy,
-                         MultiplyOnLoad&                    preMultiplyOnLoad );
+  TextureId RequestLoad(const VisualUrl&             url,
+                        const ImageDimensions        desiredSize,
+                        FittingMode::Type            fittingMode,
+                        Dali::SamplingMode::Type     samplingMode,
+                        const UseAtlas               useAtlasing,
+                        TextureUploadObserver*       observer,
+                        bool                         orientationCorrection,
+                        TextureManager::ReloadPolicy reloadPolicy,
+                        MultiplyOnLoad&              preMultiplyOnLoad);
 
   /**
    * @brief Requests an image load of the given URL, when the texture has
@@ -342,24 +336,24 @@ public:
    *                                  image has no alpha channel
    * @return                          A TextureId to use as a handle to reference this Texture
    */
-  TextureId RequestLoad( const VisualUrl&                   url,
-                         TextureId                          maskTextureId,
-                         float                              contentScale,
-                         const ImageDimensions              desiredSize,
-                         FittingMode::Type                  fittingMode,
-                         Dali::SamplingMode::Type           samplingMode,
-                         const UseAtlas                     useAtlasing,
-                         bool                               cropToMask,
-                         TextureUploadObserver*             observer,
-                         bool                               orientationCorrection,
-                         TextureManager::ReloadPolicy       reloadPolicy,
-                         MultiplyOnLoad&                    preMultiplyOnLoad );
+  TextureId RequestLoad(const VisualUrl&             url,
+                        TextureId                    maskTextureId,
+                        float                        contentScale,
+                        const ImageDimensions        desiredSize,
+                        FittingMode::Type            fittingMode,
+                        Dali::SamplingMode::Type     samplingMode,
+                        const UseAtlas               useAtlasing,
+                        bool                         cropToMask,
+                        TextureUploadObserver*       observer,
+                        bool                         orientationCorrection,
+                        TextureManager::ReloadPolicy reloadPolicy,
+                        MultiplyOnLoad&              preMultiplyOnLoad);
 
   /**
    * Requests a masking image to be loaded. This mask is not uploaded to GL,
    * instead, it is stored in CPU memory, and can be used for CPU blending.
    */
-  TextureId RequestMaskLoad( const VisualUrl& maskUrl );
+  TextureId RequestMaskLoad(const VisualUrl& maskUrl);
 
   /**
    * @brief Remove a Texture from the TextureManager.
@@ -370,14 +364,14 @@ public:
    * @param[in] textureId The ID of the Texture to remove.
    * @param[in] textureObserver The texture observer.
    */
-  void Remove( const TextureManager::TextureId textureId, TextureUploadObserver* textureObserver );
+  void Remove(const TextureManager::TextureId textureId, TextureUploadObserver* textureObserver);
 
   /**
    * @brief Get the visualUrl associated with the texture id.
    * @param[in] textureId The texture Id to get
    * @return The visual Url associated with the texture id.
    */
-  VisualUrl GetVisualUrl( TextureId textureId );
+  VisualUrl GetVisualUrl(TextureId textureId);
 
   /**
    * @brief Get the current state of a texture
@@ -385,41 +379,41 @@ public:
    * @return The loading state if the texture is valid, or NOT_STARTED if the textureId
    * is not valid.
    */
-  LoadState GetTextureState( TextureId textureId );
+  LoadState GetTextureState(TextureId textureId);
 
   /**
    * @brief Get the associated texture set if the texture id is valid
    * @param[in] textureId The texture Id to look up
    * @return the associated texture set, or an empty handle if textureId is not valid
    */
-  TextureSet GetTextureSet( TextureId textureId );
+  TextureSet GetTextureSet(TextureId textureId);
 
   /**
    * Adds an external texture to the texture manager
    * @param[in] texture The texture to add
    * @return string containing the URL for the texture
    */
-  std::string AddExternalTexture( TextureSet& texture );
+  std::string AddExternalTexture(TextureSet& texture);
 
   /**
    * Removes an external texture from texture manager
    * @param[in] url The string containing the texture to remove
    * @return handle to the texture
    */
-  TextureSet RemoveExternalTexture( const std::string& url );
+  TextureSet RemoveExternalTexture(const std::string& url);
 
   /**
    * Add an observer to the object.
    * @param[in] observer The observer to add.
    */
-  void AddObserver( TextureManager::LifecycleObserver& observer );
+  void AddObserver(TextureManager::LifecycleObserver& observer);
 
   /**
    * Remove an observer from the object
    * @pre The observer has already been added.
    * @param[in] observer The observer to remove.
    */
-  void RemoveObserver( TextureManager::LifecycleObserver& observer );
+  void RemoveObserver(TextureManager::LifecycleObserver& observer);
 
   /**
    * @brief Returns the geometry associated with texture.
@@ -428,10 +422,9 @@ public:
    * @param[out] backElements number of back elements
    * @return Returns valid geometry object
    */
-  Geometry GetRenderGeometry(TextureId textureId, uint32_t& frontElements, uint32_t& backElements );
+  Geometry GetRenderGeometry(TextureId textureId, uint32_t& frontElements, uint32_t& backElements);
 
 private:
-
   /**
    * @brief Requests an image load of the given URL, when the texture has
    * have loaded, if there is a valid maskTextureId, it will perform a
@@ -467,21 +460,21 @@ private:
    * @return                          A TextureId to use as a handle to reference this Texture
    */
   TextureId RequestLoadInternal(
-    const VisualUrl&                    url,
-    TextureId                           maskTextureId,
-    float                               contentScale,
-    const ImageDimensions               desiredSize,
-    FittingMode::Type                   fittingMode,
-    Dali::SamplingMode::Type            samplingMode,
-    UseAtlas                            useAtlas,
-    bool                                cropToMask,
-    StorageType                         storageType,
-    TextureUploadObserver*              observer,
-    bool                                orientationCorrection,
-    TextureManager::ReloadPolicy        reloadPolicy,
-    MultiplyOnLoad&                     preMultiplyOnLoad,
-    Dali::AnimatedImageLoading          animatedImageLoading,
-    uint32_t                            frameIndex );
+    const VisualUrl&             url,
+    TextureId                    maskTextureId,
+    float                        contentScale,
+    const ImageDimensions        desiredSize,
+    FittingMode::Type            fittingMode,
+    Dali::SamplingMode::Type     samplingMode,
+    UseAtlas                     useAtlas,
+    bool                         cropToMask,
+    StorageType                  storageType,
+    TextureUploadObserver*       observer,
+    bool                         orientationCorrection,
+    TextureManager::ReloadPolicy reloadPolicy,
+    MultiplyOnLoad&              preMultiplyOnLoad,
+    Dali::AnimatedImageLoading   animatedImageLoading,
+    uint32_t                     frameIndex);
 
   /**
    * @brief Get the current state of a texture
@@ -489,7 +482,7 @@ private:
    * @return The loading state if the texture is valid, or NOT_STARTED if the textureId
    * is not valid.
    */
-  LoadState GetTextureStateInternal( TextureId textureId );
+  LoadState GetTextureStateInternal(TextureId textureId);
 
   typedef size_t TextureHash; ///< The type used to store the hash used for Texture caching.
 
@@ -500,76 +493,76 @@ private:
    */
   struct TextureInfo
   {
-    TextureInfo( TextureId textureId,
-                 TextureId maskTextureId,
-                 const VisualUrl& url,
-                 ImageDimensions desiredSize,
-                 float scaleFactor,
-                 FittingMode::Type fittingMode,
-                 Dali::SamplingMode::Type samplingMode,
-                 bool loadSynchronously,
-                 bool cropToMask,
-                 UseAtlas useAtlas,
-                 TextureManager::TextureHash hash,
-                 bool orientationCorrection,
-                 bool preMultiplyOnLoad,
-                 Dali::AnimatedImageLoading animatedImageLoading,
-                 uint32_t frameIndex )
-    : url( url ),
-      desiredSize( desiredSize ),
-      useSize( desiredSize ),
-      atlasRect( 0.0f, 0.0f, 1.0f, 1.0f ), // Full atlas rectangle
-      textureId( textureId ),
-      maskTextureId( maskTextureId ),
-      hash( hash ),
-      scaleFactor( scaleFactor ),
-      referenceCount( 1u ),
-      loadState( LoadState::NOT_STARTED ),
-      fittingMode( fittingMode ),
-      samplingMode( samplingMode ),
-      storageType( StorageType::UPLOAD_TO_TEXTURE ),
-      animatedImageLoading( animatedImageLoading ),
-      frameIndex( frameIndex ),
-      loadSynchronously( loadSynchronously ),
-      useAtlas( useAtlas ),
-      cropToMask( cropToMask ),
-      orientationCorrection( true ),
-      preMultiplyOnLoad( preMultiplyOnLoad ),
-      preMultiplied( false )
+    TextureInfo(TextureId                   textureId,
+                TextureId                   maskTextureId,
+                const VisualUrl&            url,
+                ImageDimensions             desiredSize,
+                float                       scaleFactor,
+                FittingMode::Type           fittingMode,
+                Dali::SamplingMode::Type    samplingMode,
+                bool                        loadSynchronously,
+                bool                        cropToMask,
+                UseAtlas                    useAtlas,
+                TextureManager::TextureHash hash,
+                bool                        orientationCorrection,
+                bool                        preMultiplyOnLoad,
+                Dali::AnimatedImageLoading  animatedImageLoading,
+                uint32_t                    frameIndex)
+    : url(url),
+      desiredSize(desiredSize),
+      useSize(desiredSize),
+      atlasRect(0.0f, 0.0f, 1.0f, 1.0f), // Full atlas rectangle
+      textureId(textureId),
+      maskTextureId(maskTextureId),
+      hash(hash),
+      scaleFactor(scaleFactor),
+      referenceCount(1u),
+      loadState(LoadState::NOT_STARTED),
+      fittingMode(fittingMode),
+      samplingMode(samplingMode),
+      storageType(StorageType::UPLOAD_TO_TEXTURE),
+      animatedImageLoading(animatedImageLoading),
+      frameIndex(frameIndex),
+      loadSynchronously(loadSynchronously),
+      useAtlas(useAtlas),
+      cropToMask(cropToMask),
+      orientationCorrection(true),
+      preMultiplyOnLoad(preMultiplyOnLoad),
+      preMultiplied(false)
     {
     }
 
     /**
      * Container type used to store all observer clients of this Texture
      */
-    typedef Dali::Vector< TextureUploadObserver* > ObserverListType;
-
-    ObserverListType observerList; ///< Container used to store all observer clients of this Texture
-    Toolkit::ImageAtlas atlas;     ///< The atlas this Texture lays within (if any)
-    Devel::PixelBuffer pixelBuffer;///< The PixelBuffer holding the image data (May be empty after upload)
-    TextureSet textureSet;         ///< The TextureSet holding the Texture
-    VisualUrl url;                 ///< The URL of the image
-    ImageDimensions desiredSize;   ///< The size requested
-    ImageDimensions useSize;       ///< The size used
-    Vector4 atlasRect;             ///< The atlas rect used if atlased
-    TextureId textureId;           ///< The TextureId associated with this Texture
-    TextureId maskTextureId;       ///< The mask TextureId to be applied on load
-    TextureManager::TextureHash hash; ///< The hash used to cache this Texture
-    float scaleFactor;             ///< The scale factor to apply to the Texture when masking
-    int16_t referenceCount;        ///< The reference count of clients using this Texture
-    LoadState loadState;           ///< The load state showing the load progress of the Texture
-    FittingMode::Type fittingMode:3; ///< The requested FittingMode
-    Dali::SamplingMode::Type samplingMode:3; ///< The requested SamplingMode
-    StorageType storageType;       ///< CPU storage / GPU upload;
-    Dali::AnimatedImageLoading animatedImageLoading; ///< AnimatedImageLoading that contains animated image information.
-    uint32_t frameIndex;           ///< frame index that be loaded, in case of animated image
-    bool loadSynchronously:1;      ///< True if synchronous loading was requested
-    UseAtlas useAtlas:2;           ///< USE_ATLAS if an atlas was requested.
-                                   ///< This is updated to false if atlas is not used
-    bool cropToMask:1;             ///< true if the image should be cropped to the mask size.
-    bool orientationCorrection:1;  ///< true if the image should be rotated to match exif orientation data
-    bool preMultiplyOnLoad:1;      ///< true if the image's color should be multiplied by it's alpha
-    bool preMultiplied:1;          ///< true if the image's color was multiplied by it's alpha
+    typedef Dali::Vector<TextureUploadObserver*> ObserverListType;
+
+    ObserverListType            observerList;          ///< Container used to store all observer clients of this Texture
+    Toolkit::ImageAtlas         atlas;                 ///< The atlas this Texture lays within (if any)
+    Devel::PixelBuffer          pixelBuffer;           ///< The PixelBuffer holding the image data (May be empty after upload)
+    TextureSet                  textureSet;            ///< The TextureSet holding the Texture
+    VisualUrl                   url;                   ///< The URL of the image
+    ImageDimensions             desiredSize;           ///< The size requested
+    ImageDimensions             useSize;               ///< The size used
+    Vector4                     atlasRect;             ///< The atlas rect used if atlased
+    TextureId                   textureId;             ///< The TextureId associated with this Texture
+    TextureId                   maskTextureId;         ///< The mask TextureId to be applied on load
+    TextureManager::TextureHash hash;                  ///< The hash used to cache this Texture
+    float                       scaleFactor;           ///< The scale factor to apply to the Texture when masking
+    int16_t                     referenceCount;        ///< The reference count of clients using this Texture
+    LoadState                   loadState;             ///< The load state showing the load progress of the Texture
+    FittingMode::Type           fittingMode : 3;       ///< The requested FittingMode
+    Dali::SamplingMode::Type    samplingMode : 3;      ///< The requested SamplingMode
+    StorageType                 storageType;           ///< CPU storage / GPU upload;
+    Dali::AnimatedImageLoading  animatedImageLoading;  ///< AnimatedImageLoading that contains animated image information.
+    uint32_t                    frameIndex;            ///< frame index that be loaded, in case of animated image
+    bool                        loadSynchronously : 1; ///< True if synchronous loading was requested
+    UseAtlas                    useAtlas : 2;          ///< USE_ATLAS if an atlas was requested.
+                                                       ///< This is updated to false if atlas is not used
+    bool cropToMask : 1;                               ///< true if the image should be cropped to the mask size.
+    bool orientationCorrection : 1;                    ///< true if the image should be rotated to match exif orientation data
+    bool preMultiplyOnLoad : 1;                        ///< true if the image's color should be multiplied by it's alpha
+    bool preMultiplied : 1;                            ///< true if the image's color was multiplied by it's alpha
   };
 
   /**
@@ -577,14 +570,14 @@ private:
    */
   struct LoadQueueElement
   {
-    LoadQueueElement( TextureId textureId, TextureUploadObserver* observer )
-    : mTextureId( textureId ),
-      mObserver( observer )
+    LoadQueueElement(TextureId textureId, TextureUploadObserver* observer)
+    : mTextureId(textureId),
+      mObserver(observer)
     {
     }
 
-    TextureId mTextureId; ///< The texture id of the requested load.
-    TextureUploadObserver* mObserver; ///< Observer of texture load.
+    TextureId              mTextureId; ///< The texture id of the requested load.
+    TextureUploadObserver* mObserver;  ///< Observer of texture load.
   };
 
   /**
@@ -593,41 +586,41 @@ private:
    */
   struct AsyncLoadingInfo
   {
-    AsyncLoadingInfo( TextureId textureId )
-    : textureId( textureId ),
-      loadId( 0 )
+    AsyncLoadingInfo(TextureId textureId)
+    : textureId(textureId),
+      loadId(0)
     {
     }
 
-    TextureId           textureId;   ///< The external Texture Id assigned to this load
-    uint32_t            loadId;      ///< The load Id used by the async loader to reference this load
+    TextureId textureId; ///< The external Texture Id assigned to this load
+    uint32_t  loadId;    ///< The load Id used by the async loader to reference this load
   };
 
   // Private typedefs:
 
-  typedef std::deque<AsyncLoadingInfo>  AsyncLoadingInfoContainerType;  ///< The container type used to manage Asynchronous loads in progress
-  typedef std::vector<TextureInfo>      TextureInfoContainerType;       ///< The container type used to manage the life-cycle and caching of Textures
+  typedef std::deque<AsyncLoadingInfo> AsyncLoadingInfoContainerType; ///< The container type used to manage Asynchronous loads in progress
+  typedef std::vector<TextureInfo>     TextureInfoContainerType;      ///< The container type used to manage the life-cycle and caching of Textures
 
   /**
    * @brief Initiate a load or queue load if NotifyObservers is invoking callbacks
    * @param[in] textureInfo The TextureInfo struct associated with the Texture
    * @param[in] observer The observer wishing to observe the texture upload
    */
-  void LoadOrQueueTexture( TextureInfo& textureInfo, TextureUploadObserver* observer );
+  void LoadOrQueueTexture(TextureInfo& textureInfo, TextureUploadObserver* observer);
 
   /**
    * @brief Queue a texture load to be subsequently handled by ProcessQueuedTextures.
    * @param[in] textureInfo The TextureInfo struct associated with the Texture
    * @param[in] observer The observer wishing to observe the texture upload
    */
-  void QueueLoadTexture( TextureInfo& textureInfo, TextureUploadObserver* observer );
+  void QueueLoadTexture(TextureInfo& textureInfo, TextureUploadObserver* observer);
 
   /**
    * @brief Used internally to initiate a load.
    * @param[in] textureInfo The TextureInfo struct associated with the Texture
    * @param[in] observer The observer wishing to observe the texture upload
    */
-  void LoadTexture( TextureInfo& textureInfo, TextureUploadObserver* observer );
+  void LoadTexture(TextureInfo& textureInfo, TextureUploadObserver* observer);
 
   /**
    * @brief Initiate load of textures queued whilst NotifyObservers invoking callbacks.
@@ -639,21 +632,21 @@ private:
    * @param[in] textureInfo The TextureInfo struct associated with the texture
    * @param[in] observer The observer wishing to observe the texture upload
    */
-  void ObserveTexture( TextureInfo & textureInfo, TextureUploadObserver* observer );
+  void ObserveTexture(TextureInfo& textureInfo, TextureUploadObserver* observer);
 
   /**
    * @brief This signal handler is called when the async local loader finishes loading.
    * @param[in] id        This is the async image loaders Id
    * @param[in] pixelBuffer The loaded image data
    */
-  void AsyncLocalLoadComplete( uint32_t id, Devel::PixelBuffer pixelBuffer );
+  void AsyncLocalLoadComplete(uint32_t id, Devel::PixelBuffer pixelBuffer);
 
   /**
    * @brief This signal handler is called when the async local loader finishes loading.
    * @param[in] id        This is the async image loaders Id
    * @param[in] pixelBuffer The loaded image data
    */
-  void AsyncRemoteLoadComplete( uint32_t id, Devel::PixelBuffer pixelBuffer );
+  void AsyncRemoteLoadComplete(uint32_t id, Devel::PixelBuffer pixelBuffer);
 
   /**
    * Common method to handle loading completion
@@ -661,7 +654,7 @@ private:
    * @param[in] id        This is the async image loaders Id
    * @param[in] pixelBuffer The loaded image data
    */
-  void AsyncLoadComplete( AsyncLoadingInfoContainerType& container, uint32_t id, Devel::PixelBuffer pixelBuffer );
+  void AsyncLoadComplete(AsyncLoadingInfoContainerType& container, uint32_t id, Devel::PixelBuffer pixelBuffer);
 
   /**
    * @brief Performs Post-Load steps including atlasing.
@@ -669,21 +662,21 @@ private:
    * @param[in] pixelBuffer The image pixelBuffer
    * @return    True if successful
    */
-  void PostLoad( TextureManager::TextureInfo& textureInfo, Devel::PixelBuffer& pixelBuffer );
+  void PostLoad(TextureManager::TextureInfo& textureInfo, Devel::PixelBuffer& pixelBuffer);
 
   /**
    * Check if there is a texture waiting to be masked. If there
    * is then apply this mask and upload it.
    * @param[in] maskTextureInfo The texture info of the mask that has just loaded.
    */
-  void CheckForWaitingTexture( TextureInfo& maskTextureInfo );
+  void CheckForWaitingTexture(TextureInfo& maskTextureInfo);
 
   /**
    * Apply the mask to the pixelBuffer.
    * @param[in] textureInfo The information of texture to apply the mask to
    * @param[in] maskTextureId The texture id of the mask.
    */
-  void ApplyMask( TextureInfo& textureInfo, TextureId maskTextureId );
+  void ApplyMask(TextureInfo& textureInfo, TextureId maskTextureId);
 
   /**
    * Upload the texture specified in pixelBuffer to the appropriate location
@@ -691,7 +684,7 @@ private:
    * @param[in] textureInfo The texture info containing the location to
    * store the data to.
    */
-  void UploadTexture( Devel::PixelBuffer& pixelBuffer, TextureInfo& textureInfo );
+  void UploadTexture(Devel::PixelBuffer& pixelBuffer, TextureInfo& textureInfo);
 
   /**
    * Creates tiled geometry of for the texture which separates fully-opaque
@@ -699,13 +692,13 @@ private:
    * @param pixelBuffer
    * @param textureInfo
    */
-  bool CreateTiledGeometry( const Devel::PixelBuffer& pixelBuffer, TextureInfo& textureInfo );
+  bool CreateTiledGeometry(const Devel::PixelBuffer& pixelBuffer, TextureInfo& textureInfo);
 
   /**
    * Mark the texture as complete, and inform observers
    * @param[in] textureInfo The struct associated with this Texture
    */
-  void UploadComplete( TextureInfo& textureInfo );
+  void UploadComplete(TextureInfo& textureInfo);
 
   /**
    * Notify the current observers that the texture upload is complete,
@@ -713,7 +706,7 @@ private:
    * @param[in] textureInfo The struct associated with this Texture
    * @param[in] success If the pixel data was retrieved successfully and uploaded to GPU
    */
-  void NotifyObservers( TextureInfo& textureInfo, bool success );
+  void NotifyObservers(TextureInfo& textureInfo, bool success);
 
   /**
    * @brief Generates a new, unique TextureId
@@ -726,8 +719,7 @@ private:
    * @param[in] textureId The TextureId to look up
    * @return              The cache index
    */
-  int GetCacheIndexFromId( TextureId textureId );
-
+  int GetCacheIndexFromId(TextureId textureId);
 
   /**
    * @brief Generates a hash for caching based on the input parameters.
@@ -742,10 +734,7 @@ private:
    * @param[in] maskTextureId    The masking texture id (or INVALID_TEXTURE_ID)
    * @return                     A hash of the provided data for caching.
    */
-  TextureHash GenerateHash( const std::string& url, const ImageDimensions size,
-                            const FittingMode::Type fittingMode,
-                            const Dali::SamplingMode::Type samplingMode, const UseAtlas useAtlas,
-                            TextureId maskTextureId );
+  TextureHash GenerateHash(const std::string& url, const ImageDimensions size, const FittingMode::Type fittingMode, const Dali::SamplingMode::Type samplingMode, const UseAtlas useAtlas, TextureId maskTextureId);
 
   /**
    * @brief Looks up a cached texture by its hash.
@@ -762,16 +751,15 @@ private:
    */
   TextureManager::TextureId FindCachedTexture(
     const TextureManager::TextureHash hash,
-    const std::string& url,
-    const ImageDimensions size,
-    const FittingMode::Type fittingMode,
-    const Dali::SamplingMode::Type samplingMode,
-    const bool useAtlas,
-    TextureId maskTextureId,
-    MultiplyOnLoad preMultiplyOnLoad);
+    const std::string&                url,
+    const ImageDimensions             size,
+    const FittingMode::Type           fittingMode,
+    const Dali::SamplingMode::Type    samplingMode,
+    const bool                        useAtlas,
+    TextureId                         maskTextureId,
+    MultiplyOnLoad                    preMultiplyOnLoad);
 
 private:
-
   /**
    * @brief Helper class to keep the relation between AsyncImageLoader and corresponding LoadingInfo container
    */
@@ -790,9 +778,9 @@ private:
      * @param[in] animatedImageLoading  The AnimatedImageLoading to load animated image
      * @param[in] frameIndex            The frame index of a frame to be loaded frame
      */
-    void LoadAnimatedImage( TextureId textureId,
-                            Dali::AnimatedImageLoading animatedImageLoading,
-                            uint32_t frameIndex);
+    void LoadAnimatedImage(TextureId                  textureId,
+                           Dali::AnimatedImageLoading animatedImageLoading,
+                           uint32_t                   frameIndex);
 
     /**
      * @brief Load a new texture.
@@ -806,12 +794,12 @@ private:
      *                                  e.g., from portrait to landscape
      * @param[in] preMultiplyOnLoad     if the image's color should be multiplied by it's alpha. Set to OFF if there is no alpha or if the image need to be applied alpha mask.
      */
-    void Load(TextureId textureId,
-              const VisualUrl& url,
-              ImageDimensions desiredSize,
-              FittingMode::Type fittingMode,
-              SamplingMode::Type samplingMode,
-              bool orientationCorrection,
+    void Load(TextureId                                textureId,
+              const VisualUrl&                         url,
+              ImageDimensions                          desiredSize,
+              FittingMode::Type                        fittingMode,
+              SamplingMode::Type                       samplingMode,
+              bool                                     orientationCorrection,
               DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad);
 
     /**
@@ -823,34 +811,34 @@ private:
      * @param [in] cropToMask Whether to crop the content to the mask size
      * @param [in] preMultiplyOnLoad if the image's color should be multiplied by it's alpha. Set to OFF if there is no alpha.
      */
-    void ApplyMask( TextureId textureId,
-                    Devel::PixelBuffer pixelBuffer,
-                    Devel::PixelBuffer maskPixelBuffer,
-                    float contentScale,
-                    bool cropToMask,
-                    DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad );
+    void ApplyMask(TextureId                                textureId,
+                   Devel::PixelBuffer                       pixelBuffer,
+                   Devel::PixelBuffer                       maskPixelBuffer,
+                   float                                    contentScale,
+                   bool                                     cropToMask,
+                   DevelAsyncImageLoader::PreMultiplyOnLoad preMultiplyOnLoad);
 
   public:
     AsyncLoadingHelper(const AsyncLoadingHelper&) = delete;
     AsyncLoadingHelper& operator=(const AsyncLoadingHelper&) = delete;
 
     AsyncLoadingHelper(AsyncLoadingHelper&& rhs);
-    AsyncLoadingHelper& operator=(AsyncLoadingHelper&&rhs) = delete;
+    AsyncLoadingHelper& operator=(AsyncLoadingHelper&& rhs) = delete;
 
   private:
     /**
      * @brief Main constructor that used by all other constructors
      */
-    AsyncLoadingHelper( Toolkit::AsyncImageLoader loader,
-                        TextureManager& textureManager,
-                        AsyncLoadingInfoContainerType&& loadingInfoContainer );
+    AsyncLoadingHelper(Toolkit::AsyncImageLoader       loader,
+                       TextureManager&                 textureManager,
+                       AsyncLoadingInfoContainerType&& loadingInfoContainer);
 
     /**
      * @brief Callback to be called when texture loading is complete, it passes the pixel buffer on to texture manager.
      * @param[in] id          Loader id
      * @param[in] pixelBuffer Image data
      */
-    void AsyncLoadComplete( uint32_t id, Devel::PixelBuffer pixelBuffer );
+    void AsyncLoadComplete(uint32_t id, Devel::PixelBuffer pixelBuffer);
 
   private:
     Toolkit::AsyncImageLoader     mLoader;
@@ -860,43 +848,40 @@ private:
 
   struct ExternalTextureInfo
   {
-    TextureId textureId;
+    TextureId  textureId;
     TextureSet textureSet;
   };
 
 private:
-
   /**
    * Deleted copy constructor.
    */
-  TextureManager( const TextureManager& ) = delete;
+  TextureManager(const TextureManager&) = delete;
 
   /**
    * Deleted assignment operator.
    */
-  TextureManager& operator=( const TextureManager& rhs ) = delete;
+  TextureManager& operator=(const TextureManager& rhs) = delete;
 
   /**
    * This is called by the TextureManagerUploadObserver when an observer is destroyed.
    * We use the callback to know when to remove an observer from our notify list.
    * @param[in] observer The observer that generated the callback
    */
-  void ObserverDestroyed( TextureUploadObserver* observer );
-
-private:  // Member Variables:
-
-  TextureInfoContainerType                      mTextureInfoContainer; ///< Used to manage the life-cycle and caching of Textures
-  RoundRobinContainerView< AsyncLoadingHelper > mAsyncLocalLoaders;    ///< The Asynchronous image loaders used to provide all local async loads
-  RoundRobinContainerView< AsyncLoadingHelper > mAsyncRemoteLoaders;   ///< The Asynchronous image loaders used to provide all remote async loads
-  std::vector< ExternalTextureInfo >            mExternalTextures;     ///< Externally provided textures
-  Dali::Vector<LifecycleObserver*>              mLifecycleObservers;   ///< Lifecycle observers of texture manager
-  Dali::Vector<LoadQueueElement>                mLoadQueue;            ///< Queue of textures to load after NotifyObservers
-  TextureId                                     mCurrentTextureId;     ///< The current value used for the unique Texture Id generation
-  bool                                          mQueueLoadFlag;        ///< Flag that causes Load Textures to be queued.
+  void ObserverDestroyed(TextureUploadObserver* observer);
+
+private:                                                             // Member Variables:
+  TextureInfoContainerType                    mTextureInfoContainer; ///< Used to manage the life-cycle and caching of Textures
+  RoundRobinContainerView<AsyncLoadingHelper> mAsyncLocalLoaders;    ///< The Asynchronous image loaders used to provide all local async loads
+  RoundRobinContainerView<AsyncLoadingHelper> mAsyncRemoteLoaders;   ///< The Asynchronous image loaders used to provide all remote async loads
+  std::vector<ExternalTextureInfo>            mExternalTextures;     ///< Externally provided textures
+  Dali::Vector<LifecycleObserver*>            mLifecycleObservers;   ///< Lifecycle observers of texture manager
+  Dali::Vector<LoadQueueElement>              mLoadQueue;            ///< Queue of textures to load after NotifyObservers
+  TextureId                                   mCurrentTextureId;     ///< The current value used for the unique Texture Id generation
+  bool                                        mQueueLoadFlag;        ///< Flag that causes Load Textures to be queued.
 };
 
-
-} // name Internal
+} // namespace Internal
 
 } // namespace Toolkit
 
index b00722c..d6657a2 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_TEXTURE_UPLOAD_OBSERVER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/signals/dali-signal.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/public-api/dali-toolkit-common.h>
 #include <dali-toolkit/internal/visuals/visual-url.h>
+#include <dali-toolkit/public-api/dali-toolkit-common.h>
 
 namespace Dali
 {
-
 class TextureSet;
 
 namespace Toolkit
 {
-
-
 /**
  * @brief Base class used to observe the upload status of a texture.
  *
@@ -44,8 +41,7 @@ namespace Toolkit
 class TextureUploadObserver
 {
 public:
-
-  typedef Signal< void ( TextureUploadObserver* ) > DestructionSignalType; ///< Signal prototype for the Destruction Signal.
+  typedef Signal<void(TextureUploadObserver*)> DestructionSignalType; ///< Signal prototype for the Destruction Signal.
 
   /**
    * @brief Constructor.
@@ -68,8 +64,7 @@ public:
    * @param[in] atlasRect   If using atlasing, this is the rectangle within the atlas to use.
    * @param[in] preMultiplied True if the image had pre-multiplied alpha applied
    */
-  virtual void UploadComplete( bool loadSuccess, int32_t textureId, TextureSet textureSet, bool useAtlasing,
-                               const Vector4& atlasRect, bool preMultiplied ) = 0;
+  virtual void UploadComplete(bool loadSuccess, int32_t textureId, TextureSet textureSet, bool useAtlasing, const Vector4& atlasRect, bool preMultiplied) = 0;
 
   /**
    * The action to be taken once the async load has finished.
@@ -80,7 +75,7 @@ public:
    * @param[in] url           The url address of the loaded image.
    * @param[in] preMultiplied True if the image had pre-multiplied alpha applied
    */
-  virtual void LoadComplete( bool loadSuccess, Devel::PixelBuffer pixelBuffer, const Internal::VisualUrl& url, bool preMultiplied ) = 0;
+  virtual void LoadComplete(bool loadSuccess, Devel::PixelBuffer pixelBuffer, const Internal::VisualUrl& url, bool preMultiplied) = 0;
 
   /**
    * @brief Returns the destruction signal.
@@ -90,12 +85,9 @@ public:
   DestructionSignalType& DestructionSignal();
 
 private:
-
   DestructionSignalType mDestructionSignal; ///< The destruction signal emitted when the observer is destroyed.
-
 };
 
-
 } // namespace Toolkit
 
 } // namespace Dali
index 0ecf0a4..39c84f9 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_TRANSITION_DATA_H
 
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/object/base-object.h>
+#include <dali/devel-api/common/owner-container.h>
 #include <dali/public-api/animation/alpha-function.h>
+#include <dali/public-api/object/base-object.h>
 #include <dali/public-api/object/property-key.h>
-#include <dali/devel-api/common/owner-container.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/visual-factory/transition-data.h>
@@ -32,7 +32,6 @@ namespace Toolkit
 {
 namespace Internal
 {
-
 class TransitionData;
 typedef IntrusivePtr<TransitionData> TransitionDataPtr;
 
@@ -42,48 +41,47 @@ typedef IntrusivePtr<TransitionData> TransitionDataPtr;
 class TransitionData : public BaseObject
 {
 public:
-
   /**
    * @brief TransitionDataElement Describes one animator of an transition.
    */
   struct Animator
   {
     Animator()
-    : propertyKey( Property::INVALID_INDEX ),
-      alphaFunction( AlphaFunction::DEFAULT ),
-      timePeriodDelay( 0.0f ),
-      timePeriodDuration( 1.0f ),
+    : propertyKey(Property::INVALID_INDEX),
+      alphaFunction(AlphaFunction::DEFAULT),
+      timePeriodDelay(0.0f),
+      timePeriodDuration(1.0f),
       animate(false)
     {
     }
 
-    std::string objectName;   ///< An identifier of the actor or visual
-    Property::Key propertyKey; ///< A property key of the property owner
-    Property::Value initialValue; ///< The value to set at the start of the transition
-    Property::Value targetValue;   ///< The value to set or animate to
+    std::string         objectName;   ///< An identifier of the actor or visual
+    Property::Key       propertyKey;  ///< A property key of the property owner
+    Property::Value     initialValue; ///< The value to set at the start of the transition
+    Property::Value     targetValue;  ///< The value to set or animate to
     Dali::AlphaFunction alphaFunction;
-    float timePeriodDelay;
-    float timePeriodDuration;
-    bool animate;
+    float               timePeriodDelay;
+    float               timePeriodDuration;
+    bool                animate;
   };
 
   /**
    * @brief TransitionData holds the required data required to define an
    * transition to be performed on a property owner
    */
-  typedef Dali::OwnerContainer< Animator* > AnimatorList;
-  typedef AnimatorList::Iterator Iterator;
+  typedef Dali::OwnerContainer<Animator*> AnimatorList;
+  typedef AnimatorList::Iterator          Iterator;
 
 public:
   /**
    * @copydoc Dali::Transition::New()
    */
-  static TransitionDataPtr New( const Property::Array& value );
+  static TransitionDataPtr New(const Property::Array& value);
 
   /**
    * @copydoc Dali::Transition::New()
    */
-  static TransitionDataPtr New( const Property::Map& value );
+  static TransitionDataPtr New(const Property::Map& value);
 
   /**
    * @brief Iterator to the beginning of the data
@@ -103,7 +101,7 @@ public:
   /**
    * @copydoc Dali::Transition::GetAnimatorAt()
    */
-  Property::Map GetAnimatorAt( size_t index );
+  Property::Map GetAnimatorAt(size_t index);
 
 private: // Implementation
   /**
@@ -114,23 +112,23 @@ private: // Implementation
   /**
    * Second stage initialiazation
    */
-  void Initialize( const Property::Map& value );
+  void Initialize(const Property::Map& value);
 
   /**
    * Second stage initialiazation
    */
-  void Initialize( const Property::Array& value );
+  void Initialize(const Property::Array& value);
 
   /**
    * @brief Adds one Animator to the list to describe a transition.
    * @param[in] animator An animator data structure
    */
-  void Add( Animator* animator );
+  void Add(Animator* animator);
 
   /**
    * Convert a Property map into Animator data
    */
-  Animator* ConvertMap( const Property::Map& map );
+  Animator* ConvertMap(const Property::Map& map);
 
 protected:
   /**
@@ -139,24 +137,24 @@ protected:
   ~TransitionData() override;
 
 private: // Unimplemented methods
-  TransitionData( const TransitionData& );
-  TransitionData& operator=( const TransitionData& );
+  TransitionData(const TransitionData&);
+  TransitionData& operator=(const TransitionData&);
 
-private: // Data members
+private:                   // Data members
   AnimatorList mAnimators; ///< A vector of individual property transitions from which to generate a Dali::Animation.
 };
 
 } // namespace Internal
 
 // Helpers for public-api forwarding methods
-inline Internal::TransitionData& GetImplementation( Dali::Toolkit::TransitionData& handle )
+inline Internal::TransitionData& GetImplementation(Dali::Toolkit::TransitionData& handle)
 {
   DALI_ASSERT_ALWAYS(handle && "TransitionData handle is empty");
   BaseObject& object = handle.GetBaseObject();
   return static_cast<Internal::TransitionData&>(object);
 }
 
-inline const Internal::TransitionData& GetImplementation( const Dali::Toolkit::TransitionData& handle )
+inline const Internal::TransitionData& GetImplementation(const Dali::Toolkit::TransitionData& handle)
 {
   DALI_ASSERT_ALWAYS(handle && "TransitionData handle is empty");
   const BaseObject& object = handle.GetBaseObject();
@@ -166,5 +164,4 @@ inline const Internal::TransitionData& GetImplementation( const Dali::Toolkit::T
 } // namespace Toolkit
 } // namespace Dali
 
-
 #endif // DALI_TOOLKIT_INTERNAL_TRANSITION_DATA_H
index 718b5e4..2967b1d 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_VISUAL_BASE_DATA_IMPL_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/rendering/renderer.h>
 
 // INTERNAL INCLUDES
+#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 #include <dali-toolkit/internal/visuals/visual-base-impl.h>
 #include <dali-toolkit/internal/visuals/visual-event-observer.h>
 #include <dali-toolkit/public-api/align-enumerations.h>
 #include <dali-toolkit/public-api/visuals/visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 namespace Visual
 {
-
 struct Base::Impl
 {
   /**
@@ -48,7 +44,7 @@ struct Base::Impl
    * @param [in] fittingMode that the derived class prefers
    * @param [in] type The type of the this visual
    */
-  Impl( FittingMode fittingMode, Toolkit::Visual::Type type );
+  Impl(FittingMode fittingMode, Toolkit::Visual::Type type);
 
   /**
    * Destructor
@@ -57,21 +53,21 @@ struct Base::Impl
 
   enum Flags
   {
-    IS_ON_SCENE = 1,
-    IS_ATLASING_APPLIED = 1<<1,
-    IS_PREMULTIPLIED_ALPHA = 1 << 2,
+    IS_ON_SCENE                     = 1,
+    IS_ATLASING_APPLIED             = 1 << 1,
+    IS_PREMULTIPLIED_ALPHA          = 1 << 2,
     IS_SYNCHRONOUS_RESOURCE_LOADING = 1 << 3
   };
 
   struct CustomShader
   {
-    CustomShader( const Property::Map& map );
-    void SetPropertyMap( const Property::Map& map );
-    void CreatePropertyMap( Property::Map& map ) const;
+    CustomShader(const Property::Map& map);
+    void SetPropertyMap(const Property::Map& map);
+    void CreatePropertyMap(Property::Map& map) const;
 
-    std::string mVertexShader;
-    std::string mFragmentShader;
-    Dali::ImageDimensions mGridSize;
+    std::string               mVertexShader;
+    std::string               mFragmentShader;
+    Dali::ImageDimensions     mGridSize;
     Dali::Shader::Hint::Value mHints; //(bitfield) values from enum Shader::Hint
   };
 
@@ -87,56 +83,56 @@ struct Base::Impl
      * attributes, and sets the remaining attributes to their default
      * values.
      */
-    void SetPropertyMap( const Property::Map& map );
+    void SetPropertyMap(const Property::Map& map);
 
     /**
      * Add the transform attributes to the map (using integer keys)
      */
-    void GetPropertyMap( Property::Map& map ) const;
+    void GetPropertyMap(Property::Map& map) const;
 
     /**
      * Update zero or more attributes from the property map.
      */
-    void UpdatePropertyMap( const Property::Map& map );
+    void UpdatePropertyMap(const Property::Map& map);
 
     /**
      * Register or set the uniform properties onto the renderer
      */
-    void RegisterUniforms( Renderer renderer, Toolkit::Direction::Type direction );
+    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 GetVisualSize(const Vector2& controlSize);
 
-    Vector2 mOffset;
-    Vector2 mSize;
-    Vector2 mExtraSize;
-    Vector4 mOffsetSizeMode;
+    Vector2              mOffset;
+    Vector2              mSize;
+    Vector2              mExtraSize;
+    Vector4              mOffsetSizeMode;
     Toolkit::Align::Type mOrigin;
     Toolkit::Align::Type mAnchorPoint;
     Property::Index      mOffsetIndex;
     Property::Index      mSizeIndex;
   };
 
-  Renderer        mRenderer;
-  CustomShader*   mCustomShader;
-  EventObserver*  mEventObserver;  ///< Allows controls to observe when the visual has events to notify
-  std::string     mName;
-  Transform       mTransform;
-  Vector4         mMixColor;
-  Size            mControlSize;
-  float           mCornerRadius;
-  float           mCornerRadiusPolicy;
-  int             mDepthIndex;
-  Property::Index mMixColorIndex;
-  Property::Index mCornerRadiusIndex;
-  FittingMode     mFittingMode;  //< How the contents should fit the view
-  int             mFlags;
-  Toolkit::Visual::ResourceStatus  mResourceStatus;
-  const Toolkit::Visual::Type      mType;
-  bool                             mNeedCornerRadius;
+  Renderer                        mRenderer;
+  CustomShader*                   mCustomShader;
+  EventObserver*                  mEventObserver; ///< Allows controls to observe when the visual has events to notify
+  std::string                     mName;
+  Transform                       mTransform;
+  Vector4                         mMixColor;
+  Size                            mControlSize;
+  float                           mCornerRadius;
+  float                           mCornerRadiusPolicy;
+  int                             mDepthIndex;
+  Property::Index                 mMixColorIndex;
+  Property::Index                 mCornerRadiusIndex;
+  FittingMode                     mFittingMode; //< How the contents should fit the view
+  int                             mFlags;
+  Toolkit::Visual::ResourceStatus mResourceStatus;
+  const Toolkit::Visual::Type     mType;
+  bool                            mNeedCornerRadius;
 };
 
 } // namespace Visual
index 3b23e5c..c958992 100644 (file)
 #include <dali/public-api/rendering/shader.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
+#include <dali-toolkit/devel-api/direction-enums.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-base.h>
+#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
+#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 #include <dali-toolkit/internal/visuals/transition-data-impl.h>
 #include <dali-toolkit/internal/visuals/visual-factory-cache.h>
-#include <dali-toolkit/devel-api/direction-enums.h>
 #include <dali-toolkit/public-api/visuals/visual-properties.h>
-#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 namespace Visual
 {
-
 class EventObserver;
 
 using FittingMode = DevelVisual::FittingMode;
@@ -74,17 +70,16 @@ using FittingMode = DevelVisual::FittingMode;
 class Base : public BaseObject
 {
 public:
-
   /**
    * Setting the properties of the visual, this API should only called by the VisualFactory
    * @param[in] propertyMap The properties for the requested Visual object.
    */
-  void SetProperties( const Property::Map& propertyMap );
+  void SetProperties(const Property::Map& propertyMap);
 
   /**
    * @copydoc Toolkit::Visual::Base::SetName
    */
-  void SetName( const std::string& name );
+  void SetName(const std::string& name);
 
   /**
    * @copydoc Toolkit::Visual::Base::GetName
@@ -94,7 +89,7 @@ public:
   /**
    * @copydoc Toolkit::Visual::Base::SetSize
    */
-  void SetTransformAndSize( const Property::Map& transform, Size controlSize );
+  void SetTransformAndSize(const Property::Map& transform, Size controlSize);
 
   /**
    * @brief Performs an action on the visual with the given action name and attributes.
@@ -102,27 +97,27 @@ public:
    * @param[in] actionName The name of the action to perform this API only takes an Index
    * @param[in] attributes The list of attributes for the action. ( optional for this data structure to have content )
    */
-  void DoAction( const Dali::Property::Index actionName, const Dali::Property::Value attributes );
+  void DoAction(const Dali::Property::Index actionName, const Dali::Property::Value attributes);
 
   /**
    * @copydoc Toolkit::Visual::Base::GetHeightForWidth
    */
-  virtual float GetHeightForWidth( float width );
+  virtual float GetHeightForWidth(float width);
 
   /**
    * @copydoc Toolkit::Visual::Base::GetWidthForHeight
    */
-  virtual float GetWidthForHeight( float height );
+  virtual float GetWidthForHeight(float height);
 
   /**
    * @copydoc Toolkit::Visual::Base::GetNaturalSize
    */
-  virtual void GetNaturalSize( Vector2& naturalSize );
+  virtual void GetNaturalSize(Vector2& naturalSize);
 
   /**
    * @copydoc Toolkit::Visual::Base::SetDepthIndex
    */
-  void SetDepthIndex( int index );
+  void SetDepthIndex(int index);
 
   /**
    * @copydoc Toolkit::Visual::Base::GetDepthIndex
@@ -133,17 +128,17 @@ public:
    * @copydoc Toolkit::Visual::Base::SetOnScene
    * @pre Impl->mGeometry must be created before this method is called
    */
-  void SetOnScene( Actor& actor );
+  void SetOnScene(Actor& actor);
 
   /**
    * @copydoc Toolkit::Visual::Base::SetOffScene
    */
-  void SetOffScene( Actor& actor );
+  void SetOffScene(Actor& actor);
 
   /**
    * @copydoc Toolkit::Visual::Base::CreatePropertyMap
    */
-  void CreatePropertyMap( Property::Map& map ) const;
+  void CreatePropertyMap(Property::Map& map) const;
 
   /**
    * @brief Create a property map containing per-instance visual properties.
@@ -153,14 +148,14 @@ public:
    * (e.g. for image visual, the desired size, and for text visual, the actual text).
    * @param[in] map The property map into which to write
    */
-  void CreateInstancePropertyMap( Property::Map& map ) const;
+  void CreateInstancePropertyMap(Property::Map& map) const;
 
   /**
    * @brief Set whether the Pre-multiplied Alpha Blending is required
    *
    * @param[in] preMultiplied whether alpha is pre-multiplied.
    */
-  void EnablePreMultipliedAlpha( bool preMultiplied );
+  void EnablePreMultipliedAlpha(bool preMultiplied);
 
   /**
    * @brief Query whether alpha is pre-multiplied.
@@ -173,17 +168,17 @@ public:
    * @brief Sets properties of custom shader
    * @param[in] propertyMap Property map containing the custom shader data
    */
-  void SetCustomShader( const Property::Map& propertyMap );
+  void SetCustomShader(const Property::Map& propertyMap);
 
   /**
    * @copydoc Toolkit::Visual::Base::SetProperty
    */
-  void SetProperty( Dali::Property::Index index, const Dali::Property::Value& propertyValue );
+  void SetProperty(Dali::Property::Index index, const Dali::Property::Value& propertyValue);
 
   /**
    * @copydoc Toolkit::Visual::Base::GetProperty
    */
-  Dali::Property::Value GetProperty( Dali::Property::Index index );
+  Dali::Property::Value GetProperty(Dali::Property::Index index);
 
   /**
    * Gets currently staged renderer, or an empty handle if not staged
@@ -194,13 +189,13 @@ public:
    * Sets the mix color ( including opacity )  of the visual.
    * @param[in] mixColor The new mix color
    */
-  void SetMixColor( const Vector4& color );
+  void SetMixColor(const Vector4& color);
 
   /**
    * Sets the mix color of the visual.
    * @param[in] mixColor The new mix color
    */
-  void SetMixColor( const Vector3& color );
+  void SetMixColor(const Vector3& color);
 
   /**
    * Animate the property if it exists in the visual or renderer.
@@ -217,24 +212,24 @@ public:
    * @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 );
+  void AnimateProperty(Dali::Animation&                    transition,
+                       Internal::TransitionData::Animator& animator);
 
   /**
    * @brief Add an observer to watch for when the Visuals have events to notify
    * Currently only supports a single observer
    */
-  void AddEventObserver( Visual::EventObserver& observer );
+  void AddEventObserver(Visual::EventObserver& observer);
 
   /**
    * @brief Remove an observer
    */
-  void RemoveEventObserver( Visual::EventObserver& observer );
+  void RemoveEventObserver(Visual::EventObserver& observer);
 
   /**
    * @brief Called when the visuals resources are loaded / ready
    */
-  void ResourceReady( Toolkit::Visual::ResourceStatus resourceStatus );
+  void ResourceReady(Toolkit::Visual::ResourceStatus resourceStatus);
 
   /**
    * @brief Called when the visuals resources are loaded / ready
@@ -289,7 +284,7 @@ protected:
    * @param[in] fittingMode The value that determines how the visual should be fit to the view
    * @param[in] type The type of the this visual
    */
-  Base( VisualFactoryCache& factoryCache, FittingMode fittingMode, Toolkit::Visual::Type type );
+  Base(VisualFactoryCache& factoryCache, FittingMode fittingMode, Toolkit::Visual::Type type);
 
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
@@ -312,7 +307,7 @@ protected:
    *
    * @param[out] map The visual property map.
    */
-  virtual void DoCreatePropertyMap( Property::Map& map ) const = 0;
+  virtual void DoCreatePropertyMap(Property::Map& map) const = 0;
 
   /**
    * @brief Called by CreateInstancePropertyMap() allowing derived
@@ -321,14 +316,14 @@ protected:
    *
    * @param[out] map The visual property map
    */
-  virtual void DoCreateInstancePropertyMap( Property::Map& map ) const = 0;
+  virtual void DoCreateInstancePropertyMap(Property::Map& map) const = 0;
 
   /**
    * @brief Called by SetProperties() allowing sub classes to set their properties
    *
    * @param[in] propertyMap The properties for the requested Visual object.
    */
-  virtual void DoSetProperties( const Property::Map& propertyMap ) = 0;
+  virtual void DoSetProperties(const Property::Map& propertyMap) = 0;
 
   /**
    * @brief Called when transform or control size changes
@@ -343,14 +338,14 @@ protected:
    *
    * @param[in] actor The actor applying this visual.
    */
-  virtual void DoSetOnScene( Actor& actor ) = 0;
+  virtual void DoSetOnScene(Actor& actor) = 0;
 
   /**
    * @brief Called by SetOffScene() allowing sub classes to respond to the SetOffScene event
    *
    * @param[in] actor The actor applying this visual.
    */
-  virtual void DoSetOffScene( Actor& actor );
+  virtual void DoSetOffScene(Actor& actor);
 
   /**
    * @brief Called by DoAction() allowing sub classes to do the given action.
@@ -358,7 +353,7 @@ protected:
    * @param[in] actionId The action to perform
    * @param[in] attributes The list of attributes for the action. ( optional for this data structure to have content )
    */
-  virtual void OnDoAction( const Property::Index actionId, const Property::Value& attributes );
+  virtual void OnDoAction(const Property::Index actionId, const Property::Value& attributes);
 
   /**
    * @brief Update the shader when some properties are changed.
@@ -380,7 +375,6 @@ protected:
   }
 
 protected:
-
   /**
    * @brief Gets the on scene state for this Visual
    *
@@ -396,7 +390,6 @@ protected:
   bool IsRoundedCornerRequired() const;
 
 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
@@ -411,7 +404,7 @@ private:
    * @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 );
+  Property::Index GetPropertyIndex(Property::Key key);
 
   /**
    * Set up the transition. If no animation is required, then
@@ -423,11 +416,11 @@ private:
    * @param[in] initialValue The optional initial value
    * @param[in] targetValue The target value to use
    */
-  void SetupTransition( Dali::Animation& transition,
-                        Internal::TransitionData::Animator& animator,
-                        Property::Index index,
-                        Property::Value& initialValue,
-                        Property::Value& targetValue );
+  void SetupTransition(Dali::Animation&                    transition,
+                       Internal::TransitionData::Animator& animator,
+                       Property::Index                     index,
+                       Property::Value&                    initialValue,
+                       Property::Value&                    targetValue);
 
   /**
    * Animate the opacity property - Special handling to
@@ -438,8 +431,8 @@ private:
    * @param[in] transition The transition to use or set up.
    * @param[in] animator The animation data to use
    */
-  void AnimateOpacityProperty( Dali::Animation& transition,
-                               Internal::TransitionData::Animator& animator );
+  void AnimateOpacityProperty(Dali::Animation&                    transition,
+                              Internal::TransitionData::Animator& animator);
 
   /**
    * Animate the renderer property - no special handling
@@ -447,8 +440,8 @@ private:
    * @param[in] transition The transition to use or set up.
    * @param[in] animator The animation data to use
    */
-  void AnimateRendererProperty( Dali::Animation& transition,
-                                Internal::TransitionData::Animator& animator );
+  void AnimateRendererProperty(Dali::Animation&                    transition,
+                               Internal::TransitionData::Animator& animator);
 
   /**
    * Animate the mix color property.
@@ -461,30 +454,30 @@ private:
    * @param[in] transition The transition to use or set up.
    * @param[in] animator The animation data to use
    */
-  void AnimateMixColorProperty( Dali::Animation& transition,
-                                Internal::TransitionData::Animator& animator );
+  void AnimateMixColorProperty(Dali::Animation&                    transition,
+                               Internal::TransitionData::Animator& animator);
 
   // Undefined
-  Base( const Visual::Base& visual );
+  Base(const Visual::Base& visual);
 
   // Undefined
-  Base& operator=( const Visual::Base& visual );
+  Base& operator=(const Visual::Base& visual);
 
 protected:
   struct Impl;
-  Impl* mImpl;
+  Impl*               mImpl;
   VisualFactoryCache& mFactoryCache;
 };
 
 typedef IntrusivePtr<Base> BasePtr;
 
-} // namspace Visual
+} // namespace Visual
 
 } // namespace Internal
 
-inline const Internal::Visual::Base& GetImplementation(const Toolkit::Visual::Base& visualBase )
+inline const Internal::Visual::Base& GetImplementation(const Toolkit::Visual::Base& visualBase)
 {
-  DALI_ASSERT_ALWAYS( visualBase && "visual base handle is empty" );
+  DALI_ASSERT_ALWAYS(visualBase && "visual base handle is empty");
 
   const BaseObject& handle = visualBase.GetBaseObject();
 
@@ -493,7 +486,7 @@ inline const Internal::Visual::Base& GetImplementation(const Toolkit::Visual::Ba
 
 inline Internal::Visual::Base& GetImplementation(Toolkit::Visual::Base& visualBase)
 {
-  DALI_ASSERT_ALWAYS( visualBase && "visual base handle is empty" );
+  DALI_ASSERT_ALWAYS(visualBase && "visual base handle is empty");
 
   BaseObject& handle = visualBase.GetBaseObject();
 
index d816c34..799962f 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_TOOLKIT_VISUAL_EVENT_OBSERVER_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -28,7 +28,6 @@ namespace Internal
 {
 namespace Visual
 {
-
 class Base;
 
 /**
@@ -37,22 +36,20 @@ class Base;
 class EventObserver
 {
 public:
-
   /**
    * Inform the observer of the object when a resource is ready.
    * @param[in] object The connection owner
    */
-  virtual void ResourceReady( Visual::Base& object ) = 0;
+  virtual void ResourceReady(Visual::Base& object) = 0;
 
   /**
    * Inform the observer of the object when an event occurs.
    * @param[in] object The connection owner
    * @param[in] signalId The signal to emit. See Visual to find supported signals
    */
-  virtual void NotifyVisualEvent( Visual::Base& object, Property::Index signalId ) = 0;
+  virtual void NotifyVisualEvent(Visual::Base& object, Property::Index signalId) = 0;
 
 protected:
-
   /**
    * constructor
    */
@@ -68,15 +65,15 @@ protected:
   }
 
   // Undefined copy constructor.
-  EventObserver( const EventObserver& ) = delete;
+  EventObserver(const EventObserver&) = delete;
 
   // Undefined assignment operator.
-  EventObserver& operator=( const EventObserver& ) = delete;
+  EventObserver& operator=(const EventObserver&) = delete;
 };
 
-} // Visual
-} // Internal
-} // Toolkit
-} // Dali
+} // namespace Visual
+} // namespace Internal
+} // namespace Toolkit
+} // namespace Dali
 
 #endif // DALI_INTERNAL_TOOLKIT_VISUAL_EVENT_OBSERVER_H
index 8037857..418b10e 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_VISUAL_FACTORY_CACHE_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
+#include <dali/devel-api/common/owner-container.h>
 #include <dali/public-api/math/uint-16-pair.h>
 #include <dali/public-api/object/ref-object.h>
 #include <dali/public-api/rendering/geometry.h>
 #include <dali/public-api/rendering/shader.h>
-#include <dali/devel-api/common/owner-container.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/visuals/npatch-loader.h>
@@ -35,7 +35,6 @@ class Texture;
 
 namespace Toolkit
 {
-
 namespace Internal
 {
 class ImageAtlasManager;
@@ -45,14 +44,12 @@ class VectorAnimationManager;
 
 typedef IntrusivePtr<ImageAtlasManager> ImageAtlasManagerPtr;
 
-
 /**
  * Caches shaders and geometries. Owned by VisualFactory.
  */
 class VisualFactoryCache
 {
 public:
-
   /**
    * Type of shader for caching.
    */
@@ -115,13 +112,12 @@ public:
   };
 
 public:
-
   /**
    * @brief Constructor
    *
    * @param[in] preMultiplyOnLoad True if image visuals should pre-multiply alpha on image load.
    */
-  VisualFactoryCache( bool preMultiplyOnLoad );
+  VisualFactoryCache(bool preMultiplyOnLoad);
 
   /**
    * @brief Destructor
@@ -132,27 +128,27 @@ public:
    * Request geometry of the given type.
    * @return The geometry of the required type if it exist in the cache. Otherwise, an empty handle is returned.
    */
-  Geometry GetGeometry( GeometryType type );
+  Geometry GetGeometry(GeometryType type);
 
   /**
    * Cache the geometry of the give type.
    * @param[in] type The geometry type.
    * @param[in] geometry The geometry for caching.
    */
-  void SaveGeometry( GeometryType type, Geometry geometry);
+  void SaveGeometry(GeometryType type, Geometry geometry);
 
   /**
    * Request shader of the given type.
    * @return The shader of the required type if it exist in the cache. Otherwise, an empty handle is returned.
    */
-  Shader GetShader( ShaderType type );
+  Shader GetShader(ShaderType type);
 
   /**
    * Cache the geometry of the give type.
    * @param[in] type The geometry type.
    * @param[in] geometry The geometry for caching.
    */
-  void SaveShader( ShaderType type, Shader shader );
+  void SaveShader(ShaderType type, Shader shader);
 
   /*
    * Greate the quad geometry.
@@ -165,7 +161,7 @@ public:
    * @param[in] gridSize The size of the grid.
    * @return The created grid geometry.
    */
-  static Geometry CreateGridGeometry( Uint16Pair gridSize );
+  static Geometry CreateGridGeometry(Uint16Pair gridSize);
 
   /**
    * @brief Returns a new Texture to use when a visual has failed to correctly render
@@ -176,7 +172,7 @@ public:
   /**
    * @copydoc Toolkit::VisualFactory::SetPreMultiplyOnLoad()
    */
-  void SetPreMultiplyOnLoad( bool preMultiply );
+  void SetPreMultiplyOnLoad(bool preMultiply);
 
   /**
    * @copydoc Toolkit::VisualFactory::GetPreMultiplyOnLoad()
@@ -221,7 +217,6 @@ public:
   VectorAnimationManager& GetVectorAnimationManager();
 
 protected:
-
   /**
    * Undefined copy constructor.
    */
@@ -233,17 +228,17 @@ protected:
   VisualFactoryCache& operator=(const VisualFactoryCache& rhs);
 
 private:
-  Geometry mGeometry[GEOMETRY_TYPE_MAX+1];
-  Shader mShader[SHADER_TYPE_MAX+1];
-
-  ImageAtlasManagerPtr                      mAtlasManager;
-  TextureManager                            mTextureManager;
-  NPatchLoader                              mNPatchLoader;
-  Texture                                   mBrokenImageTexture;
-  SvgRasterizeThread*                       mSvgRasterizeThread;
-  std::unique_ptr< VectorAnimationManager > mVectorAnimationManager;
-  std::string                               mBrokenImageUrl;
-  bool                                      mPreMultiplyOnLoad;
+  Geometry mGeometry[GEOMETRY_TYPE_MAX + 1];
+  Shader   mShader[SHADER_TYPE_MAX + 1];
+
+  ImageAtlasManagerPtr                    mAtlasManager;
+  TextureManager                          mTextureManager;
+  NPatchLoader                            mNPatchLoader;
+  Texture                                 mBrokenImageTexture;
+  SvgRasterizeThread*                     mSvgRasterizeThread;
+  std::unique_ptr<VectorAnimationManager> mVectorAnimationManager;
+  std::string                             mBrokenImageUrl;
+  bool                                    mPreMultiplyOnLoad;
 };
 
 } // namespace Internal
index e4dd8d3..f038301 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_VISUAL_FACTORY_IMPL_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali/public-api/object/base-object.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
+#include <dali-toolkit/devel-api/styling/style-manager-devel.h>
 #include <dali-toolkit/devel-api/visual-factory/visual-base.h>
+#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
 #include <dali-toolkit/internal/visuals/visual-base-impl.h>
 #include <dali-toolkit/public-api/styling/style-manager.h>
-#include <dali-toolkit/devel-api/styling/style-manager-devel.h>
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class VisualFactoryCache;
 class ImageVisualShaderFactory;
 
@@ -45,13 +42,12 @@ class ImageVisualShaderFactory;
 class VisualFactory : public BaseObject
 {
 public:
-
   /**
    * @brief Constructor
    *
    * @param[in] debugEnabled If true, use debug renderer to replace all the concrete renderer.
    */
-  VisualFactory( bool debugEnabled );
+  VisualFactory(bool debugEnabled);
 
   /**
    * @brief StyleChanged callback
@@ -59,22 +55,22 @@ public:
    * @param[in] styleManager Handle for style manager.
    * @param[in] type Style change type.
    */
-  void OnStyleChangedSignal( Toolkit::StyleManager styleManager, StyleChange::Type type );
+  void OnStyleChangedSignal(Toolkit::StyleManager styleManager, StyleChange::Type type);
 
   /**
    * @copydoc Toolkit::VisualFactory::CreateVisual( const Property::Map& )
    */
-  Toolkit::Visual::Base CreateVisual( const Property::Map& propertyMap );
+  Toolkit::Visual::Base CreateVisual(const Property::Map& propertyMap);
 
   /**
    * @copydoc Toolkit::VisualFactory::CreateVisual( const std::string&, ImageDimensions )
    */
-  Toolkit::Visual::Base CreateVisual( const std::string& image, ImageDimensions size );
+  Toolkit::Visual::Base CreateVisual(const std::string& image, ImageDimensions size);
 
   /**
    * @copydoc Toolkit::VisualFactory::SetPreMultiplyOnLoad()
    */
-  void SetPreMultiplyOnLoad( bool preMultiply );
+  void SetPreMultiplyOnLoad(bool preMultiply);
 
   /**
    * @copydoc Toolkit::VisualFactory::GetPreMultiplyOnLoad()
@@ -87,7 +83,6 @@ public:
   Internal::TextureManager& GetTextureManager();
 
 protected:
-
   /**
    * A reference counted object may only be deleted by calling Unreference()
    */
@@ -109,11 +104,11 @@ private:
   VisualFactory& operator=(const VisualFactory& rhs) = delete;
 
 private:
-  std::unique_ptr< VisualFactoryCache >       mFactoryCache;
-  std::unique_ptr< ImageVisualShaderFactory > mImageVisualShaderFactory;
-  SlotDelegate< VisualFactory >               mSlotDelegate;
-  bool                                        mDebugEnabled:1;
-  bool                                        mPreMultiplyOnLoad:1; ///< Local store for this flag
+  std::unique_ptr<VisualFactoryCache>       mFactoryCache;
+  std::unique_ptr<ImageVisualShaderFactory> mImageVisualShaderFactory;
+  SlotDelegate<VisualFactory>               mSlotDelegate;
+  bool                                      mDebugEnabled : 1;
+  bool                                      mPreMultiplyOnLoad : 1; ///< Local store for this flag
 };
 
 /**
@@ -127,15 +122,15 @@ private:
  * @param[in] param0 First template based argument passed to the visual factory
  * @param[in] param1 Second template based argument passed to the visual factory
  */
-template< class ParameterType0, class ParameterType1 >
-void InitializeVisual( Actor& actor, Toolkit::Visual::Base& visual, ParameterType0& param0, ParameterType1& param1 )
+template<class ParameterType0, class ParameterType1>
+void InitializeVisual(Actor& actor, Toolkit::Visual::Base& visual, ParameterType0& param0, ParameterType1& param1)
 {
-  if( actor )
+  if(actor)
   {
-    Toolkit::GetImplementation(visual).SetOffScene( actor );
+    Toolkit::GetImplementation(visual).SetOffScene(actor);
   }
-  visual = Toolkit::VisualFactory::Get().CreateVisual( param0, param1 );
-  if( visual && actor && actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
+  visual = Toolkit::VisualFactory::Get().CreateVisual(param0, param1);
+  if(visual && actor && actor.GetProperty<bool>(Actor::Property::CONNECTED_TO_SCENE))
   {
     Toolkit::GetImplementation(visual).SetOnScene(actor);
   }
@@ -150,15 +145,15 @@ void InitializeVisual( Actor& actor, Toolkit::Visual::Base& visual, ParameterTyp
  * @param[in,out] visual The visual to be replaced
  * @param[in] param Template based argument passed to the visual factory
  */
-template< class ParameterType >
-void InitializeVisual( Actor& actor, Toolkit::Visual::Base& visual, ParameterType& param )
+template<class ParameterType>
+void InitializeVisual(Actor& actor, Toolkit::Visual::Base& visual, ParameterType& param)
 {
-  if( actor && visual )
+  if(actor && visual)
   {
-    Toolkit::GetImplementation(visual).SetOffScene( actor );
+    Toolkit::GetImplementation(visual).SetOffScene(actor);
   }
-  visual =  Toolkit::VisualFactory::Get().CreateVisual( param );
-  if( visual && actor && actor.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
+  visual = Toolkit::VisualFactory::Get().CreateVisual(param);
+  if(visual && actor && actor.GetProperty<bool>(Actor::Property::CONNECTED_TO_SCENE))
   {
     Toolkit::GetImplementation(visual).SetOnScene(actor);
   }
@@ -168,7 +163,7 @@ void InitializeVisual( Actor& actor, Toolkit::Visual::Base& visual, ParameterTyp
 
 inline const Internal::VisualFactory& GetImplementation(const Toolkit::VisualFactory& factory)
 {
-  DALI_ASSERT_ALWAYS( factory && "VisualFactory handle is empty" );
+  DALI_ASSERT_ALWAYS(factory && "VisualFactory handle is empty");
 
   const BaseObject& handle = factory.GetBaseObject();
 
@@ -177,7 +172,7 @@ inline const Internal::VisualFactory& GetImplementation(const Toolkit::VisualFac
 
 inline Internal::VisualFactory& GetImplementation(Toolkit::VisualFactory& factory)
 {
-  DALI_ASSERT_ALWAYS( factory && "VisualFactory handle is empty" );
+  DALI_ASSERT_ALWAYS(factory && "VisualFactory handle is empty");
 
   BaseObject& handle = factory.GetBaseObject();
 
index c30033a..5f7f336 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_VISUAL_STRING_CONSTANTS_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 // Visual type
-extern const char * const VISUAL_TYPE;
+extern const char* const                 VISUAL_TYPE;
 extern const Dali::Scripting::StringEnum VISUAL_TYPE_TABLE[];
-extern const unsigned int VISUAL_TYPE_TABLE_COUNT;
+extern const unsigned int                VISUAL_TYPE_TABLE_COUNT;
 
 // Custom shader
-extern const char * const CUSTOM_SHADER;
-extern const char * const CUSTOM_VERTEX_SHADER;
-extern const char * const CUSTOM_FRAGMENT_SHADER;
-extern const char * const CUSTOM_SUBDIVIDE_GRID_X;
-extern const char * const CUSTOM_SUBDIVIDE_GRID_Y;
-extern const char * const CUSTOM_SHADER_HINTS;
+extern const char* const CUSTOM_SHADER;
+extern const char* const CUSTOM_VERTEX_SHADER;
+extern const char* const CUSTOM_FRAGMENT_SHADER;
+extern const char* const CUSTOM_SUBDIVIDE_GRID_X;
+extern const char* const CUSTOM_SUBDIVIDE_GRID_Y;
+extern const char* const CUSTOM_SHADER_HINTS;
 
 // Transform
-extern const char * const TRANSFORM;
-extern const char * const SIZE;
-extern const char * const OFFSET;
-extern const char * const OFFSET_SIZE_MODE;
-extern const char * const ORIGIN;
-extern const char * const ANCHOR_POINT;
-extern const char * const EXTRA_SIZE;
+extern const char* const TRANSFORM;
+extern const char* const SIZE;
+extern const char* const OFFSET;
+extern const char* const OFFSET_SIZE_MODE;
+extern const char* const ORIGIN;
+extern const char* const ANCHOR_POINT;
+extern const char* const EXTRA_SIZE;
 
 // Premultiplied alpha
-extern const char * const PREMULTIPLIED_ALPHA;
+extern const char* const PREMULTIPLIED_ALPHA;
 
 // Mix color
-extern const char * const MIX_COLOR;
-extern const char * const OPACITY;
+extern const char* const MIX_COLOR;
+extern const char* const OPACITY;
 
 // Fitting mode
-extern const char * const VISUAL_FITTING_MODE;
+extern const char* const VISUAL_FITTING_MODE;
 
 // Corner radius
-extern const char * const CORNER_RADIUS;
-extern const char * const CORNER_RADIUS_POLICY;
+extern const char* const CORNER_RADIUS;
+extern const char* const CORNER_RADIUS_POLICY;
 
 // Color visual
-extern const char * const RENDER_IF_TRANSPARENT_NAME;
-extern const char * const BLUR_RADIUS_NAME;
+extern const char* const RENDER_IF_TRANSPARENT_NAME;
+extern const char* const BLUR_RADIUS_NAME;
 
 // 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;
-extern const char * const IMAGE_BORDER;
-extern const char * const PIXEL_ALIGNED_UNIFORM_NAME;
-extern const char * const ANIMATED_IMAGE_URLS_NAME;
-extern const char * const BATCH_SIZE_NAME;
-extern const char * const CACHE_SIZE_NAME;
-extern const char * const FRAME_DELAY_NAME;
-extern const char * const LOOP_COUNT_NAME;
-extern const char * const MASK_CONTENT_SCALE_NAME;
-extern const char * const CROP_TO_MASK_NAME;
-extern const char * const LOAD_POLICY_NAME;
-extern const char * const RELEASE_POLICY_NAME;
-extern const char * const ORIENTATION_CORRECTION_NAME;
-extern const char * const AUXILLARY_IMAGE_NAME;
-extern const char * const AUXILLARY_IMAGE_ALPHA_NAME;
-extern const char * const PLAY_RANGE_NAME;
-extern const char * const PLAY_STATE_NAME;
-extern const char * const CURRENT_FRAME_NUMBER_NAME;
-extern const char * const TOTAL_FRAME_NUMBER_NAME;
-extern const char * const STOP_BEHAVIOR_NAME;
-extern const char * const LOOPING_MODE_NAME;
-extern const char * const IMAGE_ATLASING;
-extern const char * const SYNCHRONOUS_LOADING;
-extern const char * const IMAGE_FITTING_MODE;
-extern const char * const IMAGE_SAMPLING_MODE;
-extern const char * const IMAGE_DESIRED_WIDTH;
-extern const char * const IMAGE_DESIRED_HEIGHT;
-extern const char * const ALPHA_MASK_URL;
-extern const char * const REDRAW_IN_SCALING_DOWN_NAME;
+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;
+extern const char* const IMAGE_BORDER;
+extern const char* const PIXEL_ALIGNED_UNIFORM_NAME;
+extern const char* const ANIMATED_IMAGE_URLS_NAME;
+extern const char* const BATCH_SIZE_NAME;
+extern const char* const CACHE_SIZE_NAME;
+extern const char* const FRAME_DELAY_NAME;
+extern const char* const LOOP_COUNT_NAME;
+extern const char* const MASK_CONTENT_SCALE_NAME;
+extern const char* const CROP_TO_MASK_NAME;
+extern const char* const LOAD_POLICY_NAME;
+extern const char* const RELEASE_POLICY_NAME;
+extern const char* const ORIENTATION_CORRECTION_NAME;
+extern const char* const AUXILLARY_IMAGE_NAME;
+extern const char* const AUXILLARY_IMAGE_ALPHA_NAME;
+extern const char* const PLAY_RANGE_NAME;
+extern const char* const PLAY_STATE_NAME;
+extern const char* const CURRENT_FRAME_NUMBER_NAME;
+extern const char* const TOTAL_FRAME_NUMBER_NAME;
+extern const char* const STOP_BEHAVIOR_NAME;
+extern const char* const LOOPING_MODE_NAME;
+extern const char* const IMAGE_ATLASING;
+extern const char* const SYNCHRONOUS_LOADING;
+extern const char* const IMAGE_FITTING_MODE;
+extern const char* const IMAGE_SAMPLING_MODE;
+extern const char* const IMAGE_DESIRED_WIDTH;
+extern const char* const IMAGE_DESIRED_HEIGHT;
+extern const char* const ALPHA_MASK_URL;
+extern const char* const REDRAW_IN_SCALING_DOWN_NAME;
 
 // Text visual
-extern const char * const TEXT_PROPERTY;
-extern const char * const FONT_FAMILY_PROPERTY;
-extern const char * const FONT_STYLE_PROPERTY;
-extern const char * const POINT_SIZE_PROPERTY;
-extern const char * const MULTI_LINE_PROPERTY;
-extern const char * const HORIZONTAL_ALIGNMENT_PROPERTY;
-extern const char * const VERTICAL_ALIGNMENT_PROPERTY;
-extern const char * const TEXT_COLOR_PROPERTY;
-extern const char * const ENABLE_MARKUP_PROPERTY;
-extern const char * const SHADOW_PROPERTY;
-extern const char * const UNDERLINE_PROPERTY;
-extern const char * const OUTLINE_PROPERTY;
-extern const char * const BACKGROUND_PROPERTY;
+extern const char* const TEXT_PROPERTY;
+extern const char* const FONT_FAMILY_PROPERTY;
+extern const char* const FONT_STYLE_PROPERTY;
+extern const char* const POINT_SIZE_PROPERTY;
+extern const char* const MULTI_LINE_PROPERTY;
+extern const char* const HORIZONTAL_ALIGNMENT_PROPERTY;
+extern const char* const VERTICAL_ALIGNMENT_PROPERTY;
+extern const char* const TEXT_COLOR_PROPERTY;
+extern const char* const ENABLE_MARKUP_PROPERTY;
+extern const char* const SHADOW_PROPERTY;
+extern const char* const UNDERLINE_PROPERTY;
+extern const char* const OUTLINE_PROPERTY;
+extern const char* const BACKGROUND_PROPERTY;
 
 //NPatch visual
-extern const char * const BORDER_ONLY;
-extern const char * const BORDER;
-extern const char * const AUXILIARY_IMAGE_NAME;
-extern const char * const AUXILIARY_IMAGE_ALPHA_NAME;
+extern const char* const BORDER_ONLY;
+extern const char* const BORDER;
+extern const char* const AUXILIARY_IMAGE_NAME;
+extern const char* const AUXILIARY_IMAGE_ALPHA_NAME;
 
 // non-animated property
 extern const char* const GRADIENT_TYPE_NAME;
@@ -162,47 +159,47 @@ extern const char* const UNIFORM_ROTATE_ANGLE_NAME;
 extern const char* const UNIFORM_OFFSET_NAME;
 
 // Border visual
-extern const char * const COLOR_NAME;
-extern const char * const SIZE_NAME;
-extern const char * const ANTI_ALIASING;
+extern const char* const COLOR_NAME;
+extern const char* const SIZE_NAME;
+extern const char* const ANTI_ALIASING;
 
 // properties: radial gradient
-extern const char * const CENTER_NAME; // Property::VECTOR2
-extern const char * const RADIUS_NAME; // Property::FLOAT
+extern const char* const CENTER_NAME; // Property::VECTOR2
+extern const char* const RADIUS_NAME; // Property::FLOAT
 
 // properties: linear&radial gradient
-extern const char * const STOP_OFFSET_NAME; // Property::Array FLOAT
-extern const char * const STOP_COLOR_NAME; // Property::Array VECTOR4
-extern const char * const UNITS_NAME; // Property::String  "userSpaceOnUse | objectBoundingBox"
-extern const char * const SPREAD_METHOD_NAME; // Property::String  "pad | reflect | repeat"
+extern const char* const STOP_OFFSET_NAME;   // Property::Array FLOAT
+extern const char* const STOP_COLOR_NAME;    // Property::Array VECTOR4
+extern const char* const UNITS_NAME;         // Property::String  "userSpaceOnUse | objectBoundingBox"
+extern const char* const SPREAD_METHOD_NAME; // Property::String  "pad | reflect | repeat"
 
 //mesh visual
-extern const char * const OBJECT_URL_NAME;
-extern const char * const MATERIAL_URL_NAME;
-extern const char * const TEXTURES_PATH_NAME;
-extern const char * const SHADING_MODE_NAME;
-extern const char * const USE_MIPMAPPING_NAME;
-extern const char * const USE_SOFT_NORMALS_NAME;
-extern const char * const LIGHT_POSITION_NAME;
+extern const char* const OBJECT_URL_NAME;
+extern const char* const MATERIAL_URL_NAME;
+extern const char* const TEXTURES_PATH_NAME;
+extern const char* const SHADING_MODE_NAME;
+extern const char* const USE_MIPMAPPING_NAME;
+extern const char* const USE_SOFT_NORMALS_NAME;
+extern const char* const LIGHT_POSITION_NAME;
 
 //Primitive properties
-extern const char * const PRIMITIVE_SHAPE;
-extern const char * const SLICES;
-extern const char * const STACKS;
-extern const char * const SCALE_TOP_RADIUS;
-extern const char * const SCALE_BOTTOM_RADIUS;
-extern const char * const SCALE_HEIGHT;
-extern const char * const SCALE_RADIUS;
-extern const char * const SCALE_DIMENSIONS;
-extern const char * const BEVEL_PERCENTAGE;
-extern const char * const BEVEL_SMOOTHNESS;
-extern const char * const LIGHT_POSITION_UNIFORM_NAME;
+extern const char* const PRIMITIVE_SHAPE;
+extern const char* const SLICES;
+extern const char* const STACKS;
+extern const char* const SCALE_TOP_RADIUS;
+extern const char* const SCALE_BOTTOM_RADIUS;
+extern const char* const SCALE_HEIGHT;
+extern const char* const SCALE_RADIUS;
+extern const char* const SCALE_DIMENSIONS;
+extern const char* const BEVEL_PERCENTAGE;
+extern const char* const BEVEL_SMOOTHNESS;
+extern const char* const LIGHT_POSITION_UNIFORM_NAME;
 
 // Arc visual
-extern const char * const THICKNESS_NAME;
-extern const char * const START_ANGLE_NAME;
-extern const char * const SWEEP_ANGLE_NAME;
-extern const char * const CAP_NAME;
+extern const char* const THICKNESS_NAME;
+extern const char* const START_ANGLE_NAME;
+extern const char* const SWEEP_ANGLE_NAME;
+extern const char* const CAP_NAME;
 
 } // namespace Internal
 
index 63ad5e4..8857184 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_INTERNAL_VISUAL_URL_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class VisualUrl
 {
 public:
-
   /**
    * The type of the URL based on the string contents
    */
@@ -63,19 +59,19 @@ public:
    * Determines type of visual and whether the url is local or remote
    * @param[in] url The URL to store and resolve
    */
-  VisualUrl( const std::string& url );
+  VisualUrl(const std::string& url);
 
   /**
    * Copy constructor
    * @param[in] url The VisualUrl to copy
    */
-  VisualUrl( const VisualUrl& url );
+  VisualUrl(const VisualUrl& url);
 
   /**
    * Assignment operator
    * @param[in] url The VisualUrl to copy
    */
-  VisualUrl& operator=( const VisualUrl& url );
+  VisualUrl& operator=(const VisualUrl& url);
 
   /**
    * Get the full URL
@@ -116,15 +112,14 @@ public:
    * @param location the location of the texture
    * @return the Url
    */
-  static std::string CreateTextureUrl( const std::string& location );
+  static std::string CreateTextureUrl(const std::string& location);
 
 private:
-  std::string mUrl;
-  Type mType;
+  std::string  mUrl;
+  Type         mType;
   ProtocolType mLocation;
 };
 
-
 } // namespace Internal
 
 } // namespace Toolkit
index 12ebfe5..e1ba79c 100644 (file)
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 class WireframeVisual;
-typedef IntrusivePtr< WireframeVisual > WireframeVisualPtr;
+typedef IntrusivePtr<WireframeVisual> WireframeVisualPtr;
 
 /**
  * @brief Renders a wireframe outline to the control's quad.
  */
-class WireframeVisual: public Visual::Base
+class WireframeVisual : public Visual::Base
 {
 public:
-
   /**
    * @brief Create a new wireframe visual.
    *
@@ -50,7 +46,7 @@ public:
    * @param[in] properties A Property::Map containing settings for this visual
    * @return A smart-pointer to the newly allocated visual.
    */
-  static WireframeVisualPtr New( VisualFactoryCache& factoryCache, const Property::Map& properties );
+  static WireframeVisualPtr New(VisualFactoryCache& factoryCache, const Property::Map& properties);
 
   /**
    * @brief Create a new wireframe visual with an encapsulated actual visual.
@@ -61,7 +57,7 @@ public:
    * @param[in] actualVisual The encapsulated actual visual.
    * @return A smart-pointer to the newly allocated visual.
    */
-  static WireframeVisualPtr New( VisualFactoryCache& factoryCache, Visual::BasePtr actualVisual );
+  static WireframeVisualPtr New(VisualFactoryCache& factoryCache, Visual::BasePtr actualVisual);
 
   /**
    * @brief Create a new wireframe visual with an encapsulated actual visual.
@@ -73,18 +69,16 @@ public:
    * @param[in] properties A Property::Map containing settings for this visual
    * @return A smart-pointer to the newly allocated visual.
    */
-  static WireframeVisualPtr New( VisualFactoryCache& factoryCache, Visual::BasePtr actualVisual, const Property::Map& properties );
-
+  static WireframeVisualPtr New(VisualFactoryCache& factoryCache, Visual::BasePtr actualVisual, const Property::Map& properties);
 
 protected:
-
   /**
    * @brief Constructor.
    *
    * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
    * @param[in] actualVisual The encapsulated actual visual.
    */
-  WireframeVisual( VisualFactoryCache& factoryCache, Visual::BasePtr actualVisual );
+  WireframeVisual(VisualFactoryCache& factoryCache, Visual::BasePtr actualVisual);
 
   /**
    * @brief A reference counted object may only be deleted by calling Unreference().
@@ -100,32 +94,32 @@ protected: // from Visual::Base
   /**
    * @copydoc Visual::Base::GetHeightForWidth()
    */
-  float GetHeightForWidth( float width ) override;
+  float GetHeightForWidth(float width) override;
 
   /**
    * @copydoc Visual::Base::GetNaturalSize()
    */
-  void GetNaturalSize( Vector2& naturalSize ) override;
+  void GetNaturalSize(Vector2& naturalSize) override;
 
   /**
    * @copydoc Visual::Base::CreatePropertyMap()
    */
-  void DoCreatePropertyMap( Property::Map& map ) const override;
+  void DoCreatePropertyMap(Property::Map& map) const override;
 
   /**
    * @copydoc Visual::Base::CreateInstancePropertyMap
    */
-  void DoCreateInstancePropertyMap( Property::Map& map ) const override;
+  void DoCreateInstancePropertyMap(Property::Map& map) const override;
 
   /**
    * @copydoc Visual::Base::DoSetProperties()
    */
-  void DoSetProperties( const Property::Map& propertyMap ) override;
+  void DoSetProperties(const Property::Map& propertyMap) override;
 
   /**
    * @copydoc Visual::Base::DoSetOnScene
    */
-  void DoSetOnScene( Actor& actor ) override;
+  void DoSetOnScene(Actor& actor) override;
 
   /**
    * @copydoc Visual::Base::OnSetTransform
@@ -147,15 +141,13 @@ private:
   Geometry CreateQuadWireframeGeometry();
 
   // Undefined
-  WireframeVisual( const WireframeVisual& visual);
+  WireframeVisual(const WireframeVisual& visual);
 
   // Undefined
-  WireframeVisual& operator=( const WireframeVisual& visual );
+  WireframeVisual& operator=(const WireframeVisual& visual);
 
 private:
-
   Visual::BasePtr mActualVisual;
-
 };
 
 } // namespace Internal
index a7aee35..fb2b5ad 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TOOLKIT_CONTROL_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -456,6 +456,7 @@ public:
    * @note A RelayoutRequest is queued by Control before this signal is emitted
    */
   ResourceReadySignalType& ResourceReadySignal();
+
 public: // Intended for control developers
   /**
    * @brief Creates an initialized Control.