Commit 5823c6d6 authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

Merge branch 'master' of git://github.com/pd-l2ork/pd

Conflicts:
	pd/src/g_array.c
parents c68349c4 f96f9d5b
......@@ -812,7 +812,7 @@ void scalehandle_unclick_label(t_scalehandle *h) {
{
iemgui_select((t_gobj *)x, x->x_glist, 1);
canvas_fixlinesfor(x->x_glist, (t_text *)x);
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", x->x_glist);
canvas_getscroll(x->x_glist);
}
}
......@@ -863,7 +863,7 @@ void scalehandle_unclick_scale(t_scalehandle *h) {
iemgui_io_draw_move(x);
iemgui_select((t_gobj *)x, x->x_glist, 1);
canvas_fixlinesfor(x->x_glist, (t_text *)x);
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", x->x_glist);
canvas_getscroll(x->x_glist);
}
void scalehandle_drag_scale(t_scalehandle *h) {
......@@ -1092,7 +1092,7 @@ void scrollbar_update(t_glist *glist) {
//ico@bukvic.net 100518 update scrollbars when object potentially
//exceeds window size
t_canvas *canvas=(t_canvas *)glist_getcanvas(glist);
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", (long unsigned int)canvas);
canvas_getscroll(canvas);
}
void wb_init(t_widgetbehavior *wb, t_getrectfn gr, t_clickfn cl) {
......
......@@ -599,8 +599,7 @@ void glist_arraydialog(t_glist *parent, t_symbol *s, int argc, t_atom *argv)
// sys_queuegui((t_gobj *)gl, glist_getcanvas(gl), graph_redraw);
//fprintf(stderr,"glist_arraydialog done\n");
glist_redraw(gl);
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n",
(long unsigned int)glist_getcanvas(parent));
canvas_getscroll(glist_getcanvas(parent));
canvas_dirty(parent, 1);
}
......
......@@ -770,6 +770,7 @@ void *qt_thread_main (void *);
/* ---------- other things added by Mathieu (aug.2014) ----------------- */
void canvas_raise_all_cords (t_canvas *x);
void canvas_getscroll (t_canvas *x);
/* --------------------------------------------------------------------- */
......
This diff is collapsed.
......@@ -1423,7 +1423,7 @@ static void graph_delete(t_gobj *z, t_glist *glist)
glist_delete(x, y);
}
if (glist_istoplevel(glist) && glist_isvisible(glist))
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", glist);
canvas_getscroll(glist);
}
static t_float graph_lastxpix, graph_lastypix;
......
......@@ -554,8 +554,7 @@ void rtext_key(t_rtext *x, int keynum, t_symbol *keysym)
{
u8_dec(x->x_buf, &x->x_selstart);
if (glist_isvisible(glist_getcanvas(x->x_glist)))
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n",
(t_int)glist_getcanvas(x->x_glist));
canvas_getscroll(glist_getcanvas(x->x_glist));
}
}
......@@ -564,8 +563,7 @@ void rtext_key(t_rtext *x, int keynum, t_symbol *keysym)
if (x->x_selend < x->x_bufsize && (x->x_selstart == x->x_selend))
u8_inc(x->x_buf, &x->x_selend);
if (glist_isvisible(glist_getcanvas(x->x_glist)))
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n",
(t_int)glist_getcanvas(x->x_glist));
canvas_getscroll(glist_getcanvas(x->x_glist));
}
ndel = x->x_selend - x->x_selstart;
......@@ -594,8 +592,7 @@ be printable in whatever 8-bit character set we find ourselves. */
x->x_bufsize = newsize;
x->x_selstart = x->x_selstart + 1;
if (glist_isvisible(glist_getcanvas(x->x_glist)))
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n",
(t_int)glist_getcanvas(x->x_glist));
canvas_getscroll(glist_getcanvas(x->x_glist));
}
/*--moo: check for unicode codepoints beyond 7-bit ASCII --*/
else if (n > 127)
......
......@@ -581,7 +581,7 @@ static void scalar_displace_withtag(t_gobj *z, t_glist *glist, int dx, int dy)
SETFLOAT(&at[2], (t_float)dy);
template_notify(template, gensym("displace"), 2, at);
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", glist);
canvas_getscroll(glist);
/* Apparently this is no longer needed, so it is commented out. But if
we merge garrays back into this code we may need it... */
......@@ -776,7 +776,7 @@ static void scalar_doredraw(t_gobj *client, t_glist *glist)
sys_vgui("pdtk_select_all_gop_widgets .x%lx %lx %d\n",
glist_getcanvas(glist), glist, 1);
}
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", glist_getcanvas(glist));
canvas_getscroll(glist_getcanvas(glist));
}
void scalar_redraw(t_scalar *x, t_glist *glist)
......
......@@ -1733,7 +1733,7 @@ void svg_doupdate(t_svg *x, t_canvas *c, t_symbol *s)
/* uncache the scalar's bbox */
((t_scalar *)g)->sc_bboxcache = 0;
/* only get the scroll if we had to redraw the bbox */
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", visible);
canvas_getscroll(visible);
if (glist_isselected(c, &((t_scalar *)g)->sc_gobj))
{
scalar_drawselectrect((t_scalar *)g, c, 0);
......
......@@ -237,7 +237,7 @@ static void canvas_objtext(t_glist *gl, int xpix, int ypix,
}*/
if ( glist_isvisible( ((t_canvas *)gl) ) )
{
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", glist_getcanvas(gl));
canvas_getscroll(glist_getcanvas(gl));
}
}
......@@ -286,7 +286,7 @@ void canvas_howputnew(t_canvas *x, int *connectp, int *xpixp, int *ypixp,
indx = nobj-1;
}
x->gl_editor->e_onmotion = MA_NONE;
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", x);
canvas_getscroll(x);
}
else
{
......@@ -599,7 +599,7 @@ static void message_set(t_message *x, t_symbol *s, int argc, t_atom *argv)
binbuf_add(x->m_text.te_binbuf, argc, argv);
glist_retext(x->m_glist, &x->m_text);
if (glist_isvisible(glist_getcanvas(x->m_glist)))
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", (t_int)x->m_glist);
canvas_getscroll(x->m_glist);
}
static void message_add2(t_message *x, t_symbol *s, int argc, t_atom *argv)
......@@ -607,7 +607,7 @@ static void message_add2(t_message *x, t_symbol *s, int argc, t_atom *argv)
binbuf_add(x->m_text.te_binbuf, argc, argv);
glist_retext(x->m_glist, &x->m_text);
if (glist_isvisible(glist_getcanvas(x->m_glist)))
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", (t_int)x->m_glist);
canvas_getscroll(x->m_glist);
}
static void message_add(t_message *x, t_symbol *s, int argc, t_atom *argv)
......@@ -616,7 +616,7 @@ static void message_add(t_message *x, t_symbol *s, int argc, t_atom *argv)
binbuf_addsemi(x->m_text.te_binbuf);
glist_retext(x->m_glist, &x->m_text);
if (glist_isvisible(glist_getcanvas(x->m_glist)))
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", (t_int)x->m_glist);
canvas_getscroll(x->m_glist);
}
static void message_addcomma(t_message *x)
......@@ -626,14 +626,14 @@ static void message_addcomma(t_message *x)
binbuf_add(x->m_text.te_binbuf, 1, &a);
glist_retext(x->m_glist, &x->m_text);
if (glist_isvisible(glist_getcanvas(x->m_glist)))
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", (t_int)x->m_glist);
canvas_getscroll(x->m_glist);
}
static void message_addsemi(t_message *x)
{
message_add(x, 0, 0, 0);
if (glist_isvisible(glist_getcanvas(x->m_glist)))
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", (t_int)x->m_glist);
canvas_getscroll(x->m_glist);
}
static void message_adddollar(t_message *x, t_floatarg f)
......@@ -646,7 +646,7 @@ static void message_adddollar(t_message *x, t_floatarg f)
binbuf_add(x->m_text.te_binbuf, 1, &a);
glist_retext(x->m_glist, &x->m_text);
if (glist_isvisible(glist_getcanvas(x->m_glist)))
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", (t_int)x->m_glist);
canvas_getscroll(x->m_glist);
}
static void message_adddollsym(t_message *x, t_symbol *s)
......@@ -660,7 +660,7 @@ static void message_adddollsym(t_message *x, t_symbol *s)
binbuf_add(x->m_text.te_binbuf, 1, &a);
glist_retext(x->m_glist, &x->m_text);
if (glist_isvisible(glist_getcanvas(x->m_glist)))
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", (t_int)x->m_glist);
canvas_getscroll(x->m_glist);
}
static void message_click(t_message *x,
......@@ -1099,8 +1099,7 @@ static void gatom_param(t_gatom *x, t_symbol *sel, int argc, t_atom *argv)
gobj_vis(&x->a_text.te_g, x->a_glist, 1);
gobj_select(&x->a_text.te_g, x->a_glist, 1);
canvas_dirty(x->a_glist, 1);
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", (t_int)x->a_glist);
canvas_getscroll(x->a_glist);
/* glist_retext(x->a_glist, &x->a_text); */
}
......@@ -2079,7 +2078,7 @@ void text_drawborder(t_text *x, t_glist *glist,
//ico@bukvic.net 100518 update scrollbars when GOP
//potentially exceeds window size
//sys_vgui("pdtk_canvas_getscroll .x%lx.c\n",
//canvas_getscroll(
// (long unsigned int)glist_getcanvas(glist));
}
......@@ -2174,7 +2173,7 @@ void text_drawborder_withtag(t_text *x, t_glist *glist,
//ico@bukvic.net 100518 update scrollbars when GOP
//potentially exceeds window size
//sys_vgui("pdtk_canvas_getscroll .x%lx.c\n",
//canvas_getscroll(
// (long unsigned int)glist_getcanvas(glist));
}
......
......@@ -93,7 +93,7 @@ void canvas_undo_undo(t_canvas *x)
{
sys_vgui("pdtk_undomenu .x%lx %s %s\n",
x, undo_action, redo_action);
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", x);
canvas_getscroll(x);
}
canvas_dirty(x, 1);
}
......@@ -137,7 +137,7 @@ void canvas_undo_redo(t_canvas *x)
{
sys_vgui("pdtk_undomenu .x%lx %s %s\n",
x, undo_action, redo_action);
sys_vgui("pdtk_canvas_getscroll .x%lx.c\n", x);
canvas_getscroll(x);
}
canvas_dirty(x, 1);
}
......
......@@ -8077,32 +8077,26 @@ if { [info tclversion] >= 8.5 && $pd_nt == 0 } {
proc pdtk_canvas_enteritem_gettags {tkcanvas x y item} {
#puts stderr "gettags $tkcanvas $x $y $item"
variable nlet_color
variable select_color
if {[winfo exists $tkcanvas]} {
set mytoplevel [winfo toplevel $tkcanvas]
#set id [$tkcanvas find withtag current]
set tags [$tkcanvas gettags $item]
set xletno -1
set object text
if { [string match *o* $item] } { set object outlet }
if { [string match *i* $item] } { set object inlet }
foreach tag $tags {
if { ![regexp "\.x.*\.t.*\[io\](\[0-9\]+)$" $tag -- xletno] } {
# iemgui tag
regexp ".*OUT(\[0-9\]+)$" $tag -- xletno
regexp ".*IN(\[0-9\]+)$" $tag -- xletno
if {[regexp "(\[io\])(\[0-9\]+)$" $tag -- type xletno] } {
if {$type=="i"} {set object inlet}
if {$type=="o"} {set object outlet}
break
}
}
#puts stderr "gettags $tags $xletno [$tkcanvas canvasx $x] [$tkcanvas canvasy $y]"
#puts stderr "gettags $tags $object $xletno [$tkcanvas canvasx $x] [$tkcanvas canvasy $y]"
if { $xletno == -1 && $object ne "text" } { return }
if { $object ne "text" } {
set nlet_color [$tkcanvas itemcget [lindex $tags 0] -stroke]
} else {
set nlet_color $::pd_colors(selection)
}
pd [concat $mytoplevel enter $object \
$x $y $xletno \;]
pd [concat $mytoplevel enter $object $x $y $xletno \;]
}
}
......@@ -8197,7 +8191,6 @@ proc pdtk_tip_delete {w} {
proc pdtk_tip {w fromc show args} {
#puts stderr "$w $fromc $show $args"
variable select_color
variable nlet_color
variable tooltip_visible
global pd_fontlist
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment