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 FixedRuler : Ruler
27 internal FixedRuler(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.Ruler.FixedRulerUpcast(cPtr), cMemoryOwn)
32 /// This will be public opened.
33 [EditorBrowsable(EditorBrowsableState.Never)]
34 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
36 Interop.Ruler.DeleteFixedRuler(swigCPtr);
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)
43 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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)
50 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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)
57 float ret = Interop.Ruler.FixedRulerSnap(swigCPtr, x, bias);
58 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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)
66 float ret = Interop.Ruler.FixedRulerGetPositionFromPage(swigCPtr, page, out volume, wrap);
67 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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)
75 uint ret = Interop.Ruler.FixedRulerGetPageFromPosition(swigCPtr, position, wrap);
76 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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()
84 uint ret = Interop.Ruler.FixedRulerGetTotalPages(swigCPtr);
85 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();