Stage::GetCurrent().Remove( g_TableView );
DaliLog::PrintPass();
}
+Actor g_childActor;
+Actor g_child1;
+Actor g_child2;
+TableView g_tableView;
+void TableViewChildProperties()
+{
+ OPEN_GL_FREATURE_CHECK(SUITE_NAME,__LINE__)
+ // Create a 10x10 table-view
+ g_tableView = TableView::New(10,10);
+ DALI_CHECK_FAIL( !g_tableView ,"TableView::New() failed");
+ g_tableView.SetSize( Dali::Vector2( 100.0f, 100.0f ) );
+
+ g_child1 = Actor::New();
+ g_child1.SetProperty( TableView::ChildProperty::CELL_INDEX, Vector2( 3, 4 ) );
+ g_tableView.Add( g_child1 );
+ Stage::GetCurrent().Add( g_tableView );
+ DALI_CHECK_FAIL( g_child1 != g_tableView.GetChildAt(TableView::CellPosition(3,4)), "GetChildAt() is failed");
+
+ g_child2 = Actor::New();
+ float rowSpan = 3.f;
+ float columnSpan = 2.f;
+ g_child2.SetProperty( TableView::ChildProperty::CELL_INDEX, Vector2( 6, 1 ) );
+ g_child2.SetProperty( TableView::ChildProperty::ROW_SPAN, rowSpan );
+ g_child2.SetProperty( TableView::ChildProperty::COLUMN_SPAN, columnSpan );
+ g_tableView.Add( g_child2 );
+ for( int i=0; i<rowSpan; i++ )
+ {
+ for(int j=0; j<columnSpan; j++)
+ {
+ DALI_CHECK_FAIL( g_child2 != g_tableView.GetChildAt(TableView::CellPosition(6+i,1+j)), "GetChildAt() is failed");
+ }
+ }
+
+ g_childActor = Actor::New();
+ g_childActor.SetSize( 5.f,5.f );
+ g_childActor.SetProperty( TableView::ChildProperty::CELL_HORIZONTAL_ALIGNMENT, "center" );
+ g_childActor.SetProperty( TableView::ChildProperty::CELL_VERTICAL_ALIGNMENT, "bottom" );
+ g_tableView.Add( g_childActor );
+
+ DALI_CHECK_FAIL( g_childActor != g_tableView.GetChildAt(TableView::CellPosition(0,0)) , "GetChildAt() is failed")
+}
+void VTTableViewChildProperties001()
+{
+ DALI_CHECK_FAIL( g_childActor.GetCurrentAnchorPoint() != AnchorPoint::TOP_LEFT, "AnchorPoint mismatch" );
+ DALI_CHECK_FAIL( g_childActor.GetCurrentParentOrigin() != ParentOrigin::TOP_LEFT, "ParentOrigin mismatch" );
+ DALI_CHECK_FAIL( g_childActor.GetCurrentPosition() != Vector3(2.5f, 5.0f, 0.0f), "Position mismatch" );
+
+ DaliLog::PrintPass();
+}
/**
TABLE_VIEW_RESIZE,
TABLE_VIEW_SET_GET_RELATIVE_WIDTH_HEIGHT,
TABLE_VIEW_SET_GET_FIT_FIXED_WIDTH_HEIGHT,
- TABLE_VIEW_SET_GET_CELL_PADDING
+ TABLE_VIEW_SET_GET_CELL_PADDING,
+ TABLE_VIEW_CHILD_PROPERTIES
};
struct TableView_TestApp : public ConnectionTracker
case TABLE_VIEW_SET_GET_CELL_PADDING:
TableViewSetGetCellPadding();
break;
+
+ case TABLE_VIEW_CHILD_PROPERTIES:
+ TableViewChildProperties();
+ break;
}
}
break;
}
break;
+ case TABLE_VIEW_CHILD_PROPERTIES:
+ switch(g_nRenderCount_TableView)
+ {
+ case 0:
+ VTTableViewChildProperties001();
+ g_nRenderCount_TableView++;
+ break;
+ }
+ break;
default:
mTimer.Stop();
return test_return_value;
}
+//& purpose: set/get child property
+//& type: auto
+/**
+* @testcase ITcTableViewChildProperties
+* @since_tizen 3.0
+* @type Positive
+* @description set/get child proper
+* @scenario Create a tableview handle with an actor added to it \n
+* Add table view to stage \n
+* Check the postion of actor chiled properties\n
+* @apicovered TableView::New(),TableView::CellPosition(),TableView::ChildProperty::CELL_INDEX, \n
+ TableView::ChildProperty::ROW_SPAN,TableView::ChildProperty::COLUMN_SPAN, \n
+ TableView::ChildProperty::CELL_HORIZONTAL_ALIGNMENT,TableView::ChildProperty::CELL_VERTICAL_ALIGNMENT
+* @passcase If sets and gets work properly
+* @failcase If sets and gets not work properly
+* @precondition NA
+* @postcondition NA
+*/
+int ITcTableViewChildProperties(void)
+{
+ DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__);
+
+ Application application = Application::New( &gArgc, &gArgv );
+ TableView_TestApp testApp( application, TABLE_VIEW_CHILD_PROPERTIES );
+ application.MainLoop();
+ return test_return_value;
+}
/** @} */ // end of itc-table-view-testcases
/** @} */ // end of itc-table-view
extern int ITcTableViewSetGetRelativeWidthHeight(void);
extern int ITcTableViewSetGetFitFixedWidthHeight(void);
extern int ITcTableViewSetGetCellPadding(void);
+extern int ITcTableViewChildProperties(void);
extern int ITcTextFieldDownCast(void);
extern int ITcTextFieldAssignment(void);
extern int ITcTextFieldCopy(void);
{"ITcTableViewSetGetRelativeWidthHeight", ITcTableViewSetGetRelativeWidthHeight, ITs_table_view_startup, ITs_table_view_cleanup},
{"ITcTableViewSetGetFitFixedWidthHeight", ITcTableViewSetGetFitFixedWidthHeight, ITs_table_view_startup, ITs_table_view_cleanup},
{"ITcTableViewSetGetCellPadding", ITcTableViewSetGetCellPadding, ITs_table_view_startup, ITs_table_view_cleanup},
+ {"ITcTableViewChildProperties", ITcTableViewChildProperties, ITs_table_view_startup, ITs_table_view_cleanup},
{"ITcTextFieldDownCast", ITcTextFieldDownCast, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcTextFieldAssignment", ITcTextFieldAssignment, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcTextFieldCopy", ITcTextFieldCopy, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcToolkitIsHorizontal", ITcToolkitIsHorizontal, ITs_toolkit_startup, ITs_toolkit_cleanup},
{"ITcToolkitWrapActorConstraint", ITcToolkitWrapActorConstraint, ITs_toolkit_startup, ITs_toolkit_cleanup},
{"ITcToolkitMoveActorConstraint", ITcToolkitMoveActorConstraint, ITs_toolkit_startup, ITs_toolkit_cleanup},
- {NULL, NULL}
+ {NULL, NULL}
};
#endif // __TCT_DALI_TOOLKIT_NATIVE_H__
extern int ITcTableViewSetGetRelativeWidthHeight(void);
extern int ITcTableViewSetGetFitFixedWidthHeight(void);
extern int ITcTableViewSetGetCellPadding(void);
+extern int ITcTableViewChildProperties(void);
extern int ITcTextFieldDownCast(void);
extern int ITcTextFieldAssignment(void);
extern int ITcTextFieldCopy(void);
{"ITcTableViewSetGetRelativeWidthHeight", ITcTableViewSetGetRelativeWidthHeight, ITs_table_view_startup, ITs_table_view_cleanup},
{"ITcTableViewSetGetFitFixedWidthHeight", ITcTableViewSetGetFitFixedWidthHeight, ITs_table_view_startup, ITs_table_view_cleanup},
{"ITcTableViewSetGetCellPadding", ITcTableViewSetGetCellPadding, ITs_table_view_startup, ITs_table_view_cleanup},
+ {"ITcTableViewChildProperties", ITcTableViewChildProperties, ITs_table_view_startup, ITs_table_view_cleanup},
{"ITcTextFieldDownCast", ITcTextFieldDownCast, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcTextFieldAssignment", ITcTextFieldAssignment, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcTextFieldCopy", ITcTextFieldCopy, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcToolkitIsHorizontal", ITcToolkitIsHorizontal, ITs_toolkit_startup, ITs_toolkit_cleanup},
{"ITcToolkitWrapActorConstraint", ITcToolkitWrapActorConstraint, ITs_toolkit_startup, ITs_toolkit_cleanup},
{"ITcToolkitMoveActorConstraint", ITcToolkitMoveActorConstraint, ITs_toolkit_startup, ITs_toolkit_cleanup},
- {NULL, NULL}
+ {NULL, NULL}
};
#endif // __TCT_DALI_TOOLKIT_NATIVE_H__
extern int ITcTableViewSetGetRelativeWidthHeight(void);
extern int ITcTableViewSetGetFitFixedWidthHeight(void);
extern int ITcTableViewSetGetCellPadding(void);
+extern int ITcTableViewChildProperties(void);
extern int ITcTextFieldDownCast(void);
extern int ITcTextFieldAssignment(void);
extern int ITcTextFieldCopy(void);
{"ITcTableViewSetGetRelativeWidthHeight", ITcTableViewSetGetRelativeWidthHeight, ITs_table_view_startup, ITs_table_view_cleanup},
{"ITcTableViewSetGetFitFixedWidthHeight", ITcTableViewSetGetFitFixedWidthHeight, ITs_table_view_startup, ITs_table_view_cleanup},
{"ITcTableViewSetGetCellPadding", ITcTableViewSetGetCellPadding, ITs_table_view_startup, ITs_table_view_cleanup},
+ {"ITcTableViewChildProperties", ITcTableViewChildProperties, ITs_table_view_startup, ITs_table_view_cleanup},
{"ITcTextFieldDownCast", ITcTextFieldDownCast, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcTextFieldAssignment", ITcTextFieldAssignment, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcTextFieldCopy", ITcTextFieldCopy, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcToolkitIsHorizontal", ITcToolkitIsHorizontal, ITs_toolkit_startup, ITs_toolkit_cleanup},
{"ITcToolkitWrapActorConstraint", ITcToolkitWrapActorConstraint, ITs_toolkit_startup, ITs_toolkit_cleanup},
{"ITcToolkitMoveActorConstraint", ITcToolkitMoveActorConstraint, ITs_toolkit_startup, ITs_toolkit_cleanup},
- {NULL, NULL}
+ {NULL, NULL}
};
#endif // __TCT_DALI_TOOLKIT_NATIVE_H__
extern int ITcTableViewSetGetRelativeWidthHeight(void);
extern int ITcTableViewSetGetFitFixedWidthHeight(void);
extern int ITcTableViewSetGetCellPadding(void);
+extern int ITcTableViewChildProperties(void);
extern int ITcTextFieldDownCast(void);
extern int ITcTextFieldAssignment(void);
extern int ITcTextFieldCopy(void);
{"ITcTableViewSetGetRelativeWidthHeight", ITcTableViewSetGetRelativeWidthHeight, ITs_table_view_startup, ITs_table_view_cleanup},
{"ITcTableViewSetGetFitFixedWidthHeight", ITcTableViewSetGetFitFixedWidthHeight, ITs_table_view_startup, ITs_table_view_cleanup},
{"ITcTableViewSetGetCellPadding", ITcTableViewSetGetCellPadding, ITs_table_view_startup, ITs_table_view_cleanup},
+ {"ITcTableViewChildProperties", ITcTableViewChildProperties, ITs_table_view_startup, ITs_table_view_cleanup},
{"ITcTextFieldDownCast", ITcTextFieldDownCast, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcTextFieldAssignment", ITcTextFieldAssignment, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcTextFieldCopy", ITcTextFieldCopy, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcToolkitIsHorizontal", ITcToolkitIsHorizontal, ITs_toolkit_startup, ITs_toolkit_cleanup},
{"ITcToolkitWrapActorConstraint", ITcToolkitWrapActorConstraint, ITs_toolkit_startup, ITs_toolkit_cleanup},
{"ITcToolkitMoveActorConstraint", ITcToolkitMoveActorConstraint, ITs_toolkit_startup, ITs_toolkit_cleanup},
- {NULL, NULL}
+ {NULL, NULL}
};
#endif // __TCT_DALI_TOOLKIT_NATIVE_H__