Merge remote-tracking branch 'origin/tizen' into new_text
[platform/core/uifw/dali-toolkit.git] / optional / dali-toolkit / internal / controls / navigation-frame / navigation-control-impl.cpp
index 37ca96a..8ef5ec6 100644 (file)
@@ -1,23 +1,29 @@
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 
 // CLASS HEADER
 #include "navigation-control-impl.h"
 
-//INTERNAL INCLUDES
+// EXTERNAL INCLUDES
+#include <dali/public-api/animation/animation.h>
+#include <dali/public-api/events/key-event.h>
+#include <dali/public-api/object/type-registry.h>
+
+// INTERNAL INCLUDES
 #include <dali-toolkit/internal/controls/navigation-frame/navigation-tool-bar.h>
 #include <dali-toolkit/internal/controls/navigation-frame/navigation-title-bar.h>
 #include <dali-toolkit/internal/controls/relayout-controller.h>
@@ -46,7 +52,7 @@ TypeAction a2(mType, Toolkit::NavigationControl::ACTION_POP, &NavigationControl:
 }
 
 NavigationControl::NavigationControl()
-: ControlImpl( true ),
+: Control( REQUIRES_TOUCH_EVENTS ),
   mToolBar(NULL),
   mTitleBar(NULL),
   mOrientationAngle( 0 ),
@@ -252,7 +258,6 @@ void NavigationControl::OrientationChanged( int angle )
     }
 
     Animation animation = Animation::New( mOrientationAnimationDuration );
-    animation.SetDestroyAction( Animation::Bake );
     animation.RotateTo( Self(), Degree( -angle ), Vector3::ZAXIS, mOrientationAnimationAlphaFunc );
     animation.Play();
 
@@ -273,7 +278,7 @@ Layer NavigationControl::GetBarLayer() const
   return mBarLayer;
 }
 
-void NavigationControl::OnRelaidOut( Vector2 size, ActorSizeContainer& container )
+void NavigationControl::OnRelayout( const Vector2& size, ActorSizeContainer& container )
 {
   const Vector2 setSize( size );
 
@@ -398,17 +403,17 @@ void NavigationControl::OnPopupTouchedOutside()
   }
 }
 
-Toolkit::NavigationControl::ItemPushedSignalV2& NavigationControl::ItemPushedSignal()
+Toolkit::NavigationControl::ItemPushedSignalType& NavigationControl::ItemPushedSignal()
 {
   return mItemPushedSignal;
 }
 
-Toolkit::NavigationControl::ItemPoppedSignalV2& NavigationControl::ItemPoppedSignal()
+Toolkit::NavigationControl::ItemPoppedSignalType& NavigationControl::ItemPoppedSignal()
 {
   return mItemPoppedSignal;
 }
 
-bool NavigationControl::DoAction(BaseObject* object, const std::string& actionName, const std::vector<Property::Value>& attributes)
+bool NavigationControl::DoAction(BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes)
 {
   bool ret = false;