Update copyright year to 2015 for public api: toolkit
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / cluster / cluster-style.cpp
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali-toolkit/public-api/controls/cluster/cluster-style.h>
20
21 // EXTERNAL INCLUDES
22 #include <limits>
23
24 // INTERNAL INCLUDES
25 #include <dali-toolkit/internal/controls/cluster/cluster-style-impl.h>
26
27 using namespace Dali;
28 using namespace Dali::Toolkit;
29
30 namespace Dali
31 {
32
33 namespace Toolkit
34 {
35
36 // ClusterStyle ///////////////////////////////////////////////////////////////
37
38 const unsigned int ClusterStyle::UNLIMITED_CHILDREN = std::numeric_limits<unsigned int>::max();
39
40 ClusterStyle::ClusterStyle()
41 {
42 }
43
44 ClusterStyle::~ClusterStyle()
45 {
46 }
47
48 ClusterStyle::ClusterStyle(Internal::ClusterStyle* internal)
49 : BaseHandle(internal)
50 {
51 }
52
53 unsigned int ClusterStyle::GetMaximumNumberOfChildren() const
54 {
55   return GetImpl(*this).GetMaximumNumberOfChildren();
56 }
57
58 void ClusterStyle::ApplyStyle(Actor child, unsigned int index, AlphaFunction alpha, const TimePeriod& durationSeconds)
59 {
60   GetImpl(*this).ApplyStyle(child, index, alpha, durationSeconds);
61 }
62
63 void ClusterStyle::ApplyStyleToBackground(Actor background, AlphaFunction alpha, const TimePeriod& durationSeconds)
64 {
65   GetImpl(*this).ApplyStyleToBackground(background, alpha, durationSeconds);
66 }
67
68 void ClusterStyle::ApplyStyleToTitle(Actor title, AlphaFunction alpha, const TimePeriod& durationSeconds)
69 {
70   GetImpl(*this).ApplyStyleToTitle(title, alpha, durationSeconds);
71 }
72
73 // ClusterStyleStandard ///////////////////////////////////////////////////////
74
75 ClusterStyleStandard ClusterStyleStandard::New(StyleType style)
76 {
77   Internal::ClusterStylePtr internal = Internal::ClusterStyleStandard::New(style);
78
79   return ClusterStyleStandard(internal.Get());
80 }
81
82 ClusterStyleStandard::ClusterStyleStandard(Internal::ClusterStyle* internal)
83 : ClusterStyle(internal)
84 {
85 }
86
87 // ClusterStyleRandom /////////////////////////////////////////////////////////
88
89 ClusterStyleRandom ClusterStyleRandom::New()
90 {
91   Internal::ClusterStylePtr internal = Internal::ClusterStyleRandom::New();
92
93   return ClusterStyleRandom(internal.Get());
94 }
95
96 ClusterStyleRandom::ClusterStyleRandom(Internal::ClusterStyle* internal)
97 : ClusterStyle(internal)
98 {
99 }
100
101 } // namespace Toolkit
102
103 } // namespace Dali