X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Ftable-view%2Ftable-view.h;h=eb03b9e8f16af195794175a1b1ce8dbe25fbd0bd;hb=daa53bafd34781116b8cb3a2a8c54475a932ba21;hp=46e3437dd3113dc5e7cdae81ca89227fe349e844;hpb=e4e5db1d2d7997e7bf803a531048d8dcb959083b;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git
diff --git a/dali-toolkit/public-api/controls/table-view/table-view.h b/dali-toolkit/public-api/controls/table-view/table-view.h
index 46e3437..eb03b9e 100644
--- a/dali-toolkit/public-api/controls/table-view/table-view.h
+++ b/dali-toolkit/public-api/controls/table-view/table-view.h
@@ -35,12 +35,52 @@ namespace Internal DALI_INTERNAL
{
class TableView;
}
+/**
+ * @addtogroup dali-toolkit-controls-table-view
+ * @{
+ */
/**
- * TableView is a layout container for aligning child actors in a grid like layout.
+ * @brief TableView is a layout container for aligning child actors in a grid like layout.
+ *
* TableView constrains the x and y position and width and height of the child actors.
* z position and depth are left intact so that 3D model actors can also be laid out
* in a grid without loosing their depth scaling.
+ *
+ * @nosubgrouping
+ *
Per-child Custom properties for script supporting:
+ *
+ * When an actor is add to the tableView through Actor::Add() instead of TableView::AddChild,
+ * the following custom properties of the actor are checked to decide the actor position inside the table.
+ *
+ * These properties are registered dynamically to the child and is non-animatable.
+ *
+ * | %Property Name | Type |
+ * |---------------------------|-------------|
+ * | cell-index | Vector2 |
+ * | row-span | float |
+ * | column-span | float |
+ * | cell-horizontal-alignment | string |
+ * | cell-vertical-alignment | string |
+ *
+ * The row-span or column span has integer value, but its type is float here due to the limitation of the builder's ability to differentiate integer and float from Json string.
+ * The available values for cell-horizontal-alignment are: left, center, right.
+ * The available values for cell-vertical-alignment are: top, center, bottom.
+ *
+ * @code
+ * "name":"gallery-1",
+ * "type":"ImageActor",
+ * "image": {
+ * "filename": "{DALI_IMAGE_DIR}gallery-small-1.jpg"
+ * },
+ * "custom-properties": {
+ * "cell-index":[1,1], // property to specify the top-left cell this child occupies, if not set, the first available cell is used
+ * "row-span":3, // property to specify how many rows this child occupies, if not set, default value is 1
+ * "column-span": 2, // property to specify how many columns this child occupies, if nor set, default value is 1
+ * "cell-horizontal-alignment": "left", // property to specify how to align horizontally inside the cells, if not set, default value is 'left'
+ * "cell-vertical-alignment": "center" // property to specify how to align vertically inside the cells, if not set, default value is 'top'
+ * }
+ * @endcode
*/
class DALI_IMPORT_API TableView : public Control
{
@@ -64,7 +104,8 @@ public:
* "layout-rows":
{
"0": { "policy": "fixed", "value": 40 }, //@see SetFixedHight
- "2": { "policy": "relative", "value": 0.33 } //@see SetRelativeHeight
+ "2": { "policy": "relative", "value": 0.33 }, //@see SetRelativeHeight
+ "3": { "policy": "fit", "value":0.0 } //@see SetFitHeight, the value is not used, its height is decided by the children in this row
}
* @endcode
*
@@ -74,6 +115,7 @@ public:
* "layout-columns":
{
"0": { "policy": "fixed", "value": 40 }, //@see SetFixedWidth
+ "1": { "policy": "fit", "value":0.0 } //@see SetFitHeight, the value is not used, its width is decided by the children in this column
"2": { "policy": "relative", "value": 0.33 } //@see SetRelativeWidth
}
* @endcode
@@ -90,11 +132,6 @@ public:
};
};
- // Custom properties for where to put the actor, these properties should be registered to the child which would be added to the table
- static const std::string CELL_INDICES_PROPERTY_NAME; ///< Property, name "cell-indices", type Vector2
- static const std::string ROW_SPAN_PROPERTY_NAME; ///< Property, name "row-span", type float (Currently builder is unable to differentiate integer and float from Json string)
- static const std::string COLUMN_SPAN_PROPERTY_NAME; ///< Property, name "column-span", type float (Currently builder is unable to differentiate integer and float from Json string)
-
/**
* @brief Describes how the size of a row / column been set
*/
@@ -102,7 +139,8 @@ public:
{
FIXED, ///< Fixed with the given value.
RELATIVE, ///< Calculated as percentage of the remainder after subtracting Padding and Fixed height/width
- FILL ///< Get the remainder of the 100% (after subtracting Padding, Fixed and Relative height/ width) divided evenly between 'fill' rows/columns
+ FILL, ///< Default policy, get the remainder of the 100% (after subtracting Fixed, Fit and Relative height/ width) divided evenly between 'fill' rows/columns
+ FIT ///< Fit around its children.
};
/**
@@ -382,11 +420,13 @@ public:
unsigned int GetColumns();
/**
- * @brief Set the alignment on a cell
+ * @brief Set the alignment on a cell.
*
- * @param[in] position The cell to set alignment on
- * @param[in] horizontal The horizontal alignment
- * @param[in] vertical The vertical alignment
+ * Cells without calling this function have the default values of LEFT and TOP respectively.
+ *
+ * @param[in] position The cell to set alignment on.
+ * @param[in] horizontal The horizontal alignment.
+ * @param[in] vertical The vertical alignment.
*/
void SetCellAlignment( CellPosition position, HorizontalAlignment::Type horizontal, VerticalAlignment::Type vertical );
@@ -405,6 +445,9 @@ public: // Not intended for application developers
explicit DALI_INTERNAL TableView( Dali::Internal::CustomActor* internal );
};
+/**
+ * @}
+ */
} // namespace Toolkit
} // namespace Dali