Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/bin Modified Files: ewl_text_test.c Log Message: - work on the text tree. seems to be more correct then the previous. - still some issues with applying contexts and having multiple styles in one spot that needs to be looked into - I'm explicitly setting the layer of the textblock which is probably wrong (Nathan?) - Selections don't show up. They work, just aren't visible, I think it's a layering thing (Nathan?) =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/bin/ewl_text_test.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- ewl_text_test.c 18 Oct 2005 02:42:41 -0000 1.9 +++ ewl_text_test.c 25 Nov 2005 05:53:21 -0000 1.10 @@ -89,13 +89,14 @@ o = ewl_text_new(); ewl_widget_name_set(o, "text"); + ewl_text_selectable_set(EWL_TEXT(o), TRUE); ewl_container_child_append(EWL_CONTAINER(win), o); + ewl_widget_show(o); ewl_text_text_insert(EWL_TEXT(o), "The first bunch of text\n", 0); /* 24 */ ewl_text_cursor_position_set(EWL_TEXT(o), 10); ewl_text_color_apply(EWL_TEXT(o), 0, 0, 255, 255, 5); - ewl_text_text_append(EWL_TEXT(o), "The second bunch of text\n"); /* 25 */ ewl_text_font_size_set(EWL_TEXT(o), 20); @@ -107,11 +108,13 @@ ewl_text_outline_color_set(EWL_TEXT(o), 200, 200, 200, 200); ewl_text_text_append(EWL_TEXT(o), "The third bunch of text\n"); /* 24 */ - ewl_text_styles_set(EWL_TEXT(o), EWL_TEXT_STYLE_NONE); ewl_text_text_insert(EWL_TEXT(o), "The fourth bunch of text\n", 31); /* 25 */ - trigger = ewl_text_trigger_new(EWL_TEXT_TRIGGER_TYPE_TRIGGER); + trigger = ewl_text_trigger_new(EWL_TEXT_TRIGGER_TYPE_TRIGGER); ewl_text_trigger_start_pos_set(trigger, ewl_text_length_get(EWL_TEXT(o))); + + ewl_text_cursor_position_set(EWL_TEXT(o), ewl_text_length_get(EWL_TEXT(o))); + ewl_text_styles_set(EWL_TEXT(o), EWL_TEXT_STYLE_NONE); ewl_text_text_append(EWL_TEXT(o), "This is the link."); /* 17 */ len = ewl_text_cursor_position_get(EWL_TEXT(o)) - @@ -136,14 +139,16 @@ ewl_text_cursor_position_set(EWL_TEXT(o), 43); ewl_text_color_apply(EWL_TEXT(o), 0, 255, 0, 255, 14); + ewl_text_cursor_position_set(EWL_TEXT(o), ewl_text_length_get(EWL_TEXT(o))); ewl_text_color_set(EWL_TEXT(o), 255, 0, 0, 255); ewl_text_text_append(EWL_TEXT(o), "And in red\n"); /* 11 */ - ewl_text_color_set(EWL_TEXT(o), 0, 0, 0, 255); + ewl_text_color_set(EWL_TEXT(o), 0, 0, 0, 255); ewl_text_text_append(EWL_TEXT(o), "Once more with feeling. "); trigger = ewl_text_trigger_new(EWL_TEXT_TRIGGER_TYPE_TRIGGER); ewl_text_trigger_start_pos_set(trigger, ewl_text_length_get(EWL_TEXT(o))); + ewl_text_text_append(EWL_TEXT(o), "This is the multi\n\nline link."); /* 28 */ len = ewl_text_cursor_position_get(EWL_TEXT(o)) - @@ -161,11 +166,9 @@ ewl_text_color_set(EWL_TEXT(o), 255, 0, 255, 255); ewl_text_text_append(EWL_TEXT(o), "ONE MORE SEGV"); - ewl_widget_show(o); - #if 0 printf("-- DUMP --\n"); - ewl_text_btree_dump((EWL_TEXT(o))->formatting, ""); + ewl_text_tree_dump((EWL_TEXT(o))->formatting, ""); printf("-- DUMP DONE --\n"); #endif } ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs