horray! We have a genlist in elev8!!
Thanks Sanjeev :)

Daniel Juyung Seo (SeoZ)

On Fri, Jan 6, 2012 at 4:23 PM, Enlightenment SVN
<no-re...@enlightenment.org> wrote:
> Log:
> An improved version of genlist example.
>
>  Signed-off-by: Sanjeev BA <iamsanj...@gmail.com>
>
> Author:       sanjeev
> Date:         2012-01-05 23:23:18 -0800 (Thu, 05 Jan 2012)
> New Revision: 66929
> Trac:         http://trac.enlightenment.org/e/changeset/66929
>
> Modified:
>  trunk/PROTO/elev8/data/javascript/genlist.js
>
> Modified: trunk/PROTO/elev8/data/javascript/genlist.js
> ===================================================================
> --- trunk/PROTO/elev8/data/javascript/genlist.js        2012-01-06 06:42:13 
> UTC (rev 66928)
> +++ trunk/PROTO/elev8/data/javascript/genlist.js        2012-01-06 07:23:18 
> UTC (rev 66929)
> @@ -7,89 +7,117 @@
>  var EXPAND_BOTH = { x : 1.0, y : 1.0 };
>  var FILL_BOTH = { x : -1.0, y : -1.0 };
>
> -/*var button = {
> -       type : "button",
> -       label : "GenList Item",
> -       //weight : { x : -1.0, y : -1.0 },
> -       on_clicked : function(arg) {
> -               print("clicked event on Button: 1 " + this.label);
> -       },
> -};
> +elm.datadir=elm.datadir + "/data/images/";
>
> -var text_get = function(arg) {
> -       print("Calling text get function.");
> -       return "Clone";
> +var yellow = {
> +       type : "icon",
> +       prescale : 1,
> +       image : elm.datadir + "yellow.png",
>  };
> +var orange = {
> +       type : "icon",
> +       prescale : 1,
> +       image : elm.datadir + "orange.png",
> +};
> +var violet = {
> +       type : "icon",
> +       prescale : 1,
> +       image : elm.datadir + "violet.png",
> +};
>
> -var content_get = function(arg) {
> -       print("Calling content get function.");
> -       return button;
> +function button_prepend() {
> +    print("button_prepend");
> +}
> +function button_append() {
> +    print("button_append");
> +       for (var i = 0; i<10; i++)
> +       win.elements.box.elements.the_list.append(new ItemType1(i));
> +}
> +
> +var ItemType1 = function(data)
> +{
> +       this.data = data;
> +       this.type = "default";
>  };
>
> -var state_get = function(arg) {
> -       print("Calling state get function.");
> +ItemType1.prototype = {
> +               on_selected : function() {
> +                       print("The member is " + this.type);
> +               },
> +               on_text : function(arg) {
> +                       print("Calling text get function." + this.data);
> +                       return this.data.toString();
> +               },
> +               on_content : function(arg) {
> +                       print("Calling content get function.");
> +               },
> +               on_state : function(arg) {
> +                       print("Calling state get function.");
> +               },
>  };
>
> -var delete_item = function(arg) {
> -       print("Calling delete item function.");
> -};*/
> -
>  var win = new elm.window({
> -       type : "main",
> -       label : "Genlist Demo",
> -       width : 480,
> -       height : 800,
> -       weight : EXPAND_BOTH,
> -       align : FILL_BOTH,
> +    type : "main",
> +       label : "GenList Example",
> +       width : 320,
> +       height : 480,
>        elements : {
>                the_background : {
>                        type : "background",
>                        weight : EXPAND_BOTH,
> -                       align : FILL_BOTH,
> -                       resize : true,
> +            align : FILL_BOTH,
> +            resize : true,
>                },
> -               the_box : {
> -                       type : "box",
> -                       weight : EXPAND_BOTH,
> -                       //resize : true,
> -                       elements : {
> -                           scroll : {
> -                                       type : "scroller",
> -                                       weight : EXPAND_BOTH,
> -                                       bounce : { x : false, y : true },
> -                                       policy : { x : "off", y : "on" },
> -                                       weight : EXPAND_BOTH,
> -                                       resize : true,
> -                                       content : {
> -                                               type : "box",
> -                                               weight : EXPAND_BOTH,
> -                                               elements : {
> -                                                       the_list : {
> -                                                               type : 
> "genlist",
> -                                                               weight : 
> EXPAND_BOTH,
> -                                                       },
> -                                               },
> -                                               but_box : {
> -                                                       type : "box",
> -                                                       weight : EXPAND_BOTH,
> -                                                       horizontal : true,
> -                                                       resize : true,
> -                                                       elements : {
> -                                                               prepend : {
> -                                                                       type 
> : "button",
> -                                                                       label 
> : "Prepend",
> -                                                                       
> weight : EXPAND_BOTH,
> -                                                               },
> -                                                               append : {
> -                                                                       type 
> : "button",
> -                                                                       label 
> : "Append",
> -                                                                       
> weight : EXPAND_BOTH,
> -                                                               },
> -                                                       },
> -                                               },
> -                                       },
> -                               },
> -                       },
> -               },
> -       },
> +        box : {
> +            type : "box",
> +            weight : EXPAND_BOTH,
> +            align : FILL_BOTH,
> +            resize : true,
> +            elements : {
> +                /*scroll : {
> +                    type : "scroller",
> +                    bounce : { x : false, y : true },
> +                    policy : { x : "off", y : "on" },
> +                    weight : EXPAND_BOTH,
> +                    align : FILL_BOTH,
> +                    resize : true,
> +                    content : {
> +                        type : "box",
> +                        weight : EXPAND_BOTH,
> +                        align : FILL_BOTH,
> +                        elements : {*/
> +                            the_list : {
> +                                type : "genlist",
> +                                weight : EXPAND_BOTH,
> +                                align : FILL_BOTH,
> +                            },
> +                        /*},
> +                    },
> +                },*/
> +                but_box : {
> +                    type : "box",
> +                    weight : EXPAND_BOTH,
> +                    align : FILL_BOTH,
> +                    resize : true,
> +                    horizontal : true,
> +                    elements : {
> +                        prepend : {
> +                            type : "button",
> +                            label : "Prepend",
> +                            weight : EXPAND_BOTH,
> +                            icon : violet,
> +                        },
> +                        append : {
> +                            type : "button",
> +                            label : "Append",
> +                            weight : EXPAND_BOTH,
> +                            icon : violet,
> +                                                       on_clicked : 
> button_append,
> +                        },
> +                    },
> +                },
> +            },
> +        },
> +    },
>  });
> +
>
>
> ------------------------------------------------------------------------------
> Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
> infrastructure or vast IT resources to deliver seamless, secure access to
> virtual desktops. With this all-in-one solution, easily deploy virtual
> desktops for less than the cost of PCs and save 60% on VDI infrastructure
> costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
> _______________________________________________
> enlightenment-svn mailing list
> enlightenment-...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to