}
else if( 0 == strcmp( signalName.c_str(), SIGNAL_TAPPED ) )
{
- controlImpl.EnableGestureDetection( Gesture::Tap );
+ controlImpl.EnableGestureDetection( GestureType::TAP );
controlImpl.GetTapGestureDetector().DetectedSignal().Connect( tracker, functor );
}
else if( 0 == strcmp( signalName.c_str(), SIGNAL_PANNED ) )
{
- controlImpl.EnableGestureDetection( Gesture::Pan );
+ controlImpl.EnableGestureDetection( GestureType::PAN );
controlImpl.GetPanGestureDetector().DetectedSignal().Connect( tracker, functor );
}
else if( 0 == strcmp( signalName.c_str(), SIGNAL_PINCHED ) )
{
- controlImpl.EnableGestureDetection( Gesture::Pinch );
+ controlImpl.EnableGestureDetection( GestureType::PINCH );
controlImpl.GetPinchGestureDetector().DetectedSignal().Connect( tracker, functor );
}
else if( 0 == strcmp( signalName.c_str(), SIGNAL_LONG_PRESSED ) )
{
- controlImpl.EnableGestureDetection( Gesture::LongPress );
+ controlImpl.EnableGestureDetection( GestureType::LONG_PRESS );
controlImpl.GetLongPressGestureDetector().DetectedSignal().Connect( tracker, functor );
}
}
DALI_TYPE_REGISTRATION_END()
/**
- * @brief Iterate through given container and setOffStage any visual found
+ * @brief Iterate through given container and setOffScene any visual found
*
* @param[in] container Container of visuals
* @param[in] parent Parent actor to remove visuals from
*/
-void SetVisualsOffStage( const RegisteredVisualContainer& container, Actor parent )
+void SetVisualsOffScene( const RegisteredVisualContainer& container, Actor parent )
{
for( auto iter = container.Begin(), end = container.End() ; iter!= end; iter++)
{
if( (*iter)->visual )
{
- DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Control::SetOffStage Setting visual(%d) off stage\n", (*iter)->index );
- Toolkit::GetImplementation((*iter)->visual).SetOffStage( parent );
+ DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Control::SetOffScene Setting visual(%d) off stage\n", (*iter)->index );
+ Toolkit::GetImplementation((*iter)->visual).SetOffScene( parent );
}
}
}
// Properties registered without macro to use specific member variables.
const PropertyRegistration Control::Impl::PROPERTY_1( typeRegistration, "styleName", Toolkit::Control::Property::STYLE_NAME, Property::STRING, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
-const PropertyRegistration Control::Impl::PROPERTY_2( typeRegistration, "reservedProperty01", Toolkit::Control::Property::RESERVED_PROPERTY_01, Property::VECTOR4, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
-const PropertyRegistration Control::Impl::PROPERTY_3( typeRegistration, "reservedProperty02", Toolkit::Control::Property::RESERVED_PROPERTY_02, Property::MAP, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
const PropertyRegistration Control::Impl::PROPERTY_4( typeRegistration, "keyInputFocus", Toolkit::Control::Property::KEY_INPUT_FOCUS, Property::BOOLEAN, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
const PropertyRegistration Control::Impl::PROPERTY_5( typeRegistration, "background", Toolkit::Control::Property::BACKGROUND, Property::MAP, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
const PropertyRegistration Control::Impl::PROPERTY_6( typeRegistration, "margin", Toolkit::Control::Property::MARGIN, Property::EXTENTS, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
const PropertyRegistration Control::Impl::PROPERTY_14( typeRegistration, "downFocusableActorId", Toolkit::DevelControl::Property::DOWN_FOCUSABLE_ACTOR_ID, Property::INTEGER, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
const PropertyRegistration Control::Impl::PROPERTY_15( typeRegistration, "shadow", Toolkit::DevelControl::Property::SHADOW, Property::MAP, &Control::Impl::SetProperty, &Control::Impl::GetProperty );
-
Control::Impl::Impl( Control& controlImpl )
: mControlImpl( controlImpl ),
mState( Toolkit::DevelControl::NORMAL ),
mLongPressGestureDetector(),
mTooltip( NULL ),
mInputMethodContext(),
+ mAutofillItem(),
+ mAutofillContainer(),
mFlags( Control::ControlBehaviour( CONTROL_BEHAVIOUR_DEFAULT ) ),
mIsKeyboardNavigationSupported( false ),
- mIsKeyboardFocusGroup( false )
+ mIsKeyboardFocusGroup( false ),
+ mIsAutofillEnabled( false )
{
}
StopObservingVisual( currentRegisteredVisual );
// If control staged and visual enabled then visuals will be swapped once ready
- if( self.OnStage() && enabled )
+ if( self.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) && enabled )
{
// Check if visual is currently in the process of being replaced ( is in removal container )
RegisteredVisualContainer::Iterator visualQueuedForRemoval;
{
// Visual with same index is already in removal container so current visual pending
// Only the the last requested visual will be displayed so remove current visual which is staged but not ready.
- Toolkit::GetImplementation( currentRegisteredVisual ).SetOffStage( self );
+ Toolkit::GetImplementation( currentRegisteredVisual ).SetOffScene( self );
mVisuals.Erase( registeredVisualsiter );
}
else
Internal::Visual::Base& visualImpl = Toolkit::GetImplementation( visual );
// Put on stage if enabled and the control is already on the stage
- if( ( enabled == VisualState::ENABLED ) && self.OnStage() )
+ if( ( enabled == VisualState::ENABLED ) && self.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
- visualImpl.SetOnStage( self );
+ visualImpl.SetOnScene( self );
}
else if( visualImpl.IsResourceReady() ) // When not being staged, check if visual already 'ResourceReady' before it was Registered. ( Resource may have been loaded already )
{
StopObservingVisual( (*iter)->visual );
Actor self( mControlImpl.Self() );
- Toolkit::GetImplementation((*iter)->visual).SetOffStage( self );
+ Toolkit::GetImplementation((*iter)->visual).SetOffScene( self );
(*iter)->visual.Reset();
mVisuals.Erase( iter );
}
if( FindVisual( index, mRemoveVisuals, iter ) )
{
Actor self( mControlImpl.Self() );
- Toolkit::GetImplementation( (*iter)->visual ).SetOffStage( self );
+ Toolkit::GetImplementation( (*iter)->visual ).SetOffScene( self );
(*iter)->pending = false;
(*iter)->visual.Reset();
mRemoveVisuals.Erase( iter );
(*iter)->enabled = enable;
Actor parentActor = mControlImpl.Self();
- if ( mControlImpl.Self().OnStage() ) // If control not on Stage then Visual will be added when StageConnection is called.
+ if ( mControlImpl.Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) ) // If control not on Scene then Visual will be added when SceneConnection is called.
{
if ( enable )
{
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Control::EnableVisual Setting %s(%d) on stage \n", (*iter)->visual.GetName().c_str(), index );
- Toolkit::GetImplementation((*iter)->visual).SetOnStage( parentActor );
+ Toolkit::GetImplementation((*iter)->visual).SetOnScene( parentActor );
}
else
{
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Control::EnableVisual Setting %s(%d) off stage \n", (*iter)->visual.GetName().c_str(), index );
- Toolkit::GetImplementation((*iter)->visual).SetOffStage( parentActor ); // No need to call if control not staged.
+ Toolkit::GetImplementation((*iter)->visual).SetOffScene( parentActor ); // No need to call if control not staged.
}
}
}
if( FindVisual( (*registeredIter)->index, mRemoveVisuals, visualToRemoveIter ) )
{
(*registeredIter)->pending = false;
- Toolkit::GetImplementation( (*visualToRemoveIter)->visual ).SetOffStage( self );
+ Toolkit::GetImplementation( (*visualToRemoveIter)->visual ).SetOffScene( self );
mRemoveVisuals.Erase( visualToRemoveIter );
}
break;
}
// A visual is ready so control may need relayouting if staged
- if ( self.OnStage() )
+ if ( self.GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) )
{
mControlImpl.RelayoutRequest();
}
Actor child = mControlImpl.Self().FindChildByName( animator->objectName );
if( child )
{
- Property::Index propertyIndex = DevelHandle::GetPropertyIndex( child, animator->propertyKey );
+ Property::Index propertyIndex = child.GetPropertyIndex( animator->propertyKey );
if( propertyIndex != Property::INVALID_INDEX )
{
if( animator->animate == false )
const Property::Map* map = value.GetMap();
if( map && !map->Empty() )
{
- controlImpl.SetShadow( *map );
+ controlImpl.mImpl->SetShadow( *map );
}
else
{
// The shadow is an empty property map, so we should clear the shadow
- controlImpl.ClearShadow();
+ controlImpl.mImpl->ClearShadow();
}
break;
}
Toolkit::Visual::Base visual = (*visualIter)->visual;
if( visual && visual.GetName() == visualName )
{
- Toolkit::GetImplementation(visual).SetOffStage( self );
+ Toolkit::GetImplementation(visual).SetOffScene( self );
(*visualIter)->visual.Reset();
visuals.Erase( visualIter );
break;
}
}
-void Control::Impl::OnStageDisconnection()
+void Control::Impl::OnSceneDisconnection()
{
Actor self = mControlImpl.Self();
// Any visuals set for replacement but not yet ready should still be registered.
- // Reason: If a request was made to register a new visual but the control removed from stage before visual was ready
+ // Reason: If a request was made to register a new visual but the control removed from scene before visual was ready
// then when this control appears back on stage it should use that new visual.
- // Iterate through all registered visuals and set off stage
- SetVisualsOffStage( mVisuals, self );
+ // Iterate through all registered visuals and set off scene
+ SetVisualsOffScene( mVisuals, self );
- // Visuals pending replacement can now be taken out of the removal list and set off stage
- // Iterate through all replacement visuals and add to a move queue then set off stage
+ // Visuals pending replacement can now be taken out of the removal list and set off scene
+ // Iterate through all replacement visuals and add to a move queue then set off scene
for( auto removalIter = mRemoveVisuals.Begin(), end = mRemoveVisuals.End(); removalIter != end; removalIter++ )
{
- Toolkit::GetImplementation((*removalIter)->visual).SetOffStage( self );
+ Toolkit::GetImplementation((*removalIter)->visual).SetOffScene( self );
}
for( auto replacedIter = mVisuals.Begin(), end = mVisuals.End(); replacedIter != end; replacedIter++ )
return mVisualEventSignal;
}
+void Control::Impl::SetShadow( const Property::Map& map )
+{
+ Toolkit::Visual::Base visual = Toolkit::VisualFactory::Get().CreateVisual( map );
+ visual.SetName("shadow");
+
+ if( visual )
+ {
+ mControlImpl.mImpl->RegisterVisual( Toolkit::DevelControl::Property::SHADOW, visual, DepthIndex::BACKGROUND_EFFECT );
+
+ mControlImpl.RelayoutRequest();
+ }
+}
+
+void Control::Impl::ClearShadow()
+{
+ mControlImpl.mImpl->UnregisterVisual( Toolkit::DevelControl::Property::SHADOW );
+
+ // Trigger a size negotiation request that may be needed when unregistering a visual.
+ mControlImpl.RelayoutRequest();
+}
+
+void Control::Impl::SetAutofillEnabled( bool autofillEnabled )
+{
+ mIsAutofillEnabled = autofillEnabled;
+}
+
+bool Control::Impl::IsAutofillEnabled()
+{
+ return mIsAutofillEnabled;
+}
+
+void Control::Impl::SetAutofillItemHandle( Dali::AutofillItem item )
+{
+ mAutofillItem = item;
+}
+
+Dali::AutofillItem Control::Impl::GetAutofillItemHandle()
+{
+ return mAutofillItem;
+}
+
+void Control::Impl::SetAutofillContainer( Toolkit::AutofillContainer container )
+{
+ mAutofillContainer = container;
+}
+
+Toolkit::AutofillContainer Control::Impl::GetAutofillContainer()
+{
+ return mAutofillContainer;
+}
+
} // namespace Internal
} // namespace Toolkit