allow getting ot table packing child too.
authorCarsten Haitzler <raster@rasterman.com>
Fri, 17 Jun 2011 11:34:30 +0000 (11:34 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Fri, 17 Jun 2011 11:34:30 +0000 (11:34 +0000)
SVN revision: 60447

legacy/evas/ChangeLog
legacy/evas/src/lib/Evas.h
legacy/evas/src/lib/canvas/evas_object_table.c

index 4d40965..d087dfc 100644 (file)
 
        * Allow evas table to re-pack the same object without error and just
         update packing parameters
-
+        * Allow to get packign location of table child
index 79355d1..289d04e 100644 (file)
@@ -8328,6 +8328,20 @@ EAPI Eina_Bool                           evas_object_table_mirrored_get    (cons
 
 
 /**
+ * Get packgin location of a child of table
+ *
+ * @param o The given table object.
+ * @param child The child object to add.
+ * @param col pointer to store relative-horizontal position to place child.
+ * @param row pointer to store relative-vertical position to place child.
+ * @param colspan pointer to store how many relative-horizontal position to use for this child.
+ * @param rowspan pointer to store how many relative-vertical position to use for this child.
+ *
+ * @return 1 on success, 0 on failure.
+ */
+EAPI Eina_Bool                           evas_object_table_pack_get(Evas_Object *o, Evas_Object *child, unsigned short *col, unsigned short *row, unsigned short *colspan, unsigned short *rowspan);
+         
+/**
  * Add a new child to a table object.
  *
  * @param o The given table object.
index 533d9ab..420c25a 100644 (file)
@@ -1046,6 +1046,28 @@ evas_object_table_padding_get(const Evas_Object *o, Evas_Coord *horizontal, Evas
 }
 
 EAPI Eina_Bool
+evas_object_table_pack_get(Evas_Object *o, Evas_Object *child, unsigned short *col, unsigned short *row, unsigned short *colspan, unsigned short *rowspan)
+{
+   Evas_Object_Table_Option *opt;
+
+   EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, 0);
+   opt = _evas_object_table_option_get(child);
+   if (!opt)
+     {
+        if (col) *col = 0;
+        if (row) *row = 0;
+        if (colspan) *colspan = 0;
+        if (rowspan) *rowspan = 0;
+        return EINA_FALSE;
+     }
+   if (col) *col = opt->col;
+   if (row) *row = opt->row;
+   if (colspan) *colspan = opt->colspan;
+   if (rowspan) *rowspan = opt->rowspan;
+   return EINA_TRUE;
+}
+
+EAPI Eina_Bool
 evas_object_table_pack(Evas_Object *o, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan)
 {
    Evas_Object_Table_Option *opt;