Whether the children of this actor can be focusable by keyboard navigation.
Change-Id: I9a2093aeb9bb0a4c3ace6dcb888cbe8b1b1cfd28
END_TEST;
}
+int UtcDaliActorSetKeyboardFocusableChildren(void)
+{
+ TestApplication application;
+
+ Actor actor = Actor::New();
+
+ actor.SetProperty(DevelActor::Property::KEYBOARD_FOCUSABLE_CHILDREN, true);
+ DALI_TEST_CHECK(actor.GetProperty<bool>(DevelActor::Property::KEYBOARD_FOCUSABLE_CHILDREN) == true);
+
+ actor.SetProperty(DevelActor::Property::KEYBOARD_FOCUSABLE_CHILDREN, false);
+ DALI_TEST_CHECK(actor.GetProperty<bool>(DevelActor::Property::KEYBOARD_FOCUSABLE_CHILDREN) == false);
+ END_TEST;
+}
+
+int UtcDaliActorAreChildrenKeyBoardFocusable(void)
+{
+ TestApplication application;
+
+ Actor actor = Actor::New();
+
+ DALI_TEST_CHECK(actor.GetProperty<bool>(DevelActor::Property::KEYBOARD_FOCUSABLE_CHILDREN) == true);
+ END_TEST;
+}
+
int UtcDaliActorSetTouchFocusable(void)
{
TestApplication application;
Actor parent2 = Actor::New();
application.GetScene().Add(parent2);
- bool addSignalReceived = false;
+ bool addSignalReceived = false;
ChildAddedSignalCheck addedSignal(addSignalReceived, child);
DevelActor::ChildAddedSignal(application.GetScene().GetRootLayer()).Connect(&application, addedSignal);
DALI_TEST_EQUALS(addSignalReceived, false, TEST_LOCATION);
- bool removedSignalReceived = false;
+ bool removedSignalReceived = false;
ChildRemovedSignalCheck removedSignal(removedSignalReceived, child);
DevelActor::ChildRemovedSignal(application.GetScene().GetRootLayer()).Connect(&application, removedSignal);
DALI_TEST_EQUALS(removedSignalReceived, false, TEST_LOCATION);
* @endcode
* @details Name "touchFocusable", type Property::BOOLEAN.
*/
- TOUCH_FOCUSABLE
+ TOUCH_FOCUSABLE,
+
+ /**
+ * @brief Whether the children of this actor can be focusable by keyboard navigation. If user sets this to false, the children of this actor will not be focused.
+ * @details Name "keyboardFocusableChildren", type Property::BOOLEAN.
+ * @note Default value is true.
+ */
+ KEYBOARD_FOCUSABLE_CHILDREN
};
} // namespace Property
DALI_PROPERTY("touchAreaOffset", RECTANGLE, true, false, false, Dali::DevelActor::Property::TOUCH_AREA_OFFSET)
DALI_PROPERTY("blendEquation", INTEGER, true, false, false, Dali::DevelActor::Property::BLEND_EQUATION)
DALI_PROPERTY("touchFocusable", BOOLEAN, true, false, false, Dali::DevelActor::Property::TOUCH_FOCUSABLE)
+DALI_PROPERTY("keyboardFocusableChildren", BOOLEAN, true, false, false, Dali::DevelActor::Property::KEYBOARD_FOCUSABLE_CHILDREN)
DALI_PROPERTY_TABLE_END(DEFAULT_ACTOR_PROPERTY_START_INDEX, ActorDefaultProperties)
// Signals
mSensitive(true),
mLeaveRequired(false),
mKeyboardFocusable(false),
+ mKeyboardFocusableChildren(true),
mTouchFocusable(false),
mOnSceneSignalled(false),
mInsideOnSizeSet(false),
}
/**
+ * @copydoc Dali::Actor::SetKeyboardFocusableChildren()
+ */
+ void SetKeyboardFocusableChildren(bool focusable)
+ {
+ mKeyboardFocusableChildren = focusable;
+ }
+
+ /**
+ * @copydoc Dali::Actor::AreChildrenKeyBoardFocusable()
+ */
+ bool AreChildrenKeyBoardFocusable() const
+ {
+ return mKeyboardFocusableChildren;
+ }
+
+ /**
* Set whether this view can focus by touch.
* @param[in] focusable focuable by touch.
*/
bool mSensitive : 1; ///< Whether the actor emits touch event signals
bool mLeaveRequired : 1; ///< Whether a touch event signal is emitted when the a touch leaves the actor's bounds
bool mKeyboardFocusable : 1; ///< Whether the actor should be focusable by keyboard navigation
+ bool mKeyboardFocusableChildren : 1; ///< Whether the children of this actor can be focusable by keyboard navigation.
bool mTouchFocusable : 1; ///< Whether the actor should be focusable by touch
bool mOnSceneSignalled : 1; ///< Set to true before OnSceneConnection signal is emitted, and false before OnSceneDisconnection
bool mInsideOnSizeSet : 1; ///< Whether we are inside OnSizeSet
break;
}
+ case Dali::DevelActor::Property::KEYBOARD_FOCUSABLE_CHILDREN:
+ {
+ bool value = false;
+ if(property.Get(value))
+ {
+ actor.SetKeyboardFocusableChildren(value);
+ }
+ break;
+ }
+
default:
{
// this can happen in the case of a non-animatable default property so just do nothing
break;
}
+ case Dali::DevelActor::Property::KEYBOARD_FOCUSABLE_CHILDREN:
+ {
+ value = actor.AreChildrenKeyBoardFocusable();
+ break;
+ }
+
default:
{
// Must be a scene-graph only property