Enlightenment CVS committal
Author : rephorm
Project : e17
Module : libs/etox
Dir : e17/libs/etox/test
Modified Files:
selections.c
Log Message:
more selection testing.
mostly works.
something's funny with saving/loading contexts. looks like the fore-/background colors
get flopped. Resizing so that the new text ends up on a wrapped line fixes this
though. Very strange.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/etox/test/selections.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- selections.c 19 Aug 2003 18:09:11 -0000 1.11
+++ selections.c 20 Aug 2003 00:44:43 -0000 1.12
@@ -38,6 +38,7 @@
int sig_exit(void *data, int type, void * ev)
{
+ printf("sig exit!!\n");
ecore_main_loop_quit();
return 1;
data = NULL;
@@ -81,8 +82,8 @@
/* Create message etox */
etox = etox_new_all(evas, 0, 0, win_w, win_h, 255,
ETOX_ALIGN_LEFT | ETOX_ALIGN_BOTTOM);
- etox_context_set_font(etox, "sinon", 14);
- etox_context_set_color(etox, 0, 255, 0, 255);
+ etox_context_set_font(etox, "Vera", 14);
+ etox_context_set_color(etox, 173, 193, 79, 255);
etox_context_set_style(etox, "shadow");
etox_context_set_soft_wrap(etox, 1);
etox_set_text(etox, msg);
@@ -126,6 +127,8 @@
ecore_evas_callback_resize_set(ee, window_resize);
ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, sig_exit, NULL);
+ ecore_evas_callback_delete_request_set(ee, sig_exit);
+ ecore_evas_callback_destroy_set(ee, sig_exit);
ecore_main_loop_begin();
@@ -141,17 +144,30 @@
Etox_Selection *sel;
Etox_Context *old, *cont;
+
+ printf("style: %s\n", etox_context_get_style(etox));
sel = etox_select_index(etox, 10, 120);
-// cont = etox_context_new();
-// old = etox_context_save(etox);
+ old = etox_context_save(etox);
etox_context_set_color(etox, 220, 0, 0, 255);
- etox_context_set_font(etox, "nationff", 12);
+ etox_context_set_font(etox, "Vera", 12);
+ cont = etox_context_save(etox);
+ etox_selection_apply_context(sel, cont);
+
+ etox_selection_free_by_etox(etox);
+
+ sel = etox_select_index(etox, 50, 200);
+ etox_context_set_color(etox, 200, 102, 10, 255);
+ etox_context_free(cont);
cont = etox_context_save(etox);
etox_selection_apply_context(sel, cont);
-// etox_context_load(etox, old);
- //etox_context_free(old);
- //etox_context_free(cont);
+ etox_context_load(etox, old);
+
+ printf("style: %s\n", etox_context_get_style(etox));
+ etox_append_text(etox, " Blah. Blah. Blum de dum.");
+
+ etox_context_free(cont);
+ etox_context_free(old);
}
-------------------------------------------------------
This SF.net email is sponsored by Dice.com.
Did you know that Dice has over 25,000 tech jobs available today? From
careers in IT to Engineering to Tech Sales, Dice has tech jobs from the
best hiring companies. http://www.dice.com/index.epl?rel_code=104
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs