/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
#include <dali/public-api/object/type-registry-helper.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/internal/controls/control/control-data-impl.h>
+#include <dali-toolkit/devel-api/controls/control-devel.h>
namespace Dali
{
-
namespace Toolkit
{
-
namespace Internal
{
-
namespace // to register type
{
-
BaseHandle Create()
{
return Toolkit::NavigationView::New();
}
-DALI_TYPE_REGISTRATION_BEGIN( Toolkit::NavigationView, Toolkit::Control, Create )
+DALI_TYPE_REGISTRATION_BEGIN(Toolkit::NavigationView, Toolkit::Control, Create)
DALI_TYPE_REGISTRATION_END()
} // namespace
NavigationView::NavigationView()
-: Control(ControlBehaviour( CONTROL_BEHAVIOUR_DEFAULT ) )
+: Control(ControlBehaviour(CONTROL_BEHAVIOUR_DEFAULT))
{
}
Toolkit::NavigationView NavigationView::New()
{
// Create the implementation, temporarily owned by this handle on stack
- IntrusivePtr< NavigationView > internalNavigationView = new NavigationView();
+ IntrusivePtr<NavigationView> internalNavigationView = new NavigationView();
// Pass ownership to CustomActor handle
- Toolkit::NavigationView navigationView( *internalNavigationView );
+ Toolkit::NavigationView navigationView(*internalNavigationView);
// Second-phase init of the implementation
// This can only be done after the CustomActor connection has been made...
void NavigationView::OnInitialize()
{
- DevelControl::SetAccessibilityConstructor( Self(), []( Dali::Actor actor ) {
- return std::unique_ptr< Dali::Accessibility::Accessible >(
- new Control::Impl::AccessibleImpl( actor, Dali::Accessibility::Role::FILLER ) );
- } );
+ DevelControl::SetAccessibilityConstructor(Self(), [](Dali::Actor actor) {
+ return std::unique_ptr<Dali::Accessibility::Accessible>(
+ new DevelControl::AccessibleImpl(actor, Dali::Accessibility::Role::FILLER));
+ });
}
-void NavigationView::OnSceneConnection( int depth )
+void NavigationView::OnSceneConnection(int depth)
{
- Self().SetProperty( Actor::Property::SENSITIVE,true);
+ Self().SetProperty(Actor::Property::SENSITIVE, true);
- Control::OnSceneConnection( depth );
+ Control::OnSceneConnection(depth);
}
-void NavigationView::Push( Actor& actor )
+void NavigationView::Push(Actor& actor)
{
// check the uninitialized item
// check the duplicated push for the top item
- if(!actor )
+ if(!actor)
{
return;
}
- if( mContentStack.size() > 0 )
+ if(mContentStack.size() > 0)
{
- Self().Remove( mContentStack.back() );
+ Self().Remove(mContentStack.back());
}
//push the new item into the stack and show it
{
// cannot pop out the bottom-most item
Actor poppedItem;
- if( mContentStack.size() > 1 )
+ if(mContentStack.size() > 1)
{
// pop out the top item of the stack and show the new item right under the old one.
Self().Remove(mContentStack.back());