Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9745
Modified Files: Tag: devel_0_39 g_canvas.c g_editor.c g_graph.c g_rtext.c g_text.c u_main.tk Log Message: color from ix038
Index: g_graph.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_graph.c,v retrieving revision 1.3.4.2.2.1 retrieving revision 1.3.4.2.2.2 diff -C2 -d -r1.3.4.2.2.1 -r1.3.4.2.2.2 *** g_graph.c 22 May 2005 12:46:00 -0000 1.3.4.2.2.1 --- g_graph.c 19 Jun 2005 03:18:59 -0000 1.3.4.2.2.2 *************** *** 708,712 **** /* draw a rectangle around the graph */ sys_vgui(".x%lx.c create line\ ! %d %d %d %d %d %d %d %d %d %d -tags %s\n", glist_getcanvas(x->gl_owner), x1, y1, x1, y2, x2, y2, x2, y1, x1, y1, tag); --- 708,712 ---- /* draw a rectangle around the graph */ sys_vgui(".x%lx.c create line\ ! %d %d %d %d %d %d %d %d %d %d -fill $::pdtheme::graph -tags %s\n", glist_getcanvas(x->gl_owner), x1, y1, x1, y2, x2, y2, x2, y1, x1, y1, tag); *************** *** 718,722 **** int ymin = (y1 < y2 ? y1 : y2); t_symbol *s = garray_getname((t_garray *)g); ! sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor sw\ -font -*-courier-bold--normal--%d-* -tags %s\n", (long)glist_getcanvas(x), x1, ymin, s->s_name, --- 718,722 ---- int ymin = (y1 < y2 ? y1 : y2); t_symbol *s = garray_getname((t_garray *)g); ! sys_vgui(".x%lx.c create text %d %d -fill $::pdtheme::text -text {%s} -anchor sw\ -font -*-courier-bold--normal--%d-* -tags %s\n", (long)glist_getcanvas(x), x1, ymin, s->s_name, *************** *** 737,745 **** { int tickpix = (i % x->gl_xtick.k_lperb ? 2 : 4); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", glist_getcanvas(x->gl_owner), (int)glist_xtopixels(x, f), (int)upix, (int)glist_xtopixels(x, f), (int)upix - tickpix, tag); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", glist_getcanvas(x->gl_owner), (int)glist_xtopixels(x, f), (int)lpix, --- 737,745 ---- { int tickpix = (i % x->gl_xtick.k_lperb ? 2 : 4); ! sys_vgui(".x%lx.c create line %d %d %d %d -fill $::pdtheme::graph -tags %s\n", glist_getcanvas(x->gl_owner), (int)glist_xtopixels(x, f), (int)upix, (int)glist_xtopixels(x, f), (int)upix - tickpix, tag); ! sys_vgui(".x%lx.c create line %d %d %d %d -fill $::pdtheme::graph -tags %s\n", glist_getcanvas(x->gl_owner), (int)glist_xtopixels(x, f), (int)lpix, *************** *** 751,759 **** { int tickpix = (i % x->gl_xtick.k_lperb ? 2 : 4); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", glist_getcanvas(x->gl_owner), (int)glist_xtopixels(x, f), (int)upix, (int)glist_xtopixels(x, f), (int)upix - tickpix, tag); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", glist_getcanvas(x->gl_owner), (int)glist_xtopixels(x, f), (int)lpix, --- 751,759 ---- { int tickpix = (i % x->gl_xtick.k_lperb ? 2 : 4); ! sys_vgui(".x%lx.c create line %d %d %d %d -fill $::pdtheme::graph -tags %s\n", glist_getcanvas(x->gl_owner), (int)glist_xtopixels(x, f), (int)upix, (int)glist_xtopixels(x, f), (int)upix - tickpix, tag); ! sys_vgui(".x%lx.c create line %d %d %d %d -fill $::pdtheme::graph -tags %s\n", glist_getcanvas(x->gl_owner), (int)glist_xtopixels(x, f), (int)lpix, *************** *** 774,782 **** { int tickpix = (i % x->gl_ytick.k_lperb ? 2 : 4); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", glist_getcanvas(x->gl_owner), x1, (int)glist_ytopixels(x, f), x1 + tickpix, (int)glist_ytopixels(x, f), tag); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", glist_getcanvas(x->gl_owner), x2, (int)glist_ytopixels(x, f), --- 774,782 ---- { int tickpix = (i % x->gl_ytick.k_lperb ? 2 : 4); ! sys_vgui(".x%lx.c create line %d %d %d %d -fill $::pdtheme::graph -tags %s\n", glist_getcanvas(x->gl_owner), x1, (int)glist_ytopixels(x, f), x1 + tickpix, (int)glist_ytopixels(x, f), tag); ! sys_vgui(".x%lx.c create line %d %d %d %d -fill $::pdtheme::graph -tags %s\n", glist_getcanvas(x->gl_owner), x2, (int)glist_ytopixels(x, f), *************** *** 788,796 **** { int tickpix = (i % x->gl_ytick.k_lperb ? 2 : 4); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", glist_getcanvas(x->gl_owner), x1, (int)glist_ytopixels(x, f), x1 + tickpix, (int)glist_ytopixels(x, f), tag); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", glist_getcanvas(x->gl_owner), x2, (int)glist_ytopixels(x, f), --- 788,796 ---- { int tickpix = (i % x->gl_ytick.k_lperb ? 2 : 4); ! sys_vgui(".x%lx.c create line %d %d %d %d -fill $::pdtheme::graph -tags %s\n", glist_getcanvas(x->gl_owner), x1, (int)glist_ytopixels(x, f), x1 + tickpix, (int)glist_ytopixels(x, f), tag); ! sys_vgui(".x%lx.c create line %d %d %d %d -fill $::pdtheme::graph -tags %s\n", glist_getcanvas(x->gl_owner), x2, (int)glist_ytopixels(x, f), *************** *** 801,805 **** for (i = 0; i < x->gl_nxlabels; i++) sys_vgui(".x%lx.c create text\ ! %d %d -text {%s} -font -*-courier-bold--normal--%d-* -tags %s\n", glist_getcanvas(x), (int)glist_xtopixels(x, atof(x->gl_xlabel[i]->s_name)), --- 801,805 ---- for (i = 0; i < x->gl_nxlabels; i++) sys_vgui(".x%lx.c create text\ ! %d %d -fill $::pdtheme::text -text {%s} -font -*-courier-bold--normal--%d-* -tags %s\n", glist_getcanvas(x), (int)glist_xtopixels(x, atof(x->gl_xlabel[i]->s_name)), *************** *** 810,814 **** for (i = 0; i < x->gl_nylabels; i++) sys_vgui(".x%lx.c create text\ ! %d %d -text {%s} -font -*-courier-bold--normal--%d-* -tags %s\n", glist_getcanvas(x), (int)glist_xtopixels(x, x->gl_ylabelx), --- 810,814 ---- for (i = 0; i < x->gl_nylabels; i++) sys_vgui(".x%lx.c create text\ ! %d %d -fill $::pdtheme::text -text {%s} -font -*-courier-bold--normal--%d-* -tags %s\n", glist_getcanvas(x), (int)glist_xtopixels(x, x->gl_ylabelx), *************** *** 942,949 **** if (canvas_showtext(x)) rtext_select(y, state); ! sys_vgui(".x%lx.c itemconfigure %sR -fill %s\n", glist, ! rtext_gettag(y), (state? "blue" : "black")); sys_vgui(".x%lx.c itemconfigure graph%lx -fill %s\n", ! glist_getcanvas(glist), z, (state? "blue" : "black")); } } --- 942,949 ---- if (canvas_showtext(x)) rtext_select(y, state); ! sys_vgui(".x%lx.c itemconfigure %sR -fill %s\n", glist, ! rtext_gettag(y), (state? "$::pdtheme::selected" : "$::pdtheme::graph")); sys_vgui(".x%lx.c itemconfigure graph%lx -fill %s\n", ! glist_getcanvas(glist), z, (state? "$::pdtheme::selected" : "$::pdtheme::graph")); } }
Index: u_main.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v retrieving revision 1.4.4.10.2.1 retrieving revision 1.4.4.10.2.2 diff -C2 -d -r1.4.4.10.2.1 -r1.4.4.10.2.2 *** u_main.tk 22 May 2005 13:04:15 -0000 1.4.4.10.2.1 --- u_main.tk 19 Jun 2005 03:18:59 -0000 1.4.4.10.2.2 *************** *** 201,205 **** . configure -menu .mbar -width 200 -height 150
! ############### set up global variables ################################
set untitled_number 1 --- 201,205 ---- . configure -menu .mbar -width 200 -height 150
! ############### set up global/namespace variables ###############
set untitled_number 1 *************** *** 211,214 **** --- 211,222 ---- set pd_undocanvas no
+ namespace eval ::pdtheme { + set ::pdtheme::arrow last + array set colors "border purple bg white box green line gray50 object green message orange inlet purple outlet red atom yellow graph red text black selected #ff049b lasso green" + foreach element [array names colors] { + eval "set ::pdtheme::$element $colors($element)" + } + } + ################ utility functions #########################
*************** *** 865,869 ****
wm geometry $name $geometry ! canvas $name.c -width $width -height $height -background white \ -yscrollcommand "$name.scrollvert set" \ -xscrollcommand "$name.scrollhort set" \ --- 873,877 ----
wm geometry $name $geometry ! canvas $name.c -width $width -height $height -bg $::pdtheme::bg \ -yscrollcommand "$name.scrollvert set" \ -xscrollcommand "$name.scrollhort set" \
Index: g_editor.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_editor.c,v retrieving revision 1.4.4.2.2.1 retrieving revision 1.4.4.2.2.2 diff -C2 -d -r1.4.4.2.2.1 -r1.4.4.2.2.2 *** g_editor.c 22 May 2005 12:43:45 -0000 1.4.4.2.2.1 --- g_editor.c 19 Jun 2005 03:18:59 -0000 1.4.4.2.2.2 *************** *** 97,101 **** x->gl_editor->e_selectline_inno = inno; x->gl_editor->e_selectline_tag = oc; ! sys_vgui(".x%lx.c itemconfigure l%lx -fill blue\n", x, x->gl_editor->e_selectline_tag); } --- 97,101 ---- x->gl_editor->e_selectline_inno = inno; x->gl_editor->e_selectline_tag = oc; ! sys_vgui(".x%lx.c itemconfigure l%lx -fill $::pdtheme::selected \n", x, x->gl_editor->e_selectline_tag); } *************** *** 107,111 **** { x->gl_editor->e_selectedline = 0; ! sys_vgui(".x%lx.c itemconfigure l%lx -fill black\n", x, x->gl_editor->e_selectline_tag); } --- 107,111 ---- { x->gl_editor->e_selectedline = 0; ! sys_vgui(".x%lx.c itemconfigure l%lx -fill $::pdtheme::line\n", x, x->gl_editor->e_selectline_tag); } *************** *** 1098,1102 **** x->gl_editor->e_ywas = ypos; sys_vgui( ! ".x%lx.c create line %d %d %d %d -width %d -tags x\n", x, xpos, ypos, xpos, ypos, (issignal ? 2 : 1)); --- 1098,1102 ---- x->gl_editor->e_ywas = ypos; sys_vgui( ! ".x%lx.c create line %d %d %d %d -fill $::pdtheme::line -arrow $::pdtheme::arrow -width %d -tags x\n", x, xpos, ypos, xpos, ypos, (issignal ? 2 : 1)); *************** *** 1197,1201 **** { if (!shiftmod) glist_noselect(x); ! sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags x\n", x, xpos, ypos, xpos, ypos); x->gl_editor->e_xwas = xpos; --- 1197,1201 ---- { if (!shiftmod) glist_noselect(x); ! sys_vgui(".x%lx.c create rectangle %d %d %d %d -outline $::pdtheme::lasso -tags x\n", x, xpos, ypos, xpos, ypos); x->gl_editor->e_xwas = xpos; *************** *** 1297,1301 **** + IOMIDDLE; ly2 = y21; ! sys_vgui(".x%lx.c create line %d %d %d %d -width %d -tags l%lx\n", glist_getcanvas(x), lx1, ly1, lx2, ly2, --- 1297,1301 ---- + IOMIDDLE; ly2 = y21; ! sys_vgui(".x%lx.c create line %d %d %d %d -fill $::pdtheme::line -arrow $::pdtheme::arrow -width %d -tags l%lx\n", glist_getcanvas(x), lx1, ly1, lx2, ly2, *************** *** 2090,2094 **** if (glist_isvisible(x)) { ! sys_vgui(".x%lx.c create line %d %d %d %d -width %d -tags l%lx\n", glist_getcanvas(x), 0, 0, 0, 0, (obj_issignaloutlet(objsrc, outno) ? 2 : 1),oc); --- 2090,2094 ---- if (glist_isvisible(x)) { ! sys_vgui(".x%lx.c create line %d %d %d %d -fill $::pdtheme::line -arrow $::pdtheme::arrow -width %d -tags l%lx\n", glist_getcanvas(x), 0, 0, 0, 0, (obj_issignaloutlet(objsrc, outno) ? 2 : 1),oc);
Index: g_text.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_text.c,v retrieving revision 1.5.4.2 retrieving revision 1.5.4.2.2.1 diff -C2 -d -r1.5.4.2 -r1.5.4.2.2.1 *** g_text.c 14 Jan 2005 18:34:13 -0000 1.5.4.2 --- g_text.c 19 Jun 2005 03:18:59 -0000 1.5.4.2.2.1 *************** *** 751,755 **** canvas_realizedollar(x->a_glist, x->a_label)->s_name, sys_hostfontsize(glist_getfont(glist)), ! "black"); } else sys_vgui(".x%lx.c delete %lx.l\n", glist_getcanvas(glist), x); --- 751,755 ---- canvas_realizedollar(x->a_glist, x->a_label)->s_name, sys_hostfontsize(glist_getfont(glist)), ! "$::pdtheme::text"); } else sys_vgui(".x%lx.c delete %lx.l\n", glist_getcanvas(glist), x); *************** *** 935,939 **** if (glist_isvisible(glist) && text_shouldvis(x, glist)) sys_vgui(".x%lx.c itemconfigure %sR -fill %s\n", glist, ! rtext_gettag(y), (state? "blue" : "black")); }
--- 935,939 ---- if (glist_isvisible(glist) && text_shouldvis(x, glist)) sys_vgui(".x%lx.c itemconfigure %sR -fill %s\n", glist, ! rtext_gettag(y), (state? "$::pdtheme::selected" : "$::pdtheme::object")); }
*************** *** 1117,1121 **** int onset = x1 + (width - IOWIDTH) * i / nplus; if (firsttime) ! sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags %so%d\n", glist_getcanvas(glist), onset, y2 - 1, --- 1117,1121 ---- int onset = x1 + (width - IOWIDTH) * i / nplus; if (firsttime) ! sys_vgui(".x%lx.c create rectangle %d %d %d %d -outline $::pdtheme::outlet -tags %so%d\n", glist_getcanvas(glist), onset, y2 - 1, *************** *** 1134,1138 **** int onset = x1 + (width - IOWIDTH) * i / nplus; if (firsttime) ! sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags %si%d\n", glist_getcanvas(glist), onset, y1, --- 1134,1138 ---- int onset = x1 + (width - IOWIDTH) * i / nplus; if (firsttime) ! sys_vgui(".x%lx.c create rectangle %d %d %d %d -outline $::pdtheme::inlet -tags %si%d\n", glist_getcanvas(glist), onset, y1, *************** *** 1160,1164 **** if (firsttime) sys_vgui(".x%lx.c create line\ ! %d %d %d %d %d %d %d %d %d %d -dash %s -tags %sR\n", glist_getcanvas(glist), x1, y1, x2, y1, x2, y2, x1, y2, x1, y1, pattern, tag); --- 1160,1164 ---- if (firsttime) sys_vgui(".x%lx.c create line\ ! %d %d %d %d %d %d %d %d %d %d -fill $::pdtheme::object -dash %s -tags %sR\n", glist_getcanvas(glist), x1, y1, x2, y1, x2, y2, x1, y2, x1, y1, pattern, tag); *************** *** 1177,1181 **** if (firsttime) sys_vgui(".x%lx.c create line\ ! %d %d %d %d %d %d %d %d %d %d %d %d %d %d -tags %sR\n", glist_getcanvas(glist), x1, y1, x2+4, y1, x2, y1+4, x2, y2-4, x2+4, y2, --- 1177,1181 ---- if (firsttime) sys_vgui(".x%lx.c create line\ ! %d %d %d %d %d %d %d %d %d %d %d %d %d %d -fill $::pdtheme::message -tags %sR\n", glist_getcanvas(glist), x1, y1, x2+4, y1, x2, y1+4, x2, y2-4, x2+4, y2, *************** *** 1193,1197 **** if (firsttime) sys_vgui(".x%lx.c create line\ ! %d %d %d %d %d %d %d %d %d %d %d %d -tags %sR\n", glist_getcanvas(glist), x1, y1, x2-4, y1, x2, y1+4, x2, y2, x1, y2, x1, y1, --- 1193,1197 ---- if (firsttime) sys_vgui(".x%lx.c create line\ ! %d %d %d %d %d %d %d %d %d %d %d %d -fill $::pdtheme::atom -tags %sR\n", glist_getcanvas(glist), x1, y1, x2-4, y1, x2, y1+4, x2, y2, x1, y2, x1, y1,
Index: g_canvas.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_canvas.c,v retrieving revision 1.4.4.1.2.1 retrieving revision 1.4.4.1.2.2 diff -C2 -d -r1.4.4.1.2.1 -r1.4.4.1.2.2 *** g_canvas.c 22 May 2005 12:40:59 -0000 1.4.4.1.2.1 --- g_canvas.c 19 Jun 2005 03:18:59 -0000 1.4.4.1.2.2 *************** *** 870,874 **** linetraverser_start(&t, x); while (oc = linetraverser_next(&t)) ! sys_vgui(".x%lx.c create line %d %d %d %d -width %d -tags l%lx\n", glist_getcanvas(x), t.tr_lx1, t.tr_ly1, t.tr_lx2, t.tr_ly2, --- 870,874 ---- linetraverser_start(&t, x); while (oc = linetraverser_next(&t)) ! sys_vgui(".x%lx.c create line %d %d %d %d -fill $::pdtheme::line -arrow $::pdtheme::arrow -width %d -tags l%lx\n", glist_getcanvas(x), t.tr_lx1, t.tr_ly1, t.tr_lx2, t.tr_ly2,
Index: g_rtext.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_rtext.c,v retrieving revision 1.4 retrieving revision 1.4.8.1 diff -C2 -d -r1.4 -r1.4.8.1 *** g_rtext.c 6 Sep 2004 20:20:34 -0000 1.4 --- g_rtext.c 19 Jun 2005 03:18:59 -0000 1.4.8.1 *************** *** 236,240 **** outchars, tempbuf, sys_hostfontsize(font), (glist_isselected(x->x_glist, ! &x->x_glist->gl_gobj)? "blue" : "black")); else if (action == SEND_UPDATE) { --- 236,240 ---- outchars, tempbuf, sys_hostfontsize(font), (glist_isselected(x->x_glist, ! &x->x_glist->gl_gobj)? "$::pdtheme::selected" : "$::pdtheme::text")); else if (action == SEND_UPDATE) { *************** *** 372,376 **** t_canvas *canvas = glist_getcanvas(glist); sys_vgui(".x%lx.c itemconfigure %s -fill %s\n", canvas, ! x->x_tag, (state? "blue" : "black")); canvas_editing = canvas; } --- 372,376 ---- t_canvas *canvas = glist_getcanvas(glist); sys_vgui(".x%lx.c itemconfigure %s -fill %s\n", canvas, ! x->x_tag, (state? "$::pdtheme::selected" : "$::pdtheme::text")); canvas_editing = canvas; }