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);
40 // Unregister this instance of view from the view registry.
41 ViewRegistry.UnregisterView(this);
44 public override void Dispose() {
45 if (!Stage.IsInstalled()) {
46 DisposeQueue.Instance.Add(this);
51 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
54 NDalicPINVOKE.delete_View(swigCPtr);
56 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
58 global::System.GC.SuppressFinalize(this);
64 * @brief Event arguments that passed via KeyInputFocusGained signal
67 public class KeyInputFocusGainedEventArgs : EventArgs
72 * @brief View - is the view that gets Key Input Focus
89 * @brief Event arguments that passed via KeyInputFocusLost signal
92 public class KeyInputFocusLostEventArgs : EventArgs
97 * @brief View - is the view that loses Key Input Focus
114 * @brief Event arguments that passed via Key signal
117 public class KeyEventArgs : EventArgs
123 * @brief View - is the view that recieves the key.
139 * @brief Key - is the key sent to the View.
156 * @brief Event arguments that passed via OnRelayout signal
159 public class OnRelayoutEventArgs : EventArgs
164 * @brief View - is the view that is being resized upon relayout
182 * @brief Event arguments that passed via Touch signal
185 public class TouchEventArgs : EventArgs
188 private Touch _touch;
191 * @brief View - is the view that is being touched
207 * @brief Touch - contains the information of touch points
224 * @brief Event arguments that passed via Hover signal
227 public class HoverEventArgs : EventArgs
230 private Hover _hover;
233 * @brief View - is the view that is being hovered
249 * @brief Hover - contains touch points that represent the points
250 * that are currently being hovered or the points where a hover has stopped
267 * @brief Event arguments that passed via Wheel signal
270 public class WheelEventArgs : EventArgs
273 private Wheel _wheel;
276 * @brief View - is the view that is being wheeled
292 * @brief Wheel - store a wheel rolling type : MOUSE_WHEEL or CUSTOM_WHEEL
309 * @brief Event arguments that passed via OnStage signal
312 public class OnStageEventArgs : EventArgs
317 * @brief View - is the view that is being connected to the stage
334 * @brief Event arguments that passed via OffStage signal
337 public class OffStageEventArgs : EventArgs
342 * @brief View - is the view that is being disconnected from the stage
358 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
359 private delegate void KeyInputFocusGainedCallbackDelegate(IntPtr control);
360 private DaliEventHandler<object,KeyInputFocusGainedEventArgs> _KeyInputFocusGainedEventHandler;
361 private KeyInputFocusGainedCallbackDelegate _KeyInputFocusGainedCallbackDelegate;
363 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
364 private delegate void KeyInputFocusLostCallbackDelegate(IntPtr control);
365 private DaliEventHandler<object,KeyInputFocusLostEventArgs> _KeyInputFocusLostEventHandler;
366 private KeyInputFocusLostCallbackDelegate _KeyInputFocusLostCallbackDelegate;
368 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
369 private delegate bool KeyCallbackDelegate(IntPtr control, IntPtr key);
370 private DaliEventHandlerWithReturnType<object,KeyEventArgs,bool> _KeyHandler;
371 private KeyCallbackDelegate _KeyCallbackDelegate;
373 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
374 private delegate void OnRelayoutEventCallbackDelegate(IntPtr control);
375 private DaliEventHandler<object,OnRelayoutEventArgs> _viewOnRelayoutEventHandler;
376 private OnRelayoutEventCallbackDelegate _viewOnRelayoutEventCallbackDelegate;
378 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
379 private delegate bool TouchCallbackDelegate(IntPtr view, IntPtr touch);
380 private DaliEventHandlerWithReturnType<object,TouchEventArgs,bool> _viewTouchHandler;
381 private TouchCallbackDelegate _viewTouchCallbackDelegate;
383 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
384 private delegate bool HoverCallbackDelegate(IntPtr view, IntPtr hover);
385 private DaliEventHandlerWithReturnType<object,HoverEventArgs,bool> _viewHoverHandler;
386 private HoverCallbackDelegate _viewHoverCallbackDelegate;
388 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
389 private delegate bool WheelCallbackDelegate(IntPtr view, IntPtr wheel);
390 private DaliEventHandlerWithReturnType<object,WheelEventArgs,bool> _viewWheelHandler;
391 private WheelCallbackDelegate _viewWheelCallbackDelegate;
393 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
394 private delegate void OnStageEventCallbackDelegate(IntPtr control);
395 private DaliEventHandler<object,OnStageEventArgs> _viewOnStageEventHandler;
396 private OnStageEventCallbackDelegate _viewOnStageEventCallbackDelegate;
398 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
399 private delegate void OffStageEventCallbackDelegate(IntPtr control);
400 private DaliEventHandler<object,OffStageEventArgs> _viewOffStageEventHandler;
401 private OffStageEventCallbackDelegate _viewOffStageEventCallbackDelegate;
404 * @brief Event for KeyInputFocusGained signal which can be used to subscribe/unsubscribe the event handler
405 * (in the type of KeyInputFocusGainedEventHandler-DaliEventHandler<object,KeyInputFocusGainedEventArgs>)
406 * provided by the user. KeyInputFocusGained signal is emitted when the control gets Key Input Focus.
408 public event DaliEventHandler<object,KeyInputFocusGainedEventArgs> KeyInputFocusGained
414 // Restricted to only one listener
415 if (_KeyInputFocusGainedEventHandler == null)
417 _KeyInputFocusGainedEventHandler += value;
418 Console.WriteLine("View Key EVENT Locked....");
419 _KeyInputFocusGainedCallbackDelegate = new KeyInputFocusGainedCallbackDelegate(OnKeyInputFocusGained);
420 this.KeyInputFocusGainedSignal().Connect(_KeyInputFocusGainedCallbackDelegate);
429 if (_KeyInputFocusGainedEventHandler != null)
431 this.KeyInputFocusGainedSignal().Disconnect(_KeyInputFocusGainedCallbackDelegate);
434 _KeyInputFocusGainedEventHandler -= value;
439 private void OnKeyInputFocusGained(IntPtr view)
441 KeyInputFocusGainedEventArgs e = new KeyInputFocusGainedEventArgs();
442 Console.WriteLine("View Key ....");
443 // Populate all members of "e" (KeyInputFocusGainedEventArgs) with real data
444 e.View = Dali.View.GetViewFromPtr(view);
446 if (_KeyInputFocusGainedEventHandler != null)
448 //here we send all data to user event handlers
449 _KeyInputFocusGainedEventHandler(this, e);
455 * @brief Event for KeyInputFocusLost signal which can be used to subscribe/unsubscribe the event handler
456 * (in the type of KeyInputFocusLostEventHandler-DaliEventHandler<object,KeyInputFocusLostEventArgs>)
457 * provided by the user. KeyInputFocusLost signal is emitted when the control loses Key Input Focus.
459 public event DaliEventHandler<object,KeyInputFocusLostEventArgs> KeyInputFocusLost
465 // Restricted to only one listener
466 if (_KeyInputFocusLostEventHandler == null)
468 _KeyInputFocusLostEventHandler += value;
470 _KeyInputFocusLostCallbackDelegate = new KeyInputFocusLostCallbackDelegate(OnKeyInputFocusLost);
471 this.KeyInputFocusLostSignal().Connect(_KeyInputFocusLostCallbackDelegate);
480 if (_KeyInputFocusLostEventHandler != null)
482 this.KeyInputFocusLostSignal().Disconnect(_KeyInputFocusLostCallbackDelegate);
485 _KeyInputFocusLostEventHandler -= value;
490 private void OnKeyInputFocusLost(IntPtr view)
492 KeyInputFocusLostEventArgs e = new KeyInputFocusLostEventArgs();
494 // Populate all members of "e" (KeyInputFocusLostEventArgs) with real data
495 e.View = Dali.View.GetViewFromPtr(view);
497 if (_KeyInputFocusLostEventHandler != null)
499 //here we send all data to user event handlers
500 _KeyInputFocusLostEventHandler(this, e);
505 * @brief Event for KeyPressed signal which can be used to subscribe/unsubscribe the event handler
506 * (in the type of KeyHandler-DaliEventHandlerWithReturnType<object,KeyEventArgs,bool>)
507 * provided by the user. KeyPressed signal is emitted when key event is received.
509 public event DaliEventHandlerWithReturnType<object,KeyEventArgs,bool> KeyPressed
515 // Restricted to only one listener
516 if (_KeyHandler == null)
518 _KeyHandler += value;
520 _KeyCallbackDelegate = new KeyCallbackDelegate(OnKey);
521 this.KeyEventSignal().Connect(_KeyCallbackDelegate);
530 if (_KeyHandler != null)
532 this.KeyEventSignal().Disconnect(_KeyCallbackDelegate);
535 _KeyHandler -= value;
540 private bool OnKey(IntPtr view, IntPtr key)
542 KeyEventArgs e = new KeyEventArgs();
544 // Populate all members of "e" (KeyEventArgs) with real data
545 e.View = Dali.View.GetViewFromPtr(view);
546 e.Key = Dali.Key.GetKeyFromPtr(key);
548 if (_KeyHandler != null)
550 //here we send all data to user event handlers
551 return _KeyHandler(this, e);
558 * @brief Event for OnRelayout signal which can be used to subscribe/unsubscribe the event handler
559 * (in the type of OnRelayoutEventHandler) provided by the user.
560 * OnRelayout signal is emitted after the size has been set on the view during relayout.
562 public event DaliEventHandler<object,OnRelayoutEventArgs> OnRelayoutEvent
568 // Restricted to only one listener
569 if (_viewOnRelayoutEventHandler == null)
571 _viewOnRelayoutEventHandler += value;
572 Console.WriteLine("View OnRelayoutEventArgs Locked....");
573 _viewOnRelayoutEventCallbackDelegate = new OnRelayoutEventCallbackDelegate(OnRelayout);
574 this.OnRelayoutSignal().Connect(_viewOnRelayoutEventCallbackDelegate);
583 if (_viewOnRelayoutEventHandler != null)
585 this.OnRelayoutSignal().Disconnect(_viewOnRelayoutEventCallbackDelegate);
588 _viewOnRelayoutEventHandler -= value;
593 // Callback for View OnRelayout signal
594 private void OnRelayout(IntPtr data)
596 OnRelayoutEventArgs e = new OnRelayoutEventArgs();
597 Console.WriteLine("View OnRelayoutEventArgs....");
598 // Populate all members of "e" (OnRelayoutEventArgs) with real data
599 e.View = View.GetViewFromPtr(data);
601 if (_viewOnRelayoutEventHandler != null)
603 //here we send all data to user event handlers
604 _viewOnRelayoutEventHandler(this, e);
609 * @brief Event for Touched signal which can be used to subscribe/unsubscribe the event handler
610 * (in the type of TouchHandler-DaliEventHandlerWithReturnType<object,TouchEventArgs,bool>)
611 * provided by the user. Touched signal is emitted when touch input is received.
613 public event DaliEventHandlerWithReturnType<object,TouchEventArgs,bool> Touched
619 // Restricted to only one listener
620 if (_viewTouchHandler == null)
622 _viewTouchHandler += value;
623 Console.WriteLine("View Touch EVENT LOCKED....");
624 _viewTouchCallbackDelegate = new TouchCallbackDelegate(OnTouch);
625 this.TouchSignal().Connect(_viewTouchCallbackDelegate);
634 if (_viewTouchHandler != null)
636 this.TouchSignal().Disconnect(_viewTouchCallbackDelegate);
639 _viewTouchHandler -= value;
644 // Callback for View TouchSignal
645 private bool OnTouch(IntPtr view, IntPtr touch)
647 TouchEventArgs e = new TouchEventArgs();
648 Console.WriteLine("View Touch EVENT....");
649 // Populate all members of "e" (TouchEventArgs) with real data
650 e.View = View.GetViewFromPtr(view);
651 e.Touch = Dali.Touch.GetTouchFromPtr(touch);
653 if (_viewTouchHandler != null)
655 //here we send all data to user event handlers
656 return _viewTouchHandler(this, e);
663 * @brief Event for Hovered signal which can be used to subscribe/unsubscribe the event handler
664 * (in the type of HoverHandler-DaliEventHandlerWithReturnType<object,HoverEventArgs,bool>)
665 * provided by the user. Hovered signal is emitted when hover input is received.
667 public event DaliEventHandlerWithReturnType<object,HoverEventArgs,bool> Hovered
673 // Restricted to only one listener
674 if (_viewHoverHandler == null)
676 _viewHoverHandler += value;
678 _viewHoverCallbackDelegate = new HoverCallbackDelegate(OnHover);
679 this.HoveredSignal().Connect(_viewHoverCallbackDelegate);
688 if (_viewHoverHandler != null)
690 this.HoveredSignal().Disconnect(_viewHoverCallbackDelegate);
693 _viewHoverHandler -= value;
698 // Callback for View Hover signal
699 private bool OnHover(IntPtr view, IntPtr hover)
701 HoverEventArgs e = new HoverEventArgs();
703 // Populate all members of "e" (HoverEventArgs) with real data
704 e.View = View.GetViewFromPtr(view);
705 e.Hover = Dali.Hover.GetHoverFromPtr(hover);
707 if (_viewHoverHandler != null)
709 //here we send all data to user event handlers
710 return _viewHoverHandler(this, e);
717 * @brief Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler
718 * (in the type of WheelHandler-DaliEventHandlerWithReturnType<object,WheelEventArgs,bool>)
719 * provided by the user. WheelMoved signal is emitted when wheel event is received.
721 public event DaliEventHandlerWithReturnType<object,WheelEventArgs,bool> WheelMoved
727 // Restricted to only one listener
728 if (_viewWheelHandler == null)
730 _viewWheelHandler += value;
731 Console.WriteLine("View Wheel EVENT LOCKED....");
732 _viewWheelCallbackDelegate = new WheelCallbackDelegate(OnWheel);
733 this.WheelEventSignal().Connect(_viewWheelCallbackDelegate);
742 if (_viewWheelHandler != null)
744 this.WheelEventSignal().Disconnect(_viewWheelCallbackDelegate);
747 _viewWheelHandler -= value;
752 // Callback for View Wheel signal
753 private bool OnWheel(IntPtr view, IntPtr wheel)
755 WheelEventArgs e = new WheelEventArgs();
756 Console.WriteLine("View Wheel EVENT ....");
757 // Populate all members of "e" (WheelEventArgs) with real data
758 e.View = View.GetViewFromPtr(view);
759 e.Wheel = Dali.Wheel.GetWheelFromPtr(wheel);
761 if (_viewWheelHandler != null)
763 //here we send all data to user event handlers
764 return _viewWheelHandler(this, e);
771 * @brief Event for OnStage signal which can be used to subscribe/unsubscribe the event handler
772 * (in the type of OnStageEventHandler) provided by the user.
773 * OnStage signal is emitted after the view has been connected to the stage.
775 public event DaliEventHandler<object,OnStageEventArgs> OnStageEvent
781 // Restricted to only one listener
782 if (_viewOnStageEventHandler == null)
784 _viewOnStageEventHandler += value;
786 _viewOnStageEventCallbackDelegate = new OnStageEventCallbackDelegate(OnStage);
787 this.OnStageSignal().Connect(_viewOnStageEventCallbackDelegate);
796 if (_viewOnStageEventHandler != null)
798 this.OnStageSignal().Disconnect(_viewOnStageEventCallbackDelegate);
801 _viewOnStageEventHandler -= value;
806 // Callback for View OnStage signal
807 private void OnStage(IntPtr data)
809 OnStageEventArgs e = new OnStageEventArgs();
811 // Populate all members of "e" (OnStageEventArgs) with real data
812 e.View = View.GetViewFromPtr(data);
814 //Console.WriteLine("############# OnStage()! e.View.Name=" + e.View.Name);
816 if (_viewOnStageEventHandler != null)
818 //here we send all data to user event handlers
819 _viewOnStageEventHandler(this, e);
824 * @brief Event for OffStage signal which can be used to subscribe/unsubscribe the event handler
825 * (in the type of OffStageEventHandler) provided by the user.
826 * OffStage signal is emitted after the view has been disconnected from the stage.
828 public event DaliEventHandler<object,OffStageEventArgs> OffStageEvent
834 // Restricted to only one listener
835 if (_viewOffStageEventHandler == null)
837 _viewOffStageEventHandler += value;
839 _viewOffStageEventCallbackDelegate = new OffStageEventCallbackDelegate(OffStage);
840 this.OnStageSignal().Connect(_viewOffStageEventCallbackDelegate);
849 if (_viewOffStageEventHandler != null)
851 this.OnStageSignal().Disconnect(_viewOffStageEventCallbackDelegate);
854 _viewOffStageEventHandler -= value;
859 // Callback for View OffStage signal
860 private void OffStage(IntPtr data)
862 OffStageEventArgs e = new OffStageEventArgs();
864 // Populate all members of "e" (OffStageEventArgs) with real data
865 e.View = View.GetViewFromPtr(data);
867 if (_viewOffStageEventHandler != null)
869 //here we send all data to user event handlers
870 _viewOffStageEventHandler(this, e);
874 public static View GetViewFromPtr(global::System.IntPtr cPtr) {
875 View ret = new View(cPtr, false);
876 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
880 public class Property : global::System.IDisposable {
881 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
882 protected bool swigCMemOwn;
884 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
885 swigCMemOwn = cMemoryOwn;
886 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
889 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) {
890 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
897 public virtual void Dispose() {
899 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
902 NDalicPINVOKE.delete_View_Property(swigCPtr);
904 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
906 global::System.GC.SuppressFinalize(this);
910 public static readonly int TOOLTIP = NDalicManualPINVOKE.View_Property_TOOLTIP_get();
911 public static readonly int STATE = NDalicManualPINVOKE.View_Property_STATE_get();
912 public static readonly int SUB_STATE = NDalicManualPINVOKE.View_Property_SUB_STATE_get();
914 public Property() : this(NDalicPINVOKE.new_View_Property(), true) {
915 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
918 public static readonly int STYLE_NAME = NDalicPINVOKE.View_Property_STYLE_NAME_get();
919 public static readonly int BACKGROUND_COLOR = NDalicPINVOKE.View_Property_BACKGROUND_COLOR_get();
920 public static readonly int BACKGROUND_IMAGE = NDalicPINVOKE.View_Property_BACKGROUND_IMAGE_get();
921 public static readonly int KEY_INPUT_FOCUS = NDalicPINVOKE.View_Property_KEY_INPUT_FOCUS_get();
922 public static readonly int BACKGROUND = NDalicPINVOKE.View_Property_BACKGROUND_get();
926 public class KeyboardFocus : global::System.IDisposable {
927 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
928 protected bool swigCMemOwn;
930 internal KeyboardFocus(global::System.IntPtr cPtr, bool cMemoryOwn) {
931 swigCMemOwn = cMemoryOwn;
932 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
935 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(KeyboardFocus obj) {
936 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
943 public virtual void Dispose() {
945 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
948 NDalicPINVOKE.delete_View_KeyboardFocus(swigCPtr);
950 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
952 global::System.GC.SuppressFinalize(this);
956 public KeyboardFocus() : this(NDalicPINVOKE.new_View_KeyboardFocus(), true) {
957 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
960 public enum Direction {
970 public View () : this (NDalicPINVOKE.View_New(), true) {
971 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
974 public View(View uiControl) : this(NDalicPINVOKE.new_View__SWIG_1(View.getCPtr(uiControl)), true) {
975 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
978 public View Assign(View handle) {
979 View ret = new View(NDalicPINVOKE.View_Assign(swigCPtr, View.getCPtr(handle)), false);
980 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
984 private new static View DownCast(BaseHandle handle) {
985 View ret = new View(NDalicPINVOKE.View_DownCast(BaseHandle.getCPtr(handle)), true);
986 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
990 public static T DownCast<T>(Actor actor) where T : View
992 return (T)( ViewRegistry.GetViewFromActor( actor ) );
995 public void SetKeyInputFocus() {
996 NDalicPINVOKE.View_SetKeyInputFocus(swigCPtr);
997 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1000 public bool HasKeyInputFocus() {
1001 bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
1002 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1006 public void ClearKeyInputFocus() {
1007 NDalicPINVOKE.View_ClearKeyInputFocus(swigCPtr);
1008 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1011 public PinchGestureDetector GetPinchGestureDetector() {
1012 PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.View_GetPinchGestureDetector(swigCPtr), true);
1013 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1017 public PanGestureDetector GetPanGestureDetector() {
1018 PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.View_GetPanGestureDetector(swigCPtr), true);
1019 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1023 public TapGestureDetector GetTapGestureDetector() {
1024 TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.View_GetTapGestureDetector(swigCPtr), true);
1025 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1029 public LongPressGestureDetector GetLongPressGestureDetector() {
1030 LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.View_GetLongPressGestureDetector(swigCPtr), true);
1031 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1035 public void SetStyleName(string styleName) {
1036 NDalicPINVOKE.View_SetStyleName(swigCPtr, styleName);
1037 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1040 public string GetStyleName() {
1041 string ret = NDalicPINVOKE.View_GetStyleName(swigCPtr);
1042 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1046 public void SetBackgroundColor(Vector4 color) {
1047 NDalicPINVOKE.View_SetBackgroundColor(swigCPtr, Vector4.getCPtr(color));
1048 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1051 public Vector4 GetBackgroundColor() {
1052 Vector4 ret = new Vector4(NDalicPINVOKE.View_GetBackgroundColor(swigCPtr), true);
1053 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1057 public void SetBackgroundImage(Image image) {
1058 NDalicPINVOKE.View_SetBackgroundImage(swigCPtr, Image.getCPtr(image));
1059 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1062 public void ClearBackground() {
1063 NDalicPINVOKE.View_ClearBackground(swigCPtr);
1064 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1067 public ControlKeySignal KeyEventSignal() {
1068 ControlKeySignal ret = new ControlKeySignal(NDalicPINVOKE.View_KeyEventSignal(swigCPtr), false);
1069 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1073 public KeyInputFocusSignal KeyInputFocusGainedSignal() {
1074 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusGainedSignal(swigCPtr), false);
1075 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1079 public KeyInputFocusSignal KeyInputFocusLostSignal() {
1080 KeyInputFocusSignal ret = new KeyInputFocusSignal(NDalicPINVOKE.View_KeyInputFocusLostSignal(swigCPtr), false);
1081 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1085 public View(ViewImpl implementation) : this(NDalicPINVOKE.new_View__SWIG_2(ViewImpl.getCPtr(implementation)), true) {
1086 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1089 public enum PropertyRange {
1090 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
1091 CONTROL_PROPERTY_START_INDEX = PROPERTY_START_INDEX,
1092 CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX+1000
1095 public string StyleName
1100 GetProperty( View.Property.STYLE_NAME).Get( out temp );
1105 SetProperty( View.Property.STYLE_NAME, new Dali.Property.Value( value ) );
1109 public Vector4 BackgroundColor
1113 Vector4 backgroundColor = new Vector4(0.0f,0.0f,0.0f,0.0f);
1115 Dali.Property.Map background = Background;
1117 background.Find( Dali.Constants.Visual.Property.Type ).Get( ref visualType );
1118 if(visualType == (int)Dali.Constants.Visual.Type.Color)
1120 background.Find( Dali.Constants.ColorVisualProperty.MixColor ).Get( backgroundColor );
1123 return backgroundColor;
1127 SetProperty( View.Property.BACKGROUND, new Dali.Property.Value( value ) );
1131 public string BackgroundImage
1135 string backgroundImage = "";
1137 Dali.Property.Map background = Background;
1139 background.Find( Dali.Constants.Visual.Property.Type ).Get( ref visualType );
1140 if(visualType == (int)Dali.Constants.Visual.Type.Image)
1142 background.Find( Dali.Constants.ImageVisualProperty.URL ).Get( out backgroundImage );
1145 return backgroundImage;
1149 SetProperty( View.Property.BACKGROUND, new Dali.Property.Value( value ) );
1153 public bool KeyInputFocus
1158 GetProperty( View.Property.KEY_INPUT_FOCUS).Get( ref temp );
1163 SetProperty( View.Property.KEY_INPUT_FOCUS, new Dali.Property.Value( value ) );
1167 public Dali.Property.Map Background
1171 Dali.Property.Map temp = new Dali.Property.Map();
1172 GetProperty( View.Property.BACKGROUND).Get( temp );
1177 SetProperty( View.Property.BACKGROUND, new Dali.Property.Value( value ) );
1186 GetProperty( View.Property.STATE).Get( out temp );
1191 SetProperty( View.Property.STATE, new Dali.Property.Value( value ) );
1195 public string SubState
1200 GetProperty( View.Property.SUB_STATE).Get( out temp );
1205 SetProperty( View.Property.SUB_STATE, new Dali.Property.Value( value ) );
1209 public Dali.Property.Map Tooltip
1213 Dali.Property.Map temp = new Dali.Property.Map();
1214 GetProperty( View.Property.TOOLTIP).Get( temp );
1219 SetProperty( View.Property.TOOLTIP, new Dali.Property.Value( value ) );
1223 public string TooltipText
1227 SetProperty( View.Property.TOOLTIP, new Dali.Property.Value( value ) );
1236 GetProperty( FlexContainer.ChildProperty.FLEX).Get( ref temp );
1241 SetProperty( FlexContainer.ChildProperty.FLEX, new Dali.Property.Value( value ) );
1245 public int AlignSelf
1250 GetProperty( FlexContainer.ChildProperty.ALIGN_SELF).Get( ref temp );
1255 SetProperty( FlexContainer.ChildProperty.ALIGN_SELF, new Dali.Property.Value( value ) );
1259 public Vector4 FlexMargin
1263 Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
1264 GetProperty( FlexContainer.ChildProperty.FLEX_MARGIN).Get( temp );
1269 SetProperty( FlexContainer.ChildProperty.FLEX_MARGIN, new Dali.Property.Value( value ) );
1273 public Vector2 CellIndex
1277 Vector2 temp = new Vector2(0.0f,0.0f);
1278 GetProperty( TableView.ChildProperty.CELL_INDEX).Get( temp );
1283 SetProperty( TableView.ChildProperty.CELL_INDEX, new Dali.Property.Value( value ) );
1287 public float RowSpan
1292 GetProperty( TableView.ChildProperty.ROW_SPAN).Get( ref temp );
1297 SetProperty( TableView.ChildProperty.ROW_SPAN, new Dali.Property.Value( value ) );
1301 public float ColumnSpan
1306 GetProperty( TableView.ChildProperty.COLUMN_SPAN).Get( ref temp );
1311 SetProperty( TableView.ChildProperty.COLUMN_SPAN, new Dali.Property.Value( value ) );
1315 public string CellHorizontalAlignment
1320 GetProperty( TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get( out temp );
1325 SetProperty( TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Dali.Property.Value( value ) );
1329 public string CellVerticalAlignment
1334 GetProperty( TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get( out temp );
1339 SetProperty( TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Dali.Property.Value( value ) );