X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=base%2Fdali-toolkit%2Fpublic-api%2Fcontrols%2Ftable-view%2Ftable-view.h;h=9051045e81f5055e7e6ae342ab3602e915bef39a;hb=fba034a17645832eecc1ac8544de26add0745a39;hp=5f9bd5d49cd281870ce0faaed9e9b15f98e4fe10;hpb=30f6ca1e541089b19f2b349a8a12d8a5bcaf2f9e;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/base/dali-toolkit/public-api/controls/table-view/table-view.h b/base/dali-toolkit/public-api/controls/table-view/table-view.h index 5f9bd5d..9051045 100644 --- a/base/dali-toolkit/public-api/controls/table-view/table-view.h +++ b/base/dali-toolkit/public-api/controls/table-view/table-view.h @@ -1,21 +1,22 @@ #ifndef __DALI_TOOLKIT_TABLE_VIEW_H__ #define __DALI_TOOLKIT_TABLE_VIEW_H__ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Flora License, Version 1.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://floralicense.org/license/ -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// +/* + * Copyright (c) 2014 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // INTERNAL INCLUDES #include @@ -42,6 +43,57 @@ class TableView : public Control { public: + /// @name Properties + /** @{ */ + static const Property::Index PROPERTY_ROWS; ///< name "rows", type UNSIGNED_INTEGER + static const Property::Index PROPERTY_COLUMNS; ///< name "columns", type UNSIGNED_INTEGER + static const Property::Index PROPERTY_CELL_PADDING; ///< name "cell-padding", type VECTOR2 + static const Property::Index PROPERTY_LAYOUT_ANIMATION_DURATION; ///< name "layout-animation-duration", type FLOAT + + /* + * PROPERTY_LAYOUT_ROWS set the height of the rows + * It has the format as follows in script: + * @code + * "layout-rows": + { + "0": { "policy": "fixed", "value": 40 }, //@see SetFixedHight + "2": { "policy": "relative", "value": 0.33 } //@see SetRelativeHeight + } + * @endcode + */ + static const Property::Index PROPERTY_LAYOUT_ROWS; ///< name "layout-rows", type MAP + + /* + * PROPERTY_LAYOUT_COLUMNS set the height of the rows + * It has the format as follows in script: + * @code + * "layout-columns": + { + "0": { "policy": "fixed", "value": 40 }, //@see SetFixedWidth + "2": { "policy": "relative", "value": 0.33 } //@see SetRelativeWidth + } + * @endcode + */ + static const Property::Index PROPERTY_LAYOUT_COLUMNS; ///< name "layout-columns", type MAP + /** @} */ + + + // 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 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 unable to differentiate integer and float from Json string) + + + /** + * @brief Describes how the size of a row / column been set + */ + enum LayoutPolicy + { + 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 + }; + /** * Structure to specify layout position for child actor */ @@ -80,10 +132,11 @@ public: TableView& operator=( const TableView& handle ); /** - * Virtual destructor. - * Dali::Object derived classes typically do not contain member data. + * @brief Destructor + * + * This is non-virtual since derived Handle types must not contain data or virtual methods. */ - virtual ~TableView(); + ~TableView(); /** * Create the TableView control.