On Fri, Oct 31, 2008 at 3:42 PM, Enlightenment SVN
<[EMAIL PROTECTED]> wrote:
> Log:
>  Add evas_object_table, make evas_object_box more consistent.
>
>  Table code is still *incomplete*, it just do homogeneous layouts as
>  I'm still trying to figure out how to make it great.
>
>  I'm not expecting to make layout configurable, as we did for box, but
>  if you think it's required we can do that later.
>
>  Now that the public API of both BOX and TABLE are in, we can add these
>  as parts of Edje.

Guys,

API is in, code needs to be completed, but as I'll travel to
Netherlands to participate in ELC-E next week I'll be out of time
until 13th, I'll need some help.

For those willing to help, we need to expose these in Edje, add 2 part
type: BOX and TABLE.

Box will have a "layout" (can be per description) that chooses the
layout to be used, these will be a text string with the layout name,
like "vertical", "horizontal", "vertical_homogeneous" and so on. These
names will be registered automatically by edje, but user will be able
to register his own functions with:

   void edje_box_layout_register(const char *name,
Evas_Object_Box_Layout layout)

One can then use the following functions to add/remove data from that
part (matches evas_object_box_*):

   Evas_Bool edje_object_part_box_append(Evas_Object *o, const char
*part, Evas_Object *child)
   Evas_Bool edje_object_part_box_prepend(Evas_Object *o,const char
*part,  Evas_Object *child)
   Evas_Bool edje_object_part_box_insert_before(Evas_Object *o, const
char *part, Evas_Object *child, const Evas_Object *reference)
   Evas_Bool edje_object_part_box_insert_at(Evas_Object *o, const char
*part, Evas_Object *child, unsigned int pos)
   Evas_Bool edje_object_part_box_remove(Evas_Object *o, const char
*part, Evas_Object *child)
   Evas_Bool edje_object_part_box_remove_at(Evas_Object *o, const char
*part, unsigned int pos)

Edje block would refer to some other groups in the same EDC to be
added, much like type:GROUP does, an example would be:

part {
   type: BOX;
   name: "my_box";
   description {
      state: "default" 0.0;
      rel1 { relative: 0.0 0.0; };
      rel2 { relative: 0.5 0.5; };
      box {
         layout: "vertical";
         padding: 0 2; /* padding between cells, here it's 2 pixels
between vertical */
          align: 0.5 0.5;
          items {
             item: "my_item";
             item: "my_other_item";
          }
      }
   }
}


Table is similar, but since we don't have pluggable layouts, no such
registry is required. API:

   Evas_Bool edje_object_part_table_pack(Evas_Object *o, const char
*part, Evas_Object *child, unsigned short col, unsigned short row,
unsigned short colspan, unsigned short rowspan);
   Evas_Bool edje_object_part_table_unpack(Evas_Object *o, const char
*part, Evas_Object *child);
   Evas_Bool edje_object_part_table_clear(Evas_Object *o, const char
*part, Evas_Bool delete);

EDC:

part {
   type: TABLE;
   name: "my_table";
   description {
      state: "default" 0.0;
      rel1 { relative: 0.0 0.0; };
      rel2 { relative: 0.5 0.5; };
      box {
         homogeneous: TABLE;
         padding: 2 2; /* padding between cells */
          align: 0.5 0.5;
          items {
             item: 0 0 1 1 "my_item";
             item: 0 1 1 1 "my_other_item";
             item: 1 0 1 1 "my_other_item2";
             item: 1 1 1 1 "my_other_item3";
          }
      }
   }
}


So, do you like this approach? Anyone wants to help here?

With these in Edje we'll be able to do most dialog layouts in EDC,
people were asking it the other day on IRC so EFM could use it for
it's status bar and so on.

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: [EMAIL PROTECTED]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to