[NUI] remove "_" and refactoring naming to pascal case.
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / FixedRuler.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 FixedRuler : Ruler
25     {
26
27         internal FixedRuler(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.Ruler.FixedRulerUpcast(cPtr), cMemoryOwn)
28         {
29         }
30
31
32         /// This will be public opened.
33         [EditorBrowsable(EditorBrowsableState.Never)]
34         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
35         {
36             Interop.Ruler.DeleteFixedRuler(swigCPtr);
37         }
38
39         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
40         [EditorBrowsable(EditorBrowsableState.Never)]
41         public FixedRuler(float spacing) : this(Interop.Ruler.NewFixedRuler(spacing), true)
42         {
43             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
44         }
45
46         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
47         [EditorBrowsable(EditorBrowsableState.Never)]
48         public FixedRuler() : this(Interop.Ruler.NewFixedRuler(), true)
49         {
50             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
51         }
52
53         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
54         [EditorBrowsable(EditorBrowsableState.Never)]
55         public override float Snap(float x, float bias)
56         {
57             float ret = Interop.Ruler.FixedRulerSnap(swigCPtr, x, bias);
58             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
59             return ret;
60         }
61
62         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
63         [EditorBrowsable(EditorBrowsableState.Never)]
64         public override float GetPositionFromPage(uint page, out uint volume, bool wrap)
65         {
66             float ret = Interop.Ruler.FixedRulerGetPositionFromPage(swigCPtr, page, out volume, wrap);
67             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
68             return ret;
69         }
70
71         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
72         [EditorBrowsable(EditorBrowsableState.Never)]
73         public override uint GetPageFromPosition(float position, bool wrap)
74         {
75             uint ret = Interop.Ruler.FixedRulerGetPageFromPosition(swigCPtr, position, wrap);
76             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
77             return ret;
78         }
79
80         /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
81         [EditorBrowsable(EditorBrowsableState.Never)]
82         public override uint GetTotalPages()
83         {
84             uint ret = Interop.Ruler.FixedRulerGetTotalPages(swigCPtr);
85             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
86             return ret;
87         }
88     }
89 }