projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "NPatch rendering optimization" into devel/master
[platform/core/uifw/dali-toolkit.git]
/
automated-tests
/
src
/
dali-toolkit
/
dali-toolkit-test-utils
/
dummy-control.h
diff --git
a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.h
b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.h
index
a425330
..
6321c1e
100644
(file)
--- a/
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.h
+++ b/
automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dummy-control.h
@@
-1,8
+1,8
@@
-#ifndef
__DALI_TOOLKIT_TEST_DUMMY_CONTROL_H__
-#define
__DALI_TOOLKIT_TEST_DUMMY_CONTROL_H__
+#ifndef
DALI_TOOLKIT_TEST_DUMMY_CONTROL_H
+#define
DALI_TOOLKIT_TEST_DUMMY_CONTROL_H
/*
/*
- * Copyright (c) 20
14
Samsung Electronics Co., Ltd.
+ * Copyright (c) 20
20
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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-21,6
+21,9
@@
// INTERNAL INCLUDES
#include <dali-toolkit/dali-toolkit.h>
// INTERNAL INCLUDES
#include <dali-toolkit/dali-toolkit.h>
+// EXTERNAL INCLUDES
+#include <functional>
+
namespace Dali
{
namespace Dali
{
@@
-28,6
+31,12
@@
namespace Toolkit
{
class DummyControlImpl;
{
class DummyControlImpl;
+class TransitionData;
+
+namespace Visual
+{
+class Base;
+}
/**
* Control does not have a New method so use this dummy class for the handle.
/**
* Control does not have a New method so use this dummy class for the handle.
@@
-45,7
+54,11
@@
public:
{
enum Type
{
{
enum Type
{
- TEST_VISUAL = PROPERTY_START_INDEX
+ TEST_VISUAL = PROPERTY_START_INDEX,
+ TEST_VISUAL2,
+ FOREGROUND_VISUAL,
+ FOCUS_VISUAL,
+ LABEL_VISUAL
};
};
};
};
@@
-70,15
+83,15
@@
public: // Not intended for application developers
* Cannot create an instance of Internal::Control, so use this dummy class for the implementation.
* This class does not override any of Internal::Control's behaviour.
*/
* Cannot create an instance of Internal::Control, so use this dummy class for the implementation.
* This class does not override any of Internal::Control's behaviour.
*/
-class DummyControlImpl : public Internal::Control
+class DummyControlImpl : public
Toolkit::
Internal::Control
{
public:
static DummyControl New();
public:
{
public:
static DummyControl New();
public:
- inline void EnableGestureDetection(Gesture
::Typ
e type) { Internal::Control::EnableGestureDetection(type); }
- inline void DisableGestureDetection(Gesture
::Typ
e type) { Internal::Control::DisableGestureDetection(type); }
+ inline void EnableGestureDetection(Gesture
Type::Valu
e type) { Internal::Control::EnableGestureDetection(type); }
+ inline void DisableGestureDetection(Gesture
Type::Valu
e type) { Internal::Control::DisableGestureDetection(type); }
inline PinchGestureDetector GetPinchGestureDetector() const { return Internal::Control::GetPinchGestureDetector(); }
inline PanGestureDetector GetPanGestureDetector() const { return Internal::Control::GetPanGestureDetector(); }
inline TapGestureDetector GetTapGestureDetector() const { return Internal::Control::GetTapGestureDetector(); }
inline PinchGestureDetector GetPinchGestureDetector() const { return Internal::Control::GetPinchGestureDetector(); }
inline PanGestureDetector GetPanGestureDetector() const { return Internal::Control::GetPanGestureDetector(); }
inline TapGestureDetector GetTapGestureDetector() const { return Internal::Control::GetTapGestureDetector(); }
@@
-88,10
+101,11
@@
public:
void RegisterVisual( Property::Index index, Toolkit::Visual::Base visual, bool enabled );
void UnregisterVisual( Property::Index index );
void EnableVisual( Property::Index index, bool enabled );
void RegisterVisual( Property::Index index, Toolkit::Visual::Base visual, bool enabled );
void UnregisterVisual( Property::Index index );
void EnableVisual( Property::Index index, bool enabled );
- bool IsVisualEnabled( Property::Index inde
p
x );
-
+ bool IsVisualEnabled( Property::Index index );
+ int GetVisualCount();
Toolkit::Visual::Base GetVisual( Property::Index index );
Animation CreateTransition( const Toolkit::TransitionData& transition );
Toolkit::Visual::Base GetVisual( Property::Index index );
Animation CreateTransition( const Toolkit::TransitionData& transition );
+ void DoAction( Dali::Property::Index index, Dali::Property::Index action, const Dali::Property::Value attributes );
static void SetProperty( BaseObject* object, Dali::Property::Index index, const Dali::Property::Value& value );
static void SetProperty( BaseObject* object, Dali::Property::Index index, const Dali::Property::Value& value );
@@
-111,27
+125,35
@@
protected:
virtual ~DummyControlImpl();
};
virtual ~DummyControlImpl();
};
+namespace Impl
+{
+
/**
* Cannot create an instance of Internal::Control, so use this dummy class for the implementation.
* This class DOES override Internal::Control's behaviour.
*/
/**
* Cannot create an instance of Internal::Control, so use this dummy class for the implementation.
* This class DOES override Internal::Control's behaviour.
*/
-class DummyControl
ImplOverride : public
DummyControlImpl
+class DummyControl
: public Toolkit::
DummyControlImpl
{
public:
{
public:
- static DummyControl New();
+ typedef std::function<void( Size )> RelayoutCallbackFunc;
+
+ static Toolkit::DummyControl New();
+
+ void SetLayout( Property::Index visualIndex, Property::Map& map );
+
+ void SetRelayoutCallback( RelayoutCallbackFunc callback );
private:
private:
- DummyControl
ImplOverride
();
+ DummyControl();
- virtual ~DummyControl
ImplOverride
();
+ virtual ~DummyControl();
private: // From Internal::Control
virtual void OnInitialize();
virtual bool OnAccessibilityActivated();
private: // From Internal::Control
virtual void OnInitialize();
virtual bool OnAccessibilityActivated();
- virtual bool OnAccessibilityTouch( const TouchEvent& touchEvent );
virtual bool OnAccessibilityValueChange( bool isIncrease );
virtual void OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change );
virtual bool OnAccessibilityValueChange( bool isIncrease );
virtual void OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change );
@@
-139,16
+161,16
@@
private: // From Internal::Control
virtual void OnPan(const PanGesture& pan);
virtual void OnTap(const TapGesture& tap);
virtual void OnLongPress(const LongPressGesture& longPress);
virtual void OnPan(const PanGesture& pan);
virtual void OnTap(const TapGesture& tap);
virtual void OnLongPress(const LongPressGesture& longPress);
+ virtual Vector3 GetNaturalSize();
private: // From CustomActorImpl
private: // From CustomActorImpl
- virtual void OnS
tag
eConnection( int depth );
- virtual void OnS
tag
eDisconnection();
+ virtual void OnS
cen
eConnection( int depth );
+ virtual void OnS
cen
eDisconnection();
virtual void OnChildAdd(Actor& child);
virtual void OnChildRemove(Actor& child);
virtual void OnSizeSet(const Vector3& targetSize);
virtual void OnSizeAnimation(Animation& animation, const Vector3& targetSize);
virtual void OnChildAdd(Actor& child);
virtual void OnChildRemove(Actor& child);
virtual void OnSizeSet(const Vector3& targetSize);
virtual void OnSizeAnimation(Animation& animation, const Vector3& targetSize);
- virtual bool OnTouchEvent(const TouchEvent& event);
virtual bool OnHoverEvent(const HoverEvent& event);
virtual bool OnWheelEvent(const WheelEvent& event);
virtual bool OnKeyEvent(const KeyEvent& event);
virtual bool OnHoverEvent(const HoverEvent& event);
virtual bool OnWheelEvent(const WheelEvent& event);
virtual bool OnKeyEvent(const KeyEvent& event);
@@
-156,11
+178,13
@@
private: // From CustomActorImpl
virtual void OnKeyInputFocusLost();
virtual void OnRelayout( const Vector2& size, RelayoutContainer& container );
virtual void OnKeyInputFocusLost();
virtual void OnRelayout( const Vector2& size, RelayoutContainer& container );
+ DALI_INTERNAL DummyControl( const DummyControl& );
+ DALI_INTERNAL DummyControl& operator=( const DummyControl& );
+
public:
bool initializeCalled;
bool activatedCalled;
public:
bool initializeCalled;
bool activatedCalled;
- bool onAccTouchedCalled;
bool onAccValueChangeCalled;
bool themeChangeCalled;
bool fontChangeCalled;
bool onAccValueChangeCalled;
bool themeChangeCalled;
bool fontChangeCalled;
@@
-174,16
+198,23
@@
public:
bool childRemoveCalled;
bool sizeSetCalled;
bool sizeAnimationCalled;
bool childRemoveCalled;
bool sizeSetCalled;
bool sizeAnimationCalled;
- bool touchEventCalled;
bool hoverEventCalled;
bool wheelEventCalled;
bool keyEventCalled;
bool keyInputFocusGained;
bool keyInputFocusLost;
bool hoverEventCalled;
bool wheelEventCalled;
bool keyEventCalled;
bool keyInputFocusGained;
bool keyInputFocusLost;
+ static int constructorCount;
+ static int destructorCount;
+
+ Property::Map mLayouts;
+ RelayoutCallbackFunc mRelayoutCallback;
+
};
};
+} // namespace Impl
+
} // namespace Toolkit
} // namespace Dali
} // namespace Toolkit
} // namespace Dali
-#endif //
__DALI_TOOLKIT_TEST_DUMMY_CONTROL_H__
+#endif //
DALI_TOOLKIT_TEST_DUMMY_CONTROL_H