[dali_1.0.39] Merge branch 'tizen'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / table-view / table-view.cpp
index 4d24415..c92f36e 100644 (file)
@@ -1,18 +1,19 @@
-//
-// 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) 2015 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.
+ *
+ */
 
 // CLASS HEADER
 #include <dali-toolkit/public-api/controls/table-view/table-view.h>
@@ -28,6 +29,10 @@ namespace Dali
 namespace Toolkit
 {
 
+const std::string TableView::CELL_INDICES_PROPERTY_NAME("cell-indices");
+const std::string TableView::ROW_SPAN_PROPERTY_NAME("row-span");
+const std::string TableView::COLUMN_SPAN_PROPERTY_NAME("column-span");
+
 TableView::TableView()
 {
 }
@@ -130,6 +135,26 @@ Size TableView::GetCellPadding()
   return GetImpl(*this).GetCellPadding();
 }
 
+void TableView::SetFitHeight( unsigned int rowIndex )
+{
+  GetImpl(*this).SetRowPolicy( rowIndex, Internal::TableView::FIT );
+}
+
+bool TableView::IsFitHeight( unsigned int rowIndex ) const
+{
+  return ( GetImpl(*this).GetRowPolicy( rowIndex ) == Internal::TableView::FIT );
+}
+
+void TableView::SetFitWidth( unsigned int columnIndex )
+{
+  GetImpl(*this).SetColumnPolicy( columnIndex, Internal::TableView::FIT );
+}
+
+bool TableView::IsFitWidth( unsigned int columnIndex ) const
+{
+  return ( GetImpl(*this).GetColumnPolicy( columnIndex ) == Internal::TableView::FIT );
+}
+
 void TableView::SetFixedHeight( unsigned int rowIndex, float height )
 {
   GetImpl(*this).SetFixedHeight( rowIndex, height );
@@ -170,16 +195,6 @@ float TableView::GetRelativeWidth( unsigned int columnIndex ) const
   return GetImpl(*this).GetRelativeWidth( columnIndex );
 }
 
-void TableView::SetLayoutAnimationDuration( float duration )
-{
-  GetImpl(*this).SetLayoutAnimationDuration( duration );
-}
-
-float TableView::GetLayoutAnimationDuration()
-{
-  return GetImpl(*this).GetLayoutAnimationDuration();
-}
-
 unsigned int TableView::GetRows()
 {
   return GetImpl(*this).GetRows();
@@ -190,6 +205,11 @@ unsigned int TableView::GetColumns()
   return GetImpl(*this).GetColumns();
 }
 
+void TableView::SetCellAlignment( CellPosition position, HorizontalAlignment::Type horizontal, VerticalAlignment::Type vertical )
+{
+  GetImpl(*this).SetCellAlignment( position, horizontal, vertical );
+}
+
 TableView::TableView(Internal::TableView& implementation)
 : Control(implementation)
 {