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
David MacDonald
purr-data
Commits
e35c56a1
Commit
e35c56a1
authored
May 23, 2013
by
Ivica Bukvic
Browse files
added accelerated displace to pddplink
parent
187bbf67
Changes
1
Hide whitespace changes
Inline
Side-by-side
externals/pddp/pddplink.c
View file @
e35c56a1
...
...
@@ -79,6 +79,18 @@ static void pddplink_displace(t_gobj *z, t_glist *glist, int dx, int dy)
}
}
static
void
pddplink_displace_withtag
(
t_gobj
*
z
,
t_glist
*
glist
,
int
dx
,
int
dy
)
{
t_text
*
t
=
(
t_text
*
)
z
;
t
->
te_xpix
+=
dx
;
t
->
te_ypix
+=
dy
;
/*if (glist_isvisible(glist))
{
t_rtext *y = glist_findrtext(glist, t);
rtext_displace(y, dx, dy);
}*/
}
static
void
pddplink_select
(
t_gobj
*
z
,
t_glist
*
glist
,
int
state
)
{
t_pddplink
*
x
=
(
t_pddplink
*
)
z
;
...
...
@@ -86,12 +98,17 @@ static void pddplink_select(t_gobj *z, t_glist *glist, int state)
rtext_select
(
y
,
state
);
if
(
glist_isvisible
(
glist
)
&&
glist
->
gl_havewindow
)
{
if
(
state
)
sys_vgui
(
".x%lx.c itemconfigure %s -fill $select_color
\n
"
,
glist
,
rtext_gettag
(
y
));
else
sys_vgui
(
".x%lx.c itemconfigure %s -text {%s} -fill #0000dd -activefill #e70000
\n
"
,
glist
,
rtext_gettag
(
y
),
x
->
x_vistext
);
if
(
state
)
{
sys_vgui
(
".x%lx.c itemconfigure %s -fill $select_color
\n
"
,
glist
,
rtext_gettag
(
y
));
sys_vgui
(
".x%lx.c addtag selected withtag %s
\n
"
,
glist
,
rtext_gettag
(
y
));
}
else
{
sys_vgui
(
".x%lx.c itemconfigure %s -text {%s} -fill #0000dd -activefill #e70000
\n
"
,
glist
,
rtext_gettag
(
y
),
x
->
x_vistext
);
sys_vgui
(
".x%lx.c dtag %s selected
\n
"
,
glist
,
rtext_gettag
(
y
));
}
}
}
...
...
@@ -137,6 +154,7 @@ static t_widgetbehavior pddplink_widgetbehavior =
0
,
pddplink_vis
,
pddplink_wbclick
,
pddplink_displace_withtag
,
};
/* Code that might be merged back to g_text.c ends here. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment