#include <dali-toolkit/devel-api/focus-manager/keyinput-focus-manager.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/devel-api/controls/control-devel.h>
using namespace Dali;
using namespace Dali::Toolkit;
if ( iconVisual )
{
- impl.RegisterVisual( index, iconVisual );
+ DevelControl::RegisterVisual( impl, index, iconVisual );
}
break;
}
case Demo::MyControl::Property::ICON_VISUAL:
{
Property::Map map;
- Toolkit::Visual::Base visual = GetImpl( myControl ).GetVisual( propertyIndex );
+ MyControl& impl = GetImpl( myControl );
+ Toolkit::Visual::Base visual = DevelControl::GetVisual( impl, propertyIndex );
if ( visual )
{
visual.CreatePropertyMap( map ); // Creates a Property map containing the Visual that ICON_VISUAL currently is. Can change if state changes.
#include <dali-toolkit/dali-toolkit.h>
#include <dali/public-api/object/type-registry-helper.h>
#include <dali-toolkit/devel-api/align-enums.h>
+#include <dali-toolkit/devel-api/controls/control-devel.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
properties[Dali::Toolkit::ImageVisual::Property::URL] = url;
mVisual = Toolkit::VisualFactory::Get().CreateVisual( properties );
- RegisterVisual( Demo::ImageChannelControl::Property::IMAGE_VISUAL, mVisual );
+ Toolkit::DevelControl::RegisterVisual( *this, Demo::ImageChannelControl::Property::IMAGE_VISUAL, mVisual );
mVisual.SetName("imageVisual");
RelayoutRequest();
{
if( mDisableVisibilityTransition.Count() > 0 )
{
- mAnimation = CreateTransition( mDisableVisibilityTransition );
+ mAnimation = Toolkit::DevelControl::CreateTransition( *this, mDisableVisibilityTransition );
}
}
else
{
if( mEnableVisibilityTransition.Count() > 0 )
{
- mAnimation = CreateTransition( mEnableVisibilityTransition );
+ mAnimation = Toolkit::DevelControl::CreateTransition( *this, mEnableVisibilityTransition );
}
}
}
if( map )
{
impl.mVisual = Toolkit::VisualFactory::Get().CreateVisual( *map );
- impl.RegisterVisual( Demo::ImageChannelControl::Property::IMAGE_VISUAL, impl.mVisual );
+ Toolkit::DevelControl::RegisterVisual( impl, Demo::ImageChannelControl::Property::IMAGE_VISUAL, impl.mVisual );
}
break;
}
#include <dali-toolkit/devel-api/align-enums.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
+#include <dali-toolkit/devel-api/controls/control-devel.h>
#include <cstdio>
void ShadowButton::SetCheckState( bool checkState )
{
mCheckState = checkState;
- EnableVisual( Demo::ShadowButton::Property::CHECKBOX_FG_VISUAL, true );
+ DevelControl::EnableVisual( *this, Demo::ShadowButton::Property::CHECKBOX_FG_VISUAL, true );
if( Self().OnStage() )
{
if( checkState )
iter->mAnimation.FinishedSignal().Disconnect( this, &ShadowButton::OnTransitionFinished );
}
- iter->mAnimation = CreateTransition( iter->mTransitionData );
+ iter->mAnimation = DevelControl::CreateTransition( *this, iter->mTransitionData );
StoreTargetLayouts( iter->mTransitionData );
iter->mAnimation.FinishedSignal().Connect( this, &ShadowButton::OnTransitionFinished );
}
case Demo::ShadowButton::Property::UNCHECK_TRANSITION:
{
- EnableVisual( Demo::ShadowButton::Property::CHECKBOX_FG_VISUAL, false );
+ DevelControl::EnableVisual( *this, Demo::ShadowButton::Property::CHECKBOX_FG_VISUAL, false );
break;
}
}
{
case Demo::ShadowButton::Property::BACKGROUND_VISUAL:
{
- RegisterVisual( index, visual );
+ DevelControl::RegisterVisual( *this, index, visual );
visual.SetDepthIndex(0.0f);
break;
}
case Demo::ShadowButton::Property::CHECKBOX_BG_VISUAL:
{
- RegisterVisual( index, visual );
+ DevelControl::RegisterVisual( *this, index, visual );
visual.SetDepthIndex(1.0f);
break;
}
case Demo::ShadowButton::Property::CHECKBOX_FG_VISUAL:
{
- RegisterVisual( index, visual, mCheckState );
+ DevelControl::RegisterVisual( *this, index, visual, mCheckState );
visual.SetDepthIndex(2.0f);
break;
}
case Demo::ShadowButton::Property::LABEL_VISUAL:
{
- RegisterVisual( index, visual );
+ DevelControl::RegisterVisual( *this, index, visual );
visual.SetDepthIndex(1.0f);
break;
}
case Demo::ShadowButton::Property::CHECKBOX_FG_VISUAL:
{
impl.ResetVisual( index, impl.mCheckboxFgVisual, value );
- impl.EnableVisual( Demo::ShadowButton::Property::CHECKBOX_FG_VISUAL, impl.mCheckState );
+ DevelControl::EnableVisual( impl, Demo::ShadowButton::Property::CHECKBOX_FG_VISUAL, impl.mCheckState );
break;
}
case Demo::ShadowButton::Property::LABEL_VISUAL:
/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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-toolkit/dali-toolkit.h>
#include <dali/public-api/object/type-registry-helper.h>
#include <dali-toolkit/devel-api/align-enums.h>
+#include <dali-toolkit/devel-api/controls/control-devel.h>
#include <dali-toolkit/devel-api/visual-factory/visual-factory.h>
#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
OnBounceAnimationFinished(mAnimation);
}
- mAnimation = CreateTransition( mBounceTransition );
+ mAnimation = DevelControl::CreateTransition( *this, mBounceTransition );
mAnimation.FinishedSignal().Connect( this, &BeatControl::OnBounceAnimationFinished );
mAnimation.Play();
mAnimationPlaying |= BOUNCE_ANIMATION_RUNNING;
OnXAnimationFinished(mXAnimation);
}
- mXAnimation = CreateTransition( mLeftTransition );
+ mXAnimation = DevelControl::CreateTransition( *this, mLeftTransition );
mXAnimation.FinishedSignal().Connect( this, &BeatControl::OnXAnimationFinished );
mXAnimation.Play();
mAnimationPlaying |= X_ANIMATION_RUNNING;
OnYAnimationFinished(mYAnimation);
}
- mYAnimation = CreateTransition( mUpTransition );
+ mYAnimation = DevelControl::CreateTransition( *this, mUpTransition );
mYAnimation.FinishedSignal().Connect( this, &BeatControl::OnYAnimationFinished );
mYAnimation.Play();
mAnimationPlaying |= Y_ANIMATION_RUNNING;
OnFadeAnimationFinished(mFadeAnimation);
}
- mFadeAnimation = CreateTransition( mFadeTransition );
+ mFadeAnimation = DevelControl::CreateTransition( *this, mFadeTransition );
mFadeAnimation.FinishedSignal().Connect( this, &BeatControl::OnFadeAnimationFinished );
mFadeAnimation.Play();
mAnimationPlaying |= FADE_ANIMATION_RUNNING;
{
// Only register a visual if there is more than just a size setting
impl.mVisual = Toolkit::VisualFactory::Get().CreateVisual( *map );
- impl.RegisterVisual( Demo::BeatControl::Property::BEAT_VISUAL, impl.mVisual );
+ DevelControl::RegisterVisual( impl, Demo::BeatControl::Property::BEAT_VISUAL, impl.mVisual );
// We have registered a new visual: must trigger size negotiation
// in order to call SetTransformAndSize on the visual with the right size: