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.
21 using Tizen.NUI.BaseComponents;
23 /// An interface to encapsulate the information required for relayout.
25 /// <since_tizen> 3 </since_tizen>
26 public class RelayoutContainer : Disposable
31 /// <since_tizen> 3 </since_tizen>
32 protected bool swigCMemOwn;
34 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
37 /// Adds relayout information to the container if it doesn't already exist.
39 /// <param name="view">The view to relayout.</param>
40 /// <param name="size">The size to relayout.</param>
41 /// <since_tizen> 3 </since_tizen>
42 public virtual void Add(View view, Size2D size)
44 Interop.NDalic.RelayoutContainer_Add(swigCPtr, View.getCPtr(view), Size2D.getCPtr(size));
45 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
48 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(RelayoutContainer obj)
50 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
53 internal RelayoutContainer(global::System.IntPtr cPtr, bool cMemoryOwn)
55 swigCMemOwn = cMemoryOwn;
56 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
62 /// <since_tizen> 3 </since_tizen>
63 protected override void Dispose(DisposeTypes type)
70 //Release your own unmanaged resources here.
71 //You should not access any managed member here except static instance.
72 //because the execution order of Finalizes is non-deterministic.
74 if (swigCPtr.Handle != global::System.IntPtr.Zero)
79 Interop.NDalic.delete_RelayoutContainer(swigCPtr);
81 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);