1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
20 using System.Runtime.InteropServices;
23 public class View : CustomActor {
24 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
26 internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn) {
27 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
29 // Register this instance of view in the view registry.
30 ViewRegistry.RegisterView(this);
33 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj) {
34 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
38 DisposeQueue.Instance.Add(this);
41 public override void Dispose() {
42 if (!Stage.IsInstalled()) {
43 DisposeQueue.Instance.Add(this);
48 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
51 NDalicPINVOKE.delete_View(swigCPtr);
53 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
55 global::System.GC.SuppressFinalize(this);
61 * @brief Event arguments that passed via KeyInputFocusGained signal
64 public class KeyInputFocusGainedEventArgs : EventArgs
69 * @brief View - is the view that gets Key Input Focus
86 * @brief Event arguments that passed via KeyInputFocusLost signal
89 public class KeyInputFocusLostEventArgs : EventArgs
94 * @brief View - is the view that loses Key Input Focus
111 * @brief Event arguments that passed via Key signal
114 public class KeyEventArgs : EventArgs
120 * @brief View - is the view that recieves the key.
136 * @brief Key - is the key sent to the View.
153 * @brief Event arguments that passed via OnRelayout signal
156 public class OnRelayoutEventArgs : EventArgs
161 * @brief View - is the view that is being resized upon relayout
179 * @brief Event arguments that passed via Touch signal
182 public class TouchEventArgs : EventArgs
185 private Touch _touch;
188 * @brief View - is the view that is being touched
204 * @brief Touch - contains the information of touch points
221 * @brief Event arguments that passed via Hover signal
224 public class HoverEventArgs : EventArgs
227 private Hover _hover;
230 * @brief View - is the view that is being hovered
246 * @brief Hover - contains touch points that represent the points
247 * that are currently being hovered or the points where a hover has stopped
264 * @brief Event arguments that passed via Wheel signal
267 public class WheelEventArgs : EventArgs
270 private Wheel _wheel;
273 * @brief View - is the view that is being wheeled
289 * @brief Wheel - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
306 * @brief Event arguments that passed via OnStage signal
309 public class OnStageEventArgs : EventArgs
314 * @brief View - is the view that is being connected to the stage
331 * @brief Event arguments that passed via OffStage signal
334 public class OffStageEventArgs : EventArgs
339 * @brief View - is the view that is being disconnected from the stage
355 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
356 private delegate void KeyInputFocusGainedCallbackDelegate(IntPtr control);
357 private DaliEventHandler<object,KeyInputFocusGainedEventArgs> _KeyInputFocusGainedEventHandler;
358 private KeyInputFocusGainedCallbackDelegate _KeyInputFocusGainedCallbackDelegate;
360 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
361 private delegate void KeyInputFocusLostCallbackDelegate(IntPtr control);
362 private DaliEventHandler<object,KeyInputFocusLostEventArgs> _KeyInputFocusLostEventHandler;
363 private KeyInputFocusLostCallbackDelegate _KeyInputFocusLostCallbackDelegate;
365 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
366 private delegate bool KeyCallbackDelegate(IntPtr control, IntPtr key);
367 private DaliEventHandlerWithReturnType<object,KeyEventArgs,bool> _KeyHandler;
368 private KeyCallbackDelegate _KeyCallbackDelegate;
370 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
371 private delegate void OnRelayoutEventCallbackDelegate(IntPtr control);
372 private DaliEventHandler<object,OnRelayoutEventArgs> _viewOnRelayoutEventHandler;
373 private OnRelayoutEventCallbackDelegate _viewOnRelayoutEventCallbackDelegate;
375 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
376 private delegate bool TouchCallbackDelegate(IntPtr view, IntPtr touch);
377 private DaliEventHandlerWithReturnType<object,TouchEventArgs,bool> _viewTouchHandler;
378 private TouchCallbackDelegate _viewTouchCallbackDelegate;
380 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
381 private delegate bool HoverCallbackDelegate(IntPtr view, IntPtr hover);
382 private DaliEventHandlerWithReturnType<object,HoverEventArgs,bool> _viewHoverHandler;
383 private HoverCallbackDelegate _viewHoverCallbackDelegate;
385 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
386 private delegate bool WheelCallbackDelegate(IntPtr view, IntPtr wheel);
387 private DaliEventHandlerWithReturnType<object,WheelEventArgs,bool> _viewWheelHandler;
388 private WheelCallbackDelegate _viewWheelCallbackDelegate;
390 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
391 private delegate void OnStageEventCallbackDelegate(IntPtr control);
392 private DaliEventHandler<object,OnStageEventArgs> _viewOnStageEventHandler;
393 private OnStageEventCallbackDelegate _viewOnStageEventCallbackDelegate;
395 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
396 private delegate void OffStageEventCallbackDelegate(IntPtr control);
397 private DaliEventHandler<object,OffStageEventArgs> _viewOffStageEventHandler;
398 private OffStageEventCallbackDelegate _viewOffStageEventCallbackDelegate;
401 * @brief Event for KeyInputFocusGained signal which can be used to subscribe/unsubscribe the event handler
402 * (in the type of KeyInputFocusGainedEventHandler-DaliEventHandler<object,KeyInputFocusGainedEventArgs>)
403 * provided by the user. KeyInputFocusGained signal is emitted when the control gets Key Input Focus.
405 public event DaliEventHandler<object,KeyInputFocusGainedEventArgs> KeyInputFocusGained
411 // Restricted to only one listener
412 if (_KeyInputFocusGainedEventHandler == null)
414 _KeyInputFocusGainedEventHandler += value;
415 Console.WriteLine("View Key EVENT Locked....");
416 _KeyInputFocusGainedCallbackDelegate = new KeyInputFocusGainedCallbackDelegate(OnKeyInputFocusGained);
417 this.KeyInputFocusGainedSignal().Connect(_KeyInputFocusGainedCallbackDelegate);
426 if (_KeyInputFocusGainedEventHandler != null)
428 this.KeyInputFocusGainedSignal().Disconnect(_KeyInputFocusGainedCallbackDelegate);
431 _KeyInputFocusGainedEventHandler -= value;
436 private void OnKeyInputFocusGained(IntPtr view)
438 KeyInputFocusGainedEventArgs e = new KeyInputFocusGainedEventArgs();
439 Console.WriteLine("View Key ....");
440 // Populate all members of "e" (KeyInputFocusGainedEventArgs) with real data
441 e.View = Dali.View.GetViewFromPtr(view);
443 if (_KeyInputFocusGainedEventHandler != null)
445 //here we send all data to user event handlers
446 _KeyInputFocusGainedEventHandler(this, e);
452 * @brief Event for KeyInputFocusLost signal which can be used to subscribe/unsubscribe the event handler
453 * (in the type of KeyInputFocusLostEventHandler-DaliEventHandler<object,KeyInputFocusLostEventArgs>)
454 * provided by the user. KeyInputFocusLost signal is emitted when the control loses Key Input Focus.
456 public event DaliEventHandler<object,KeyInputFocusLostEventArgs> KeyInputFocusLost
462 // Restricted to only one listener
463 if (_KeyInputFocusLostEventHandler == null)
465 _KeyInputFocusLostEventHandler += value;
467 _KeyInputFocusLostCallbackDelegate = new KeyInputFocusLostCallbackDelegate(OnKeyInputFocusLost);
468 this.KeyInputFocusLostSignal().Connect(_KeyInputFocusLostCallbackDelegate);
477 if (_KeyInputFocusLostEventHandler != null)
479 this.KeyInputFocusLostSignal().Disconnect(_KeyInputFocusLostCallbackDelegate);
482 _KeyInputFocusLostEventHandler -= value;
487 private void OnKeyInputFocusLost(IntPtr view)
489 KeyInputFocusLostEventArgs e = new KeyInputFocusLostEventArgs();
491 // Populate all members of "e" (KeyInputFocusLostEventArgs) with real data
492 e.View = Dali.View.GetViewFromPtr(view);
494 if (_KeyInputFocusLostEventHandler != null)
496 //here we send all data to user event handlers
497 _KeyInputFocusLostEventHandler(this, e);
502 * @brief Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler
503 * (in the type of KeyHandler-DaliEventHandlerWithReturnType<object,KeyEventArgs,bool>)
504 * provided by the user. KeyPressed signal is emitted when key event is received.
506 public event DaliEventHandlerWithReturnType<object,KeyEventArgs,bool> KeyPressed
512 // Restricted to only one listener
513 if (_KeyHandler == null)
515 _KeyHandler += value;
517 _KeyCallbackDelegate = new KeyCallbackDelegate(OnKey);
518 this.KeyEventSignal().Connect(_KeyCallbackDelegate);
527 if (_KeyHandler != null)
529 this.KeyEventSignal().Disconnect(_KeyCallbackDelegate);
532 _KeyHandler -= value;
537 private bool OnKey(IntPtr view, IntPtr key)
539 KeyEventArgs e = new KeyEventArgs();
541 // Populate all members of "e" (KeyEventArgs) with real data
542 e.View = Dali.View.GetViewFromPtr(view);
543 e.Key = Dali.Key.GetKeyFromPtr(key);
545 if (_KeyHandler != null)
547 //here we send all data to user event handlers
548 return _KeyHandler(this, e);
555 * @brief Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler
556 * (in the type of OnRelayoutEventHandler) provided by the user.
557 * OnRelayout signal is emitted after the size has been set on the view during relayout.
559 public event DaliEventHandler<object,OnRelayoutEventArgs> OnRelayoutEvent
565 // Restricted to only one listener
566 if (_viewOnRelayoutEventHandler == null)
568 _viewOnRelayoutEventHandler += value;
569 Console.WriteLine("View OnRelayoutEventArgs Locked....");
570 _viewOnRelayoutEventCallbackDelegate = new OnRelayoutEventCallbackDelegate(OnRelayout);
571 this.OnRelayoutSignal().Connect(_viewOnRelayoutEventCallbackDelegate);
580 if (_viewOnRelayoutEventHandler != null)
582 this.OnRelayoutSignal().Disconnect(_viewOnRelayoutEventCallbackDelegate);
585 _viewOnRelayoutEventHandler -= value;
590 // Callback for View OnRelayout signal
591 private void OnRelayout(IntPtr data)
593 OnRelayoutEventArgs e = new OnRelayoutEventArgs();
594 Console.WriteLine("View OnRelayoutEventArgs....");
595 // Populate all members of "e" (OnRelayoutEventArgs) with real data
596 e.View = View.GetViewFromPtr(data);
598 if (_viewOnRelayoutEventHandler != null)
600 //here we send all data to user event handlers
601 _viewOnRelayoutEventHandler(this, e);
606 * @brief Event for Touched signal which can be used to subscribe/unsubscribe the event handler
607 * (in the type of TouchHandler-DaliEventHandlerWithReturnType<object,TouchEventArgs,bool>)
608 * provided by the user. Touched signal is emitted when touch input is received.
610 public event DaliEventHandlerWithReturnType<object,TouchEventArgs,bool> Touched
616 // Restricted to only one listener
617 if (_viewTouchHandler == null)
619 _viewTouchHandler += value;
620 Console.WriteLine("View Touch EVENT LOCKED....");
621 _viewTouchCallbackDelegate = new TouchCallbackDelegate(OnTouch);
622 this.TouchSignal().Connect(_viewTouchCallbackDelegate);
631 if (_viewTouchHandler != null)
633 this.TouchSignal().Disconnect(_viewTouchCallbackDelegate);
636 _viewTouchHandler -= value;
641 // Callback for View TouchSignal
642 private bool OnTouch(IntPtr view, IntPtr touch)
644 TouchEventArgs e = new TouchEventArgs();
645 Console.WriteLine("View Touch EVENT....");
646 // Populate all members of "e" (TouchEventArgs) with real data
647 e.View = View.GetViewFromPtr(view);
648 e.Touch = Dali.Touch.GetTouchFromPtr(touch);
650 if (_viewTouchHandler != null)
652 //here we send all data to user event handlers
653 return _viewTouchHandler(this, e);
660 * @brief Event for Hovered signal which can be used to subscribe/unsubscribe the event handler
661 * (in the type of HoverHandler-DaliEventHandlerWithReturnType<object,HoverEventArgs,bool>)
662 * provided by the user. Hovered signal is emitted when hover input is received.
664 public event DaliEventHandlerWithReturnType<object,HoverEventArgs,bool> Hovered
670 // Restricted to only one listener
671 if (_viewHoverHandler == null)
673 _viewHoverHandler += value;
675 _viewHoverCallbackDelegate = new HoverCallbackDelegate(OnHover);
676 this.HoveredSignal().Connect(_viewHoverCallbackDelegate);
685 if (_viewHoverHandler != null)
687 this.HoveredSignal().Disconnect(_viewHoverCallbackDelegate);
690 _viewHoverHandler -= value;
695 // Callback for View Hover signal
696 private bool OnHover(IntPtr view, IntPtr hover)
698 HoverEventArgs e = new HoverEventArgs();
700 // Populate all members of "e" (HoverEventArgs) with real data
701 e.View = View.GetViewFromPtr(view);
702 e.Hover = Dali.Hover.GetHoverFromPtr(hover);
704 if (_viewHoverHandler != null)
706 //here we send all data to user event handlers
707 return _viewHoverHandler(this, e);
714 * @brief Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler
715 * (in the type of WheelHandler-DaliEventHandlerWithReturnType<object,WheelEventArgs,bool>)
716 * provided by the user. WheelMoved signal is emitted when wheel event is received.
718 public event DaliEventHandlerWithReturnType<object,WheelEventArgs,bool> WheelMoved
724 // Restricted to only one listener
725 if (_viewWheelHandler == null)
727 _viewWheelHandler += value;
728 Console.WriteLine("View Wheel EVENT LOCKED....");
729 _viewWheelCallbackDelegate = new WheelCallbackDelegate(OnWheel);
730 this.WheelEventSignal().Connect(_viewWheelCallbackDelegate);
739 if (_viewWheelHandler != null)
741 this.WheelEventSignal().Disconnect(_viewWheelCallbackDelegate);
744 _viewWheelHandler -= value;
749 // Callback for View Wheel signal
750 private bool OnWheel(IntPtr view, IntPtr wheel)
752 WheelEventArgs e = new WheelEventArgs();
753 Console.WriteLine("View Wheel EVENT ....");
754 // Populate all members of "e" (WheelEventArgs) with real data
755 e.View = View.GetViewFromPtr(view);
756 e.Wheel = Dali.Wheel.GetWheelFromPtr(wheel);
758 if (_viewWheelHandler != null)
760 //here we send all data to user event handlers
761 return _viewWheelHandler(this, e);
768 * @brief Event for OnStage signal which can be used to subscribe/unsubscribe the event handler
769 * (in the type of OnStageEventHandler) provided by the user.
770 * OnStage signal is emitted after the view has been connected to the stage.
772 public event DaliEventHandler<object,OnStageEventArgs> OnStageEvent
778 // Restricted to only one listener
779 if (_viewOnStageEventHandler == null)
781 _viewOnStageEventHandler += value;
783 _viewOnStageEventCallbackDelegate = new OnStageEventCallbackDelegate(OnStage);
784 this.OnStageSignal().Connect(_viewOnStageEventCallbackDelegate);
793 if (_viewOnStageEventHandler != null)
795 this.OnStageSignal().Disconnect(_viewOnStageEventCallbackDelegate);
798 _viewOnStageEventHandler -= value;
803 // Callback for View OnStage signal
804 private void OnStage(IntPtr data)
806 OnStageEventArgs e = new OnStageEventArgs();
808 // Populate all members of "e" (OnStageEventArgs) with real data
809 e.View = View.GetViewFromPtr(data);
811 //Console.WriteLine("############# OnStage()! e.View.Name=" + e.View.Name);
813 if (_viewOnStageEventHandler != null)
815 //here we send all data to user event handlers
816 _viewOnStageEventHandler(this, e);
821 * @brief Event for OffStage signal which can be used to subscribe/unsubscribe the event handler
822 * (in the type of OffStageEventHandler) provided by the user.
823 * OffStage signal is emitted after the view has been disconnected from the stage.
825 public event DaliEventHandler<object,OffStageEventArgs> OffStageEvent
831 // Restricted to only one listener
832 if (_viewOffStageEventHandler == null)
834 _viewOffStageEventHandler += value;
836 _viewOffStageEventCallbackDelegate = new OffStageEventCallbackDelegate(OffStage);
837 this.OnStageSignal().Connect(_viewOffStageEventCallbackDelegate);
846 if (_viewOffStageEventHandler != null)
848 this.OnStageSignal().Disconnect(_viewOffStageEventCallbackDelegate);
851 _viewOffStageEventHandler -= value;
856 // Callback for View OffStage signal
857 private void OffStage(IntPtr data)
859 OffStageEventArgs e = new OffStageEventArgs();
861 // Populate all members of "e" (OffStageEventArgs) with real data
862 e.View = View.GetViewFromPtr(data);
864 if (_viewOffStageEventHandler != null)
866 //here we send all data to user event handlers
867 _viewOffStageEventHandler(this, e);
871 public static View GetViewFromPtr(global::System.IntPtr cPtr) {
872 View ret = new View(cPtr, false);
873 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
877 public class Property : global::System.IDisposable {
878 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
879 protected bool swigCMemOwn;
881 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
882 swigCMemOwn = cMemoryOwn;
883 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
886 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) {
887 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
894 public virtual void Dispose() {
896 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
899 NDalicPINVOKE.delete_View_Property(swigCPtr);
901 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
903 global::System.GC.SuppressFinalize(this);
907 public static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
908 public static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
909 public static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
911 public Property() : this(NDalicPINVOKE.new_View_Property(), true) {
912 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
915 public static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
916 public static readonly int BACKGROUND_COLOR = NDalicPINVOKE.View_Property_BACKGROUND_COLOR_get();
917 public static readonly int BACKGROUND_IMAGE = NDalicPINVOKE.View_Property_BACKGROUND_IMAGE_get();
918 public static readonly int KEY_INPUT_FOCUS = NDalicPINVOKE.View_Property_KEY_INPUT_FOCUS_get();
919 public static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
923 public class KeyboardFocus : global::System.IDisposable {
924 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
925 protected bool swigCMemOwn;
927 internal KeyboardFocus(global::System.IntPtr cPtr, bool cMemoryOwn) {
928 swigCMemOwn = cMemoryOwn;
929 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
932 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyboardFocus obj) {
933 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
940 public virtual void Dispose() {
942 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
945 NDalicPINVOKE.delete_View_KeyboardFocus(swigCPtr);
947 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
949 global::System.GC.SuppressFinalize(this);
953 public KeyboardFocus() : this(NDalicPINVOKE.new_View_KeyboardFocus(), true) {
954 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
957 public enum Direction {
967 public View () : this (NDalicPINVOKE.View_New(), true) {
968 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
971 public View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true) {
972 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
975 public View Assign(View handle) {
976 View ret = new View(NDalicPINVOKE.View_Assign(swigCPtr, View.getCPtr(handle)), false);
977 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
981 private new static View DownCast(BaseHandle handle) {
982 View ret = new View(NDalicPINVOKE.View_DownCast(BaseHandle.getCPtr(handle)), true);
983 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
987 public static T DownCast<T>(Actor actor) where T : View
989 return (T)( ViewRegistry.GetViewFromActor( actor ) );
992 public void SetKeyInputFocus() {
993 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
994 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
997 public bool HasKeyInputFocus() {
998 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
999 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1003 public void ClearKeyInputFocus() {
1004 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
1005 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1008 public PinchGestureDetector GetPinchGestureDetector() {
1009 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
1010 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1014 public PanGestureDetector GetPanGestureDetector() {
1015 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
1016 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1020 public TapGestureDetector GetTapGestureDetector() {
1021 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
1022 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1026 public LongPressGestureDetector GetLongPressGestureDetector() {
1027 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
1028 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1032 public void SetStyleName(string styleName) {
1033 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
1034 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1037 public string GetStyleName() {
1038 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
1039 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1043 public void SetBackgroundColor(Vector4 color) {
1044 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
1045 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1048 public Vector4 GetBackgroundColor() {
1049 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
1050 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1054 public void SetBackgroundImage(Image image) {
1055 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
1056 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1059 public void ClearBackground() {
1060 NDalicPINVOKE.View_ClearBackground(swigCPtr);
1061 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1064 public ControlKeySignal KeyEventSignal() {
1065 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
1066 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1070 public KeyInputFocusSignal KeyInputFocusGainedSignal() {
1071 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
1072 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1076 public KeyInputFocusSignal KeyInputFocusLostSignal() {
1077 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
1078 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1082 public View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true) {
1083 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1086 public enum PropertyRange {
1087 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1088 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1089 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX+1000
1092 public string StyleName
1097 GetProperty( View.Property.STYLE_NAME).Get( out temp );
1102 SetProperty( View.Property.STYLE_NAME, new Dali.Property.Value( value ) );
1106 public Vector4 BackgroundColor
1110 Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
1111 GetProperty( View.Property.BACKGROUND_COLOR).Get( temp );
1116 SetProperty( View.Property.BACKGROUND_COLOR, new Dali.Property.Value( value ) );
1120 public Dali.Property.Map BackgroundImage
1124 Dali.Property.Map temp = new Dali.Property.Map();
1125 GetProperty( View.Property.BACKGROUND_IMAGE).Get( temp );
1130 SetProperty( View.Property.BACKGROUND_IMAGE, new Dali.Property.Value( value ) );
1134 public bool KeyInputFocus
1139 GetProperty( View.Property.KEY_INPUT_FOCUS).Get( ref temp );
1144 SetProperty( View.Property.KEY_INPUT_FOCUS, new Dali.Property.Value( value ) );
1148 public Dali.Property.Map Background
1152 Dali.Property.Map temp = new Dali.Property.Map();
1153 GetProperty( View.Property.BACKGROUND).Get( temp );
1158 SetProperty( View.Property.BACKGROUND, new Dali.Property.Value( value ) );
1167 GetProperty( View.Property.STATE).Get( out temp );
1172 SetProperty( View.Property.STATE, new Dali.Property.Value( value ) );
1176 public string SubState
1181 GetProperty( View.Property.SUB_STATE).Get( out temp );
1186 SetProperty( View.Property.SUB_STATE, new Dali.Property.Value( value ) );
1190 public Dali.Property.Map Tooltip
1194 Dali.Property.Map temp = new Dali.Property.Map();
1195 GetProperty( View.Property.TOOLTIP).Get( temp );
1200 SetProperty( View.Property.TOOLTIP, new Dali.Property.Value( value ) );
1204 public string TooltipText
1208 SetProperty( View.Property.TOOLTIP, new Dali.Property.Value( value ) );
1217 GetProperty( FlexContainer.ChildProperty.FLEX).Get( ref temp );
1222 SetProperty( FlexContainer.ChildProperty.FLEX, new Dali.Property.Value( value ) );
1226 public int AlignSelf
1231 GetProperty( FlexContainer.ChildProperty.ALIGN_SELF).Get( ref temp );
1236 SetProperty( FlexContainer.ChildProperty.ALIGN_SELF, new Dali.Property.Value( value ) );
1240 public Vector4 FlexMargin
1244 Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
1245 GetProperty( FlexContainer.ChildProperty.FLEX_MARGIN).Get( temp );
1250 SetProperty( FlexContainer.ChildProperty.FLEX_MARGIN, new Dali.Property.Value( value ) );
1254 public Vector2 CellIndex
1258 Vector2 temp = new Vector2(0.0f,0.0f);
1259 GetProperty( TableView.ChildProperty.CELL_INDEX).Get( temp );
1264 SetProperty( TableView.ChildProperty.CELL_INDEX, new Dali.Property.Value( value ) );
1268 public float RowSpan
1273 GetProperty( TableView.ChildProperty.ROW_SPAN).Get( ref temp );
1278 SetProperty( TableView.ChildProperty.ROW_SPAN, new Dali.Property.Value( value ) );
1282 public float ColumnSpan
1287 GetProperty( TableView.ChildProperty.COLUMN_SPAN).Get( ref temp );
1292 SetProperty( TableView.ChildProperty.COLUMN_SPAN, new Dali.Property.Value( value ) );
1296 public string CellHorizontalAlignment
1301 GetProperty( TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get( out temp );
1306 SetProperty( TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Dali.Property.Value( value ) );
1310 public string CellVerticalAlignment
1315 GetProperty( TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get( out temp );
1320 SetProperty( TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Dali.Property.Value( value ) );