[NUI] Sync dalihub - Add C# layout (#816)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / Layouting / LayoutData.cs
1 /*
2  * Copyright (c) 2019 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.Collections.Generic;
19
20 namespace Tizen.NUI
21 {
22
23     /// <summary>
24     /// [Draft] Class to hold layout position data
25     /// </summary>
26     internal struct LayoutPositionData
27     {
28         /// <summary>
29         /// [Draft] Initialized constructor
30         /// </summary>
31         /// <param name="left">Left position.</param>
32         /// <param name="top">Top position.</param>
33         /// <param name="right">Right position.</param>
34         /// <param name="bottom">Bottom position.</param>
35         /// <param name="animated">If an animation is required to the given positions.</param>
36         public LayoutPositionData( float left, float top, float right, float bottom, bool animated )
37         {
38             _left = left;
39             _top = top;
40             _right = right;
41             _bottom = bottom;
42             _animated = animated;
43         }
44
45         private float _left;
46         private float _top;
47         private float _right;
48         private float _bottom;
49         private bool _animated;
50     };
51
52     /// <summary>
53     /// [Draft] Class to hold Layout data for each entity being laid out.
54     /// </summary>
55     internal class LayoutData
56     {
57         /// <summary>
58         /// [Draft] Constructor
59         /// </summary>
60         public LayoutData()
61         {
62             LayoutPositionDataList = new List<LayoutPositionData>();
63         }
64
65         private List<LayoutPositionData> layoutPositionDataList;
66
67         internal List<LayoutPositionData> LayoutPositionDataList { get => layoutPositionDataList; set => layoutPositionDataList = value; }
68     } // LayoutData
69
70 } // namespace Tizen.NUI