2 * Copyright(c) 2017 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 using System.ComponentModel;
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
27 internal Ruler(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.Ruler.Upcast(cPtr), cMemoryOwn)
31 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Ruler obj)
33 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
36 /// This will be public opened.
37 [EditorBrowsable(EditorBrowsableState.Never)]
38 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
40 throw new global::System.MethodAccessException("C++ destructor does not have public access");
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)
47 float ret = Interop.Ruler.Snap(swigCPtr, x, bias);
48 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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)
56 float ret = Interop.Ruler.Snap(swigCPtr, x);
57 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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)
65 float ret = Interop.Ruler.GetPositionFromPage(swigCPtr, page, out volume, wrap);
66 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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)
74 uint ret = Interop.Ruler.GetPageFromPosition(swigCPtr, position, wrap);
75 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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()
83 uint ret = Interop.Ruler.GetTotalPages(swigCPtr);
84 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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()
92 Ruler.RulerType ret = (Ruler.RulerType)Interop.Ruler.GetType(swigCPtr);
93 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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()
101 bool ret = Interop.Ruler.IsEnabled(swigCPtr);
102 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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)]
110 Interop.Ruler.Enable(swigCPtr);
111 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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()
118 Interop.Ruler.Disable(swigCPtr);
119 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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)
126 Interop.Ruler.SetDomain(swigCPtr, RulerDomain.getCPtr(domain));
127 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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()
134 RulerDomain ret = new RulerDomain(Interop.Ruler.GetDomain(swigCPtr), false);
135 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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()
143 Interop.Ruler.DisableDomain(swigCPtr);
144 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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)
151 float ret = Interop.Ruler.Clamp(swigCPtr, x, length, scale);
152 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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)
160 float ret = Interop.Ruler.Clamp(swigCPtr, x, length);
161 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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)
169 float ret = Interop.Ruler.Clamp(swigCPtr, x);
170 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
174 internal float Clamp(float x, float length, float scale, SWIGTYPE_p_Dali__Toolkit__ClampState clamped)
176 float ret = Interop.Ruler.Clamp(swigCPtr, x, length, scale, SWIGTYPE_p_Dali__Toolkit__ClampState.getCPtr(clamped));
177 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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)
185 float ret = Interop.Ruler.SnapAndClamp(swigCPtr, x, bias, length, scale);
186 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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)
194 float ret = Interop.Ruler.SnapAndClamp(swigCPtr, x, bias, length);
195 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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)
203 float ret = Interop.Ruler.SnapAndClamp(swigCPtr, x, bias);
204 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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)
212 float ret = Interop.Ruler.SnapAndClamp(swigCPtr, x);
213 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
217 internal float SnapAndClamp(float x, float bias, float length, float scale, SWIGTYPE_p_Dali__Toolkit__ClampState clamped)
219 float ret = Interop.Ruler.SnapAndClamp(swigCPtr, x, bias, length, scale, SWIGTYPE_p_Dali__Toolkit__ClampState.getCPtr(clamped));
220 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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
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.
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.