#include "dummy-control.h"
-#include <dali-toolkit/public-api/styling/style-manager.h>
+#include <dali-toolkit/dali-toolkit.h>
namespace Dali
{
{
DummyControl::DummyControl()
-: mCustomSlot1Called(false)
{
}
DummyControl::DummyControl(const DummyControl& control)
-: Control( control ),
- mCustomSlot1Called(false),
- mCustomSlot1Value(Vector3::ZERO)
+: Control( 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()
}
DummyControlImpl::DummyControlImpl()
-: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_STYLE_CHANGE_SIGNALS ) )
+: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_HOVER_EVENTS | REQUIRES_STYLE_CHANGE_SIGNALS ) ),
+ mCustomSlot1Called(false)
{
}
+
DummyControlImpl::~DummyControlImpl()
{
}
DummyControlImplOverride::DummyControlImplOverride()
: DummyControlImpl(),
initializeCalled(false),
- themeChangeCalled( false ),
- fontChangeCalled( false ),
+ activatedCalled(false),
+ onAccTouchedCalled(false),
+ onAccValueChangeCalled(false),
+ themeChangeCalled(false),
+ fontChangeCalled(false),
pinchCalled(false),
panCalled(false),
tapCalled(false),
sizeSetCalled(false),
sizeAnimationCalled(false),
touchEventCalled(false),
- mouseWheelEventCalled(false),
+ hoverEventCalled(false),
+ wheelEventCalled(false),
keyEventCalled(false),
keyInputFocusGained(false),
keyInputFocusLost(false)
void DummyControlImplOverride::OnInitialize() { initializeCalled = true; }
-void DummyControlImplOverride::OnThemeChange(StyleManager change) { themeChangeCalled = true;}
-void DummyControlImplOverride::OnFontChange(bool defaultFontChange, bool defaultFontSizeChange) { fontChangeCalled = 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::OnStageConnection() { stageConnectionCalled = true; }
-void DummyControlImplOverride::OnStageDisconnection() { stageDisconnectionCalled = true; }
+bool DummyControlImplOverride::OnAccessibilityActivated() { activatedCalled = true; return true; }
+bool DummyControlImplOverride::OnAccessibilityTouch(const TouchEvent& touchEvent) { onAccTouchedCalled = true; return true; }
+bool DummyControlImplOverride::OnAccessibilityValueChange( bool isIncrease )
+{
+ onAccValueChangeCalled = true; return true;
+}
+
+void DummyControlImplOverride::OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change )
+{
+ themeChangeCalled = change == StyleChange::THEME_CHANGE;
+ fontChangeCalled = change == StyleChange::DEFAULT_FONT_SIZE_CHANGE;
+}
+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( int depth ) { Control::OnStageConnection( depth ); stageConnectionCalled = true; }
+void DummyControlImplOverride::OnStageDisconnection() { stageDisconnectionCalled = true; Control::OnStageDisconnection(); }
void DummyControlImplOverride::OnChildAdd(Actor& child) { childAddCalled = true; }
void DummyControlImplOverride::OnChildRemove(Actor& child) { childRemoveCalled = true; }
-void DummyControlImplOverride::OnSizeSet(const Vector3& targetSize) { sizeSetCalled = true; }
-void DummyControlImplOverride::OnSizeAnimation(Animation& animation, const Vector3& targetSize) { sizeAnimationCalled = true; }
+void DummyControlImplOverride::OnSizeSet(const Vector3& targetSize) { Control::OnSizeSet( targetSize ); sizeSetCalled = true; }
+void DummyControlImplOverride::OnSizeAnimation(Animation& animation, const Vector3& targetSize) { Control::OnSizeAnimation( animation, targetSize ); sizeAnimationCalled = true; }
bool DummyControlImplOverride::OnTouchEvent(const TouchEvent& event) { touchEventCalled = true; return false; }
-bool DummyControlImplOverride::OnMouseWheelEvent(const MouseWheelEvent& event) { mouseWheelEventCalled = true; return false; }
+bool DummyControlImplOverride::OnHoverEvent(const HoverEvent& event) { hoverEventCalled = true; return false; }
+bool DummyControlImplOverride::OnWheelEvent(const WheelEvent& event) { wheelEventCalled = true; return false; }
bool DummyControlImplOverride::OnKeyEvent(const KeyEvent& event) { keyEventCalled = true; return false;}
void DummyControlImplOverride::OnKeyInputFocusGained() { keyInputFocusGained = true; }
void DummyControlImplOverride::OnKeyInputFocusLost() { keyInputFocusLost = true; }
}
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<DummyControlImpl>(internal);
}