Enlightenment CVS committal

Author  : moom
Project : e17
Module  : proto

Dir     : e17/proto/etk/src/bin


Modified Files:
        etk_tree2_test.c 


Log Message:
* [Tree2] The models can now be combined: for example, if you want a 
column containing an icon followed by a text, just add the image model 
and the text model to the column. It allows a lot more 
flexibility with the models, it makes model creation easier, and there 
is no more need for the "icon_text" model. It needs more work though 
before being usable


===================================================================
RCS file: /cvs/e/e17/proto/etk/src/bin/etk_tree2_test.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- etk_tree2_test.c    3 Jan 2007 00:09:31 -0000       1.5
+++ etk_tree2_test.c    3 Jan 2007 18:10:11 -0000       1.6
@@ -46,10 +46,16 @@
    etk_container_add(ETK_CONTAINER(alignment), tree);
 
    /* We first create the columns of the tree, and then we "build" the tree 
with etk_tree2_build() */
-   col1 = etk_tree2_col_new(ETK_TREE2(tree), "Column 1", 
etk_tree2_model_icon_text_new(ETK_TREE2(tree), ETK_TREE_FROM_EDJE), 130);
-   col2 = etk_tree2_col_new(ETK_TREE2(tree), "Column 2", 
etk_tree2_model_double_new(ETK_TREE2(tree)), 60);
-   col3 = etk_tree2_col_new(ETK_TREE2(tree), "Column 3", 
etk_tree2_model_image_new(ETK_TREE2(tree), ETK_TREE_FROM_FILE), 60);
-   col4 = etk_tree2_col_new(ETK_TREE2(tree), "Column 4", 
etk_tree2_model_checkbox_new(ETK_TREE2(tree)), 90);
+   col1 = etk_tree2_col_new(ETK_TREE2(tree), "Column 1", 130);
+      etk_tree2_col_model_add(col1, etk_tree2_model_image_new(ETK_TREE2(tree), 
ETK_TREE_FROM_EDJE));
+      etk_tree2_col_model_add(col1, etk_tree2_model_text_new(ETK_TREE2(tree)));
+   col2 = etk_tree2_col_new(ETK_TREE2(tree), "Column 2", 60);
+      etk_tree2_col_model_add(col2, 
etk_tree2_model_double_new(ETK_TREE2(tree)));
+   col3 = etk_tree2_col_new(ETK_TREE2(tree), "Column 3", 60);
+      etk_tree2_col_model_add(col3, etk_tree2_model_image_new(ETK_TREE2(tree), 
ETK_TREE_FROM_FILE));
+   col4 = etk_tree2_col_new(ETK_TREE2(tree), "Column 4", 90);
+      etk_tree2_col_model_add(col4, 
etk_tree2_model_checkbox_new(ETK_TREE2(tree)));
+   
    etk_tree2_build(ETK_TREE2(tree));
    
    /* Then we add the rows to the tree. etk_tree2_freeze/thaw() is used to 
improve the speed when you insert a lot



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to