2 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #include "dummy-visual.h"
20 #include <dali-toolkit/internal/visuals/visual-factory-cache.h>
31 DummyVisualPtr DummyVisual::New( const Property::Map& properties )
33 VisualFactoryCache* factoryCache = new VisualFactoryCache(false);
35 DummyVisualPtr dummyVisualPtr( new DummyVisual( *factoryCache ) );
36 dummyVisualPtr->Initialize();
37 return dummyVisualPtr;
40 DummyVisual::DummyVisual( VisualFactoryCache& factoryCache )
41 : Visual::Base( factoryCache, Visual::FittingMode::FILL, Toolkit::Visual::Type::COLOR ),
46 void DummyVisual::OnInitialize()
48 // Implement if required
51 void DummyVisual::DoCreatePropertyMap( Property::Map& map ) const
53 // Implement if required
56 void DummyVisual::DoCreateInstancePropertyMap( Property::Map& map ) const
58 // Implement if required
61 void DummyVisual::DoSetProperties( const Property::Map& propertyMap )
63 // Implement if required
66 void DummyVisual::OnSetTransform()
68 // Implement if required
71 void DummyVisual::DoSetOnScene( Actor& actor )
73 // Implement if required
76 void DummyVisual::OnDoAction( const Property::Index actionName, const Property::Value& attributes )
78 if ( DummyVisual::TEST_ACTION == actionName )
80 mActionCounter++; // GetActionCounter can be used to test for this.
82 // Further Actions can be added here
85 unsigned int DummyVisual::GetActionCounter() const
87 return mActionCounter;
90 void DummyVisual::ResetActionCounter()
97 } // namespace Toolkit