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 "ImageView example code correction" 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
95b4126
..
d0387d9
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
@@
-2,7
+2,7
@@
#define __DALI_TOOLKIT_TEST_DUMMY_CONTROL_H__
/*
#define __DALI_TOOLKIT_TEST_DUMMY_CONTROL_H__
/*
- * Copyright (c) 201
4
Samsung Electronics Co., Ltd.
+ * Copyright (c) 201
7
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,13
+31,36
@@
namespace Toolkit
{
class DummyControlImpl;
{
class DummyControlImpl;
-class ControlRenderer;
+class TransitionData;
+
+namespace Visual
+{
+class Base;
+}
+
/**
* Control does not have a New method so use this dummy class for the handle.
*/
class DummyControl : public Control
{
public:
/**
* Control does not have a New method so use this dummy class for the handle.
*/
class DummyControl : public Control
{
public:
+ enum PropertyRange
+ {
+ PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, ///< @SINCE_1_0.0
+ PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property index
+ };
+
+ struct Property
+ {
+ enum Type
+ {
+ TEST_VISUAL = PROPERTY_START_INDEX,
+ TEST_VISUAL2,
+ FOREGROUND_VISUAL,
+ FOCUS_VISUAL,
+ LABEL_VISUAL
+ };
+ };
DummyControl();
DummyControl(const DummyControl& control);
DummyControl();
DummyControl(const DummyControl& control);
@@
-57,7
+83,7
@@
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:
{
public:
@@
-75,11
+101,15
@@
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 );
+ static void SetProperty( BaseObject* object, Dali::Property::Index index, const Dali::Property::Value& value );
+
+ static Property::Value GetProperty( BaseObject* object, Dali::Property::Index propertyIndex );
+
// Used to test signal connections
void CustomSlot1( Actor actor );
// Used to test signal connections
void CustomSlot1( Actor actor );
@@
-94,21
+124,30
@@
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
private: // From Internal::Control
@@
-139,6
+178,9
@@
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;
public:
bool initializeCalled;
@@
-163,8
+205,14
@@
public:
bool keyEventCalled;
bool keyInputFocusGained;
bool keyInputFocusLost;
bool keyEventCalled;
bool keyInputFocusGained;
bool keyInputFocusLost;
+
+ Property::Map mLayouts;
+ RelayoutCallbackFunc mRelayoutCallback;
+
};
};
+} // namespace Impl
+
} // namespace Toolkit
} // namespace Dali
} // namespace Toolkit
} // namespace Dali