X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Ftable-view%2Ftable-view.h;h=8af9427d965a8b2e62773dcb4f0b7413ca914782;hp=3e8ce7da6703eb87aa698ce07c027d79b18b9b67;hb=f4a28993f3f77f15015e5c9b4e1bedd06e23b926;hpb=502a6996c58f8b8de2dd530235852d53d01d2ac0 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 3e8ce7d..8af9427 100644 --- a/dali-toolkit/public-api/controls/table-view/table-view.h +++ b/dali-toolkit/public-api/controls/table-view/table-view.h @@ -63,17 +63,17 @@ class TableView; * | cellHorizontalAlignment | string | * | cellVerticalAlignment | 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 rowSpan or columnSpan 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 cellHorizontalAlignment are: left, center, right. * The available values for cellVerticalAlignment are: top, center, bottom. * * @code * "name":"gallery1", - * "type":"ImageActor", + * "type":"ImageView", * "image": { - * "filename": "{DALI_IMAGE_DIR}gallery-small-1.jpg" + * "url": "{DALI_IMAGE_DIR}gallery-small-1.jpg" * }, - * "customProperties": { + * "properties": { * "cellIndex":[1,1], // property to specify the top-left cell this child occupies, if not set, the first available cell is used * "rowSpan":3, // property to specify how many rows this child occupies, if not set, default value is 1 * "columnSpan": 2, // property to specify how many columns this child occupies, if nor set, default value is 1 @@ -94,7 +94,10 @@ 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 indices @SINCE_1_0.0 + PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000, ///< Reserve property indices @SINCE_1_0.0 + + CHILD_PROPERTY_START_INDEX = CHILD_PROPERTY_REGISTRATION_START_INDEX, ///< @SINCE_1_1.36 + CHILD_PROPERTY_END_INDEX = CHILD_PROPERTY_REGISTRATION_START_INDEX + 1000 ///< Reserve child property indices @SINCE_1_1.36 }; /** @@ -111,7 +114,7 @@ public: * } * @endcode * - * LayoutColumns: set the height of the rows. + * LayoutColumns: set the width of the columns. * It has the format as follows in script: * @code * "layoutColumns": @@ -136,6 +139,22 @@ public: }; /** + * @brief An enumeration of child properties belonging to the TableView class. + * @SINCE_1_1.36 + */ + struct ChildProperty + { + enum + { + CELL_INDEX = CHILD_PROPERTY_START_INDEX, ///< name "cellIndex", The top-left cell this child occupies, if not set, the first available cell is used, type VECTOR2 @SINCE_1_1.36 + ROW_SPAN, ///< name "rowSpan", The number of rows this child occupies, if not set, default value is 1, type FLOAT @SINCE_1_1.36 + COLUMN_SPAN, ///< name "columnSpan", The number of columns this child occupies, if not set, default value is 1, type FLOAT @SINCE_1_1.36 + CELL_HORIZONTAL_ALIGNMENT, ///< name "cellHorizontalAlignment", The horizontal alignment of this child inside the cells, if not set, default value is 'left', type STRING @SINCE_1_1.36 + CELL_VERTICAL_ALIGNMENT ///< name "cellVerticalAlignment", The vertical alignment of this child inside the cells, if not set, default value is 'top', type STRING @SINCE_1_1.36 + }; + }; + + /** * @brief Describes how the size of a row / column been set * @SINCE_1_0.0 */ @@ -156,6 +175,10 @@ public: /** * @brief Constructor to initialise values to defaults for convenience * @SINCE_1_0.0 + * @param[in] rowIndex The row index initialized + * @param[in] columnIndex The column index initialized + * @param[in] rowSpan The row span initialized + * @param[in] columnSpan The column span initialized */ CellPosition( unsigned int rowIndex = 0, unsigned int columnIndex = 0, unsigned int rowSpan = 1, unsigned int columnSpan = 1 ) @@ -179,13 +202,15 @@ public: /** * @brief Copy constructor. Creates another handle that points to the same real object * @SINCE_1_0.0 - * @param handle to copy from + * @param[in] handle to copy from */ TableView( const TableView& handle ); /** * @brief Assignment operator. Changes this handle to point to another real object * @SINCE_1_0.0 + * @param[in] handle Handle to an object + * @return A reference to this */ TableView& operator=( const TableView& handle ); @@ -207,7 +232,9 @@ public: static TableView New( unsigned int initialRows, unsigned int initialColumns ); /** - * @brief Downcast an Object handle to TableView. If handle points to a TableView the + * @brief Downcast a handle to TableView handle. + * + * If handle points to a TableView the * downcast produces valid handle. If not the returned handle is left uninitialized. * @SINCE_1_0.0 * @param[in] handle Handle to an object @@ -228,20 +255,20 @@ public: /** * @brief Returns a child from the given layout position - * Note! if there is no child in this position this method returns an uninitialized - * Actor handle * @SINCE_1_0.0 * @param[in] position in the table * @return child that was in the cell or an uninitialized handle + * @note If there is no child in this position this method returns an uninitialized. + * Actor handle */ Actor GetChildAt( CellPosition position ); /** * @brief Removes a child from the given layout position - * Note! if there is no child in this position this method does nothing * @SINCE_1_0.0 * @param[in] position for the child to remove * @return child that was removed or an uninitialized handle + * @note If there is no child in this position this method does nothing. */ Actor RemoveChildAt( CellPosition position ); @@ -301,24 +328,26 @@ public: void DeleteColumn( unsigned int columnIndex, std::vector& removed ); /** - * @brief Resize the TableView. Note! if the new size is smaller than old, - * superfluous actors get removed. If you want to relayout removed children, - * use the variant that returns the removed Actors and reinsert them into the table - * If an actor spans to a removed row or column it gets removed from the table + * @brief Resize the TableView. * @SINCE_1_0.0 * @param[in] rows for the table * @param[in] columns for the table + * @note If the new size is smaller than old, + * superfluous actors get removed. If you want to relayout removed children, + * use the variant that returns the removed Actors and reinsert them into the table. + * If an actor spans to a removed row or column it gets removed from the table. */ void Resize( unsigned int rows, unsigned int columns ); /** - * @brief Resize the TableView. Note! if the new size is smaller than old, - * superfluous actors get removed. - * If an actor spans to a removed row or column it gets removed from the table + * @brief Resize the TableView. * @SINCE_1_0.0 * @param[in] rows for the table * @param[in] columns for the table * @param[out] removed actor handles + * @note If the new size is smaller than old, + * superfluous actors get removed. + * If an actor spans to a removed row or column it gets removed from the table. */ void Resize( unsigned int rows, unsigned int columns, std::vector& removed ); @@ -330,6 +359,7 @@ public: void SetCellPadding( Size padding ); /** + * @brief Get the current padding as width and height. * @SINCE_1_0.0 * @return the current padding as width and height */ @@ -381,10 +411,11 @@ public: /** * @brief Gets a row's fixed height. - * Note! The returned value is valid if it has been set before. * @SINCE_1_0.0 + * @param[in] rowIndex The row index with fixed height * @return height in world coordinate units. * @pre The row rowIndex must exist. + * @note The returned value is valid if it has been set before. */ float GetFixedHeight( unsigned int rowIndex ) const; @@ -401,10 +432,11 @@ public: /** * @brief Gets a row's relative height. - * Note! The returned value is valid if it has been set before. * @SINCE_1_0.0 + * @param[in] rowIndex The row index with relative height * @return height in percentage units, between 0.0f and 1.0f. * @pre The row rowIndex must exist. + * @note The returned value is valid if it has been set before. */ float GetRelativeHeight( unsigned int rowIndex ) const; @@ -420,10 +452,11 @@ public: /** * @brief Gets a column's fixed width. - * Note! The returned value is valid if it has been set before. * @SINCE_1_0.0 + * @param[in] columnIndex The column index with fixed width * @return width in world coordinate units. * @pre The column columnIndex must exist. + * @note The returned value is valid if it has been set before. */ float GetFixedWidth( unsigned int columnIndex ) const; @@ -440,20 +473,23 @@ public: /** * @brief Gets a column's relative width. - * Note! The returned value is valid if it has been set before. * @SINCE_1_0.0 + * @param[in] columnIndex The column index with relative width * @return width in percentage units, between 0.0f and 1.0f. * @pre The column columnIndex must exist. + * @note The returned value is valid if it has been set before. */ float GetRelativeWidth( unsigned int columnIndex ) const; /** + * @brief Gets the amount of rows in the table. * @SINCE_1_0.0 * @return the amount of rows in the table */ unsigned int GetRows(); /** + * @brief Gets the amount of columns in the table. * @SINCE_1_0.0 * @return the amount of columns in the table */ @@ -473,6 +509,7 @@ public: public: // Not intended for application developers + /// @cond internal /** * @brief Creates a handle using the Toolkit::Internal implementation. * @SINCE_1_0.0 @@ -486,6 +523,7 @@ public: // Not intended for application developers * @param[in] internal A pointer to the internal CustomActor. */ explicit DALI_INTERNAL TableView( Dali::Internal::CustomActor* internal ); + /// @endcond }; /**