{
public class CustomView : ViewWrapper
{
- public CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour) : base(new ViewWrapperImpl(behaviour))
+ public CustomView(string typeName, ViewWrapperImpl.CustomViewBehaviour behaviour) : base(typeName, new ViewWrapperImpl(behaviour))
{
// Registering CustomView virtual functions to viewWrapperImpl delegates.
viewWrapperImpl.OnStageConnection = new ViewWrapperImpl.OnStageConnectionDelegate(OnStageConnection);
viewWrapperImpl.OnPropertySet = new ViewWrapperImpl.OnPropertySetDelegate(OnPropertySet);
viewWrapperImpl.OnSizeSet = new ViewWrapperImpl.OnSizeSetDelegate(OnSizeSet);
viewWrapperImpl.OnSizeAnimation = new ViewWrapperImpl.OnSizeAnimationDelegate(OnSizeAnimation);
- viewWrapperImpl.OnTouchEvent = new ViewWrapperImpl.OnTouchEventDelegate(OnTouchEvent);
- viewWrapperImpl.OnHoverEvent = new ViewWrapperImpl.OnHoverEventDelegate(OnHoverEvent);
- viewWrapperImpl.OnKeyEvent = new ViewWrapperImpl.OnKeyEventDelegate(OnKeyEvent);
- viewWrapperImpl.OnWheelEvent = new ViewWrapperImpl.OnWheelEventDelegate(OnWheelEvent);
+ viewWrapperImpl.OnTouch = new ViewWrapperImpl.OnTouchDelegate(OnTouch);
+ viewWrapperImpl.OnHover = new ViewWrapperImpl.OnHoverDelegate(OnHover);
+ viewWrapperImpl.OnKey = new ViewWrapperImpl.OnKeyDelegate(OnKey);
+ viewWrapperImpl.OnWheel = new ViewWrapperImpl.OnWheelDelegate(OnWheel);
viewWrapperImpl.OnRelayout = new ViewWrapperImpl.OnRelayoutDelegate(OnRelayout);
viewWrapperImpl.OnSetResizePolicy = new ViewWrapperImpl.OnSetResizePolicyDelegate(OnSetResizePolicy);
viewWrapperImpl.GetNaturalSize = new ViewWrapperImpl.GetNaturalSizeDelegate(GetNaturalSize);
viewWrapperImpl.OnPan = new ViewWrapperImpl.OnPanDelegate(OnPan);
viewWrapperImpl.OnTap = new ViewWrapperImpl.OnTapDelegate(OnTap);
viewWrapperImpl.OnLongPress = new ViewWrapperImpl.OnLongPressDelegate(OnLongPress);
- viewWrapperImpl.SignalConnected = new ViewWrapperImpl.SignalConnectedDelegate(SignalConnected);
- viewWrapperImpl.SignalDisconnected = new ViewWrapperImpl.SignalDisconnectedDelegate(SignalDisconnected);
// Make sure CustomView is initialized.
OnInitialize();
- // Make sure the style of actors/visuals initialized above are applied by the style manager.
- viewWrapperImpl.ApplyThemeStyle();
+ // Set the StyleName the name of the View
+ // We have to do this because the StyleManager on Native side can't workout it out
+ // This will also ensure that the style of actors/visuals initialized above are applied by the style manager.
+ SetStyleName( this.GetType().Name );
}
/**
* @endcode
* @param[in] type The gesture type(s) to enable.
*/
- public void EnableGestureDetection(Gesture.Type type)
+ public void EnableGestureDetection(Gesture.GestureType type)
{
viewWrapperImpl.EnableGestureDetection(type);
}
* @param[in] type The gesture type(s) to disable.
* @see EnableGetureDetection
*/
- public void DisableGestureDetection(Gesture.Type type)
+ public void DisableGestureDetection(Gesture.GestureType type)
{
viewWrapperImpl.DisableGestureDetection(type);
}
/**
* @brief Called by the KeyInputFocusManager to emit key event signals.
*
- * @param[in] keyEvent The key event.
+ * @param[in] key The key event.
* @return True if the event was consumed.
*/
- public bool EmitKeyEventSignal(KeyEvent keyEvent)
+ public bool EmitKeyEventSignal(Key key)
{
- return viewWrapperImpl.EmitKeyEventSignal(keyEvent);
+ return viewWrapperImpl.EmitKeyEventSignal(key);
}
/**
*
* @brief Called after a touch-event is received by the owning actor.
*
- * @param[in] event The touch event
+ * @param[in] touch The touch event
* @return True if the event should be consumed.
* @note CustomViewBehaviour.REQUIRES_TOUCH_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour).
*/
- public virtual bool OnTouchEvent(TouchEvent touchEvent)
+ public virtual bool OnTouch(Touch touch)
{
return false; // Do not consume
}
/**
* @brief Called after a hover-event is received by the owning actor.
*
- * @param[in] event The hover event
- * @return True if the event should be consumed.
+ * @param[in] hover The hover event
+ * @return True if the hover event should be consumed.
* @note CustomViewBehaviour.REQUIRES_HOVER_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour).
*/
- public virtual bool OnHoverEvent(HoverEvent hoverEvent)
+ public virtual bool OnHover(Hover hover)
{
return false; // Do not consume
}
/**
* @brief Called after a key-event is received by the actor that has had its focus set.
*
- * @param[in] event the Key Event
+ * @param[in] key the Key Event
* @return True if the event should be consumed.
*/
- public virtual bool OnKeyEvent(KeyEvent keyEvent)
+ public virtual bool OnKey(Key key)
{
return false; // Do not consume
}
/**
* @brief Called after a wheel-event is received by the owning actor.
*
- * @param[in] event The wheel event
+ * @param[in] wheel The wheel event
* @return True if the event should be consumed.
* @note CustomViewBehaviour.REQUIRES_WHEEL_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour).
*/
- public virtual bool OnWheelEvent(WheelEvent wheelEvent)
+ public virtual bool OnWheel(Wheel wheel)
{
return false; // Do not consume
}
* @brief This method should be overridden by deriving classes when they wish to respond the accessibility
* touch event.
*
- * @param[in] touchEvent The touch event.
+ * @param[in] touch The touch event.
* @return true if the touch event has been consumed by this control
*/
- public virtual bool OnAccessibilityTouch(TouchEvent touchEvent)
+ public virtual bool OnAccessibilityTouch(Touch touch)
{
return false;
}
{
}
- private void SignalConnected(SlotObserver slotObserver, SWIGTYPE_p_Dali__CallbackBase callback)
- {
- }
-
- private void SignalDisconnected(SlotObserver slotObserver, SWIGTYPE_p_Dali__CallbackBase callback)
- {
- }
-
private void OnControlChildAdd(Actor child)
{
}