e847f9d764808560ad28cc7eb10ec646d3cc3e91
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / Utility / ItemViewBindableProperty.cs
1 /*
2  * Copyright(c) 2021 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 using System.ComponentModel;
19 using Tizen.NUI.Binding;
20
21 namespace Tizen.NUI
22 {
23     public partial class ItemView
24     {
25         /// <summary>
26         /// LayoutProperty
27         /// </summary>
28         [EditorBrowsable(EditorBrowsableState.Never)]
29         public static BindableProperty LayoutProperty = null;
30         internal static void SetInternalLayoutProperty(BindableObject bindable, object oldValue, object newValue)
31         {
32             var instance = (Tizen.NUI.ItemView)bindable;
33             if (newValue != null)
34             {
35                 instance.InternalLayout = (Tizen.NUI.PropertyArray)newValue;
36             }
37         }
38         internal static object GetInternalLayoutProperty(BindableObject bindable)
39         {
40             var instance = (Tizen.NUI.ItemView)bindable;
41             return instance.InternalLayout;
42         }
43
44         /// <summary>
45         /// MinimumSwipeSpeedProperty
46         /// </summary>
47         [EditorBrowsable(EditorBrowsableState.Never)]
48         public static BindableProperty MinimumSwipeSpeedProperty = null;
49         internal static void SetInternalMinimumSwipeSpeedProperty(BindableObject bindable, object oldValue, object newValue)
50         {
51             var instance = (Tizen.NUI.ItemView)bindable;
52             if (newValue != null)
53             {
54                 instance.InternalMinimumSwipeSpeed = (float)newValue;
55             }
56         }
57         internal static object GetInternalMinimumSwipeSpeedProperty(BindableObject bindable)
58         {
59             var instance = (Tizen.NUI.ItemView)bindable;
60             return instance.InternalMinimumSwipeSpeed;
61         }
62
63         /// <summary>
64         /// MinimumSwipeDistanceProperty
65         /// </summary>
66         [EditorBrowsable(EditorBrowsableState.Never)]
67         public static BindableProperty MinimumSwipeDistanceProperty = null;
68         internal static void SetInternalMinimumSwipeDistanceProperty(BindableObject bindable, object oldValue, object newValue)
69         {
70             var instance = (Tizen.NUI.ItemView)bindable;
71             if (newValue != null)
72             {
73                 instance.InternalMinimumSwipeDistance = (float)newValue;
74             }
75         }
76         internal static object GetInternalMinimumSwipeDistanceProperty(BindableObject bindable)
77         {
78             var instance = (Tizen.NUI.ItemView)bindable;
79             return instance.InternalMinimumSwipeDistance;
80         }
81
82         /// <summary>
83         /// WheelScrollDistanceStepProperty
84         /// </summary>
85         [EditorBrowsable(EditorBrowsableState.Never)]
86         public static BindableProperty WheelScrollDistanceStepProperty = null;
87         internal static void SetInternalWheelScrollDistanceStepProperty(BindableObject bindable, object oldValue, object newValue)
88         {
89             var instance = (Tizen.NUI.ItemView)bindable;
90             if (newValue != null)
91             {
92                 instance.InternalWheelScrollDistanceStep = (float)newValue;
93             }
94         }
95         internal static object GetInternalWheelScrollDistanceStepProperty(BindableObject bindable)
96         {
97             var instance = (Tizen.NUI.ItemView)bindable;
98             return instance.InternalWheelScrollDistanceStep;
99         }
100
101         /// <summary>
102         /// SnapToItemEnabledProperty
103         /// </summary>
104         [EditorBrowsable(EditorBrowsableState.Never)]
105         public static BindableProperty SnapToItemEnabledProperty = null;
106         internal static void SetInternalSnapToItemEnabledProperty(BindableObject bindable, object oldValue, object newValue)
107         {
108             var instance = (Tizen.NUI.ItemView)bindable;
109             if (newValue != null)
110             {
111                 instance.InternalSnapToItemEnabled = (bool)newValue;
112             }
113         }
114         internal static object GetInternalSnapToItemEnabledProperty(BindableObject bindable)
115         {
116             var instance = (Tizen.NUI.ItemView)bindable;
117             return instance.InternalSnapToItemEnabled;
118         }
119
120         /// <summary>
121         /// RefreshIntervalProperty
122         /// </summary>
123         [EditorBrowsable(EditorBrowsableState.Never)]
124         public static BindableProperty RefreshIntervalProperty = null;
125         internal static void SetInternalRefreshIntervalProperty(BindableObject bindable, object oldValue, object newValue)
126         {
127             var instance = (Tizen.NUI.ItemView)bindable;
128             if (newValue != null)
129             {
130                 instance.InternalRefreshInterval = (float)newValue;
131             }
132         }
133         internal static object GetInternalRefreshIntervalProperty(BindableObject bindable)
134         {
135             var instance = (Tizen.NUI.ItemView)bindable;
136             return instance.InternalRefreshInterval;
137         }
138
139         /// <summary>
140         /// LayoutPositionProperty
141         /// </summary>
142         [EditorBrowsable(EditorBrowsableState.Never)]
143         public static BindableProperty LayoutPositionProperty = null;
144         internal static void SetInternalLayoutPositionProperty(BindableObject bindable, object oldValue, object newValue)
145         {
146             var instance = (Tizen.NUI.ItemView)bindable;
147             if (newValue != null)
148             {
149                 instance.InternalLayoutPosition = (float)newValue;
150             }
151         }
152         internal static object GetInternalLayoutPositionProperty(BindableObject bindable)
153         {
154             var instance = (Tizen.NUI.ItemView)bindable;
155             return instance.InternalLayoutPosition;
156         }
157
158         /// <summary>
159         /// ScrollSpeedProperty
160         /// </summary>
161         [EditorBrowsable(EditorBrowsableState.Never)]
162         public static BindableProperty ScrollSpeedProperty = null;
163         internal static void SetInternalScrollSpeedProperty(BindableObject bindable, object oldValue, object newValue)
164         {
165             var instance = (Tizen.NUI.ItemView)bindable;
166             if (newValue != null)
167             {
168                 instance.InternalScrollSpeed = (float)newValue;
169             }
170         }
171         internal static object GetInternalScrollSpeedProperty(BindableObject bindable)
172         {
173             var instance = (Tizen.NUI.ItemView)bindable;
174             return instance.InternalScrollSpeed;
175         }
176
177         /// <summary>
178         /// OvershootProperty
179         /// </summary>
180         [EditorBrowsable(EditorBrowsableState.Never)]
181         public static BindableProperty OvershootProperty = null;
182         internal static void SetInternalOvershootProperty(BindableObject bindable, object oldValue, object newValue)
183         {
184             var instance = (Tizen.NUI.ItemView)bindable;
185             if (newValue != null)
186             {
187                 instance.InternalOvershoot = (float)newValue;
188             }
189         }
190         internal static object GetInternalOvershootProperty(BindableObject bindable)
191         {
192             var instance = (Tizen.NUI.ItemView)bindable;
193             return instance.InternalOvershoot;
194         }
195
196         /// <summary>
197         /// ScrollDirectionProperty
198         /// </summary>
199         [EditorBrowsable(EditorBrowsableState.Never)]
200         public static BindableProperty ScrollDirectionProperty = null;
201         internal static void SetInternalScrollDirectionProperty(BindableObject bindable, object oldValue, object newValue)
202         {
203             var instance = (Tizen.NUI.ItemView)bindable;
204             if (newValue != null)
205             {
206                 instance.InternalScrollDirection = (Tizen.NUI.Vector2)newValue;
207             }
208         }
209         internal static object GetInternalScrollDirectionProperty(BindableObject bindable)
210         {
211             var instance = (Tizen.NUI.ItemView)bindable;
212             return instance.InternalScrollDirection;
213         }
214
215         /// <summary>
216         /// LayoutOrientationProperty
217         /// </summary>
218         [EditorBrowsable(EditorBrowsableState.Never)]
219         public static BindableProperty LayoutOrientationProperty = null;
220         internal static void SetInternalLayoutOrientationProperty(BindableObject bindable, object oldValue, object newValue)
221         {
222             var instance = (Tizen.NUI.ItemView)bindable;
223             if (newValue != null)
224             {
225                 instance.InternalLayoutOrientation = (int)newValue;
226             }
227         }
228         internal static object GetInternalLayoutOrientationProperty(BindableObject bindable)
229         {
230             var instance = (Tizen.NUI.ItemView)bindable;
231             return instance.InternalLayoutOrientation;
232         }
233
234         /// <summary>
235         /// ScrollContentSizeProperty
236         /// </summary>
237         [EditorBrowsable(EditorBrowsableState.Never)]
238         public static BindableProperty ScrollContentSizeProperty = null;
239         internal static void SetInternalScrollContentSizeProperty(BindableObject bindable, object oldValue, object newValue)
240         {
241             var instance = (Tizen.NUI.ItemView)bindable;
242             if (newValue != null)
243             {
244                 instance.InternalScrollContentSize = (float)newValue;
245             }
246         }
247         internal static object GetInternalScrollContentSizeProperty(BindableObject bindable)
248         {
249             var instance = (Tizen.NUI.ItemView)bindable;
250             return instance.InternalScrollContentSize;
251         }
252     }
253 }