public delegate bool OnAccessibilityZoomDelegate();
public delegate void OnKeyInputFocusGainedDelegate();
public delegate void OnKeyInputFocusLostDelegate();
- public delegate Actor GetNextKeyboardFocusableActorDelegate(Actor currentFocusedActor, View.FocusDirection direction, bool loopEnabled);
- public delegate void OnKeyboardFocusChangeCommittedDelegate(Actor commitedFocusableActor);
+ public delegate View GetNextKeyboardFocusableViewDelegate(View currentFocusedView, View.FocusDirection direction, bool loopEnabled);
+ public delegate void OnKeyboardFocusChangeCommittedDelegate(View commitedFocusableView);
public delegate bool OnKeyboardEnterDelegate();
public delegate void OnPinchDelegate(PinchGesture pinch);
public delegate void OnPanDelegate(PanGesture pan);
public OnAccessibilityZoomDelegate OnAccessibilityZoom;
public OnKeyInputFocusGainedDelegate OnKeyInputFocusGained;
public OnKeyInputFocusLostDelegate OnKeyInputFocusLost;
- public GetNextKeyboardFocusableActorDelegate GetNextKeyboardFocusableActor;
+ public GetNextKeyboardFocusableViewDelegate GetNextKeyboardFocusableView;
public OnKeyboardFocusChangeCommittedDelegate OnKeyboardFocusChangeCommitted;
public OnKeyboardEnterDelegate OnKeyboardEnter;
public OnPinchDelegate OnPinch;
private void DirectorOnPropertySet(int index, global::System.IntPtr propertyValue)
{
- OnPropertySet(index, new PropertyValue(propertyValue, true));
+ if ( OnPropertySet != null )
+ {
+ OnPropertySet(index, new PropertyValue(propertyValue, true));
+ }
}
private void DirectorOnSizeSet(global::System.IntPtr targetSize)
private global::System.IntPtr DirectorGetNextKeyboardFocusableActor(global::System.IntPtr currentFocusedActor, int direction, bool loopEnabled)
{
- return Actor.getCPtr(GetNextKeyboardFocusableActor(new Actor(currentFocusedActor, false), (View.FocusDirection)direction, loopEnabled)).Handle;
+ return Actor.getCPtr(GetNextKeyboardFocusableView(new View(currentFocusedActor, false), (View.FocusDirection)direction, loopEnabled)).Handle;
}
- private void DirectorOnKeyboardFocusChangeCommitted(global::System.IntPtr commitedFocusableActor)
+ private void DirectorOnKeyboardFocusChangeCommitted(global::System.IntPtr commitedFocusableView)
{
- OnKeyboardFocusChangeCommitted(new Actor(commitedFocusableActor, false));
+ OnKeyboardFocusChangeCommitted(new View(commitedFocusableView, false));
}
private bool DirectorOnKeyboardEnter()
return ret;
}
- internal float GetRelayoutSize(DimensionType dimension)
+ public float GetRelayoutSize(DimensionType dimension)
{
float ret = NDalicPINVOKE.Actor_GetRelayoutSize(swigCPtr, (int)dimension);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
switch (temp)
{
case "USE_OWN_COLOR":
- return ColorMode.UseOwnColor;
+ return ColorMode.UseOwnColor;
case "USE_PARENT_COLOR":
- return ColorMode.UseParentColor;
+ return ColorMode.UseParentColor;
case "USE_OWN_MULTIPLY_PARENT_COLOR":
- return ColorMode.UseOwnMultiplyParentColor;
+ return ColorMode.UseOwnMultiplyParentColor;
case "USE_OWN_MULTIPLY_PARENT_ALPHA":
- return ColorMode.UseOwnMultiplyParentAlpha;
+ return ColorMode.UseOwnMultiplyParentAlpha;
default:
- return ColorMode.UseOwnMultiplyParentAlpha;
+ return ColorMode.UseOwnMultiplyParentAlpha;
}
}
set
switch (temp)
{
case "NORMAL":
- return DrawModeType.Normal;
+ return DrawModeType.Normal;
case "OVERLAY_2D":
- return DrawModeType.Overlay2D;
+ return DrawModeType.Overlay2D;
case "STENCIL":
- return DrawModeType.Stencil;
+ return DrawModeType.Stencil;
default:
- return DrawModeType.Normal;
+ return DrawModeType.Normal;
}
}
set
switch (temp)
{
case "FIXED":
- return ResizePolicyType.Fixed;
+ return ResizePolicyType.Fixed;
case "USE_NATURAL_SIZE":
- return ResizePolicyType.UseNaturalSize;
+ return ResizePolicyType.UseNaturalSize;
case "FILL_TO_PARENT":
- return ResizePolicyType.FillToParent;
+ return ResizePolicyType.FillToParent;
case "SIZE_RELATIVE_TO_PARENT":
- return ResizePolicyType.SizeRelativeToParent;
+ return ResizePolicyType.SizeRelativeToParent;
case "SIZE_FIXED_OFFSET_FROM_PARENT":
- return ResizePolicyType.SizeFixedOffsetFromParent;
+ return ResizePolicyType.SizeFixedOffsetFromParent;
case "FIT_TO_CHILDREN":
- return ResizePolicyType.FitToChildren;
+ return ResizePolicyType.FitToChildren;
case "DIMENSION_DEPENDENCY":
- return ResizePolicyType.DimensionDependency;
+ return ResizePolicyType.DimensionDependency;
case "USE_ASSIGNED_SIZE":
- return ResizePolicyType.UseAssignedSize;
+ return ResizePolicyType.UseAssignedSize;
default:
- return ResizePolicyType.Fixed;
+ return ResizePolicyType.Fixed;
}
}
set
switch (temp)
{
case "FIXED":
- return ResizePolicyType.Fixed;
+ return ResizePolicyType.Fixed;
case "USE_NATURAL_SIZE":
- return ResizePolicyType.UseNaturalSize;
+ return ResizePolicyType.UseNaturalSize;
case "FILL_TO_PARENT":
- return ResizePolicyType.FillToParent;
+ return ResizePolicyType.FillToParent;
case "SIZE_RELATIVE_TO_PARENT":
- return ResizePolicyType.SizeRelativeToParent;
+ return ResizePolicyType.SizeRelativeToParent;
case "SIZE_FIXED_OFFSET_FROM_PARENT":
- return ResizePolicyType.SizeFixedOffsetFromParent;
+ return ResizePolicyType.SizeFixedOffsetFromParent;
case "FIT_TO_CHILDREN":
- return ResizePolicyType.FitToChildren;
+ return ResizePolicyType.FitToChildren;
case "DIMENSION_DEPENDENCY":
- return ResizePolicyType.DimensionDependency;
+ return ResizePolicyType.DimensionDependency;
case "USE_ASSIGNED_SIZE":
- return ResizePolicyType.UseAssignedSize;
+ return ResizePolicyType.UseAssignedSize;
default:
- return ResizePolicyType.Fixed;
+ return ResizePolicyType.Fixed;
}
}
set
switch (temp)
{
case "USE_SIZE_SET":
- return SizeScalePolicyType.UseSizeSet;
+ return SizeScalePolicyType.UseSizeSet;
case "FIT_WITH_ASPECT_RATIO":
- return SizeScalePolicyType.FitWithAspectRatio;
+ return SizeScalePolicyType.FitWithAspectRatio;
case "FILL_WITH_ASPECT_RATIO":
- return SizeScalePolicyType.FillWithAspectRatio;
+ return SizeScalePolicyType.FillWithAspectRatio;
default:
- return SizeScalePolicyType.UseSizeSet;
+ return SizeScalePolicyType.UseSizeSet;
}
}
set
{
- SetProperty(Actor.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue((int)value));
+ string valueToString = "";
+ switch (value)
+ {
+ case SizeScalePolicyType.UseSizeSet:
+ {
+ valueToString = "USE_SIZE_SET";
+ break;
+ }
+ case SizeScalePolicyType.FitWithAspectRatio:
+ {
+ valueToString = "FIT_WITH_ASPECT_RATIO";
+ break;
+ }
+ case SizeScalePolicyType.FillWithAspectRatio:
+ {
+ valueToString = "FILL_WITH_ASPECT_RATIO";
+ break;
+ }
+ default:
+ {
+ valueToString = "USE_SIZE_SET";
+ break;
+ }
+ }
+ SetProperty(Actor.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
}
}
switch (temp)
{
case "DISABLED":
- return ClippingModeType.Disabled;
+ return ClippingModeType.Disabled;
case "CLIP_CHILDREN":
- return ClippingModeType.ClipChildren;
+ return ClippingModeType.ClipChildren;
default:
- return ClippingModeType.Disabled;
+ return ClippingModeType.Disabled;
}
}
set
viewWrapperImpl.OnAccessibilityZoom = new ViewWrapperImpl.OnAccessibilityZoomDelegate(OnAccessibilityZoom);
viewWrapperImpl.OnKeyInputFocusGained = new ViewWrapperImpl.OnKeyInputFocusGainedDelegate(OnKeyInputFocusGained);
viewWrapperImpl.OnKeyInputFocusLost = new ViewWrapperImpl.OnKeyInputFocusLostDelegate(OnKeyInputFocusLost);
- viewWrapperImpl.GetNextKeyboardFocusableActor = new ViewWrapperImpl.GetNextKeyboardFocusableActorDelegate(GetNextKeyboardFocusableActor);
+ viewWrapperImpl.GetNextKeyboardFocusableView = new ViewWrapperImpl.GetNextKeyboardFocusableViewDelegate(GetNextKeyboardFocusableView);
viewWrapperImpl.OnKeyboardFocusChangeCommitted = new ViewWrapperImpl.OnKeyboardFocusChangeCommittedDelegate(OnKeyboardFocusChangeCommitted);
viewWrapperImpl.OnKeyboardEnter = new ViewWrapperImpl.OnKeyboardEnterDelegate(OnKeyboardEnter);
viewWrapperImpl.OnPinch = new ViewWrapperImpl.OnPinchDelegate(OnPinch);
viewWrapperImpl.OnTap = new ViewWrapperImpl.OnTapDelegate(OnTap);
viewWrapperImpl.OnLongPress = new ViewWrapperImpl.OnLongPressDelegate(OnLongPress);
+ // By default, we do not want the position to use the anchor point
+ this.PositionUsesAnchorPoint = false;
+
// Make sure CustomView is initialized.
OnInitialize();
* @endcode
* @param[in] type The gesture type(s) to enable.
*/
- internal void EnableGestureDetection(Gesture.GestureType type)
+ public void EnableGestureDetection(Gesture.GestureType type)
{
viewWrapperImpl.EnableGestureDetection(type);
}
* @param[in] loopEnabled Whether the focus movement should be looped within the control.
* @return the next keyboard focusable actor in this control or an empty handle if no actor can be focused.
*/
- public virtual Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, View.FocusDirection direction, bool loopEnabled)
+ public virtual View GetNextKeyboardFocusableView(View currentFocusedView, View.FocusDirection direction, bool loopEnabled)
{
- return new Actor();
+ return new View();
}
/**
*
* @param[in] commitedFocusableActor The commited focusable actor.
*/
- public virtual void OnKeyboardFocusChangeCommitted(Actor commitedFocusableActor)
+ public virtual void OnKeyboardFocusChangeCommitted(View commitedFocusableView)
{
}
* @note Tap detection should be enabled via EnableGestureDetection().
* @see EnableGestureDetection
*/
- internal virtual void OnTap(TapGesture tap)
+ public virtual void OnTap(TapGesture tap)
{
}