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 //------------------------------------------------------------------------------
14 internal class FixedRuler : Ruler
16 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
18 internal FixedRuler(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.FixedRuler_SWIGUpcast(cPtr), cMemoryOwn)
20 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
23 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FixedRuler obj)
25 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
28 protected override void Dispose(DisposeTypes type)
35 if (type == DisposeTypes.Explicit)
38 //Release your own managed resources here.
39 //You should release all of your own disposable objects here.
43 //Release your own unmanaged resources here.
44 //You should not access any managed member here except static instance.
45 //because the execution order of Finalizes is non-deterministic.
47 if (swigCPtr.Handle != global::System.IntPtr.Zero)
52 NDalicPINVOKE.delete_FixedRuler(swigCPtr);
54 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
60 public FixedRuler(float spacing) : this(NDalicPINVOKE.new_FixedRuler__SWIG_0(spacing), true)
62 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
65 public FixedRuler() : this(NDalicPINVOKE.new_FixedRuler__SWIG_1(), true)
67 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
70 public override float Snap(float x, float bias)
72 float ret = NDalicPINVOKE.FixedRuler_Snap(swigCPtr, x, bias);
73 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
77 public override float GetPositionFromPage(uint page, out uint volume, bool wrap)
79 float ret = NDalicPINVOKE.FixedRuler_GetPositionFromPage(swigCPtr, page, out volume, wrap);
80 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
84 public override uint GetPageFromPosition(float position, bool wrap)
86 uint ret = NDalicPINVOKE.FixedRuler_GetPageFromPosition(swigCPtr, position, wrap);
87 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
91 public override uint GetTotalPages()
93 uint ret = NDalicPINVOKE.FixedRuler_GetTotalPages(swigCPtr);
94 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();