* TableView is a custom control for laying out actors in a table layout
* @see Dali::Toolkit:TableView for more details
*/
-class TableView : public ControlImpl
+class TableView : public Control
{
public:
+ // Properties
+ enum
+ {
+ TABLEVIEW_PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
+ TABLEVIEW_PROPERTY_END_INDEX = TABLEVIEW_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices
+ };
+
/**
* Structure for the layout data
*/
*/
unsigned int GetColumns();
-private: // From ControlImpl
+ // Properties
+
+ /**
+ * Called when a property of an object of this type is set.
+ * @param[in] object The object whose property is set.
+ * @param[in] index The property index.
+ * @param[in] value The new property value.
+ */
+ static void SetProperty( BaseObject* object, Property::Index index, const Property::Value& value );
+
+ /**
+ * Called to retrieve a property of an object of this type.
+ * @param[in] object The object whose property is to be retrieved.
+ * @param[in] index The property index.
+ * @return The current value of the property.
+ */
+ static Property::Value GetProperty( BaseObject* object, Property::Index index );
+
+private: // From Control
/**
- * @copydoc Toolkit::ControlImpl::OnControlChildAdd(Actor& child)
+ * @copydoc Control::OnControlChildAdd(Actor& child)
*/
virtual void OnControlChildAdd(Actor& child);
/**
- * @copydoc Toolkit::ControlImpl::OnControlChildRemove(Actor& child)
+ * @copydoc Control::OnControlChildRemove(Actor& child)
*/
virtual void OnControlChildRemove(Actor& child);
/**
- * @copydoc Toolkit::ControlImpl::OnRelaidOut
+ * @copydoc Control::OnRelaidOut
*/
virtual void OnRelaidOut( Vector2 size, ActorSizeContainer& container );
/**
- * @copydoc Toolkit::ControlImpl::OnInitialize()
+ * @copydoc Control::OnInitialize()
*/
virtual void OnInitialize();
/**
- * @copydoc Toolkit::ControlImpl::GetNextKeyboardFocusableActor
+ * @copydoc Control::GetNextKeyboardFocusableActor
*/
- virtual Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
+ virtual Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
private: // Implementation
*/
virtual ~TableView();
+private: // scripting support
+
+ /**
+ * Called to set the heights/widths property.
+ * @param[in] tableViewImpl The object whose property is set.
+ * @param[in] funcFixed The set function to call, it can be SetFixedHeight or SetFixedWidths.
+ * @param[in] funcRelative The set function to call, it can be SetRelativeHeight or SetRelativeWidths.
+ * @param[in] value The new property value.
+ */
+ static void SetHeightOrWidthProperty( TableView& tableViewImpl,
+ void(TableView::*funcFixed)(unsigned int, float),
+ void(TableView::*funcRelative)(unsigned int, float),
+ const Property::Value& map );
+
+ /**
+ * Called to retrieve the property value of row heights.
+ * @return The property value of row heights.
+ */
+ Property::Value GetRowHeightsPropertyValue();
+
+ /**
+ * Called to retrieve the property value of column widths.
+ * @return The fixed-widths property value.
+ */
+ Property::Value GetColumnWidthsPropertyValue();
+
+ /**
+ * Generate the map type property value from the size vectors.
+ * @param[in] fixedSize The vector of fixed heights or widths.
+ * @param[in] relativeSize The vector of relative heights or widths.
+ * @param[out] map The property value.
+ */
+ void GetMapPropertyValue( const std::vector<float>& fixedSize, const std::vector<float>& relativeSize, Property::Map& map );
+
+
/**
* Helper class to prevent child adds and removes from causing relayout
* when we're already anyways going to do one in the end