1 //------------------------------------------------------------------------------
4 // This file was automatically generated by SWIG (http://www.swig.org).
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
13 public class DefaultRuler : Ruler {
14 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
16 internal DefaultRuler(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.DefaultRuler_SWIGUpcast(cPtr), cMemoryOwn) {
17 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
20 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(DefaultRuler obj) {
21 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
28 public override void Dispose() {
30 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
33 NDalicPINVOKE.delete_DefaultRuler(swigCPtr);
35 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
37 global::System.GC.SuppressFinalize(this);
42 public DefaultRuler() : this(NDalicPINVOKE.new_DefaultRuler(), true) {
43 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
46 public override float Snap(float x, float bias) {
47 float ret = NDalicPINVOKE.DefaultRuler_Snap(swigCPtr, x, bias);
48 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
52 public override float GetPositionFromPage(uint page, out uint volume, bool wrap) {
53 float ret = NDalicPINVOKE.DefaultRuler_GetPositionFromPage(swigCPtr, page, out volume, wrap);
54 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
58 public override uint GetPageFromPosition(float position, bool wrap) {
59 uint ret = NDalicPINVOKE.DefaultRuler_GetPageFromPosition(swigCPtr, position, wrap);
60 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
64 public override uint GetTotalPages() {
65 uint ret = NDalicPINVOKE.DefaultRuler_GetTotalPages(swigCPtr);
66 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();