#define __DALI_TOOLKIT_ITEM_LAYOUT_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
// EXTERNAL INCLUDES
#include <dali/public-api/animation/alpha-function.h>
+#include <dali/public-api/object/property-key.h>
+#include <dali/public-api/object/property-map.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/enums.h>
struct ItemRange
{
/**
- * @brief Create a range of item identifiers.
+ * @brief Creates a range of item identifiers.
*
* @SINCE_1_0.0
- * @param[in] beginItem The first item within the range.
- * @param[in] endItem The past-the-end item.
+ * @param[in] beginItem The first item within the range
+ * @param[in] endItem The past-the-end item
*/
ItemRange(unsigned int beginItem, unsigned int endItem)
: begin(beginItem),
* @brief Copy Constructor.
*
* @SINCE_1_0.0
- * @param[in] copy ItemRange we should copy from.
+ * @param[in] copy ItemRange we should copy from
*/
ItemRange(const ItemRange& copy)
: begin(copy.begin),
* @brief Assignment operator.
*
* @SINCE_1_0.0
- * @param[in] range The Range to assign from.
- * @return The updated range.
+ * @param[in] range The Range to assign from
+ * @return The updated range
*/
ItemRange& operator=(const ItemRange& range)
{
- begin = range.begin;
- end = range.end;
+ if( this != &range )
+ {
+ begin = range.begin;
+ end = range.end;
+ }
return *this;
}
/**
- * @brief Test whether an item is within the range.
+ * @brief Tests whether an item is within the range.
*
* @SINCE_1_0.0
- * @param[in] itemId The item identifier.
- * @return True if the item is within the range.
+ * @param[in] itemId The item identifier
+ * @return true if the item is within the range
*/
bool Within(unsigned int itemId)
{
}
/**
- * @brief Create the intersection of two ranges.
+ * @brief Creates the intersection of two ranges.
*
* @SINCE_1_0.0
- * @param[in] second The second range.
- * @return The intersection.
+ * @param[in] second The second range
+ * @return The intersection
*/
ItemRange Intersection(const ItemRange& second)
{
DALI_IMPORT_API ControlOrientation::Type GetOrientation() const;
/**
+ * @brief Apply the layout Properties.
+ * @SINCE_1_2.20
+ * @param[in] properties The properties the layout.
+ */
+ void SetLayoutProperties(const Property::Map& properties);
+
+ /**
+ * @brief Get the layout Properties.
+ * @SINCE_1_2.20
+ * @return the property of the layout.
+ */
+ Property::Map GetLayoutProperties();
+
+ /**
* @brief Retrieve the target size of an item in the layout.
*
* This will return the default size for the layout unless overridden by calling SetItemSize().
*/
DALI_IMPORT_API virtual float GetFlickSpeedFactor() const;
- /*
+ /**
* @brief Applies constraints defined by the layout to an actor.
*
* @param[in] actor The actor to constrain.
* @param[in] itemId The ID of the item represented by the actor.
- * @param[in] layoutSize the current size of the item view instance.
+ * @param[in] layoutSize The current size of the item view instance.
* @param[in] itemViewActor The item view instance which requests the application of constraints.
*/
DALI_IMPORT_API virtual void ApplyConstraints( Actor& actor, const int itemId, const Vector3& layoutSize, const Actor& itemViewActor ) = 0;
* @brief Gets the position of a given item
*
* @SINCE_1_0.0
- * @param[in] itemID id of the item we want to get its position
- * @param[in] currentLayoutPosition the current layout position of the item view instance
- * @param[in] layoutSize the current size of the item view instance
+ * @param[in] itemID The id of the item we want to get its position
+ * @param[in] currentLayoutPosition The current layout position of the item view instance
+ * @param[in] layoutSize The current size of the item view instance
* @return The item position (x,y,z)
*/
DALI_IMPORT_API virtual Vector3 GetItemPosition(int itemID, float currentLayoutPosition, const Vector3& layoutSize) const = 0;