Updates after changes to Property::Map
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / public-api / controls / control-impl.cpp
index e45436f..de46873 100644 (file)
@@ -206,6 +206,7 @@ void SetupBackgroundActor( Actor actor, Property::Index constrainingIndex, const
 {
   actor.SetColor( color );
   actor.SetPositionInheritanceMode( USE_PARENT_POSITION_PLUS_LOCAL_POSITION );
+  actor.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR );
   actor.SetZ( BACKGROUND_ACTOR_Z_POSITION );
 
   Constraint constraint = Constraint::New<Vector3>( constrainingIndex,
@@ -335,7 +336,7 @@ public:
               controlImpl.SetBackground( image );
             }
           }
-          else if ( value.Get< Property::Map >().empty() )
+          else if ( ! value.Get< Property::Map >().Count() )
           {
             // An empty map means the background is no longer required
             controlImpl.ClearBackground();
@@ -420,7 +421,7 @@ public:
               Image image = imageActor.GetImage();
               Property::Map imageMap;
               Scripting::CreatePropertyMap( image, imageMap );
-              map.push_back( Property::StringValuePair( "image", imageMap ) );
+              map[ "image" ] = imageMap;
             }
           }
 
@@ -555,7 +556,7 @@ public:
 
   Toolkit::Control::SizePolicy mWidthPolicy :3;  ///< Stores the width policy. 3 bits covers 8 values
   Toolkit::Control::SizePolicy mHeightPolicy :3; ///< Stores the height policy. 3 bits covers 8 values
-  ControlBehaviour mFlags :4;             ///< Flags passed in from constructor. Need to increase this size when new enums are added
+  ControlBehaviour mFlags :6;             ///< Flags passed in from constructor. Need to increase this size when new enums are added
   bool mInsideRelayout:1;                 ///< Detect when were in Relayout
   bool mIsKeyboardNavigationSupported:1;  ///< Stores whether keyboard navigation is supported by the control.
   bool mIsKeyboardFocusGroup:1;           ///< Stores whether the control is a focus group.
@@ -616,6 +617,9 @@ void Control::Initialize()
     GetImpl( styleManager ).ApplyThemeStyle( GetOwner() );
   }
 
+  SetRequiresHoverEvents(mImpl->mFlags & REQUIRES_HOVER_EVENTS);
+  SetRequiresMouseWheelEvents(mImpl->mFlags & REQUIRES_MOUSE_WHEEL_EVENTS);
+
   mImpl->mInitialized = true;
 }
 
@@ -865,6 +869,11 @@ bool Control::OnTouchEvent(const TouchEvent& event)
   return false; // Do not consume
 }
 
+bool Control::OnHoverEvent(const HoverEvent& event)
+{
+  return false; // Do not consume
+}
+
 bool Control::OnKeyEvent(const KeyEvent& event)
 {
   return false; // Do not consume