[PD-cvs] pd/src u_object.tk,1.1.2.5,1.1.2.6 g_bang.c,1.1.1.3.2.2.2.4,1.1.1.3.2.2.2.5 g_canvas.c,1.1.1.4.2.7.2.2,1.1.1.4.2.7.2.3 g_editor.c,1.1.1.4.2.3.2.2,1.1.1.4.2.3.2.3 g_graph.c,1.1.1.3.2.3.2.1,1.1.1.3.2.3.2.2 g_hdial.c,1.1.1.4.2.2.2.4,1.1.1.4.2.2.2.5 g_hslider.c,1.1.1.3.2.2.2.4,1.1.1.3.2.2.2.5 g_numbox.c,1.1.1.4.2.2.2.2,1.1.1.4.2.2.2.3 g_text.c,1.1.1.4.2.2.2.2,1.1.1.4.2.2.2.3 g_toggle.c,1.1.1.3.2.2.2.3,1.1.1.3.2.2.2.4 g_vumeter.c,1.1.1.3.2.2.2.2,1.1.1.3.2.2.2.3
matju at users.sourceforge.net
matju at users.sourceforge.net
Mon Mar 8 13:32:42 CET 2004
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2600
Modified Files:
Tag: impd_0_37
u_object.tk g_bang.c g_canvas.c g_editor.c g_graph.c g_hdial.c
g_hslider.c g_numbox.c g_text.c g_toggle.c g_vumeter.c
Log Message:
now passing the x1,y1,width,height to Tcl instead of x1,y1,x2,y2
Index: u_object.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/u_object.tk,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -d -r1.1.2.5 -r1.1.2.6
*** u_object.tk 8 Mar 2004 02:28:00 -0000 1.1.2.5
--- u_object.tk 8 Mar 2004 12:32:38 -0000 1.1.2.6
***************
*** 52,63 ****
set look(iopos) 1
! proc io_draw {canvas tag x1 y1 x2 y2 ins outs} {
global look
! set width [expr $x2 - $x1]
set fx $look(iopos)
set fy $look(iopos)
set nplus [expr $ins == 1 ? 1 : $ins-1]
for {set i 0} {$i<$ins} {incr i} {
! set onset [expr $x1 + ($width - $look(iowidth)) * $i / $nplus]
set points [list [expr $onset+$fx] [expr $y1-$fy] \
[expr $onset-$fx+$look(iowidth)] [expr $y1-$fy+$look(extrapix)]]
--- 52,64 ----
set look(iopos) 1
! proc io_draw {canvas tag x1 y1 xs ys ins outs} {
global look
! set x2 [expr $x1+$xs]
! set y2 [expr $y1+$ys]
set fx $look(iopos)
set fy $look(iopos)
set nplus [expr $ins == 1 ? 1 : $ins-1]
for {set i 0} {$i<$ins} {incr i} {
! set onset [expr $x1 + ($xs - $look(iowidth)) * $i / $nplus]
set points [list [expr $onset+$fx] [expr $y1-$fy] \
[expr $onset-$fx+$look(iowidth)] [expr $y1-$fy+$look(extrapix)]]
***************
*** 70,74 ****
set nplus [expr $outs == 1 ? 1 : $outs-1]
for {set i 0} {$i<$outs} {incr i} {
! set onset [expr $x1 + ($width - $look(iowidth)) * $i / $nplus]
set points [list [expr $onset+$fx] [expr $y2-1+$fy] \
[expr $onset-$fx+$look(iowidth)] [expr $y2+$fy]]
--- 71,75 ----
set nplus [expr $outs == 1 ? 1 : $outs-1]
for {set i 0} {$i<$outs} {incr i} {
! set onset [expr $x1 + ($xs - $look(iowidth)) * $i / $nplus]
set points [list [expr $onset+$fx] [expr $y2-1+$fy] \
[expr $onset-$fx+$look(iowidth)] [expr $y2+$fy]]
***************
*** 86,91 ****
}
! proc objectbox_draw {canvas tag x1 y1 x2 y2 ins outs} {
global look
set xya [list $x1 $y1 $x2 $y2]
set xyb [list [expr $x2-1] [expr $y1+1] [expr $x1+1] [expr $y1+1] [expr $x1+1] [expr $y2-1]]
--- 87,94 ----
}
! proc objectbox_draw {canvas tag x1 y1 xs ys ins outs} {
global look
+ set x2 [expr $x1+$xs]
+ set y2 [expr $y1+$ys]
set xya [list $x1 $y1 $x2 $y2]
set xyb [list [expr $x2-1] [expr $y1+1] [expr $x1+1] [expr $y1+1] [expr $x1+1] [expr $y2-1]]
***************
*** 101,105 ****
eval "$canvas create line $xyc -tag ${tag}++ -fill ${look(objectframe2)}"
}
! io_draw $canvas $tag $x1 $y1 $x2 $y2 $ins $outs
}
--- 104,108 ----
eval "$canvas create line $xyc -tag ${tag}++ -fill ${look(objectframe2)}"
}
! io_draw $canvas $tag $x1 $y1 $xs $ys $ins $outs
}
***************
*** 115,120 ****
}
! proc brokenbox_draw {canvas tag x1 y1 x2 y2 ins outs} {
! objectbox_draw $canvas $tag $x1 $y1 $x2 $y2 $ins $outs
$canvas itemconfigure ${tag}.l -fill #ffcccc
}
--- 118,123 ----
}
! proc brokenbox_draw {canvas tag x1 y1 xs ys ins outs} {
! objectbox_draw $canvas $tag $x1 $y1 $xs $ys $ins $outs
$canvas itemconfigure ${tag}.l -fill #ffcccc
}
***************
*** 123,128 ****
proc brokenbox_erase {canvas tag} {objectbox_erase $canvas $tag}
! proc message_draw {canvas tag x1 y1 x2 y2 ins outs} {
global look
set points [list $x1 $y1 [expr $x2+4] $y1 $x2 [expr $y1+4] $x2 [expr $y2-4] \
[expr $x2+4] $y2 $x1 $y2 $x2 $y2 $x1 $y2]
--- 126,133 ----
proc brokenbox_erase {canvas tag} {objectbox_erase $canvas $tag}
! proc message_draw {canvas tag x1 y1 xs ys ins outs} {
global look
+ set x2 [expr $x1+$xs]
+ set y2 [expr $y1+$ys]
set points [list $x1 $y1 [expr $x2+4] $y1 $x2 [expr $y1+4] $x2 [expr $y2-4] \
[expr $x2+4] $y2 $x1 $y2 $x2 $y2 $x1 $y2]
***************
*** 132,136 ****
eval "$canvas create polygon $points -tag ${tag} -fill $look(objectbg) -outline $look(objectframe3)"
}
! io_draw $canvas $tag $x1 $y1 $x2 $y2 $ins $outs
}
--- 137,141 ----
eval "$canvas create polygon $points -tag ${tag} -fill $look(objectbg) -outline $look(objectframe3)"
}
! io_draw $canvas $tag $x1 $y1 $xs $ys $ins $outs
}
***************
*** 149,154 ****
#proc message_tick {canvas tag} {}
! proc atom_draw {canvas tag x1 y1 x2 y2 ins outs} {
global look
set points [list $x1 $y1 [expr $x2-4] $y1 $x2 [expr $y1+4] $x2 $y2 $x1 $y2]
if {[llength [$canvas gettags $tag]] != 0} {
--- 154,161 ----
#proc message_tick {canvas tag} {}
! proc atom_draw {canvas tag x1 y1 xs ys ins outs} {
global look
+ set x2 [expr $x1+$xs]
+ set y2 [expr $y1+$ys]
set points [list $x1 $y1 [expr $x2-4] $y1 $x2 [expr $y1+4] $x2 $y2 $x1 $y2]
if {[llength [$canvas gettags $tag]] != 0} {
***************
*** 157,161 ****
eval "$canvas create polygon $points -tag ${tag} -fill $look(objectbg) -outline $look(objectframe3)"
}
! io_draw $canvas $tag $x1 $y1 $x2 $y2 $ins $outs
}
--- 164,168 ----
eval "$canvas create polygon $points -tag ${tag} -fill $look(objectbg) -outline $look(objectframe3)"
}
! io_draw $canvas $tag $x1 $y1 $xs $ys $ins $outs
}
***************
*** 171,175 ****
}
! proc comment_draw {canvas tag x1 y1 x2 y2 ins outs} {
if {[llength [$canvas gettags $tag]] != 0} {}
}
--- 178,206 ----
}
! proc numbox_draw {canvas tag x1 y1 xs ys ins outs} {
! global look
! set x2 [expr $x1+$xs]
! set y2 [expr $y1+$ys]
! set points [list $x1 $y1 [expr $x2-4] $y1 $x2 [expr $y1+4] $x2 $y2 $x1 $y2]
! if {[llength [$canvas gettags $tag]] != 0} {
! eval "$canvas coords ${tag} $points"
! } {
! eval "$canvas create polygon $points -tag ${tag} -fill $look(objectbg) -outline $look(objectframe3)"
! }
! io_draw $canvas $tag $x1 $y1 $xs $ys $ins $outs
! }
!
! proc numbox_select {canvas tag flag} {
! global look
! if {$flag} {set colour $look(objectframe4)} {set colour $look(objectframe3)}
! $canvas itemconfigure $tag -outline $colour
! }
!
! proc numbox_erase {canvas tag} {
! $canvas delete $tag
! io_erase $canvas $tag
! }
!
! proc comment_draw {canvas tag x1 y1 xs ys ins outs} {
if {[llength [$canvas gettags $tag]] != 0} {}
}
***************
*** 177,181 ****
proc comment_erase {canvas tag} {}
! proc bluebox_draw {canvas tag x1 y1 x2 y2 ins outs colour} {
set xya [list $x1 $y1 $x2 $y2]
set xyb [list [expr $x2-1] [expr $y1+1] [expr $x1+1] [expr $y1+1] [expr $x1+1] [expr $y2-1]]
--- 208,214 ----
proc comment_erase {canvas tag} {}
! proc bluebox_draw {canvas tag x1 y1 xs ys ins outs colour} {
! set x2 [expr $x1+$xs]
! set y2 [expr $y1+$ys]
set xya [list $x1 $y1 $x2 $y2]
set xyb [list [expr $x2-1] [expr $y1+1] [expr $x1+1] [expr $y1+1] [expr $x1+1] [expr $y2-1]]
***************
*** 191,195 ****
eval "$canvas create line $xyc -tag ${tag}++ -fill [darker $color]"
}
! io_draw $canvas $tag $x1 $y1 $x2 $y2 $ins $outs
}
--- 224,228 ----
eval "$canvas create line $xyc -tag ${tag}++ -fill [darker $color]"
}
! io_draw $canvas $tag $x1 $y1 $xs $ys $ins $outs
}
***************
*** 211,227 ****
}
! proc numbox_draw {canvas tag x1 y1 x2 y2 ins outs color1 color2} {
! atom_draw $canvas $tag $x1 $y1 $x2 $y2 $ins $outs
! }
!
! proc numbox_erase {canvas tag} {
! atom_erase $canvas $tag
! io_erase $canvas $tag
! }
!
! proc radio_draw {canvas tag x1 y1 x2 y2 ins outs orient number colour} {
set isnew [expr [llength [$canvas gettags ${tag}BASE]] == 0]
! bluebox_draw $canvas ${tag}BASE $x1 $y1 $x2 $y2 $ins $outs $colour
! if {$orient} {set size [expr $y2-$y1]} {set size [expr $x2-$x1]}
set size [expr $size/$number]
for {set i 0} {$i<$number} {incr i} {
--- 244,251 ----
}
! proc radio_draw {canvas tag x1 y1 xs ys ins outs orient number colour} {
set isnew [expr [llength [$canvas gettags ${tag}BASE]] == 0]
! bluebox_draw $canvas ${tag}BASE $x1 $y1 $xs $ys $ins $outs $colour
! if {$orient} {set size $ys} {set size $xs}
set size [expr $size/$number]
for {set i 0} {$i<$number} {incr i} {
***************
*** 250,256 ****
}
! proc slider_draw {canvas tag x1 y1 x2 y2 ins outs orient colour} {
set isnew [expr [llength [$canvas gettags ${tag}BASE]] == 0]
! bluebox_draw $canvas ${tag}BASE $x1 $y1 $x2 $y2 $ins $outs $colour
if {$isnew} {
set color [bluify #ffffff]
--- 274,280 ----
}
! proc slider_draw {canvas tag x1 y1 xs ys ins outs orient colour} {
set isnew [expr [llength [$canvas gettags ${tag}BASE]] == 0]
! bluebox_draw $canvas ${tag}BASE $x1 $y1 $xs $ys $ins $outs $colour
if {$isnew} {
set color [bluify #ffffff]
***************
*** 291,298 ****
}
! proc bang_draw {canvas tag x1 y1 x2 y2 ins outs colour label ldx ldy lfont lcolor} {
set isnew [expr [llength [$canvas gettags ${tag}BASE]] == 0]
! bluebox_draw $canvas ${tag}BASE $x1 $y1 $x2 $y2 $ins $outs $colour
! io_draw $canvas $tag $x1 $y1 $x2 $y2 $ins $outs
if {$isnew} {
$canvas create oval \
--- 315,324 ----
}
! proc bang_draw {canvas tag x1 y1 xs ys ins outs colour label ldx ldy lfont lcolor} {
set isnew [expr [llength [$canvas gettags ${tag}BASE]] == 0]
! set x2 [expr $x1+$xs]
! set y2 [expr $y1+$ys]
! bluebox_draw $canvas ${tag}BASE $x1 $y1 $xs $ys $ins $outs $colour
! io_draw $canvas $tag $x1 $y1 $xs $ys $ins $outs
if {$isnew} {
$canvas create oval \
***************
*** 320,331 ****
}
! proc toggle_draw {canvas tag x1 y1 x2 y2 ins outs colour label ldx ldy lfont lcolor} {
set isnew [expr [llength [$canvas gettags ${tag}BASE]] == 0]
! bluebox_draw $canvas ${tag}BASE $x1 $y1 $x2 $y2 $ins $outs $colour
! io_draw $canvas $tag $x1 $y1 $x2 $y2 $ins $outs
set w 1
set on 0
! if {$x2-$x1 >= 30} {set w 2}
! if {$x2-$x1 >= 60} {set w 3}
if {$on} {set fill #ffff00} {set fill [bluify $colour]}
set x3 [expr $x1+$w+2]
--- 346,359 ----
}
! proc toggle_draw {canvas tag x1 y1 xs ys ins outs colour label ldx ldy lfont lcolor} {
! set x2 [expr $x1+$xs]
! set y2 [expr $y1+$ys]
set isnew [expr [llength [$canvas gettags ${tag}BASE]] == 0]
! bluebox_draw $canvas ${tag}BASE $x1 $y1 $xs $ys $ins $outs $colour
! io_draw $canvas $tag $x1 $y1 $xs $ys $ins $outs
set w 1
set on 0
! if {$xs >= 30} {set w 2}
! if {$xs >= 60} {set w 3}
if {$on} {set fill #ffff00} {set fill [bluify $colour]}
set x3 [expr $x1+$w+2]
***************
*** 351,352 ****
--- 379,385 ----
$canvas delete ${tag}BUT ${tag}LABEL
}
+
+ proc vu_draw {canvas tag x1 y1 xs ys ins outs colour label ldx ldy lfont lcolor} {
+ set isnew [expr [llength [$canvas gettags ${tag}BASE]] == 0]
+ bluebox_draw $canvas ${tag}BASE $x1 $y1 $xs $ys $ins $outs $colour
+ }
Index: g_bang.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_bang.c,v
retrieving revision 1.1.1.3.2.2.2.4
retrieving revision 1.1.1.3.2.2.2.5
diff -C2 -d -r1.1.1.3.2.2.2.4 -r1.1.1.3.2.2.2.5
*** g_bang.c 8 Mar 2004 02:28:00 -0000 1.1.1.3.2.2.2.4
--- g_bang.c 8 Mar 2004 12:32:38 -0000 1.1.1.3.2.2.2.5
***************
*** 44,48 ****
int ypos=text_ypix(&x->x_gui.x_obj, glist);
sys_vgui("bang_draw .x%x.c %x %d %d %d %d %d %d #%6.6x {%s} %d %d {%s %d bold} #%6.6x\n",
! canvas, x, xpos, ypos, xpos + x->x_gui.x_w, ypos + x->x_gui.x_h,
!x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able, x->x_gui.x_bcol,
strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"",
--- 44,48 ----
int ypos=text_ypix(&x->x_gui.x_obj, glist);
sys_vgui("bang_draw .x%x.c %x %d %d %d %d %d %d #%6.6x {%s} %d %d {%s %d bold} #%6.6x\n",
! canvas, x, xpos, ypos, x->x_gui.x_w, x->x_gui.x_h,
!x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able, x->x_gui.x_bcol,
strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"",
***************
*** 274,292 ****
int bflcol[]={-262144, -1, -1};
int a=IEM_GUI_DEFAULTSIZE;
- int ldx=0, ldy=-6;
int fs=8;
int ftbreak=IEM_BNG_DEFAULTBREAKFLASHTIME,
fthold= IEM_BNG_DEFAULTHOLDFLASHTIME;
! char str[144];
!
! iem_inttosymargs(&x->x_gui.x_isa, 0);
! iem_inttofstyle(&x->x_gui.x_fsf, 0);
! if (pd_scanargs(argc,argv,"iiiF???iiFiiii",&a,&fthold,&ftbreak,
! &ldx,&ldy,&fs,&bflcol[0],&bflcol[1],&bflcol[2]))
{
! iem_inttosymargs(&x->x_gui.x_isa, atom_getintarg(3, argc, argv));
iemgui_new_getnames(&x->x_gui, 4, argv);
! iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(9, argc, argv));
}
else {
--- 274,293 ----
int bflcol[]={-262144, -1, -1};
int a=IEM_GUI_DEFAULTSIZE;
int fs=8;
int ftbreak=IEM_BNG_DEFAULTBREAKFLASHTIME,
fthold= IEM_BNG_DEFAULTHOLDFLASHTIME;
! int fstyle=0, isa=0;
!
! x->x_gui.x_ldx=0;
! x->x_gui.x_ldy=-6;
! if (pd_scanargs(argc,argv,"iiii???iiiiiii",
! &a,&fthold,&ftbreak,&isa,
! &x->x_gui.x_ldx,&x->x_gui.x_ldy,&fstyle,
! &fs,&bflcol[0],&bflcol[1],&bflcol[2]))
{
! iem_inttosymargs(&x->x_gui.x_isa, isa);
iemgui_new_getnames(&x->x_gui, 4, argv);
! iem_inttofstyle(&x->x_gui.x_fsf, fstyle);
}
else {
***************
*** 295,299 ****
x->x_gui.x_draw = (t_iemfunptr)bng_draw;
-
x->x_gui.x_fsf.x_snd_able = 1;
x->x_gui.x_fsf.x_rcv_able = 1;
--- 296,299 ----
***************
*** 309,317 ****
if (x->x_gui.x_fsf.x_rcv_able)
pd_bind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv);
! x->x_gui.x_ldx = ldx;
! x->x_gui.x_ldy = ldy;
!
! if(fs < 4)
! fs = 4;
x->x_gui.x_fontsize = fs;
x->x_gui.x_w = iemgui_clip_size(a);
--- 309,313 ----
if (x->x_gui.x_fsf.x_rcv_able)
pd_bind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv);
! if(fs < 4) fs = 4;
x->x_gui.x_fontsize = fs;
x->x_gui.x_w = iemgui_clip_size(a);
Index: g_canvas.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_canvas.c,v
retrieving revision 1.1.1.4.2.7.2.2
retrieving revision 1.1.1.4.2.7.2.3
diff -C2 -d -r1.1.1.4.2.7.2.2 -r1.1.1.4.2.7.2.3
*** g_canvas.c 6 Mar 2004 22:19:41 -0000 1.1.1.4.2.7.2.2
--- g_canvas.c 8 Mar 2004 12:32:38 -0000 1.1.1.4.2.7.2.3
***************
*** 457,469 ****
{
float zz;
! zz = y2;
! y2 = y1;
! y1 = zz;
! zz = py2;
! py2 = py1;
! py1 = zz;
}
! if (x1 == x2 || y1 == y2)
! x1 = 0, x2 = 100, y1 = 1, y2 = -1;
if (px1 >= px2 || py1 >= py2)
px1 = 100, py1 = 20, px2 = 100 + GLIST_DEFGRAPHWIDTH,
--- 457,464 ----
{
float zz;
! zz = y2; y2 = y1; y1 = zz;
! zz = py2; py2 = py1; py1 = zz;
}
! if (x1 == x2 || y1 == y2) x1=0, x2=100, y1=1, y2=-1;
if (px1 >= px2 || py1 >= py2)
px1 = 100, py1 = 20, px2 = 100 + GLIST_DEFGRAPHWIDTH,
***************
*** 769,777 ****
t_glist *gl2 = x->gl_owner;
canvas_create_editor(x, 1);
! if (glist_isvisible(gl2))
! gobj_vis(&x->gl_gobj, gl2, 0);
x->gl_havewindow = 0;
! if (glist_isvisible(gl2))
! gobj_vis(&x->gl_gobj, gl2, 1);
}
else x->gl_havewindow = 0;
--- 764,770 ----
t_glist *gl2 = x->gl_owner;
canvas_create_editor(x, 1);
! if (glist_isvisible(gl2)) gobj_vis(&x->gl_gobj, gl2, 0);
x->gl_havewindow = 0;
! if (glist_isvisible(gl2)) gobj_vis(&x->gl_gobj, gl2, 1);
}
else x->gl_havewindow = 0;
Index: g_editor.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_editor.c,v
retrieving revision 1.1.1.4.2.3.2.2
retrieving revision 1.1.1.4.2.3.2.3
diff -C2 -d -r1.1.1.4.2.3.2.2 -r1.1.1.4.2.3.2.3
*** g_editor.c 6 Mar 2004 22:19:41 -0000 1.1.1.4.2.3.2.2
--- g_editor.c 8 Mar 2004 12:32:38 -0000 1.1.1.4.2.3.2.3
***************
*** 848,855 ****
int graphme = (fgraphme != 0), redraw = 0;
yperpix = -yperpix;
! if (xperpix == 0)
! xperpix = 1;
! if (yperpix == 0)
! yperpix = 1;
canvas_setgraph(x, graphme);
if (!x->gl_isgraph && (xperpix != glist_dpixtodx(x, 1)))
--- 848,853 ----
int graphme = (fgraphme != 0), redraw = 0;
yperpix = -yperpix;
! if (xperpix == 0) xperpix = 1;
! if (yperpix == 0) yperpix = 1;
canvas_setgraph(x, graphme);
if (!x->gl_isgraph && (xperpix != glist_dpixtodx(x, 1)))
Index: g_graph.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_graph.c,v
retrieving revision 1.1.1.3.2.3.2.1
retrieving revision 1.1.1.3.2.3.2.2
diff -C2 -d -r1.1.1.3.2.3.2.1 -r1.1.1.3.2.3.2.2
*** g_graph.c 6 Mar 2004 22:19:41 -0000 1.1.1.3.2.3.2.1
--- g_graph.c 8 Mar 2004 12:32:38 -0000 1.1.1.3.2.3.2.2
***************
*** 176,192 ****
else break;
put1:
! if (g9)
! g9->g_next = g1, g9 = g1;
! else g9 = g = g1;
! if (g1 = g1->g_next)
! f1 = gobj_getxforsort(g1);
g9->g_next = 0;
continue;
put2:
! if (g9)
! g9->g_next = g2, g9 = g2;
! else g9 = g = g2;
! if (g2 = g2->g_next)
! f2 = gobj_getxforsort(g2);
g9->g_next = 0;
continue;
--- 176,186 ----
else break;
put1:
! if (g9) g9->g_next = g1, g9 = g1; else g9 = g = g1;
! if (g1 = g1->g_next) f1 = gobj_getxforsort(g1);
g9->g_next = 0;
continue;
put2:
! if (g9) g9->g_next = g2, g9 = g2; else g9 = g = g2;
! if (g2 = g2->g_next) f2 = gobj_getxforsort(g2);
g9->g_next = 0;
continue;
***************
*** 195,200 ****
}
! static t_gobj *glist_dosort(t_glist *x,
! t_gobj *g, int nitems)
{
if (nitems < 2)
--- 189,193 ----
}
! static t_gobj *glist_dosort(t_glist *x, t_gobj *g, int nitems)
{
if (nitems < 2)
Index: g_hdial.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_hdial.c,v
retrieving revision 1.1.1.4.2.2.2.4
retrieving revision 1.1.1.4.2.2.2.5
diff -C2 -d -r1.1.1.4.2.2.2.4 -r1.1.1.4.2.2.2.5
*** g_hdial.c 7 Mar 2004 20:35:05 -0000 1.1.1.4.2.2.2.4
--- g_hdial.c 8 Mar 2004 12:32:38 -0000 1.1.1.4.2.2.2.5
***************
*** 47,51 ****
int y1=text_ypix(&x->x_gui.x_obj, glist), y2=y1+x->x_gui.x_h*(isvert(x)?x->x_number:1);
sys_vgui("radio_draw .x%x.c %x %d %d %d %d %d %d %d %d #%6.6x\n",
! canvas, x, x1, y1, x2, y2,
!x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,
isvert(x),x->x_number,x->x_gui.x_bcol);
--- 47,51 ----
int y1=text_ypix(&x->x_gui.x_obj, glist), y2=y1+x->x_gui.x_h*(isvert(x)?x->x_number:1);
sys_vgui("radio_draw .x%x.c %x %d %d %d %d %d %d %d %d #%6.6x\n",
! canvas, x, x1, y1, x2-x1, y2-y1,
!x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,
isvert(x),x->x_number,x->x_gui.x_bcol);
***************
*** 64,68 ****
int x1=text_xpix(&x->x_gui.x_obj, glist), x2=x1+x->x_gui.x_w*(isvert(x)?1:x->x_number);
int y1=text_ypix(&x->x_gui.x_obj, glist), y2=y1+x->x_gui.x_h*(isvert(x)?x->x_number:1);
! sys_vgui("radio_draw .x%x.c %x %d %d %d %d %d %d %s %d #%6.6x\n",
canvas, x, x1, y1, x2, y2,
!x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,
--- 64,68 ----
int x1=text_xpix(&x->x_gui.x_obj, glist), x2=x1+x->x_gui.x_w*(isvert(x)?1:x->x_number);
int y1=text_ypix(&x->x_gui.x_obj, glist), y2=y1+x->x_gui.x_h*(isvert(x)?x->x_number:1);
! sys_vgui("radio_draw .x%x.c %x %d %d %d %d %d %d %d %d #%6.6x\n",
canvas, x, x1, y1, x2, y2,
!x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,
Index: g_hslider.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_hslider.c,v
retrieving revision 1.1.1.3.2.2.2.4
retrieving revision 1.1.1.3.2.2.2.5
diff -C2 -d -r1.1.1.3.2.2.2.4 -r1.1.1.3.2.2.2.5
*** g_hslider.c 8 Mar 2004 00:44:38 -0000 1.1.1.3.2.2.2.4
--- g_hslider.c 8 Mar 2004 12:32:38 -0000 1.1.1.3.2.2.2.5
***************
*** 50,54 ****
t_canvas *canvas=glist_getcanvas(glist);
sys_vgui("slider_draw .x%x.c %x %d %d %d %d %d %d %d #%6.6x\n",
! canvas, x, xpos, ypos, xpos+x->x_gui.x_w, ypos+x->x_gui.x_h,
!x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,isvert(x),x->x_gui.x_bcol);
sys_vgui("slider_set .x%x.c %x %d %d #%6.6x\n", canvas, x, x->x_val, isvert(x),x->x_gui.x_fcol);
--- 50,54 ----
t_canvas *canvas=glist_getcanvas(glist);
sys_vgui("slider_draw .x%x.c %x %d %d %d %d %d %d %d #%6.6x\n",
! canvas, x, xpos, ypos, x->x_gui.x_w, x->x_gui.x_h,
!x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,isvert(x),x->x_gui.x_bcol);
sys_vgui("slider_set .x%x.c %x %d %d #%6.6x\n", canvas, x, x->x_val, isvert(x),x->x_gui.x_fcol);
Index: g_numbox.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_numbox.c,v
retrieving revision 1.1.1.4.2.2.2.2
retrieving revision 1.1.1.4.2.2.2.3
diff -C2 -d -r1.1.1.4.2.2.2.2 -r1.1.1.4.2.2.2.3
*** g_numbox.c 7 Mar 2004 19:38:13 -0000 1.1.1.4.2.2.2.2
--- g_numbox.c 8 Mar 2004 12:32:38 -0000 1.1.1.4.2.2.2.3
***************
*** 21,30 ****
#endif
- /*------------------ global functions -------------------------*/
-
static void my_numbox_key(void *z, t_floatarg fkey);
-
- /* ------------ nmx gui-my number box ----------------------- */
-
t_widgetbehavior my_numbox_widgetbehavior;
static t_class *my_numbox_class;
--- 21,25 ----
***************
*** 49,56 ****
void my_numbox_clip(t_my_numbox *x)
{
! if(x->x_val < x->x_min)
! x->x_val = x->x_min;
! if(x->x_val > x->x_max)
! x->x_val = x->x_max;
}
--- 44,49 ----
void my_numbox_clip(t_my_numbox *x)
{
! if(x->x_val < x->x_min) x->x_val = x->x_min;
! if(x->x_val > x->x_max) x->x_val = x->x_max;
}
***************
*** 58,67 ****
{
int w, f=31;
!
! if(x->x_gui.x_fsf.x_font_style == 1)
! f = 27;
! else if(x->x_gui.x_fsf.x_font_style == 2)
! f = 25;
!
w = x->x_gui.x_fontsize * f * x->x_gui.x_w;
w /= 36;
--- 51,56 ----
{
int w, f=31;
! if(x->x_gui.x_fsf.x_font_style == 1) f = 27;
! else if(x->x_gui.x_fsf.x_font_style == 2) f = 25;
w = x->x_gui.x_fontsize * f * x->x_gui.x_w;
w /= 36;
***************
*** 115,121 ****
if(x->x_buf[idecimal] == '.')
break;
! if(idecimal > x->x_gui.x_w)
! {
! x->x_buf[0] = (f < 0.0 ? '-' : '+');
x->x_buf[1] = 0;
}
--- 104,108 ----
if(x->x_buf[idecimal] == '.')
break;
! if(idecimal > x->x_gui.x_w) {x->x_buf[0] = (f < 0.0 ? '-' : '+');
x->x_buf[1] = 0;
}
***************
*** 141,146 ****
if(sl >= x->x_gui.x_w)
cp += sl - x->x_gui.x_w + 1;
! sys_vgui(
! ".x%x.c itemconfigure %xNUMBER -fill #%6.6x -text {%s} \n",
glist_getcanvas(glist), x, IEM_GUI_COLOR_EDITED, cp);
x->x_buf[sl] = 0;
--- 128,132 ----
if(sl >= x->x_gui.x_w)
cp += sl - x->x_gui.x_w + 1;
! sys_vgui(".x%x.c itemconfigure %xNUMBER -fill #%6.6x -text {%s} \n",
glist_getcanvas(glist), x, IEM_GUI_COLOR_EDITED, cp);
x->x_buf[sl] = 0;
***************
*** 149,154 ****
{
my_numbox_ftoa(x);
! sys_vgui(
! ".x%x.c itemconfigure %xNUMBER -fill #%6.6x -text {%s} \n",
glist_getcanvas(glist), x, IEM_GUI_COLOR_EDITED, x->x_buf);
x->x_buf[0] = 0;
--- 135,139 ----
{
my_numbox_ftoa(x);
! sys_vgui(".x%x.c itemconfigure %xNUMBER -fill #%6.6x -text {%s} \n",
glist_getcanvas(glist), x, IEM_GUI_COLOR_EDITED, x->x_buf);
x->x_buf[0] = 0;
***************
*** 176,181 ****
t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui("numbox_draw .x%x.c %xBASE %d %d %d %d %d %d #%6.6x #%6.6x\n",
! canvas, x, xpos, ypos, xpos + x->x_numwidth, ypos + x->x_gui.x_h,
!x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,
IEM_GUI_COLOR_NORMAL, x->x_gui.x_bcol);
--- 161,166 ----
t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui("numbox_draw .x%x.c %x %d %d %d %d %d %d\n",
! canvas, x, xpos, ypos, x->x_numwidth, x->x_gui.x_h,
!x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,
IEM_GUI_COLOR_NORMAL, x->x_gui.x_bcol);
***************
*** 715,726 ****
x->x_gui.x_ldx = ldx;
x->x_gui.x_ldy = ldy;
! if(fs < 4)
! fs = 4;
x->x_gui.x_fontsize = fs;
! if(w < 1)
! w = 1;
x->x_gui.x_w = w;
! if(h < 8)
! h = 8;
x->x_gui.x_h = h;
x->x_buf[0] = 0;
--- 700,708 ----
x->x_gui.x_ldx = ldx;
x->x_gui.x_ldy = ldy;
! if(fs < 4) fs = 4;
x->x_gui.x_fontsize = fs;
! if(w < 1) w = 1;
x->x_gui.x_w = w;
! if(h < 8) h = 8;
x->x_gui.x_h = h;
x->x_buf[0] = 0;
Index: g_text.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_text.c,v
retrieving revision 1.1.1.4.2.2.2.2
retrieving revision 1.1.1.4.2.2.2.3
diff -C2 -d -r1.1.1.4.2.2.2.2 -r1.1.1.4.2.2.2.3
*** g_text.c 6 Mar 2004 22:19:41 -0000 1.1.1.4.2.2.2.2
--- g_text.c 8 Mar 2004 12:32:38 -0000 1.1.1.4.2.2.2.3
***************
*** 1091,1095 ****
{
sys_vgui("io_draw .x%x.cBASE %s %d %d %d %d %d %d\n",
! glist_getcanvas(glist), tag, x1, y1, x2, y2,
obj_ninlets(ob), obj_noutlets(ob));
}
--- 1091,1095 ----
{
sys_vgui("io_draw .x%x.cBASE %s %d %d %d %d %d %d\n",
! glist_getcanvas(glist), tag, x1, y1, x2-x1, y2-x1,
obj_ninlets(ob), obj_noutlets(ob));
}
***************
*** 1099,1109 ****
{
t_object *ob;
! int x1, y1, x2, y2, width, height;
text_getrect(&x->te_g, glist, &x1, &y1, &x2, &y2);
- width = x2 - x1;
- height = y2 - y1;
ob = pd_checkobject(&x->te_pd);
sys_vgui("%s_draw .x%x.c %sR %d %d %d %d %d %d\n",
! text_classname(x),glist,tag,x1,y1,x2,y2,
ob?obj_ninlets(ob):0, ob?obj_noutlets(ob):0);
}
--- 1099,1107 ----
{
t_object *ob;
! int x1, y1, x2, y2;
text_getrect(&x->te_g, glist, &x1, &y1, &x2, &y2);
ob = pd_checkobject(&x->te_pd);
sys_vgui("%s_draw .x%x.c %sR %d %d %d %d %d %d\n",
! text_classname(x),glist,tag,x1,y1,x2-x1,y2-y1,
ob?obj_ninlets(ob):0, ob?obj_noutlets(ob):0);
}
Index: g_toggle.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_toggle.c,v
retrieving revision 1.1.1.3.2.2.2.3
retrieving revision 1.1.1.3.2.2.2.4
diff -C2 -d -r1.1.1.3.2.2.2.3 -r1.1.1.3.2.2.2.4
*** g_toggle.c 8 Mar 2004 02:28:00 -0000 1.1.1.3.2.2.2.3
--- g_toggle.c 8 Mar 2004 12:32:38 -0000 1.1.1.3.2.2.2.4
***************
*** 47,51 ****
int ypos=text_ypix(&x->x_gui.x_obj, glist);
sys_vgui("toggle_draw .x%x.c %x %d %d %d %d %d %d #%6.6x {%s} %d %d {%s %d bold} #%6.6x\n",
! canvas, x, xpos, ypos, xpos + x->x_gui.x_w, ypos + x->x_gui.x_h,
!x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able, x->x_gui.x_bcol,
strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"",
--- 47,51 ----
int ypos=text_ypix(&x->x_gui.x_obj, glist);
sys_vgui("toggle_draw .x%x.c %x %d %d %d %d %d %d #%6.6x {%s} %d %d {%s %d bold} #%6.6x\n",
! canvas, x, xpos, ypos, x->x_gui.x_w, x->x_gui.x_h,
!x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able, x->x_gui.x_bcol,
strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"",
***************
*** 214,226 ****
static void toggle_init(t_toggle *x, t_floatarg f)
! {
! x->x_gui.x_isa.x_loadinit = (f==0.0)?0:1;
! }
static void toggle_nonzero(t_toggle *x, t_floatarg f)
! {
! if(f != 0.0)
! x->x_nonzero = f;
! }
static void *toggle_new(t_symbol *s, int argc, t_atom *argv)
--- 214,221 ----
static void toggle_init(t_toggle *x, t_floatarg f)
! {x->x_gui.x_isa.x_loadinit = (f==0.0)?0:1;}
static void toggle_nonzero(t_toggle *x, t_floatarg f)
! {if(f != 0.0) x->x_nonzero = f;}
static void *toggle_new(t_symbol *s, int argc, t_atom *argv)
***************
*** 233,246 ****
float on=0.0, nonzero=1.0;
char str[144];
! iem_inttosymargs(&x->x_gui.x_isa, 0);
! iem_inttofstyle(&x->x_gui.x_fsf, 0);
!
! if(pd_scanargs(argc,argv,"iF???iiFiiiii;?",
! &a,&ldx,&ldy,&fs,&bflcol[0],&bflcol[1],&bflcol[2],&on))
{
! iem_inttosymargs(&x->x_gui.x_isa, atom_getintarg(1, argc, argv));
iemgui_new_getnames(&x->x_gui, 2, argv);
! iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(7, argc, argv));
}
else iemgui_new_getnames(&x->x_gui, 2, 0);
--- 228,239 ----
float on=0.0, nonzero=1.0;
char str[144];
+ int fstyle=0, isa=0;
! if(pd_scanargs(argc,argv,"ii???iiiiiiii;?",
! &a,&isa,&ldx,&ldy,&fstyle,&fs,&bflcol[0],&bflcol[1],&bflcol[2],&on))
{
! iem_inttosymargs(&x->x_gui.x_isa, isa);
iemgui_new_getnames(&x->x_gui, 2, argv);
! iem_inttofstyle(&x->x_gui.x_fsf, fstyle);
}
else iemgui_new_getnames(&x->x_gui, 2, 0);
***************
*** 268,273 ****
x->x_gui.x_ldy = ldy;
! if(fs < 4)
! fs = 4;
x->x_gui.x_fontsize = fs;
x->x_gui.x_w = iemgui_clip_size(a);
--- 261,265 ----
x->x_gui.x_ldy = ldy;
! if(fs < 4) fs = 4;
x->x_gui.x_fontsize = fs;
x->x_gui.x_w = iemgui_clip_size(a);
Index: g_vumeter.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_vumeter.c,v
retrieving revision 1.1.1.3.2.2.2.2
retrieving revision 1.1.1.3.2.2.2.3
diff -C2 -d -r1.1.1.3.2.2.2.2 -r1.1.1.3.2.2.2.3
*** g_vumeter.c 7 Mar 2004 19:38:13 -0000 1.1.1.3.2.2.2.2
--- g_vumeter.c 8 Mar 2004 12:32:38 -0000 1.1.1.3.2.2.2.3
***************
*** 52,61 ****
int ypos=text_ypix(&x->x_gui.x_obj, glist);
! if(x->x_peak)
! {
int i=iemgui_vu_col[x->x_peak];
! int j=ypos + (x->x_led_size+1)*(IEM_VU_STEPS+1-x->x_peak)
! - (x->x_led_size+1)/2;
!
sys_vgui(".x%x.c coords %xPLED %d %d %d %d\n", canvas, x,
xpos, j,
--- 52,58 ----
int ypos=text_ypix(&x->x_gui.x_obj, glist);
! if(x->x_peak) {
int i=iemgui_vu_col[x->x_peak];
! int j=ypos + (x->x_led_size+1)*(IEM_VU_STEPS+1-x->x_peak) - (x->x_led_size+1)/2;
sys_vgui(".x%x.c coords %xPLED %d %d %d %d\n", canvas, x,
xpos, j,
***************
*** 63,71 ****
sys_vgui(".x%x.c itemconfigure %xPLED -fill #%6.6x\n", canvas, x,
iemgui_color_hex[i]);
! }
! else
! {
int mid=xpos+x->x_gui.x_w/2;
-
sys_vgui(".x%x.c itemconfigure %xPLED -fill #%6.6x\n",
canvas, x, x->x_gui.x_bcol);
--- 60,65 ----
sys_vgui(".x%x.c itemconfigure %xPLED -fill #%6.6x\n", canvas, x,
iemgui_color_hex[i]);
! }else{
int mid=xpos+x->x_gui.x_w/2;
sys_vgui(".x%x.c itemconfigure %xPLED -fill #%6.6x\n",
canvas, x, x->x_gui.x_bcol);
***************
*** 127,131 ****
x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_lcol, x);
sys_vgui("io_draw .x%x.c %x %d %d %d %d %d %d\n",
! canvas, x, xpos-1, ypos-2, xpos+x->x_gui.x_w+1, ypos+x->x_gui.x_h+2,
2*!x->x_gui.x_fsf.x_rcv_able, 2*!x->x_gui.x_fsf.x_snd_able);
}
--- 121,125 ----
x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_lcol, x);
sys_vgui("io_draw .x%x.c %x %d %d %d %d %d %d\n",
! canvas, x, xpos-1, ypos-2, x->x_gui.x_w+1, x->x_gui.x_h+2,
2*!x->x_gui.x_fsf.x_rcv_able, 2*!x->x_gui.x_fsf.x_snd_able);
}
***************
*** 511,524 ****
{
int i;
!
! if(rms <= IEM_VU_MINDB)
! x->x_rms = 0;
! else if(rms >= IEM_VU_MAXDB)
! x->x_rms = IEM_VU_STEPS;
! else
! {
! int i = (int)(2.0*(rms + IEM_VU_OFFSET));
! x->x_rms = iemgui_vu_db2i[i];
! }
i = (int)(100.0*rms + 10000.5);
rms = 0.01*(float)(i - 10000);
--- 505,511 ----
{
int i;
! if(rms <= IEM_VU_MINDB) x->x_rms = 0;
! else if(rms >= IEM_VU_MAXDB)x->x_rms = IEM_VU_STEPS;
! else x->x_rms = iemgui_vu_db2i[ (int)(2.0*(rms + IEM_VU_OFFSET)) ];
i = (int)(100.0*rms + 10000.5);
rms = 0.01*(float)(i - 10000);
***************
*** 531,544 ****
{
int i;
!
! if(peak <= IEM_VU_MINDB)
! x->x_peak = 0;
! else if(peak >= IEM_VU_MAXDB)
! x->x_peak = IEM_VU_STEPS;
! else
! {
! int i = (int)(2.0*(peak + IEM_VU_OFFSET));
! x->x_peak = iemgui_vu_db2i[i];
! }
i = (int)(100.0*peak + 10000.5);
peak = 0.01*(float)(i - 10000);
--- 518,524 ----
{
int i;
! if(peak <= IEM_VU_MINDB) x->x_peak = 0;
! else if(peak >= IEM_VU_MAXDB)x->x_peak = IEM_VU_STEPS;
! else x->x_peak = iemgui_vu_db2i[ (int)(2.0*(peak + IEM_VU_OFFSET)) ];
i = (int)(100.0*peak + 10000.5);
peak = 0.01*(float)(i - 10000);
More information about the Pd-cvs
mailing list