Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
nerrons
purr-data
Commits
dbf7f7a2
Commit
dbf7f7a2
authored
Aug 24, 2013
by
Ivica Bukvic
Browse files
updated tags to enable accelerated repositioning (and avoid potentially cpu-costly redraws)
parent
96f511e1
Changes
13
Hide whitespace changes
Inline
Side-by-side
pd/src/g_bang.c
View file @
dbf7f7a2
...
...
@@ -72,31 +72,31 @@ void bng_draw_new(t_bng *x, t_glist *glist)
else
nlet_tag
=
"bogus"
;
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -tags {%lxBASE %lxBNG text}
\n
"
,
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -tags {%lxBASE %lxBNG
%lx
text}
\n
"
,
canvas
,
xpos
,
ypos
,
xpos
+
x
->
x_gui
.
x_w
,
ypos
+
x
->
x_gui
.
x_h
,
x
->
x_gui
.
x_bcol
,
x
,
x
);
sys_vgui
(
".x%lx.c create oval %d %d %d %d -fill #%6.6x -tags {%lxBUT %lxBNG text}
\n
"
,
x
->
x_gui
.
x_bcol
,
x
,
x
,
x
);
sys_vgui
(
".x%lx.c create oval %d %d %d %d -fill #%6.6x -tags {%lxBUT %lxBNG
%lx
text}
\n
"
,
canvas
,
xpos
+
1
,
ypos
+
1
,
xpos
+
x
->
x_gui
.
x_w
-
1
,
ypos
+
x
->
x_gui
.
x_h
-
1
,
x
->
x_flashed
?
x
->
x_gui
.
x_fcol
:
x
->
x_gui
.
x_bcol
,
x
,
x
);
x
->
x_flashed
?
x
->
x_gui
.
x_fcol
:
x
->
x_gui
.
x_bcol
,
x
,
x
,
x
);
sys_vgui
(
".x%lx.c create text %d %d -text {%s} -anchor w \
-font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxBNG text}
\n
"
,
-font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxBNG
%lx
text}
\n
"
,
canvas
,
xpos
+
x
->
x_gui
.
x_ldx
,
ypos
+
x
->
x_gui
.
x_ldy
,
strcmp
(
x
->
x_gui
.
x_lab
->
s_name
,
"empty"
)
?
x
->
x_gui
.
x_lab
->
s_name
:
""
,
x
->
x_gui
.
x_font
,
x
->
x_gui
.
x_fontsize
,
sys_fontweight
,
x
->
x_gui
.
x_lcol
,
x
,
x
);
x
->
x_gui
.
x_lcol
,
x
,
x
,
x
);
if
(
!
x
->
x_gui
.
x_fsf
.
x_snd_able
&&
canvas
==
x
->
x_gui
.
x_glist
)
{
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxBNG%so%d %so%d %lxBNG outlet}
\n
"
,
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxBNG%so%d %so%d %lxBNG
%lx
outlet}
\n
"
,
canvas
,
xpos
,
ypos
+
x
->
x_gui
.
x_h
-
1
,
xpos
+
IOWIDTH
,
ypos
+
x
->
x_gui
.
x_h
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
);
ypos
+
x
->
x_gui
.
x_h
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
,
x
);
}
if
(
!
x
->
x_gui
.
x_fsf
.
x_rcv_able
&&
canvas
==
x
->
x_gui
.
x_glist
)
{
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxBNG%si%d %si%d %lxBNG inlet}
\n
"
,
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxBNG%si%d %si%d %lxBNG
%lx
inlet}
\n
"
,
canvas
,
xpos
,
ypos
,
xpos
+
IOWIDTH
,
ypos
+
1
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
);
xpos
+
IOWIDTH
,
ypos
+
1
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
,
x
);
}
//}
}
...
...
@@ -221,16 +221,16 @@ void bng_draw_io(t_bng* x, t_glist* glist, int old_snd_rcv_flags)
else
nlet_tag
=
"bogus"
;
if
((
old_snd_rcv_flags
&
IEM_GUI_OLD_SND_FLAG
)
&&
!
x
->
x_gui
.
x_fsf
.
x_snd_able
)
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxBNG%so%d %so%d %lxBNG outlet}
\n
"
,
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxBNG%so%d %so%d %lxBNG
%lx
outlet}
\n
"
,
canvas
,
xpos
,
ypos
+
x
->
x_gui
.
x_h
-
1
,
xpos
+
IOWIDTH
,
ypos
+
x
->
x_gui
.
x_h
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
);
ypos
+
x
->
x_gui
.
x_h
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
,
x
);
if
(
!
(
old_snd_rcv_flags
&
IEM_GUI_OLD_SND_FLAG
)
&&
x
->
x_gui
.
x_fsf
.
x_snd_able
)
sys_vgui
(
".x%lx.c delete %lxBNG%so%d
\n
"
,
canvas
,
x
,
nlet_tag
,
0
);
if
((
old_snd_rcv_flags
&
IEM_GUI_OLD_RCV_FLAG
)
&&
!
x
->
x_gui
.
x_fsf
.
x_rcv_able
)
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxBNG%si%d %si%d %lxBNG inlet}
\n
"
,
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxBNG%si%d %si%d %lxBNG
%lx
inlet}
\n
"
,
canvas
,
xpos
,
ypos
,
xpos
+
IOWIDTH
,
ypos
+
1
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
);
xpos
+
IOWIDTH
,
ypos
+
1
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
,
x
);
if
(
!
(
old_snd_rcv_flags
&
IEM_GUI_OLD_RCV_FLAG
)
&&
x
->
x_gui
.
x_fsf
.
x_rcv_able
)
sys_vgui
(
".x%lx.c delete %lxBNG%si%d
\n
"
,
canvas
,
x
,
nlet_tag
,
0
);
}
...
...
@@ -261,11 +261,11 @@ void bng_draw_select(t_bng* x, t_glist* glist)
sys_vgui
(
"canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor bottom_right_corner
\n
"
,
sh
->
h_pathname
,
SCALEHANDLE_WIDTH
,
SCALEHANDLE_HEIGHT
);
sys_vgui
(
".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxBNG}
\n
"
,
sys_vgui
(
".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxBNG
%lx
}
\n
"
,
canvas
,
x
->
x_gui
.
x_obj
.
te_xpix
+
x
->
x_gui
.
x_w
-
SCALEHANDLE_WIDTH
-
1
,
x
->
x_gui
.
x_obj
.
te_ypix
+
x
->
x_gui
.
x_h
-
SCALEHANDLE_HEIGHT
-
1
,
SCALEHANDLE_WIDTH
,
SCALEHANDLE_HEIGHT
,
sh
->
h_pathname
,
x
,
x
);
sh
->
h_pathname
,
x
,
x
,
x
);
sys_vgui
(
"bind %s <Button> {pd [concat %s _click 1 %%x %%y
\\
;]}
\n
"
,
sh
->
h_pathname
,
sh
->
h_bindsym
->
s_name
);
sys_vgui
(
"bind %s <ButtonRelease> {pd [concat %s _click 0 0 0
\\
;]}
\n
"
,
...
...
@@ -283,11 +283,11 @@ void bng_draw_select(t_bng* x, t_glist* glist)
sys_vgui
(
"canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair
\n
"
,
lh
->
h_pathname
,
LABELHANDLE_WIDTH
,
LABELHANDLE_HEIGHT
);
sys_vgui
(
".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxBNG}
\n
"
,
sys_vgui
(
".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxBNG
%lx
}
\n
"
,
canvas
,
x
->
x_gui
.
x_obj
.
te_xpix
+
x
->
x_gui
.
x_ldx
-
LABELHANDLE_WIDTH
,
x
->
x_gui
.
x_obj
.
te_ypix
+
x
->
x_gui
.
x_ldy
-
LABELHANDLE_HEIGHT
,
LABELHANDLE_WIDTH
,
LABELHANDLE_HEIGHT
,
lh
->
h_pathname
,
x
,
x
,
x
);
lh
->
h_pathname
,
x
,
x
,
x
,
x
);
sys_vgui
(
"bind %s <Button> {pd [concat %s _click 1 %%x %%y
\\
;]}
\n
"
,
lh
->
h_pathname
,
lh
->
h_bindsym
->
s_name
);
sys_vgui
(
"bind %s <ButtonRelease> {pd [concat %s _click 0 0 0
\\
;]}
\n
"
,
...
...
pd/src/g_editor.c
View file @
dbf7f7a2
...
...
@@ -1418,8 +1418,8 @@ void canvas_undo_arrange(t_canvas *x, void *z, int action)
}
// and finally redraw canvas
canvas_redraw
(
x
);
/
*
some day when the object tagging is properly done for all GUI objects
//
canvas_redraw(x);
/
/
some day when the object tagging is properly done for all GUI objects
t_object
*
ob
=
NULL
;
t_rtext
*
yr
=
NULL
;
if
(
prev
)
{
...
...
@@ -1441,7 +1441,7 @@ void canvas_undo_arrange(t_canvas *x, void *z, int action)
// fall back to legacy redraw for objects that are not patchable
//fprintf(stderr,"lower fallback redraw\n");
canvas_redraw
(
x
);
}*/
}
//
*/
glob_preset_node_list_check_loc_and_update
();
}
...
...
@@ -1463,8 +1463,8 @@ void canvas_undo_arrange(t_canvas *x, void *z, int action)
y
->
g_next
=
next
;
// and finally redraw canvas
canvas_redraw
(
x
);
/
*
some day when the object tagging is properly done for all GUI objects
//
canvas_redraw(x);
/
/
some day when the object tagging is properly done for all GUI objects
t_object
*
ob
=
NULL
;
t_rtext
*
yr
=
NULL
;
if
(
prev
)
{
...
...
@@ -1485,7 +1485,7 @@ void canvas_undo_arrange(t_canvas *x, void *z, int action)
// fall back to legacy redraw for objects that are not patchable
//fprintf(stderr,"raise fallback redraw\n");
canvas_redraw
(
x
);
}*/
}
//
*/
glob_preset_node_list_check_loc_and_update
();
}
...
...
@@ -1665,10 +1665,10 @@ void canvas_undo_canvas_apply(t_canvas *x, void *z, int action)
t_canvas
*
canvas
=
(
t_canvas
*
)
glist_getcanvas
(
x
);
//if gop is being disabled go one level up
if
(
!
x
->
gl_isgraph
&&
x
->
gl_owner
)
{
/*
if (!x->gl_isgraph && x->gl_owner) {
canvas=canvas->gl_owner;
canvas_redraw(canvas);
}
}
*/
//if properties window is open, update the properties with the previous window properties
/*t_int properties = gfxstub_haveproperties((void *)x);
...
...
@@ -4143,6 +4143,11 @@ static void canvas_displaceselection(t_canvas *x, int dx, int dy)
if
(
x
->
gl_editor
->
e_selection
)
canvas_dirty
(
x
,
1
);
}
// if we have old_displace, legacy displaced objects won't conform
// to proper ordering of objects as they have been redrawn on top
// of everything else rather than where they were supposed to be
// (e.g. possibly in the middle or at the bottom)
if
(
old_displace
)
canvas_redraw
(
x
);
old_displace
=
0
;
}
...
...
pd/src/g_graph.c
View file @
dbf7f7a2
...
...
@@ -817,10 +817,10 @@ static void graph_vis(t_gobj *gr, t_glist *parent_glist, int vis)
if
(
vis
&&
gobj_shouldvis
(
gr
,
parent_glist
))
{
sys_vgui
(
".x%lx.c create polygon\
%d %d %d %d %d %d %d %d %d %d -tags %sfill -fill $graph_outline
\n
"
,
%d %d %d %d %d %d %d %d %d %d -tags
{
%sfill
%s}
-fill $graph_outline
\n
"
,
glist_getcanvas
(
x
->
gl_owner
),
//parent_glist,
x1
,
y1
,
x1
,
y2
,
x2
,
y2
,
x2
,
y1
,
x1
,
y1
,
tag
);
x1
,
y1
,
x1
,
y2
,
x2
,
y2
,
x2
,
y1
,
x1
,
y1
,
tag
,
tag
);
}
else
if
(
gobj_shouldvis
(
gr
,
parent_glist
))
{
...
...
@@ -840,9 +840,9 @@ static void graph_vis(t_gobj *gr, t_glist *parent_glist, int vis)
t_garray
*
ga
;
/* draw a rectangle around the graph */
sys_vgui
(
".x%lx.c create line\
%d %d %d %d %d %d %d %d %d %d -fill $graph_outline -tags %sR
\n
"
,
%d %d %d %d %d %d %d %d %d %d -fill $graph_outline -tags
{
%sR
%s}
\n
"
,
glist_getcanvas
(
x
->
gl_owner
),
x1
,
y1
,
x1
,
y2
,
x2
,
y2
,
x2
,
y1
,
x1
,
y1
,
tag
);
x1
,
y1
,
x1
,
y2
,
x2
,
y2
,
x2
,
y1
,
x1
,
y1
,
tag
,
tag
);
/* if there's just one "garray" in the graph, write its name
along the top */
...
...
pd/src/g_hdial.c
View file @
dbf7f7a2
...
...
@@ -86,30 +86,30 @@ void hradio_draw_new(t_hradio *x, t_glist *glist)
for
(
i
=
0
;
i
<
n
;
i
++
)
{
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -tags {%lxBASE%d %lxHRDO text}
\n
"
,
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -tags {%lxBASE%d %lxHRDO
%lx
text}
\n
"
,
canvas
,
xx11
,
yy11
,
xx11
+
dx
,
yy12
,
x
->
x_gui
.
x_bcol
,
x
,
i
,
x
);
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -outline #%6.6x -tags {%lxBUT%d %lxHRDO text}
\n
"
,
x
->
x_gui
.
x_bcol
,
x
,
i
,
x
,
x
);
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -outline #%6.6x -tags {%lxBUT%d %lxHRDO
%lx
text}
\n
"
,
canvas
,
xx21
,
yy21
,
xx22
,
yy22
,
(
x
->
x_on
==
i
)
?
x
->
x_gui
.
x_fcol
:
x
->
x_gui
.
x_bcol
,
(
x
->
x_on
==
i
)
?
x
->
x_gui
.
x_fcol
:
x
->
x_gui
.
x_bcol
,
x
,
i
,
x
);
(
x
->
x_on
==
i
)
?
x
->
x_gui
.
x_fcol
:
x
->
x_gui
.
x_bcol
,
x
,
i
,
x
,
x
);
xx11
+=
dx
;
xx21
+=
dx
;
xx22
+=
dx
;
x
->
x_drawn
=
x
->
x_on
;
}
sys_vgui
(
".x%lx.c create text %d %d -text {%s} -anchor w \
-font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxHRDO text}
\n
"
,
-font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxHRDO
%lx
text}
\n
"
,
canvas
,
xx11b
+
x
->
x_gui
.
x_ldx
,
yy11
+
x
->
x_gui
.
x_ldy
,
strcmp
(
x
->
x_gui
.
x_lab
->
s_name
,
"empty"
)
?
x
->
x_gui
.
x_lab
->
s_name
:
""
,
x
->
x_gui
.
x_font
,
x
->
x_gui
.
x_fontsize
,
sys_fontweight
,
x
->
x_gui
.
x_lcol
,
x
,
x
);
x
->
x_gui
.
x_lcol
,
x
,
x
,
x
);
if
(
!
x
->
x_gui
.
x_fsf
.
x_snd_able
&&
canvas
==
x
->
x_gui
.
x_glist
)
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxHRDO%so%d %so%d %lxHRDO outlet}
\n
"
,
canvas
,
xx11b
,
yy12
-
1
,
xx11b
+
IOWIDTH
,
yy12
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
);
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxHRDO%so%d %so%d %lxHRDO
%lx
outlet}
\n
"
,
canvas
,
xx11b
,
yy12
-
1
,
xx11b
+
IOWIDTH
,
yy12
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
,
x
);
if
(
!
x
->
x_gui
.
x_fsf
.
x_rcv_able
&&
canvas
==
x
->
x_gui
.
x_glist
)
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxHRDO%si%d %si%d %lxHRDO inlet}
\n
"
,
canvas
,
xx11b
,
yy11
,
xx11b
+
IOWIDTH
,
yy11
+
1
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
);
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxHRDO%si%d %si%d %lxHRDO
%lx
inlet}
\n
"
,
canvas
,
xx11b
,
yy11
,
xx11b
+
IOWIDTH
,
yy11
+
1
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
,
x
);
//}
}
...
...
@@ -249,18 +249,18 @@ void hradio_draw_io(t_hradio* x, t_glist* glist, int old_snd_rcv_flags)
else
nlet_tag
=
"bogus"
;
if
((
old_snd_rcv_flags
&
IEM_GUI_OLD_SND_FLAG
)
&&
!
x
->
x_gui
.
x_fsf
.
x_snd_able
)
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxHRDO%so%d %so%d %lxHRDO outlet}
\n
"
,
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxHRDO%so%d %so%d %lxHRDO
%lx
outlet}
\n
"
,
canvas
,
xpos
,
ypos
+
x
->
x_gui
.
x_w
-
1
,
xpos
+
IOWIDTH
,
ypos
+
x
->
x_gui
.
x_w
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
);
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
,
x
);
if
(
!
(
old_snd_rcv_flags
&
IEM_GUI_OLD_SND_FLAG
)
&&
x
->
x_gui
.
x_fsf
.
x_snd_able
)
sys_vgui
(
".x%lx.c delete %lxHRDO%so%d
\n
"
,
canvas
,
x
,
nlet_tag
,
0
);
if
((
old_snd_rcv_flags
&
IEM_GUI_OLD_RCV_FLAG
)
&&
!
x
->
x_gui
.
x_fsf
.
x_rcv_able
)
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxHRDO%si%d %si%d %lxHRDO inlet}
\n
"
,
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxHRDO%si%d %si%d %lxHRDO
%lx
inlet}
\n
"
,
canvas
,
xpos
,
ypos
,
xpos
+
IOWIDTH
,
ypos
+
1
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
);
xpos
+
IOWIDTH
,
ypos
+
1
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
,
x
);
if
(
!
(
old_snd_rcv_flags
&
IEM_GUI_OLD_RCV_FLAG
)
&&
x
->
x_gui
.
x_fsf
.
x_rcv_able
)
sys_vgui
(
".x%lx.c delete %lxHRDO%si%d
\n
"
,
canvas
,
x
,
nlet_tag
,
0
);
}
...
...
@@ -294,11 +294,11 @@ void hradio_draw_select(t_hradio* x, t_glist* glist)
sys_vgui
(
"canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor bottom_right_corner
\n
"
,
sh
->
h_pathname
,
SCALEHANDLE_WIDTH
,
SCALEHANDLE_HEIGHT
);
sys_vgui
(
".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxHRDO}
\n
"
,
sys_vgui
(
".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxHRDO
%lx
}
\n
"
,
canvas
,
x
->
x_gui
.
x_obj
.
te_xpix
+
x
->
x_gui
.
x_w
*
x
->
x_number
-
SCALEHANDLE_WIDTH
-
1
,
x
->
x_gui
.
x_obj
.
te_ypix
+
x
->
x_gui
.
x_h
-
SCALEHANDLE_HEIGHT
-
1
,
SCALEHANDLE_WIDTH
,
SCALEHANDLE_HEIGHT
,
sh
->
h_pathname
,
x
,
x
);
sh
->
h_pathname
,
x
,
x
,
x
);
sys_vgui
(
"bind %s <Button> {pd [concat %s _click 1 %%x %%y
\\
;]}
\n
"
,
sh
->
h_pathname
,
sh
->
h_bindsym
->
s_name
);
sys_vgui
(
"bind %s <ButtonRelease> {pd [concat %s _click 0 0 0
\\
;]}
\n
"
,
...
...
@@ -315,11 +315,11 @@ void hradio_draw_select(t_hradio* x, t_glist* glist)
sys_vgui
(
"canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair
\n
"
,
lh
->
h_pathname
,
LABELHANDLE_WIDTH
,
LABELHANDLE_HEIGHT
);
sys_vgui
(
".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxHRDO}
\n
"
,
sys_vgui
(
".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxHRDO
%lx
}
\n
"
,
canvas
,
x
->
x_gui
.
x_obj
.
te_xpix
+
x
->
x_gui
.
x_ldx
-
LABELHANDLE_WIDTH
,
x
->
x_gui
.
x_obj
.
te_ypix
+
x
->
x_gui
.
x_ldy
-
LABELHANDLE_HEIGHT
,
LABELHANDLE_WIDTH
,
LABELHANDLE_HEIGHT
,
lh
->
h_pathname
,
x
,
x
,
x
);
lh
->
h_pathname
,
x
,
x
,
x
,
x
);
sys_vgui
(
"bind %s <Button> {pd [concat %s _click 1 %%x %%y
\\
;]}
\n
"
,
lh
->
h_pathname
,
lh
->
h_bindsym
->
s_name
);
sys_vgui
(
"bind %s <ButtonRelease> {pd [concat %s _click 0 0 0
\\
;]}
\n
"
,
...
...
pd/src/g_hslider.c
View file @
dbf7f7a2
...
...
@@ -96,28 +96,28 @@ static void hslider_draw_new(t_hslider *x, t_glist *glist)
if
(
yyyy
)
nlet_tag
=
rtext_gettag
(
yyyy
);
else
nlet_tag
=
"bogus"
;
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -tags {%lxBASE %lxHSLDR text}
\n
"
,
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -tags {%lxBASE %lxHSLDR
%lx
text}
\n
"
,
canvas
,
xpos
,
ypos
,
xpos
+
x
->
x_gui
.
x_w
+
5
,
ypos
+
x
->
x_gui
.
x_h
,
x
->
x_gui
.
x_bcol
,
x
,
x
);
sys_vgui
(
".x%lx.c create line %d %d %d %d -width 3 -fill #%6.6x -tags {%lxKNOB %lxHSLDR text}
\n
"
,
x
->
x_gui
.
x_bcol
,
x
,
x
,
x
);
sys_vgui
(
".x%lx.c create line %d %d %d %d -width 3 -fill #%6.6x -tags {%lxKNOB %lxHSLDR
%lx
text}
\n
"
,
canvas
,
r
,
ypos
+
2
,
r
,
ypos
+
x
->
x_gui
.
x_h
-
1
,
x
->
x_gui
.
x_fcol
,
x
,
x
);
ypos
+
x
->
x_gui
.
x_h
-
1
,
x
->
x_gui
.
x_fcol
,
x
,
x
,
x
);
sys_vgui
(
".x%lx.c create text %d %d -text {%s} -anchor w \
-font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxHSLDR text}
\n
"
,
-font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxHSLDR
%lx
text}
\n
"
,
canvas
,
xpos
+
x
->
x_gui
.
x_ldx
,
ypos
+
x
->
x_gui
.
x_ldy
,
strcmp
(
x
->
x_gui
.
x_lab
->
s_name
,
"empty"
)
?
x
->
x_gui
.
x_lab
->
s_name
:
""
,
x
->
x_gui
.
x_font
,
x
->
x_gui
.
x_fontsize
,
sys_fontweight
,
x
->
x_gui
.
x_lcol
,
x
,
x
);
x
->
x_gui
.
x_lcol
,
x
,
x
,
x
);
if
(
!
x
->
x_gui
.
x_fsf
.
x_snd_able
&&
canvas
==
x
->
x_gui
.
x_glist
)
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxHSLDR%so%d %so%d %lxHSLDR outlet}
\n
"
,
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxHSLDR%so%d %so%d %lxHSLDR
%lx
outlet}
\n
"
,
canvas
,
xpos
,
ypos
+
x
->
x_gui
.
x_h
-
1
,
xpos
+
7
,
ypos
+
x
->
x_gui
.
x_h
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
);
xpos
+
7
,
ypos
+
x
->
x_gui
.
x_h
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
,
x
);
if
(
!
x
->
x_gui
.
x_fsf
.
x_rcv_able
&&
canvas
==
x
->
x_gui
.
x_glist
)
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxHSLDR%si%d %si%d %lxHSLDR inlet}
\n
"
,
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxHSLDR%si%d %si%d %lxHSLDR
%lx
inlet}
\n
"
,
canvas
,
xpos
,
ypos
,
xpos
+
7
,
ypos
+
1
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
);
xpos
+
7
,
ypos
+
1
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
,
x
);
//}
}
...
...
@@ -242,15 +242,15 @@ static void hslider_draw_io(t_hslider* x,t_glist* glist, int old_snd_rcv_flags)
else
nlet_tag
=
"bogus"
;
if
((
old_snd_rcv_flags
&
IEM_GUI_OLD_SND_FLAG
)
&&
!
x
->
x_gui
.
x_fsf
.
x_snd_able
)
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxHSLDR%so%d %so%d %lxHSLDR outlet}
\n
"
,
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxHSLDR%so%d %so%d %lxHSLDR
%lx
outlet}
\n
"
,
canvas
,
xpos
,
ypos
+
x
->
x_gui
.
x_h
-
1
,
xpos
+
7
,
ypos
+
x
->
x_gui
.
x_h
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
);
xpos
+
7
,
ypos
+
x
->
x_gui
.
x_h
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
,
x
);
if
(
!
(
old_snd_rcv_flags
&
IEM_GUI_OLD_SND_FLAG
)
&&
x
->
x_gui
.
x_fsf
.
x_snd_able
)
sys_vgui
(
".x%lx.c delete %lxHSLDR%so%d
\n
"
,
canvas
,
x
,
nlet_tag
,
0
);
if
((
old_snd_rcv_flags
&
IEM_GUI_OLD_RCV_FLAG
)
&&
!
x
->
x_gui
.
x_fsf
.
x_rcv_able
)
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxHSLDR%si%d %si%d %lxHSLDR inlet}
\n
"
,
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxHSLDR%si%d %si%d %lxHSLDR
%lx
inlet}
\n
"
,
canvas
,
xpos
,
ypos
,
xpos
+
7
,
ypos
+
1
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
);
xpos
+
7
,
ypos
+
1
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
,
x
);
if
(
!
(
old_snd_rcv_flags
&
IEM_GUI_OLD_RCV_FLAG
)
&&
x
->
x_gui
.
x_fsf
.
x_rcv_able
)
sys_vgui
(
".x%lx.c delete %lxHSLDR%si%d
\n
"
,
canvas
,
x
,
nlet_tag
,
0
);
}
...
...
@@ -280,11 +280,11 @@ static void hslider_draw_select(t_hslider* x,t_glist* glist)
sys_vgui
(
"canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor bottom_right_corner
\n
"
,
sh
->
h_pathname
,
SCALEHANDLE_WIDTH
,
SCALEHANDLE_HEIGHT
);
sys_vgui
(
".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxHSLDR}
\n
"
,
sys_vgui
(
".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxHSLDR
%lx
}
\n
"
,
canvas
,
x
->
x_gui
.
x_obj
.
te_xpix
+
x
->
x_gui
.
x_w
+
5
-
SCALEHANDLE_WIDTH
-
1
,
x
->
x_gui
.
x_obj
.
te_ypix
+
x
->
x_gui
.
x_h
-
SCALEHANDLE_HEIGHT
-
1
,
SCALEHANDLE_WIDTH
,
SCALEHANDLE_HEIGHT
,
sh
->
h_pathname
,
x
,
x
);
sh
->
h_pathname
,
x
,
x
,
x
);
sys_vgui
(
"bind %s <Button> {pd [concat %s _click 1 %%x %%y
\\
;]}
\n
"
,
sh
->
h_pathname
,
sh
->
h_bindsym
->
s_name
);
sys_vgui
(
"bind %s <ButtonRelease> {pd [concat %s _click 0 0 0
\\
;]}
\n
"
,
...
...
@@ -302,11 +302,11 @@ static void hslider_draw_select(t_hslider* x,t_glist* glist)
sys_vgui
(
"canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair
\n
"
,
lh
->
h_pathname
,
LABELHANDLE_WIDTH
,
LABELHANDLE_HEIGHT
);
sys_vgui
(
".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxHSLDR}
\n
"
,
sys_vgui
(
".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxHSLDR
%lx
}
\n
"
,
canvas
,
x
->
x_gui
.
x_obj
.
te_xpix
+
x
->
x_gui
.
x_ldx
-
LABELHANDLE_WIDTH
,
x
->
x_gui
.
x_obj
.
te_ypix
+
x
->
x_gui
.
x_ldy
-
LABELHANDLE_HEIGHT
,
LABELHANDLE_WIDTH
,
LABELHANDLE_HEIGHT
,
lh
->
h_pathname
,
x
,
x
,
x
);
lh
->
h_pathname
,
x
,
x
,
x
,
x
);
sys_vgui
(
"bind %s <Button> {pd [concat %s _click 1 %%x %%y
\\
;]}
\n
"
,
lh
->
h_pathname
,
lh
->
h_bindsym
->
s_name
);
sys_vgui
(
"bind %s <ButtonRelease> {pd [concat %s _click 0 0 0
\\
;]}
\n
"
,
...
...
pd/src/g_mycanvas.c
View file @
dbf7f7a2
...
...
@@ -49,20 +49,20 @@ void my_canvas_draw_new(t_my_canvas *x, t_glist *glist)
//if (glist_isvisible(glist)) {
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -outline #%6.6x -tags {%lxRECT %lxMYCNV text}
\n
"
,
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -outline #%6.6x -tags {%lxRECT %lxMYCNV
%lx
text}
\n
"
,
canvas
,
xpos
,
ypos
,
xpos
+
x
->
x_vis_w
,
ypos
+
x
->
x_vis_h
,
x
->
x_gui
.
x_bcol
,
x
->
x_gui
.
x_bcol
,
x
,
x
);
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -outline #%6.6x -tags {%lxBASE %lxMYCNV text}
\n
"
,
x
->
x_gui
.
x_bcol
,
x
->
x_gui
.
x_bcol
,
x
,
x
,
x
);
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -outline #%6.6x -tags {%lxBASE %lxMYCNV
%lx
text}
\n
"
,
canvas
,
xpos
,
ypos
,
xpos
+
x
->
x_gui
.
x_w
,
ypos
+
x
->
x_gui
.
x_h
,
x
->
x_gui
.
x_bcol
,
x
,
x
);
x
->
x_gui
.
x_bcol
,
x
,
x
,
x
);
sys_vgui
(
".x%lx.c create text %d %d -text {%s} -anchor w \
-font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxMYCNV text}
\n
"
,
-font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxMYCNV
%lx
text}
\n
"
,
canvas
,
xpos
+
x
->
x_gui
.
x_ldx
,
ypos
+
x
->
x_gui
.
x_ldy
,
strcmp
(
x
->
x_gui
.
x_lab
->
s_name
,
"empty"
)
?
x
->
x_gui
.
x_lab
->
s_name
:
""
,
x
->
x_gui
.
x_font
,
x
->
x_gui
.
x_fontsize
,
sys_fontweight
,
x
->
x_gui
.
x_lcol
,
x
,
x
);
x
->
x_gui
.
x_lcol
,
x
,
x
,
x
);
//}
}
...
...
@@ -157,11 +157,11 @@ void my_canvas_draw_select(t_my_canvas* x, t_glist* glist)
sys_vgui
(
"canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor bottom_right_corner
\n
"
,
sh
->
h_pathname
,
SCALEHANDLE_WIDTH
,
SCALEHANDLE_HEIGHT
);
sys_vgui
(
".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxMYCNV}
\n
"
,
sys_vgui
(
".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxMYCNV
%lx
}
\n
"
,
canvas
,
x
->
x_gui
.
x_obj
.
te_xpix
+
x
->
x_vis_w
-
SCALEHANDLE_WIDTH
-
1
,
x
->
x_gui
.
x_obj
.
te_ypix
+
x
->
x_vis_h
-
SCALEHANDLE_HEIGHT
-
1
,
SCALEHANDLE_WIDTH
,
SCALEHANDLE_HEIGHT
,
sh
->
h_pathname
,
x
,
x
);
sh
->
h_pathname
,
x
,
x
,
x
);
sys_vgui
(
"bind %s <Button> {pd [concat %s _click 1 %%x %%y
\\
;]}
\n
"
,
sh
->
h_pathname
,
sh
->
h_bindsym
->
s_name
);
sys_vgui
(
"bind %s <ButtonRelease> {pd [concat %s _click 0 0 0
\\
;]}
\n
"
,
...
...
@@ -179,11 +179,11 @@ void my_canvas_draw_select(t_my_canvas* x, t_glist* glist)
sys_vgui
(
"canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair
\n
"
,
lh
->
h_pathname
,
LABELHANDLE_WIDTH
,
LABELHANDLE_HEIGHT
);
sys_vgui
(
".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxMYCNV}
\n
"
,
sys_vgui
(
".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxMYCNV
%lx
}
\n
"
,
canvas
,
x
->
x_gui
.
x_obj
.
te_xpix
+
x
->
x_gui
.
x_ldx
-
LABELHANDLE_WIDTH
,
x
->
x_gui
.
x_obj
.
te_ypix
+
x
->
x_gui
.
x_ldy
-
LABELHANDLE_HEIGHT
,
LABELHANDLE_WIDTH
,
LABELHANDLE_HEIGHT
,
lh
->
h_pathname
,
x
,
x
,
x
);
lh
->
h_pathname
,
x
,
x
,
x
,
x
);
sys_vgui
(
"bind %s <Button> {pd [concat %s _click 1 %%x %%y
\\
;]}
\n
"
,
lh
->
h_pathname
,
lh
->
h_bindsym
->
s_name
);
sys_vgui
(
"bind %s <ButtonRelease> {pd [concat %s _click 0 0 0
\\
;]}
\n
"
,
...
...
pd/src/g_numbox.c
View file @
dbf7f7a2
...
...
@@ -216,55 +216,55 @@ static void my_numbox_draw_new(t_my_numbox *x, t_glist *glist)
if
(
x
->
x_hide_frame
<=
1
)
{
sys_vgui
(
".x%lx.c create polygon %d %d %d %d %d %d %d %d %d %d -outline #%6.6x \
-fill #%6.6x -tags {%lxBASE1 %lxNUM text}
\n
"
,
-fill #%6.6x -tags {%lxBASE1 %lxNUM
%lx
text}
\n
"
,
canvas
,
xpos
,
ypos
,
xpos
+
x
->
x_numwidth
-
4
,
ypos
,
xpos
+
x
->
x_numwidth
,
ypos
+
4
,
xpos
+
x
->
x_numwidth
,
ypos
+
x
->
x_gui
.
x_h
,
xpos
,
ypos
+
x
->
x_gui
.
x_h
,
IEM_GUI_COLOR_NORMAL
,
x
->
x_gui
.
x_bcol
,
x
,
x
);
IEM_GUI_COLOR_NORMAL
,
x
->
x_gui
.
x_bcol
,
x
,
x
,
x
);
if
(
!
x
->
x_gui
.
x_fsf
.
x_snd_able
&&
canvas
==
x
->
x_gui
.
x_glist
)
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxNUM%so%d %so%d %lxNUM outlet}
\n
"
,
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxNUM%so%d %so%d %lxNUM
%lx
outlet}
\n
"
,
canvas
,
xpos
,
ypos
+
x
->
x_gui
.
x_h
-
1
,
xpos
+
IOWIDTH
,
ypos
+
x
->
x_gui
.
x_h
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
);
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
,
x
);
if
(
!
x
->
x_gui
.
x_fsf
.
x_rcv_able
&&
canvas
==
x
->
x_gui
.
x_glist
)
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxNUM%si%d %si%d %lxNUM inlet}
\n
"
,
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxNUM%si%d %si%d %lxNUM
%lx
inlet}
\n
"
,
canvas
,
xpos
,
ypos
,
xpos
+
IOWIDTH
,
ypos
+
1
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
);
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
,
x
);
}
else
{
sys_vgui
(
".x%lx.c create polygon %d %d %d %d %d %d %d %d %d %d -outline #%6.6x \
-fill #%6.6x -tags {%lxBASE1 %lxNUM text}
\n
"
,
-fill #%6.6x -tags {%lxBASE1 %lxNUM
%lx
text}
\n
"
,
canvas
,
xpos
,
ypos
,
xpos
+
x
->
x_numwidth
-
4
,
ypos
,
xpos
+
x
->
x_numwidth
,
ypos
+
4
,
xpos
+
x
->
x_numwidth
,
ypos
+
x
->
x_gui
.
x_h
,
xpos
,
ypos
+
x
->
x_gui
.
x_h
,
x
->
x_gui
.
x_bcol
,
x
->
x_gui
.
x_bcol
,
x
,
x
);
x
->
x_gui
.
x_bcol
,
x
->
x_gui
.
x_bcol
,
x
,
x
,
x
);
}
if
(
!
x
->
x_hide_frame
||
x
->
x_hide_frame
==
2
)
sys_vgui
(
".x%lx.c create line %d %d %d %d %d %d -fill #%6.6x -tags {%lxBASE2 %lxNUM text}
\n
"
,
".x%lx.c create line %d %d %d %d %d %d -fill #%6.6x -tags {%lxBASE2 %lxNUM
%lx
text}
\n
"
,
canvas
,
xpos
,
ypos
,
xpos
+
half
,
ypos
+
half
,
xpos
,
ypos
+
x
->
x_gui
.
x_h
,
x
->
x_gui
.
x_fcol
,
x
,
x
);
x
->
x_gui
.
x_fcol
,
x
,
x
,
x
);
sys_vgui
(
".x%lx.c create text %d %d -text {%s} -anchor w \
-font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxNUM text}
\n
"
,
-font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxNUM
%lx
text}
\n
"
,
canvas
,
xpos
+
x
->
x_gui
.
x_ldx
,
ypos
+
x
->
x_gui
.
x_ldy
,
strcmp
(
x
->
x_gui
.
x_lab
->
s_name
,
"empty"
)
?
x
->
x_gui
.
x_lab
->
s_name
:
""
,
x
->
x_gui
.
x_font
,
x
->
x_gui
.
x_fontsize
,
sys_fontweight
,
x
->
x_gui
.
x_lcol
,
x
,
x
);
x
->
x_gui
.
x_lcol
,
x
,
x
,
x
);
my_numbox_ftoa
(
x
);
sys_vgui
(
".x%lx.c create text %d %d -text {%s} -anchor w \
-font {{%s} -%d %s} -fill #%6.6x -tags {%lxNUMBER %lxNUM noscroll text}
\n
"
,
-font {{%s} -%d %s} -fill #%6.6x -tags {%lxNUMBER %lxNUM
%lx
noscroll text}
\n
"
,
canvas
,
xpos
+
half
+
2
,
ypos
+
half
+
d
,
x
->
x_buf
,
x
->
x_gui
.
x_font
,
x
->
x_gui
.
x_fontsize
,
sys_fontweight
,
x
->
x_gui
.
x_fcol
,
x
,
x
);
x
->
x_gui
.
x_fcol
,
x
,
x
,
x
);
//}
}
...
...
@@ -417,19 +417,19 @@ static void my_numbox_draw_io(t_my_numbox* x,t_glist* glist, int old_snd_rcv_fla
else
nlet_tag
=
"bogus"
;
if
((
old_snd_rcv_flags
&
IEM_GUI_OLD_SND_FLAG
)
&&
!
x
->
x_gui
.
x_fsf
.
x_snd_able
)
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxNUM%so%d %so%d %lxNUM outlet}
\n
"
,
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxNUM%so%d %so%d %lxNUM
%lx
outlet}
\n
"
,
canvas
,
xpos
,
ypos
+
x
->
x_gui
.
x_h
-
1
,
xpos
+
IOWIDTH
,
ypos
+
x
->
x_gui
.
x_h
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
);
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
,
x
);
if
(
!
(
old_snd_rcv_flags
&
IEM_GUI_OLD_SND_FLAG
)
&&
x
->
x_gui
.
x_fsf
.
x_snd_able
)
sys_vgui
(
".x%lx.c delete %lxNUM%so%d
\n
"
,
canvas
,
x
,
nlet_tag
,
0
);
if
((
old_snd_rcv_flags
&
IEM_GUI_OLD_RCV_FLAG
)
&&
!
x
->
x_gui
.
x_fsf
.
x_rcv_able
)
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxNUM%si%d %si%d %lxNUM inlet}
\n
"
,
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags {%lxNUM%si%d %si%d %lxNUM
%lx
inlet}
\n
"
,
canvas
,
xpos
,
ypos
,
xpos
+
IOWIDTH
,
ypos
+
1
,
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
);
x
,
nlet_tag
,
0
,
nlet_tag
,
0
,
x
,
x
);
if
(
!
(
old_snd_rcv_flags
&
IEM_GUI_OLD_RCV_FLAG
)
&&
x
->
x_gui
.
x_fsf
.
x_rcv_able
)
sys_vgui
(
".x%lx.c delete %lxNUM%si%d
\n
"
,
canvas
,
x
,
nlet_tag
,
0
);
...
...
@@ -474,11 +474,11 @@ static void my_numbox_draw_select(t_my_numbox *x, t_glist *glist)
sys_vgui
(
"canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor bottom_right_corner
\n
"
,
sh
->
h_pathname
,
SCALEHANDLE_WIDTH
,
SCALEHANDLE_HEIGHT
);
sys_vgui
(
".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxNUM}
\n
"
,
sys_vgui
(
".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxNUM
%lx
}
\n
"
,
canvas
,
x
->
x_gui
.
x_obj
.
te_xpix
+
x
->
x_numwidth
-
SCALEHANDLE_WIDTH
-
1
,
x
->
x_gui
.
x_obj
.
te_ypix
+
x
->
x_gui
.
x_h
-
SCALEHANDLE_HEIGHT
-
1
,
SCALEHANDLE_WIDTH
,
SCALEHANDLE_HEIGHT
,
sh
->
h_pathname
,
x
,
x
);
sh
->
h_pathname
,
x
,
x
,
x
);
sys_vgui
(
"bind %s <Button> {pd [concat %s _click 1 %%x %%y
\\
;]}
\n
"
,
sh
->
h_pathname
,
sh
->
h_bindsym
->
s_name
);
sys_vgui
(
"bind %s <ButtonRelease> {pd [concat %s _click 0 0 0
\\
;]}
\n
"
,
...
...
@@ -495,11 +495,11 @@ static void my_numbox_draw_select(t_my_numbox *x, t_glist *glist)
sys_vgui
(
"canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair
\n
"
,
lh
->
h_pathname
,
LABELHANDLE_WIDTH
,
LABELHANDLE_HEIGHT
);
sys_vgui
(
".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxNUM}
\n
"
,
sys_vgui
(
".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxNUM
%lx
}
\n
"
,
canvas
,
x
->
x_gui
.
x_obj
.
te_xpix
+
x
->
x_gui
.
x_ldx
-
LABELHANDLE_WIDTH
,
x
->
x_gui
.
x_obj
.
te_ypix
+
x
->
x_gui
.
x_ldy
-
LABELHANDLE_HEIGHT
,
LABELHANDLE_WIDTH
,
LABELHANDLE_HEIGHT
,
lh
->
h_pathname
,
x
,
x
,
x
);
lh
->
h_pathname
,
x
,
x
,
x
,
x
);
sys_vgui
(
"bind %s <Button> {pd [concat %s _click 1 %%x %%y
\\
;]}
\n
"
,
lh
->
h_pathname
,
lh
->
h_bindsym
->
s_name
);
sys_vgui
(
"bind %s <ButtonRelease> {pd [concat %s _click 0 0 0
\\
;]}
\n
"
,
...
...
pd/src/g_scalar.c
View file @
dbf7f7a2
...
...
@@ -363,8 +363,8 @@ static void scalar_vis(t_gobj *z, t_glist *owner, int vis)
{
int
x1
=
glist_xtopixels
(
owner
,
basex
);
int
y1
=
glist_ytopixels
(
owner
,
basey
);
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags scalar%lx
\n
"
,
glist_getcanvas
(
owner
),
x1
-
1
,
y1
-
1
,
x1
+
1
,
y1
+
1
,
x
);
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d -tags
{%lx
scalar%lx
}
\n
"
,
glist_getcanvas
(
owner
),
x1
-
1
,
y1
-
1
,
x1
+
1
,
y1
+
1
,
x
,
x
);
}
else
sys_vgui
(
".x%lx.c delete scalar%lx
\n
"
,
glist_getcanvas
(
owner
),
x
);
return
;
...
...
pd/src/g_text.c
View file @
dbf7f7a2
...
...
@@ -1670,11 +1670,11 @@ void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime,
//fprintf(stderr,"glist_drawiofor o firsttime\n");
issignal
=
obj_issignaloutlet
(
ob
,
i
);
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d \
-fill %s -outline %s -tags {%so%d outlet}
\n
"
,
-fill %s -outline %s -tags {%so%d
%lx
outlet}
\n
"
,
glist_getcanvas
(
glist
),
onset
,
y2
-
2
,
onset
+
IOWIDTH
,
y2
,
(
issignal
?
"$signal_nlet"
:
"$msg_nlet"
),
(
issignal
?
"$signal_cord"
:
"$msg_cord"
),
tag
,
i
);
tag
,
i
,
tag
);
}
else
{
//fprintf(stderr,"glist_drawiofor o redraw\n");
...
...
@@ -1700,11 +1700,11 @@ void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime,
//fprintf(stderr,"glist_drawiofor i firsttime\n");
issignal
=
obj_issignalinlet
(
ob
,
i
);
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d \
-fill %s -outline %s -tags {%si%d inlet}
\n
"
,
-fill %s -outline %s -tags {%si%d
%lx
inlet}
\n
"
,
glist_getcanvas
(
glist
),
onset
,
y1
,
onset
+
IOWIDTH
,
y1
+
EXTRAPIX
,
(
issignal
?
"$signal_nlet"
:
"$msg_nlet"
),
(
issignal
?
"$signal_cord"
:
"$msg_cord"
),
tag
,
i
);
tag
,
i
,
tag
);
}
else
{
//fprintf(stderr,"glist_drawiofor i firsttime\n");
...
...
@@ -1740,11 +1740,11 @@ void glist_drawiofor_withtag(t_glist *glist, t_object *ob, int firsttime,
//fprintf(stderr,"drawiofor_withtag o firsttime\n");
issignal
=
obj_issignaloutlet
(
ob
,
i
);
sys_vgui
(
".x%lx.c create rectangle %d %d %d %d \
-fill %s -outline %s -tags {%so%d outlet}
\n
"
,
-fill %s -outline %s -tags {%so%d
%lx
outlet}
\n
"
,
glist_getcanvas
(
glist
),
onset
,
y2
-
2
,
onset
+
IOWIDTH
,
y2
,
(
issignal
?
"$signal_nlet"
:
"$msg_nlet"
),
(
issignal
?
"$signal_cord"
:
"$msg_cord"
),
tag
,
i
);