Commit 69eabadd authored by Ivica Ico Bukvic's avatar Ivica Ico Bukvic
Browse files

further improved tooltip detection and reintroduced canvas tips that appear...

further improved tooltip detection and reintroduced canvas tips that appear either in the bottom-left or top-left corners
parent 70fc008f
......@@ -49,6 +49,7 @@ static int last_inlet_filter = 0;
static int last_outlet_filter = 0;
static int copyfromexternalbuffer = 0;
static int tooltips = 0;
static int objtooltip = 0;
static int screenx1; /* screen coordinates when doing copyfromexternalbuffer */
static int screeny1;
static int screenx2;
......@@ -2454,6 +2455,12 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
bug("editor");
return;
}
/* remove stale tooltips, if any */
if (objtooltip) {
objtooltip = 0;
sys_vgui("pdtk_canvas_leaveitem .x%x.c;\n", x);
}
shiftmod = (mod & SHIFTMOD);
runmode = ((mod & CTRLMOD) || (!x->gl_edit));
......@@ -2516,7 +2523,7 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
/* if not a runmode left click, fall here. */
if (y = canvas_findhitbox(x, xpos, ypos, &x1, &y1, &x2, &y2))
{
t_object *ob = pd_checkobject(&y->g_pd);
t_object *ob;
/* check you're in the rectangle */
ob = pd_checkobject(&y->g_pd);
if (rightclick)
......@@ -2565,6 +2572,7 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
{
if (doit)
{
int issignal = obj_issignaloutlet(ob, closest);
x->gl_editor->e_onmotion = MA_CONNECT;
x->gl_editor->e_xwas = xpos;
......@@ -2577,7 +2585,7 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
else
// jsarlo
{
t_rtext *y = glist_findrtext(x, (t_text *)&ob->ob_g);
t_rtext *yr = glist_findrtext(x, (t_text *)&ob->ob_g);
if (canvas_cnct_outlet_tag[0] != 0)
{
......@@ -2586,12 +2594,12 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
(last_outlet_filter ? "black" : (outlet_issignal ? "$signal_cord" : "$msg_cord")),
(outlet_issignal ? "$signal_nlet" : "$msg_nlet"));
}
if (y)
if (yr)
{
last_outlet_filter = gobj_filter_highlight_behavior(y);
last_outlet_filter = gobj_filter_highlight_behavior(yr);
sprintf(canvas_cnct_outlet_tag,
"%so%d",
rtext_gettag(y),
rtext_gettag(yr),
closest);
sys_vgui(".x%x.c itemconfigure %s -outline $select_nlet_color -width $highlight_width\n",
x,
......@@ -2601,7 +2609,10 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
x,
canvas_cnct_outlet_tag);
outlet_issignal = obj_issignaloutlet(ob,closest);
//sys_vgui("pdtk_canvas_enteritem .x%x.c %d %d %s 0\n;", x, xpos, ypos, canvas_cnct_outlet_tag);
if (tooltips) {
objtooltip = 1;
sys_vgui("pdtk_canvas_enteritem .x%x.c %d %d %s -1\n;", x, xpos, ypos, canvas_cnct_outlet_tag);
}
}
// jsarlo
if(x->gl_magic_glass) {
......@@ -2627,7 +2638,7 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
if (closest < ninlet &&
xpos >= (hotspot-1) && xpos <= hotspot + (IOWIDTH+1))
{
t_rtext *y = glist_findrtext(x, (t_text *)&ob->ob_g);
t_rtext *yr = glist_findrtext(x, (t_text *)&ob->ob_g);
if (canvas_cnct_inlet_tag[0] != 0)
{
......@@ -2637,12 +2648,12 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
(inlet_issignal ? "$signal_nlet" : "$msg_nlet"));
}
if (y)
if (yr)
{
last_inlet_filter = gobj_filter_highlight_behavior(y);
last_inlet_filter = gobj_filter_highlight_behavior(yr);
sprintf(canvas_cnct_inlet_tag,
"%si%d",
rtext_gettag(y),
rtext_gettag(yr),
closest);
sys_vgui(".x%x.c itemconfigure %s -width $highlight_width\n",
x,
......@@ -2652,7 +2663,10 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
x,
canvas_cnct_inlet_tag);
inlet_issignal = obj_issignalinlet(ob,closest);
//sys_vgui("pdtk_canvas_enteritem .x%x.c %d %d %s 0\n;", x, xpos, ypos, canvas_cnct_outlet_tag);
if (tooltips) {
objtooltip = 1;
sys_vgui("pdtk_canvas_enteritem .x%x.c %d %d %s -1\n;", x, xpos, ypos, canvas_cnct_inlet_tag);
}
}
}
}
......@@ -2661,7 +2675,7 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
{
t_rtext *rt;
/* check if the box is being text edited */
nooutletafterall:
nooutletafterall:
if (ob && (rt = x->gl_editor->e_textedfor) &&
rt == glist_findrtext(x, ob))
{
......@@ -2689,7 +2703,8 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
//sys_vgui("pdtk_update_xy_tooltip .x%lx %d %d\n", x, (int)xpos, (int)ypos);
//sys_vgui("pdtk_toggle_xy_tooltip .x%lx %d\n", x, 1);
x->gl_editor->e_onmotion = MA_MOVE;
sys_vgui("pdtk_tip .x%x.c 0 0\n;", x);
if (tooltips)
sys_vgui("pdtk_tip .x%x.c 0 0\n;", x);
}
}
else
......@@ -2701,6 +2716,11 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
x, canvas_cnct_inlet_tag,
(last_inlet_filter ? "black" : (inlet_issignal ? "$signal_cord" : "$msg_cord")),
(inlet_issignal ? "$signal_nlet" : "$msg_nlet"));
if (objtooltip) {
objtooltip = 0;
sys_vgui("pdtk_canvas_leaveitem .x%x.c;\n", x);
}
canvas_cnct_inlet_tag[0] = 0;
}
if (canvas_cnct_outlet_tag[0] != 0)
......@@ -2709,6 +2729,10 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
x, canvas_cnct_outlet_tag,
(last_outlet_filter ? "black" : (outlet_issignal ? "$signal_cord" : "$msg_cord")),
(outlet_issignal ? "$signal_nlet" : "$msg_nlet"));
if (objtooltip) {
objtooltip = 0;
sys_vgui("pdtk_canvas_leaveitem .x%x.c;\n", x);
}
canvas_cnct_outlet_tag[0] = 0;
}
......@@ -2717,6 +2741,13 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
magicGlass_hide(x->gl_magic_glass);
}
canvas_setcursor(x, CURSOR_EDITMODE_NOTHING);
/* now check for tooltips object tooltips */
if (tooltips) {
t_rtext *yr = glist_findrtext(x, (t_text *)&ob->ob_g);
objtooltip = 1;
sys_vgui("pdtk_canvas_enteritem .x%x.c %d %d %s -1;\n", x, xpos, ypos, rtext_gettag(yr));
}
}
// end jsarlo
}
......@@ -2786,6 +2817,10 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
x, canvas_cnct_inlet_tag,
(last_inlet_filter ? "black" : (outlet_issignal ? "$signal_cord" : "$msg_cord")),
(inlet_issignal ? "$signal_nlet" : "$msg_nlet"));
if (objtooltip) {
objtooltip = 0;
sys_vgui("pdtk_canvas_leaveitem .x%x.c;\n", x);
}
canvas_cnct_inlet_tag[0] = 0;
}
if (canvas_cnct_outlet_tag[0] != 0)
......@@ -2794,6 +2829,10 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
x, canvas_cnct_outlet_tag,
(last_outlet_filter ? "black" : (outlet_issignal ? "$signal_cord" : "$msg_cord")),
(outlet_issignal ? "$signal_nlet" : "$msg_nlet"));
if (objtooltip) {
objtooltip = 0;
sys_vgui("pdtk_canvas_leaveitem .x%x.c;\n", x);
}
canvas_cnct_outlet_tag[0] = 0;
}
// end jsarlo
......@@ -2807,6 +2846,10 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
x, canvas_cnct_inlet_tag,
(last_inlet_filter ? "black" : (outlet_issignal ? "$signal_cord" : "$msg_cord")),
(inlet_issignal ? "$signal_nlet" : "$msg_nlet"));
if (objtooltip) {
objtooltip = 0;
sys_vgui("pdtk_canvas_leaveitem .x%x.c;\n", x);
}
canvas_cnct_inlet_tag[0] = 0;
}
// jsarlo
......@@ -2816,6 +2859,10 @@ void canvas_doclick(t_canvas *x, int xpos, int ypos, int which,
x, canvas_cnct_outlet_tag,
(last_outlet_filter ? "black" : (outlet_issignal ? "$signal_cord" : "$msg_cord")),
(outlet_issignal ? "$signal_nlet" : "$msg_nlet"));
if (objtooltip) {
objtooltip = 0;
sys_vgui("pdtk_canvas_leaveitem .x%x.c;\n", x);
}
canvas_cnct_outlet_tag[0] = 0;
}
if(x->gl_magic_glass) {
......@@ -2960,6 +3007,10 @@ void canvas_doconnect(t_canvas *x, int xpos, int ypos, int which, int doit)
x, canvas_cnct_inlet_tag,
(last_inlet_filter ? "black" : (obj_issignaloutlet(ob1, closest1) ? "$signal_cord" : "$msg_cord")),
(inlet_issignal ? "$signal_nlet" : "$msg_nlet"));
if (objtooltip) {
objtooltip = 0;
sys_vgui("pdtk_canvas_leaveitem .x%x.c;\n", x);
}
canvas_cnct_inlet_tag[0] = 0;
}
if (canvas_cnct_outlet_tag[0] != 0)
......@@ -2968,6 +3019,10 @@ void canvas_doconnect(t_canvas *x, int xpos, int ypos, int which, int doit)
x, canvas_cnct_outlet_tag,
(last_outlet_filter ? "black" : (outlet_issignal ? "$signal_cord" : "$msg_cord")),
(outlet_issignal ? "$signal_nlet" : "$msg_nlet"));
if (objtooltip) {
objtooltip = 0;
sys_vgui("pdtk_canvas_leaveitem .x%x.c;\n", x);
}
canvas_cnct_outlet_tag[0] = 0;
}
// end jsarlo
......@@ -3006,7 +3061,11 @@ void canvas_doconnect(t_canvas *x, int xpos, int ypos, int which, int doit)
x,
canvas_cnct_inlet_tag);
inlet_issignal = obj_issignalinlet(ob2, closest2);
sys_vgui("pdtk_canvas_enteritem .x%x.c %d %d %s -1\n;", x, xpos, ypos, canvas_cnct_outlet_tag);
if (tooltips) {
objtooltip = 1;
sys_vgui("pdtk_canvas_enteritem .x%x.c %d %d %s -1;\n",
x, xpos, ypos, canvas_cnct_inlet_tag);
}
}
canvas_setcursor(x, CURSOR_EDITMODE_CONNECT);
}
......@@ -3021,7 +3080,10 @@ void canvas_doconnect(t_canvas *x, int xpos, int ypos, int which, int doit)
x, canvas_cnct_inlet_tag,
(last_inlet_filter ? "black" : (outlet_issignal ? "$signal_cord" : "$msg_cord")),
(inlet_issignal ? "$signal_nlet" : "$msg_nlet"));
sys_vgui("pdtk_canvas_leaveitem .x%x.c %s\n;", x, canvas_cnct_outlet_tag);
if (objtooltip) {
objtooltip = 0;
sys_vgui("pdtk_canvas_leaveitem .x%x.c;\n", x);
}
canvas_cnct_inlet_tag[0] = 0;
}
if(x->gl_magic_glass) {
......@@ -4694,6 +4756,10 @@ void canvas_tooltips(t_canvas *x, t_floatarg fyesplease)
}
else {
tooltips = 0;
if (objtooltip) {
objtooltip = 0;
sys_vgui("pdtk_canvas_leaveitem .x%x.c;\n", x);
}
}
sys_vgui("pdtk_canvas_tooltips .x%lx %d\n",
x, tooltips);
......
......@@ -2536,12 +2536,12 @@ proc pdtk_canvas_new {name width height geometry editable} {
# canvas bindings ---------------------------------------------------------
# just for tooltips right now
$name.c bind inlet <Enter> "pdtk_canvas_enteritem %W %x %y inlet %#"
$name.c bind outlet <Enter> "pdtk_canvas_enteritem %W %x %y outlet %#"
$name.c bind text <Enter> "pdtk_canvas_enteritem %W %x %y text %#"
$name.c bind inlet <Leave> "pdtk_canvas_leaveitem %W inlet"
$name.c bind outlet <Leave> "pdtk_canvas_leaveitem %W outlet"
$name.c bind text <Leave> "pdtk_canvas_leaveitem %W text"
#$name.c bind inlet <Enter> "pdtk_canvas_enteritem %W %x %y inlet %#"
#$name.c bind outlet <Enter> "pdtk_canvas_enteritem %W %x %y outlet %#"
#$name.c bind text <Enter> "pdtk_canvas_enteritem %W %x %y text %#"
#$name.c bind inlet <Leave> "pdtk_canvas_leaveitem %W inlet 0"
#$name.c bind outlet <Leave> "pdtk_canvas_leaveitem %W outlet 0"
#$name.c bind text <Leave> "pdtk_canvas_leaveitem %W text 0"
if {$pd_nt == 2} {
bind $name.c <Option-Motion> {pdtk_canvas_motion %W %x %y 4}
......@@ -7190,7 +7190,8 @@ if { [info tclversion] >= 8.5 && $pd_nt == 0 } {
}
}
################# Autotips ######################
proc pdtk_canvas_enteritem_gettags {tkcanvas x y item} {
#puts stderr "gettags $tkcanvas $x $y $item"
variable nlet_color
......@@ -7198,7 +7199,7 @@ proc pdtk_canvas_enteritem_gettags {tkcanvas x y item} {
if {[winfo exists $tkcanvas]} {
set mytoplevel [winfo toplevel $tkcanvas]
set id [$tkcanvas find withtag current]
set tags [$tkcanvas gettags $id]
set tags [$tkcanvas gettags $item]
set xletno -1
set object text
if { [string match *o* $item] } { set object outlet }
......@@ -7210,7 +7211,8 @@ proc pdtk_canvas_enteritem_gettags {tkcanvas x y item} {
regexp ".*IN(\[0-9\]+)$" $tag -- xletno
}
}
#puts stderr "gettags $tags $xletno"
if { $xletno == -1 && $object ne "text" } { return }
if { $object ne "text" } {
set nlet_color [$tkcanvas itemcget [lindex $tags 0] -outline]
} else {
......@@ -7230,11 +7232,6 @@ proc pdtk_canvas_enteritem {tkcanvas x y item enterid} {
variable autotips
if {$autotips == 0} {return}
if {$enterid != $duplicate_tags || $enterid == -1} {
#if {$item eq "inlet" ||
# $item eq "outlet"} {
# $tkcanvas itemconfigure $item -activewidth 5
#}
set duplicate_tags $enterid
if {$current_window eq $tkcanvas} {
after cancel $afterid
......@@ -7247,7 +7244,7 @@ proc pdtk_canvas_enteritem {tkcanvas x y item enterid} {
}
# move activewidth to toggle on editmode?
proc pdtk_canvas_leaveitem {w item} {
proc pdtk_canvas_leaveitem {w} {
variable afterid
variable current_window
variable duplicate_tags
......@@ -7256,10 +7253,7 @@ proc pdtk_canvas_leaveitem {w item} {
after cancel $afterid
set afterid 0
if {[lsearch -exact [$w gettags $w.tipwindow] "sticky"] == -1} {
#if {$item eq "inlet" ||
#$item eq "outlet"} {
# $w itemconfigure $item -activewidth 0
#}
#puts stderr "pdtk_canvas_leaveitem $w"
if {[winfo exists $w.tiplabel]} {
set afterid [after 50 "pdtk_tip $w 0 0"]
#pdtk_tip $w 0 0
......@@ -7269,6 +7263,61 @@ proc pdtk_canvas_leaveitem {w item} {
set duplicate_tags -1;
}
proc pdtk_tip {w fromc show args} {
set exists [winfo exists $w.tiplabel]
if {$show == 0} {
catch {destroy $w.tiplabel}
catch {$w delete $w.tipwindow}
} else {
if {$exists} {
$w.tiplabel configure -text [join $args]
$w dtag $w.tipwindow "sticky"
if {$fromc == 1} {
$w addtag "sticky" withtag $w.tipwindow
}
} else {
label $w.tiplabel -text [join $args] -bd 1 \
-wraplength [winfo width $w] -bg "#c4dcdc" -bd 1 \
-padx 2 -pady 2 -relief raised
}
set yreal [expr [$w canvasy 0] * -1 + \
[winfo pointery $w]-[winfo rooty $w]]
set yoffset 0
if {$yreal < [expr [winfo height $w] - \
[winfo reqheight $w.tiplabel]] - 5} {
set yoffset [winfo height $w]
set anchor "sw"
} else {
set anchor "nw"
}
set x [$w canvasx 0]
set y [expr [$w canvasy 0] + $yoffset]
set tags $w.tipwindow
if {$fromc == 1} {
lappend tags "sticky"
}
if {$exists} {
$w coords $w.tipwindow $x $y
$w itemconfigure $w.tipwindow -anchor $anchor
} else {
$w create window $x $y -window $w.tiplabel -anchor $anchor \
-tags $tags
$w bind $w.tipwindow <Enter> "pdtk_tip_mouseover $w"
}
}
}
proc pdtk_tip {w fromc show args} {
variable select_color
variable nlet_color
......@@ -7313,72 +7362,92 @@ proc pdtk_tip {w fromc show args} {
-wraplength [winfo width $w] -bg $nlet_color -fg $fg -bd 1 \
-padx 2 -pady 2 -relief flat -font $typeface
}
set xreal [expr [$w canvasx 0] + [winfo pointerx $w]-[winfo rootx $w]]
set yreal [expr [$w canvasy 0] + [winfo pointery $w]-[winfo rooty $w]]
# first figure out default behavior for above/below
if { [string match "\{Inlet*" $args] } {
set yoffset 0
set anchor "nw"
set top_bottom [expr -30 - [winfo reqheight $w.tiplabel]]
set yreal_offset -5
} else {
set yoffset [winfo height $w]
set anchor "sw"
set top_bottom [expr 30 + [winfo reqheight $w.tiplabel]]
set yreal_offset 5
}
set x [expr $xreal + rand()*10]
set y [expr $yreal + $top_bottom]
# now check if there is enough room to do the default above/below (if not redo behavior)
if { $top_bottom < 0 && $y < [expr [$w canvasy 0] + $yoffset] } {
set yoffset [winfo height $w]
set anchor "sw"
set top_bottom [expr 30 + [winfo reqheight $w.tiplabel]]
set yreal_offset 5
}
if { $top_bottom > 0 && $y > [expr [$w canvasy 0] + $yoffset] } {
set yoffset 0
set anchor "nw"
set top_bottom [expr -30 - [winfo reqheight $w.tiplabel]]
set yreal_offset -5
}
set x [expr $xreal + rand()*10]
set y [expr $yreal + $top_bottom]
# if we still cannot fit things, let's now stick them as close to the side we selected last
if { $top_bottom < 0 && $y < [expr [$w canvasy 0] + $yoffset] } { set y [expr [$w canvasy 0] + $yoffset] }
if { $top_bottom > 0 && $y > [expr [$w canvasy 0] + $yoffset] } { set y [expr [$w canvasy 0] + $yoffset] }
if {$fromc == 1} {
set yreal [expr [$w canvasy 0] * -1 + \
[winfo pointery $w]-[winfo rooty $w]]
set yoffset 0
if {$yreal < [expr [winfo height $w] - \
[winfo reqheight $w.tiplabel]] - 5} {
set yoffset [winfo height $w]
set anchor "sw"
} else {
set anchor "nw"
}
set x [$w canvasx 0]
set y [expr [$w canvasy 0] + $yoffset]
} else {
set xreal [expr [$w canvasx 0] + [winfo pointerx $w]-[winfo rootx $w]]
set yreal [expr [$w canvasy 0] + [winfo pointery $w]-[winfo rooty $w]]
# first figure out default behavior for above/below
if { [string match "\{Inlet*" $args] } {
set yoffset 0
set anchor "nw"
set top_bottom [expr -25 - [winfo reqheight $w.tiplabel]]
set yreal_offset -5
set xreal_offset 0
} else {
set yoffset [winfo height $w]
set anchor "sw"
set top_bottom [expr 35 + [winfo reqheight $w.tiplabel]]
set yreal_offset 15
set xreal_offset 5
}
set x [expr $xreal + rand()*10]
set y [expr $yreal + $top_bottom]
# now check if there is enough room to do the default above/below (if not redo behavior)
if { $top_bottom < 0 && $y < [expr [$w canvasy 0] + $yoffset] } {
set yoffset [winfo height $w]
set anchor "sw"
set top_bottom [expr 35 + [winfo reqheight $w.tiplabel]]
set yreal_offset 15
set xreal_offset 5
}
if { $top_bottom > 0 && $y > [expr [$w canvasy 0] + $yoffset] } {
set yoffset 0
set anchor "nw"
set top_bottom [expr -25 - [winfo reqheight $w.tiplabel]]
set yreal_offset -5
set xreal_offset 0
}
set x [expr $xreal + rand()*10]
set y [expr $yreal + $top_bottom]
# if we still cannot fit things, let's now stick them as close to the side we selected last
if { $top_bottom < 0 && $y < [expr [$w canvasy 0] + $yoffset] } { set y [expr [$w canvasy 0] + $yoffset] }
if { $top_bottom > 0 && $y > [expr [$w canvasy 0] + $yoffset] } { set y [expr [$w canvasy 0] + $yoffset] }
# now check the width
set right 0
set xarrow [expr $x + 5]
# now check the width
set right 0
set xarrow [expr $x + 5]
if { [expr $x + [winfo reqwidth $w.tiplabel]] > [expr [$w canvasx 0] + [winfo reqwidth $w]] } {
set tmp1 [expr $x - (($x + [winfo reqwidth $w.tiplabel]) - ([$w canvasx 0] + [winfo reqwidth $w]))]
set x $tmp1
set right 1
}
if { $x < [$w canvasx 0] } {
set x [$w canvasx 0]
}
if { [expr $x + [winfo reqwidth $w.tiplabel]] > [expr [$w canvasx 0] + [winfo reqwidth $w]] } {
set tmp1 [expr $x - (($x + [winfo reqwidth $w.tiplabel]) - ([$w canvasx 0] + [winfo reqwidth $w]))]
set x $tmp1
set right 1
}
if { $x < [$w canvasx 0] } {
set x [$w canvasx 0]
}
#now do the arrow
if { $right } {
if { $xarrow > [expr [$w canvasx 0] + [winfo reqwidth $w]] } {
set xarrow [expr [$w canvasx 0] + [winfo reqwidth $w] - 12]
#now do the arrow
if { $right } {
if { $xarrow > [expr [$w canvasx 0] + [winfo reqwidth $w]] } {
set xarrow [expr [$w canvasx 0] + [winfo reqwidth $w] - 12]
}
}
}
if { $top_bottom < 0 } {
set yarrow [expr $y + [winfo reqheight $w.tiplabel] - 1]
} else {
set yarrow [expr $y - [winfo reqheight $w.tiplabel] + 1]
}
if { $top_bottom < 0 } {
set yarrow [expr $y + [winfo reqheight $w.tiplabel] - 1]
} else {
set yarrow [expr $y - [winfo reqheight $w.tiplabel] + 1]
}
$w create polygon 0 0 0 0 0 0 -fill $nlet_color -width 4 -tags tiparrow
$w coords tiparrow $xreal [expr $yreal+$yreal_offset] $xarrow $yarrow [expr $xarrow+7] $yarrow
$w create polygon 0 0 0 0 0 0 -fill $nlet_color -width 4 -tags tiparrow
$w coords tiparrow [expr $xreal+$xreal_offset] [expr $yreal+$yreal_offset] $xarrow $yarrow [expr $xarrow+7] $yarrow
}
set tags $w.tipwindow
if {$fromc == 1} {
......
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