Follow formatting NUI
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / Ruler.cs
1 /*
2  * Copyright(c) 2017 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
20 namespace Tizen.NUI
21 {
22     /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
23     [EditorBrowsable(EditorBrowsableState.Never)]
24     public class Ruler : RefObject
25     {
26
27         internal Ruler(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.Ruler.Ruler_SWIGUpcast(cPtr), cMemoryOwn)
28         {
29         }
30
31         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Ruler obj)
32         {
33             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
34         }
35
36         /// This will be public opened.
37         [EditorBrowsable(EditorBrowsableState.Never)]
38         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
39         {
40             throw new global::System.MethodAccessException("C++ destructor does not have public access");
41         }
42
43         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
44         [EditorBrowsable(EditorBrowsableState.Never)]
45         public virtual float Snap(float x, float bias)
46         {
47             float ret = Interop.Ruler.Ruler_Snap__SWIG_0(swigCPtr, x, bias);
48             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
49             return ret;
50         }
51
52         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
53         [EditorBrowsable(EditorBrowsableState.Never)]
54         public virtual float Snap(float x)
55         {
56             float ret = Interop.Ruler.Ruler_Snap__SWIG_1(swigCPtr, x);
57             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
58             return ret;
59         }
60
61         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
62         [EditorBrowsable(EditorBrowsableState.Never)]
63         public virtual float GetPositionFromPage(uint page, out uint volume, bool wrap)
64         {
65             float ret = Interop.Ruler.Ruler_GetPositionFromPage(swigCPtr, page, out volume, wrap);
66             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
67             return ret;
68         }
69
70         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
71         [EditorBrowsable(EditorBrowsableState.Never)]
72         public virtual uint GetPageFromPosition(float position, bool wrap)
73         {
74             uint ret = Interop.Ruler.Ruler_GetPageFromPosition(swigCPtr, position, wrap);
75             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
76             return ret;
77         }
78
79         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
80         [EditorBrowsable(EditorBrowsableState.Never)]
81         public virtual uint GetTotalPages()
82         {
83             uint ret = Interop.Ruler.Ruler_GetTotalPages(swigCPtr);
84             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
85             return ret;
86         }
87
88         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
89         [EditorBrowsable(EditorBrowsableState.Never)]
90         public new Ruler.RulerType GetType()
91         {
92             Ruler.RulerType ret = (Ruler.RulerType)Interop.Ruler.Ruler_GetType(swigCPtr);
93             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
94             return ret;
95         }
96
97         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
98         [EditorBrowsable(EditorBrowsableState.Never)]
99         public bool IsEnabled()
100         {
101             bool ret = Interop.Ruler.Ruler_IsEnabled(swigCPtr);
102             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
103             return ret;
104         }
105
106         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
107         [EditorBrowsable(EditorBrowsableState.Never)]
108         public void Enable()
109         {
110             Interop.Ruler.Ruler_Enable(swigCPtr);
111             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
112         }
113
114         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
115         [EditorBrowsable(EditorBrowsableState.Never)]
116         public void Disable()
117         {
118             Interop.Ruler.Ruler_Disable(swigCPtr);
119             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
120         }
121
122         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
123         [EditorBrowsable(EditorBrowsableState.Never)]
124         public void SetDomain(RulerDomain domain)
125         {
126             Interop.Ruler.Ruler_SetDomain(swigCPtr, RulerDomain.getCPtr(domain));
127             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128         }
129
130         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
131         [EditorBrowsable(EditorBrowsableState.Never)]
132         public RulerDomain GetDomain()
133         {
134             RulerDomain ret = new RulerDomain(Interop.Ruler.Ruler_GetDomain(swigCPtr), false);
135             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
136             return ret;
137         }
138
139         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
140         [EditorBrowsable(EditorBrowsableState.Never)]
141         public void DisableDomain()
142         {
143             Interop.Ruler.Ruler_DisableDomain(swigCPtr);
144             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
145         }
146
147         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
148         [EditorBrowsable(EditorBrowsableState.Never)]
149         public float Clamp(float x, float length, float scale)
150         {
151             float ret = Interop.Ruler.Ruler_Clamp__SWIG_0(swigCPtr, x, length, scale);
152             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
153             return ret;
154         }
155
156         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
157         [EditorBrowsable(EditorBrowsableState.Never)]
158         public float Clamp(float x, float length)
159         {
160             float ret = Interop.Ruler.Ruler_Clamp__SWIG_1(swigCPtr, x, length);
161             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
162             return ret;
163         }
164
165         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
166         [EditorBrowsable(EditorBrowsableState.Never)]
167         public float Clamp(float x)
168         {
169             float ret = Interop.Ruler.Ruler_Clamp__SWIG_2(swigCPtr, x);
170             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
171             return ret;
172         }
173
174         internal float Clamp(float x, float length, float scale, SWIGTYPE_p_Dali__Toolkit__ClampState clamped)
175         {
176             float ret = Interop.Ruler.Ruler_Clamp__SWIG_3(swigCPtr, x, length, scale, SWIGTYPE_p_Dali__Toolkit__ClampState.getCPtr(clamped));
177             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
178             return ret;
179         }
180
181         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
182         [EditorBrowsable(EditorBrowsableState.Never)]
183         public float SnapAndClamp(float x, float bias, float length, float scale)
184         {
185             float ret = Interop.Ruler.Ruler_SnapAndClamp__SWIG_0(swigCPtr, x, bias, length, scale);
186             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
187             return ret;
188         }
189
190         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
191         [EditorBrowsable(EditorBrowsableState.Never)]
192         public float SnapAndClamp(float x, float bias, float length)
193         {
194             float ret = Interop.Ruler.Ruler_SnapAndClamp__SWIG_1(swigCPtr, x, bias, length);
195             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
196             return ret;
197         }
198
199         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
200         [EditorBrowsable(EditorBrowsableState.Never)]
201         public float SnapAndClamp(float x, float bias)
202         {
203             float ret = Interop.Ruler.Ruler_SnapAndClamp__SWIG_2(swigCPtr, x, bias);
204             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
205             return ret;
206         }
207
208         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
209         [EditorBrowsable(EditorBrowsableState.Never)]
210         public float SnapAndClamp(float x)
211         {
212             float ret = Interop.Ruler.Ruler_SnapAndClamp__SWIG_3(swigCPtr, x);
213             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
214             return ret;
215         }
216
217         internal float SnapAndClamp(float x, float bias, float length, float scale, SWIGTYPE_p_Dali__Toolkit__ClampState clamped)
218         {
219             float ret = Interop.Ruler.Ruler_SnapAndClamp__SWIG_4(swigCPtr, x, bias, length, scale, SWIGTYPE_p_Dali__Toolkit__ClampState.getCPtr(clamped));
220             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
221             return ret;
222         }
223
224         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
225         [EditorBrowsable(EditorBrowsableState.Never)]
226         public enum RulerType
227         {
228             /// <summary>A Fixed ruler.</summary>
229             /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
230
231             Fixed,
232
233             /// <summary>A Free ruler.</summary>
234             /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
235             Free
236         }
237     }
238 }