X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Fdummy-control.cpp;h=e2b419ef3af2e60ff9480e39e8c75773e69984a5;hb=3b16ae16f01bd50a26e6c44e6e20ebb8499b4f91;hp=86400028e18c5c4a91198feca8dd70c3e9c9ad2c;hpb=00ef589046a32c53d20de1c61af7cc69524e51dc;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp index 8640002..e2b419e 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.cpp @@ -1,21 +1,24 @@ -// -// 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. + * + */ #include "dummy-control.h" +#include + namespace Dali { @@ -23,14 +26,11 @@ namespace Toolkit { DummyControl::DummyControl() -: mCustomSlot1Called(false) { } DummyControl::DummyControl(const DummyControl& control) -: Control( control ), - mCustomSlot1Called(false), - mCustomSlot1Value(Vector3::ZERO) +: Control( control ) { } @@ -50,10 +50,9 @@ DummyControl& DummyControl::operator=(const DummyControl& control) } // Used to test signal connections -void DummyControl::CustomSlot1( Actor actor, const Vector3& value ) +void DummyControlImpl::CustomSlot1( Actor actor ) { mCustomSlot1Called = true; - mCustomSlot1Value = value; } DummyControl DummyControlImpl::New() @@ -65,10 +64,12 @@ DummyControl DummyControlImpl::New() } DummyControlImpl::DummyControlImpl() -: Control(true) +: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_STYLE_CHANGE_SIGNALS ) ), + mCustomSlot1Called(false) { } + DummyControlImpl::~DummyControlImpl() { } @@ -85,7 +86,8 @@ DummyControl DummyControlImplOverride::New() DummyControlImplOverride::DummyControlImplOverride() : DummyControlImpl(), initializeCalled(false), - styleChangeCalled(false), + themeChangeCalled( false ), + fontChangeCalled( false ), pinchCalled(false), panCalled(false), tapCalled(false), @@ -108,11 +110,12 @@ DummyControlImplOverride::~DummyControlImplOverride() { } void DummyControlImplOverride::OnInitialize() { initializeCalled = true; } -void DummyControlImplOverride::OnStyleChange(StyleChange change) { styleChangeCalled = true;} -void DummyControlImplOverride::OnPinch(PinchGesture pinch) { pinchCalled = true; } -void DummyControlImplOverride::OnPan(PanGesture pan) { panCalled = true; } -void DummyControlImplOverride::OnTap(TapGesture tap) { tapCalled = true; } -void DummyControlImplOverride::OnLongPress(LongPressGesture longPress) { longPressCalled = true; } +void DummyControlImplOverride::OnThemeChange(StyleManager change) { themeChangeCalled = true;} +void DummyControlImplOverride::OnFontChange(bool defaultFontChange, bool defaultFontSizeChange) { fontChangeCalled = true; } +void DummyControlImplOverride::OnPinch(const PinchGesture& pinch) { pinchCalled = true; } +void DummyControlImplOverride::OnPan(const PanGesture& pan) { panCalled = true; } +void DummyControlImplOverride::OnTap(const TapGesture& tap) { tapCalled = true; } +void DummyControlImplOverride::OnLongPress(const LongPressGesture& longPress) { longPressCalled = true; } void DummyControlImplOverride::OnStageConnection() { stageConnectionCalled = true; } void DummyControlImplOverride::OnStageDisconnection() { stageDisconnectionCalled = true; } void DummyControlImplOverride::OnChildAdd(Actor& child) { childAddCalled = true; } @@ -142,16 +145,12 @@ DummyControl DummyControl::New( bool override ) } DummyControl::DummyControl( DummyControlImpl& implementation ) -: Control( implementation ), - mCustomSlot1Called(false), - mCustomSlot1Value(Vector3::ZERO) +: Control( implementation ) { } DummyControl::DummyControl( Dali::Internal::CustomActor* internal ) -: Control( internal ), - mCustomSlot1Called(false), - mCustomSlot1Value(Vector3::ZERO) +: Control( internal ) { VerifyCustomActorPointer(internal); }