TextField property updates
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / cluster / cluster-style-impl.h
index 39f4e66..bf7b75d 100644 (file)
@@ -1,31 +1,32 @@
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 
-// INTERNAL INCLUDES
+// EXTERNAL INCLUDES
 #include <dali/public-api/object/ref-object.h>
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/math/vector3.h>
 #include <dali/public-api/object/base-object.h>
+
+// INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/cluster/cluster-style.h>
 
 namespace Dali
 {
 
-struct Vector3;
-
 namespace Toolkit
 {
 
@@ -56,12 +57,17 @@ public:
   /**
    * @copydoc Toolkit::ClusterStyle::ApplyStyleToBackground
    */
-  virtual void ApplyStyleToBackground(Actor background, AlphaFunction alpha, const TimePeriod& durationSeconds) = 0;
+  virtual void ApplyStyleToBackground(Actor background, AlphaFunction alpha, const TimePeriod& durationSeconds);
 
   /**
    * @copydoc Toolkit::ClusterStyle::ApplyStyleToTitle
    */
-  virtual void ApplyStyleToTitle(Actor title, AlphaFunction alpha, const TimePeriod& durationSeconds) = 0;
+  virtual void ApplyStyleToTitle(Actor title, AlphaFunction alpha, const TimePeriod& durationSeconds);
+
+  /**
+    * Set the size of cluster
+    */
+  void SetClusterSize( const Vector3& clusterSize );
 
 protected:
 
@@ -91,6 +97,43 @@ protected:
                                const Vector3& offsetPosition,
                                const Vector3& size);
 
+  /**
+   * Get the size of cluster.
+   * @return the cluster size
+   */
+   Vector3 GetClusterSize() const;
+
+   /**
+    * Apply the given position & size to the actor
+    * @param[in] position The target position
+    * @param[in] size The target size
+    * @param[in] size The size to resize to
+    * @param[in] alpha The alpha function to use.
+    * @param[in] durationSeconds The time period to apply this style.
+    */
+   void Apply( Actor actor,
+               const Vector3& position,
+               const Vector3& size,
+               AlphaFunction alpha,
+               const TimePeriod& durationSeconds);
+   /**
+    * Apply the given position & size to the actor
+    * @param[in] actor The actor to apply the changes
+    * @param[in] position The target position
+    * @param[in] size The target size
+    * @param[in] rotation The target Quaternion value
+    * @param[in] scale The target scale
+    * @param[in] alpha The alpha function to use.
+    * @param[in] durationSeconds The time period to apply this style.
+    */
+   void Apply( Actor actor,
+               const Vector3& position,
+               const Vector3& size,
+               const Quaternion& rotation,
+               const Vector3& scale,
+               AlphaFunction alpha,
+               const TimePeriod& durationSeconds);
+
 protected:
 
   /**
@@ -112,7 +155,7 @@ protected:
   Vector3 mBackgroundPositionRelative;            ///< Background's position relative to size of cluster
   Vector3 mBackgroundPositionOffset;              ///< Background's position offset
   Vector3 mBackgroundSize;                        ///< Background's size relative to size of cluster
-
+  Vector3 mClusterSize;                           ///< The size of cluster
 };
 
 /**
@@ -140,16 +183,6 @@ public:
    */
   void ApplyStyle(Actor child, unsigned int index, AlphaFunction alpha, const TimePeriod& durationSeconds);
 
-  /**
-   * @copydoc Toolkit::ClusterStyle::ApplyStyleToBackground
-   */
-  void ApplyStyleToBackground(Actor background, AlphaFunction alpha, const TimePeriod& durationSeconds);
-
-  /**
-   * @copydoc Toolkit::ClusterStyle::ApplyStyleToTitle
-   */
-  void ApplyStyleToTitle(Actor title, AlphaFunction alpha, const TimePeriod& durationSeconds);
-
 private:
 
   /**
@@ -198,16 +231,6 @@ public:
    */
   void ApplyStyle(Actor child, unsigned int index, AlphaFunction alpha, const TimePeriod& durationSeconds);
 
-  /**
-   * @copydoc Toolkit::ClusterStyle::ApplyStyleToBackground
-   */
-  void ApplyStyleToBackground(Actor background, AlphaFunction alpha, const TimePeriod& durationSeconds);
-
-  /**
-   * @copydoc Toolkit::ClusterStyle::ApplyStyleToTitle
-   */
-  void ApplyStyleToTitle(Actor title, AlphaFunction alpha, const TimePeriod& durationSeconds);
-
 protected:
 
   /**