Updated CAPI documentation style
[platform/core/uifw/dali-toolkit.git] / capi / dali-toolkit / public-api / controls / cluster / cluster-style.h
1 #ifndef __DALI_TOOLKIT_CLUSTER_STYLE_H__
2 #define __DALI_TOOLKIT_CLUSTER_STYLE_H__
3
4 //
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 //
7 // Licensed under the Flora License, Version 1.0 (the License);
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 //     http://floralicense.org/license/
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an AS IS BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
18 //
19
20 /**
21  * @addtogroup CAPI_DALI_TOOLKIT_CLUSTER_MODULE
22  * @{
23  */
24
25 // INTERNAL INCLUDES
26 #include <dali/dali.h>
27 #include <dali-toolkit/public-api/enums.h>
28
29 namespace Dali DALI_IMPORT_API
30 {
31
32 struct TimePeriod;
33 class Actor;
34
35 namespace Toolkit
36 {
37
38 namespace Internal DALI_INTERNAL
39 {
40 class ClusterStyle;
41 class ClusterStyleRandom;
42 }
43
44 class ClusterStyle;
45
46 typedef IntrusivePtr<ClusterStyle> ClusterStylePtr; ///< Pointer to a Dali::Toolkit::ClusterStyle object
47
48 /**
49  * @brief A ClusterStyle describes the constraints which are imposed on the child actors in the cluster.
50  */
51 class ClusterStyle : public Dali::BaseHandle
52 {
53 public:
54
55   static const unsigned int UNLIMITED_CHILDREN; ///< Constant that represents an unlimited number of children.
56
57 public:
58
59   /**
60    * @brief Virtual destructor.
61    */
62   virtual ~ClusterStyle();
63
64   /**
65    * @brief Query the maximum number of children this Style can handle.
66    *
67    * If return value is UNLIMITED_CHILDREN, then this style has no
68    * limit.
69    * @return The maximum number of children.
70    */
71   unsigned int GetMaximumNumberOfChildren() const;
72
73   /**
74    * @brief Applies style (position) to child actor over a specified time duration.
75    *
76    * @param[in] child The child actor to apply
77    * @param[in] index The style position index for the actor to transform to.
78    * @param[in] alpha The alpha function to use.
79    * @param[in] durationSeconds The time period to apply this style.
80    */
81   void ApplyStyle(Actor child, unsigned int index, AlphaFunction alpha, const TimePeriod& durationSeconds);
82
83   /**
84    * @brief Applies style to background actor over a specified time duration.
85    *
86    * @param[in] background The background actor to apply
87    * @param[in] alpha The alpha function to use.
88    * @param[in] durationSeconds The time period to apply this style.
89    */
90   void ApplyStyleToBackground(Actor background, AlphaFunction alpha, const TimePeriod& durationSeconds);
91
92   /**
93    * @brief Applies style to title actor over a specified time duration.
94    *
95    * @param[in] title The title actor to apply
96    * @param[in] alpha The alpha function to use.
97    * @param[in] durationSeconds The time period to apply this style.
98    */
99   void ApplyStyleToTitle(Actor title, AlphaFunction alpha, const TimePeriod& durationSeconds);
100
101 protected:
102
103   /**
104    * @brief Create a new ClusterStyle; Only derived versions are instantiatable.
105    */
106   ClusterStyle();
107
108 public: // Not intended for application developers
109
110   /**
111    * @brief This constructor is used by Dali New() methods.
112    *
113    * @param [in] internal A pointer to a newly allocated Dali resource
114    */
115   ClusterStyle(Internal::ClusterStyle* internal);
116 };
117
118 /**
119  * @brief A ClusterStyle describes the constraints, which are imposed on the child actors in the cluster.
120  */
121 class ClusterStyleStandard : public ClusterStyle
122 {
123 public:
124
125   /**
126    * @brief Cluster Style type.
127    */
128   enum StyleType
129   {
130     ClusterStyle1,     ///< Style number 1
131     ClusterStyle2,     ///< Style number 2
132     ClusterStyle3,     ///< Style number 3
133     ClusterStyle4,     ///< Style number 4
134     TotalClusterStyles ///< The number of styles
135   };
136
137 public:
138
139   /**
140    * @brief Create an initialized style.
141    */
142   static ClusterStyleStandard New(StyleType style);
143
144 public: // Not intended for application developers
145
146   /**
147    * @brief This constructor is used by Dali New() methods.
148    *
149    * @param [in] internal A pointer to a newly allocated Dali resource
150    */
151   ClusterStyleStandard(Internal::ClusterStyle* internal);
152 };
153
154 /**
155  * @brief A ClusterStyle describes the constraints, which are imposed on the child actors in the cluster.
156  */
157 class ClusterStyleRandom : public ClusterStyle
158 {
159 public:
160
161   /**
162    * @brief Create an initialized style.
163    */
164   static ClusterStyleRandom New();
165
166 public: // Not intended for application developers
167
168   /**
169    * @brief This constructor is used by Dali New() methods.
170    *
171    * @param [in] internal A pointer to a newly allocated Dali resource
172    */
173   ClusterStyleRandom(Internal::ClusterStyle* internal);
174 };
175
176 } // namespace Toolkit
177
178 } // namespace Dali
179
180 /**
181  * @}
182  */
183 #endif // __DALI_TOOLKIT_CLUSTER_STYLE_H__