{
public class CustomView : ViewWrapper
{
- public CustomView(string typeName, ViewWrapperImpl.CustomViewBehaviour behaviour) : base(typeName, new ViewWrapperImpl(behaviour))
+ public CustomView(string typeName, CustomViewBehaviour behaviour) : base(typeName, new ViewWrapperImpl(behaviour))
{
// Registering CustomView virtual functions to viewWrapperImpl delegates.
viewWrapperImpl.OnStageConnection = new ViewWrapperImpl.OnStageConnectionDelegate(OnStageConnection);
viewWrapperImpl.OnAccessibilityTouch = new ViewWrapperImpl.OnAccessibilityTouchDelegate(OnAccessibilityTouch);
viewWrapperImpl.OnAccessibilityValueChange = new ViewWrapperImpl.OnAccessibilityValueChangeDelegate(OnAccessibilityValueChange);
viewWrapperImpl.OnAccessibilityZoom = new ViewWrapperImpl.OnAccessibilityZoomDelegate(OnAccessibilityZoom);
- viewWrapperImpl.OnKeyInputFocusGained = new ViewWrapperImpl.OnKeyInputFocusGainedDelegate(OnKeyInputFocusGained);
- viewWrapperImpl.OnKeyInputFocusLost = new ViewWrapperImpl.OnKeyInputFocusLostDelegate(OnKeyInputFocusLost);
- viewWrapperImpl.GetNextKeyboardFocusableActor = new ViewWrapperImpl.GetNextKeyboardFocusableActorDelegate(GetNextKeyboardFocusableView);
- viewWrapperImpl.OnKeyboardFocusChangeCommitted = new ViewWrapperImpl.OnKeyboardFocusChangeCommittedDelegate(OnKeyboardFocusChangeCommitted);
- viewWrapperImpl.OnKeyboardEnter = new ViewWrapperImpl.OnKeyboardEnterDelegate(OnKeyboardEnter);
+ viewWrapperImpl.OnFocusGained = new ViewWrapperImpl.OnFocusGainedDelegate(OnFocusGained);
+ viewWrapperImpl.OnFocusLost = new ViewWrapperImpl.OnFocusLostDelegate(OnFocusLost);
+ viewWrapperImpl.GetNextFocusableActor = new ViewWrapperImpl.GetNextFocusableActorDelegate(GetNextFocusableView);
+ viewWrapperImpl.OnFocusChangeCommitted = new ViewWrapperImpl.OnFocusChangeCommittedDelegate(OnFocusChangeCommitted);
+ viewWrapperImpl.OnFocusEnter = new ViewWrapperImpl.OnFocusEnterDelegate(OnFocusEnter);
viewWrapperImpl.OnPinch = new ViewWrapperImpl.OnPinchDelegate(OnPinch);
viewWrapperImpl.OnPan = new ViewWrapperImpl.OnPanDelegate(OnPan);
viewWrapperImpl.OnTap = new ViewWrapperImpl.OnTapDelegate(OnTap);
* The control doesn't support it by default.
* @param[in] isSupported Whether this control supports two dimensional keyboard navigation.
*/
- public void SetKeyboardNavigationSupport(bool isSupported)
+ public void SetFocusNavigationSupport(bool isSupported)
{
- viewWrapperImpl.SetKeyboardNavigationSupport(isSupported);
+ viewWrapperImpl.SetFocusNavigationSupport(isSupported);
}
/**
*
* @return true if this control supports two dimensional keyboard navigation.
*/
- public bool IsKeyboardNavigationSupported()
+ public bool IsFocusNavigationSupported()
{
- return viewWrapperImpl.IsKeyboardNavigationSupported();
+ return viewWrapperImpl.IsFocusNavigationSupported();
}
/**
* can be limitied to its child views). The control is not a focus group by default.
* @param[in] isFocusGroup Whether this control is set as a focus group for keyboard navigation.
*/
- public void SetAsKeyboardFocusGroup(bool isFocusGroup)
+ public void SetAsFocusGroup(bool isFocusGroup)
{
- viewWrapperImpl.SetAsKeyboardFocusGroup(isFocusGroup);
+ viewWrapperImpl.SetAsFocusGroup(isFocusGroup);
}
/**
*
* @return true if this control is set as a focus group for keyboard navigation.
*/
- public bool IsKeyboardFocusGroup()
+ public bool IsFocusGroup()
{
- return viewWrapperImpl.IsKeyboardFocusGroup();
+ return viewWrapperImpl.IsFocusGroup();
}
/**
/**
* @brief Called by the KeyboardFocusManager.
*/
- public void KeyboardEnter()
+ public void FocusEnter()
{
- viewWrapperImpl.KeyboardEnter();
+ viewWrapperImpl.FocusEnter();
}
/**
* @param[in] key The key event.
* @return True if the event was consumed.
*/
- public bool EmitKeyEventSignal(Key key)
+ internal bool EmitKeyEventSignal(Key key)
{
return viewWrapperImpl.EmitKeyEventSignal(key);
}
*
* @param[in] focusGained True if gained, False if lost
*/
- protected void EmitKeyInputFocusSignal(bool focusGained)
+ protected void EmitFocusSignal(bool focusGained)
{
- viewWrapperImpl.EmitKeyInputFocusSignal( focusGained );
+ viewWrapperImpl.EmitFocusSignal( focusGained );
}
/**
* Derived classes should override this to perform custom accessibility activation.
* @return true if this control can perform accessibility activation.
*/
- public virtual bool OnAccessibilityActivated()
+ internal virtual bool OnAccessibilityActivated()
{
return false;
}
* @param[in] gesture The pan gesture.
* @return true if the pan gesture has been consumed by this control
*/
- public virtual bool OnAccessibilityPan(PanGesture gestures)
+ internal virtual bool OnAccessibilityPan(PanGesture gestures)
{
return false;
}
* @param[in] touch The touch event.
* @return true if the touch event has been consumed by this control
*/
- public virtual bool OnAccessibilityTouch(Touch touch)
+ internal virtual bool OnAccessibilityTouch(Touch touch)
{
return false;
}
* @param[in] isIncrease Whether the value should be increased or decreased
* @return true if the value changed action has been consumed by this control
*/
- public virtual bool OnAccessibilityValueChange(bool isIncrease)
+ internal virtual bool OnAccessibilityValueChange(bool isIncrease)
{
return false;
}
*
* @return true if the zoom action has been consumed by this control
*/
- public virtual bool OnAccessibilityZoom()
+ internal virtual bool OnAccessibilityZoom()
{
return false;
}
*
* @return true if the zoom action has been consumed by this control
*/
- public virtual void OnKeyInputFocusGained()
+ public virtual void OnFocusGained()
{
}
*
* Should be overridden by derived classes if they need to customize what happens when focus is lost.
*/
- public virtual void OnKeyInputFocusLost()
+ public virtual void OnFocusLost()
{
}
* @param[in] loopEnabled Whether the focus movement should be looped within the view.
* @return the next keyboard focusable view in this control or an empty handle if no view can be focused.
*/
- public virtual View GetNextKeyboardFocusableView(View currentFocusedView, View.KeyboardFocus.Direction direction, bool loopEnabled)
+ public virtual View GetNextFocusableView(View currentFocusedView, View.Focus.Direction direction, bool loopEnabled)
{
return new View();
}
*
* @param[in] commitedFocusableView The commited focusable view.
*/
- public virtual void OnKeyboardFocusChangeCommitted(View commitedFocusableView)
+ public virtual void OnFocusChangeCommitted(View commitedFocusableView)
{
}
* Derived classes should override this to perform custom actions.
* @return true if this control supported this action.
*/
- public virtual bool OnKeyboardEnter()
+ public virtual bool OnFocusEnter()
{
return false;
}
{
}
}
+
+ public enum CustomViewBehaviour
+ {
+ VIEW_BEHAVIOUR_DEFAULT = 0,
+ DISABLE_SIZE_NEGOTIATION = 1 << 0,
+ REQUIRES_KEYBOARD_NAVIGATION_SUPPORT = 1 << 5,
+ DISABLE_STYLE_CHANGE_SIGNALS = 1 << 6,
+ LAST_VIEW_BEHAVIOUR_FLAG
+ }
}