-//------------------------------------------------------------------------------
-// <auto-generated />
-//
-// This file was automatically generated by SWIG (http://www.swig.org).
-// Version 3.0.10
-//
-// Do not make changes to this file unless you know what you are doing--modify
-// the SWIG interface file instead.
-//------------------------------------------------------------------------------
-
-namespace Dali {
-
-public class ViewContainer : global::System.IDisposable, global::System.Collections.IEnumerable
- , global::System.Collections.Generic.IEnumerable<View>
- {
- private global::System.Runtime.InteropServices.HandleRef swigCPtr;
- protected bool swigCMemOwn;
-
- internal ViewContainer(global::System.IntPtr cPtr, bool cMemoryOwn) {
- swigCMemOwn = cMemoryOwn;
- swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- }
-
- internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ViewContainer obj) {
- return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
- }
-
- ~ViewContainer() {
- DisposeQueue.Instance.Add(this);
- }
-
- public virtual void Dispose() {
- if (!Window.IsInstalled()) {
- DisposeQueue.Instance.Add(this);
- return;
- }
-
- lock(this) {
- if (swigCPtr.Handle != global::System.IntPtr.Zero) {
- if (swigCMemOwn) {
- swigCMemOwn = false;
- NDalicPINVOKE.delete_ActorContainer(swigCPtr);
- }
- swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
- }
- global::System.GC.SuppressFinalize(this);
- }
- }
-
-
- public ViewContainer(global::System.Collections.ICollection c) : this() {
- if (c == null)
- throw new global::System.ArgumentNullException("c");
- foreach (View element in c) {
- this.Add(element);
- }
- }
-
- public bool IsFixedSize {
- get {
- return false;
- }
- }
-
- public bool IsReadOnly {
- get {
- return false;
- }
- }
-
- public View this[int index] {
- get {
- return getitem(index);
- }
- set {
- setitem(index, value);
- }
- }
-
- public int Capacity {
- get {
- return (int)capacity();
- }
- set {
- if (value < size())
- throw new global::System.ArgumentOutOfRangeException("Capacity");
- reserve((uint)value);
- }
- }
-
- public int Count {
- get {
- return (int)size();
- }
- }
-
- public bool IsSynchronized {
- get {
- return false;
- }
- }
-
- public void CopyTo(View[] array)
- {
- CopyTo(0, array, 0, this.Count);
- }
-
- public void CopyTo(View[] array, int arrayIndex)
- {
- CopyTo(0, array, arrayIndex, this.Count);
- }
-
- public void CopyTo(int index, View[] array, int arrayIndex, int count)
- {
- if (array == null)
- throw new global::System.ArgumentNullException("array");
- if (index < 0)
- throw new global::System.ArgumentOutOfRangeException("index", "Value is less than zero");
- if (arrayIndex < 0)
- throw new global::System.ArgumentOutOfRangeException("arrayIndex", "Value is less than zero");
- if (count < 0)
- throw new global::System.ArgumentOutOfRangeException("count", "Value is less than zero");
- if (array.Rank > 1)
- throw new global::System.ArgumentException("Multi dimensional array.", "array");
- if (index+count > this.Count || arrayIndex+count > array.Length)
- throw new global::System.ArgumentException("Number of elements to copy is too large.");
- for (int i=0; i<count; i++)
- array.SetValue(getitemcopy(index+i), arrayIndex+i);
- }
-
- global::System.Collections.Generic.IEnumerator<View> global::System.Collections.Generic.IEnumerable<View>.GetEnumerator() {
- return new ViewContainerEnumerator(this);
- }
-
- global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
- return new ViewContainerEnumerator(this);
- }
-
- public ViewContainerEnumerator GetEnumerator() {
- return new ViewContainerEnumerator(this);
- }
-
- // Type-safe enumerator
- /// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown
- /// whenever the collection is modified. This has been done for changes in the size of the
- /// collection but not when one of the elements of the collection is modified as it is a bit
- /// tricky to detect unmanaged code that modifies the collection under our feet.
- public sealed class ViewContainerEnumerator : global::System.Collections.IEnumerator
- , global::System.Collections.Generic.IEnumerator<View>
- {
- private ViewContainer collectionRef;
- private int currentIndex;
- private object currentObject;
- private int currentSize;
-
- public ViewContainerEnumerator(ViewContainer collection) {
- collectionRef = collection;
- currentIndex = -1;
- currentObject = null;
- currentSize = collectionRef.Count;
- }
-
- // Type-safe iterator Current
- public View Current {
- get {
- if (currentIndex == -1)
- throw new global::System.InvalidOperationException("Enumeration not started.");
- if (currentIndex > currentSize - 1)
- throw new global::System.InvalidOperationException("Enumeration finished.");
- if (currentObject == null)
- throw new global::System.InvalidOperationException("Collection modified.");
- return (View)currentObject;
- }
- }
-
- // Type-unsafe IEnumerator.Current
- object global::System.Collections.IEnumerator.Current {
- get {
- return Current;
- }
- }
-
- public bool MoveNext() {
- int size = collectionRef.Count;
- bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
- if (moveOkay) {
- currentIndex++;
- currentObject = collectionRef[currentIndex];
- } else {
- currentObject = null;
- }
- return moveOkay;
- }
-
- public void Reset() {
- currentIndex = -1;
- currentObject = null;
- if (collectionRef.Count != currentSize) {
- throw new global::System.InvalidOperationException("Collection modified.");
- }
- }
-
- public void Dispose() {
- currentIndex = -1;
- currentObject = null;
- }
- }
-
- public void Clear() {
- NDalicPINVOKE.ActorContainer_Clear(swigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- public void Add(View x) {
- NDalicPINVOKE.ActorContainer_Add(swigCPtr, View.getCPtr(x));
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- private uint size() {
- uint ret = NDalicPINVOKE.ActorContainer_size(swigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
-
- private uint capacity() {
- uint ret = NDalicPINVOKE.ActorContainer_capacity(swigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
-
- private void reserve(uint n) {
- NDalicPINVOKE.ActorContainer_reserve(swigCPtr, n);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- public ViewContainer() : this(NDalicPINVOKE.new_ActorContainer__SWIG_0(), true) {
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- public ViewContainer(ViewContainer other) : this(NDalicPINVOKE.new_ActorContainer__SWIG_1(ViewContainer.getCPtr(other)), true) {
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- public ViewContainer(int capacity) : this(NDalicPINVOKE.new_ActorContainer__SWIG_2(capacity), true) {
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- private View getitemcopy(int index) {
- View ret = new View(NDalicPINVOKE.ActorContainer_getitemcopy(swigCPtr, index), true);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
-
- private View getitem(int index) {
- View ret = new View(NDalicPINVOKE.ActorContainer_getitem(swigCPtr, index), false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
-
- private void setitem(int index, View val) {
- NDalicPINVOKE.ActorContainer_setitem(swigCPtr, index, View.getCPtr(val));
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- public void AddRange(ViewContainer values) {
- NDalicPINVOKE.ActorContainer_AddRange(swigCPtr, ViewContainer.getCPtr(values));
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- public ViewContainer GetRange(int index, int count) {
- global::System.IntPtr cPtr = NDalicPINVOKE.ActorContainer_GetRange(swigCPtr, index, count);
- ViewContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new ViewContainer(cPtr, true);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
-
- public void Insert(int index, View x) {
- NDalicPINVOKE.ActorContainer_Insert(swigCPtr, index, View.getCPtr(x));
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- public void InsertRange(int index, ViewContainer values) {
- NDalicPINVOKE.ActorContainer_InsertRange(swigCPtr, index, ViewContainer.getCPtr(values));
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- public void RemoveAt(int index) {
- NDalicPINVOKE.ActorContainer_RemoveAt(swigCPtr, index);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- public void RemoveRange(int index, int count) {
- NDalicPINVOKE.ActorContainer_RemoveRange(swigCPtr, index, count);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- public static ViewContainer Repeat(View value, int count) {
- global::System.IntPtr cPtr = NDalicPINVOKE.ActorContainer_Repeat(View.getCPtr(value), count);
- ViewContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new ViewContainer(cPtr, true);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
-
- public void Reverse() {
- NDalicPINVOKE.ActorContainer_Reverse__SWIG_0(swigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- public void Reverse(int index, int count) {
- NDalicPINVOKE.ActorContainer_Reverse__SWIG_1(swigCPtr, index, count);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- public void SetRange(int index, ViewContainer values) {
- NDalicPINVOKE.ActorContainer_SetRange(swigCPtr, index, ViewContainer.getCPtr(values));
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
-}
-
-}