[ACR-564] deprecate unused API
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.Wearable / src / public / RecyclerView / RecycleLayoutManager.cs
1 /* Copyright (c) 2020 Samsung Electronics Co., Ltd.
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  *
15  */
16 using Tizen.NUI.BaseComponents;
17 using Tizen.NUI.Components;
18 using System.Collections.Generic;
19 using System.ComponentModel;
20 using System;
21
22 namespace Tizen.NUI.Wearable
23 {
24     /// <summary>
25     /// [Draft] Defalt layout manager for RecyclerView.
26     /// Lay out RecycleItem and recycle RecycleItem.
27     /// </summary>
28     /// <since_tizen> 8 </since_tizen>
29     [Obsolete("This has been deprecated in API12")]
30     [EditorBrowsable(EditorBrowsableState.Never)]
31     public class RecycleLayoutManager
32     {
33         /// <summary>
34         /// Enumeration for the direction in which the content is laid out
35         /// </summary>
36         /// <since_tizen> 8 </since_tizen>
37         [Obsolete("This has been deprecated in API12")]
38         [EditorBrowsable(EditorBrowsableState.Never)]
39         public enum Orientation
40         {
41             /// <summary>
42             /// Vertical
43             /// </summary>
44             /// <since_tizen> 8 </since_tizen>
45             [Obsolete("This has been deprecated in API12")]
46             [EditorBrowsable(EditorBrowsableState.Never)]
47             Vertical = 0,
48             /// <summary>
49             /// Horizontal
50             /// </summary>
51             /// <since_tizen> 8 </since_tizen>
52             [Obsolete("This has been deprecated in API12")]
53             [EditorBrowsable(EditorBrowsableState.Never)]
54             Horizontal = 1,
55         }
56
57         /// <summary>
58         /// Container which contains RecycleItems.
59         /// </summary>
60         /// <since_tizen> 8 </since_tizen>
61         [Obsolete("This has been deprecated in API12")]
62         [EditorBrowsable(EditorBrowsableState.Never)]
63         public View Container { get; set; }
64
65         /// <summary>
66         /// Size of RecycleItem.
67         /// </summary>
68         /// <since_tizen> 8 </since_tizen>
69         [Obsolete("This has been deprecated in API12")]
70         [EditorBrowsable(EditorBrowsableState.Never)]
71         public Size ItemSize { get; set; } = new Size();
72
73         /// <summary>
74         /// Get/Set the orientation in the layout.
75         /// </summary>
76         /// <since_tizen> 8 </since_tizen>
77         [Obsolete("This has been deprecated in API12")]
78         [EditorBrowsable(EditorBrowsableState.Never)]
79         public Orientation LayoutOrientation { get; set; } = Orientation.Vertical;
80
81         /// <summary>
82         /// How far can you reach the next item.
83         /// </summary>
84         /// <since_tizen> 8 </since_tizen>
85         [Obsolete("This has been deprecated in API12")]
86         [EditorBrowsable(EditorBrowsableState.Never)]
87         public float StepSize { get; protected set; }
88
89         /// <summary>
90         /// How far can you reach the next item.
91         /// </summary>
92         /// <since_tizen> 8 </since_tizen>
93         [Obsolete("This has been deprecated in API12")]
94         [EditorBrowsable(EditorBrowsableState.Never)]
95         public int DataCount { get; set; }
96
97         /// <summary>
98         /// The last scrolled position which is calculated by ScrollableBase. The value should be updated in the Recycle() method.
99         /// </summary>
100         [Obsolete("This has been deprecated in API12")]
101         [EditorBrowsable(EditorBrowsableState.Never)]
102         protected float PrevScrollPosition { get; set; }
103
104         /// <summary>
105         /// This is called to find out where items are lain out according to current scroll position.
106         /// </summary>
107         /// <param name="scrollPosition">Scroll position which is calculated by ScrollableBase</param>
108         /// <since_tizen> 8 </since_tizen>
109         [Obsolete("This has been deprecated in API12")]
110         [EditorBrowsable(EditorBrowsableState.Never)]
111         public virtual void Layout(float scrollPosition)
112         {
113
114         }
115
116         /// <summary>
117         /// This is called to find out how much container size can be.
118         /// </summary>
119         /// <since_tizen> 8 </since_tizen>
120         [Obsolete("This has been deprecated in API12")]
121         [EditorBrowsable(EditorBrowsableState.Never)]
122         public virtual float CalculateLayoutOrientationSize()
123         {
124             return 0.0f;
125         }
126
127         /// <summary>
128         /// This is called to find out which items should be recycled according to current scroll position.
129         /// </summary>
130         /// <param name="scrollPosition">Scroll position which is calculated by ScrollableBase</param>
131         /// <returns>List of RecycleItems which should be recycled.</returns>
132         /// <since_tizen> 8 </since_tizen>
133         [Obsolete("This has been deprecated in API12")]
134         [EditorBrowsable(EditorBrowsableState.Never)]
135         public virtual List<RecycleItem> Recycle(float scrollPosition)
136         {
137             return new List<RecycleItem>();
138         }
139
140         /// <summary>
141         /// Adjust scrolling position by own scrolling rules.
142         /// </summary>
143         /// <param name="scrollPosition">Scroll position which is calculated by ScrollableBase</param>
144         /// <since_tizen> 8 </since_tizen>
145         [Obsolete("This has been deprecated in API12")]
146         [EditorBrowsable(EditorBrowsableState.Never)]
147         public virtual float CalculateCandidateScrollPosition(float scrollPosition)
148         {
149             return scrollPosition;
150         }
151
152         /// <summary>
153         /// Gets the next keyboard focusable view in this control towards the given direction.<br />
154         /// A control needs to override this function in order to support two dimensional keyboard navigation.<br />
155         /// </summary>
156         /// <param name="currentFocusedView">The current focused view.</param>
157         /// <param name="direction">The direction to move the focus towards.</param>
158         /// <param name="loopEnabled">Whether the focus movement should be looped within the control.</param>
159         /// <returns>The next keyboard focusable view in this control or an empty handle if no view can be focused.</returns>
160         [Obsolete("This has been deprecated in API12")]
161         [EditorBrowsable(EditorBrowsableState.Never)]
162         public virtual View RequestNextFocusableView(View currentFocusedView, View.FocusDirection direction, bool loopEnabled)
163         {
164             return null;
165         }
166
167     }
168 }