Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
purr-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
brittney allen
purr-data
Commits
c4ef0b17
Commit
c4ef0b17
authored
8 years ago
by
Jonathan Wilkes
Browse files
Options
Downloads
Patches
Plain Diff
use accelerated displace_withtag interface, comment out old unused tcl code
parent
7ad55854
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
externals/miXed/cyclone/sickle/Scope.c
+48
-23
48 additions, 23 deletions
externals/miXed/cyclone/sickle/Scope.c
with
48 additions
and
23 deletions
externals/miXed/cyclone/sickle/Scope.c
+
48
−
23
View file @
c4ef0b17
...
@@ -580,6 +580,25 @@ static void scope_displace(t_gobj *z, t_glist *glist, int dx, int dy)
...
@@ -580,6 +580,25 @@ static void scope_displace(t_gobj *z, t_glist *glist, int dx, int dy)
}
}
}
}
static
void
scope_displace_wtag
(
t_gobj
*
z
,
t_glist
*
glist
,
int
dx
,
int
dy
)
{
t_scope
*
x
=
(
t_scope
*
)
z
;
t_text
*
t
=
(
t_text
*
)
z
;
t
->
te_xpix
+=
dx
;
t
->
te_ypix
+=
dy
;
if
(
glist_isvisible
(
glist
))
{
t_canvas
*
cv
=
scope_getcanvas
(
x
,
glist
);
//sys_vgui(".x%x.c move %s %d %d\n", cv, x->x_tag, dx, dy);
// gui_vmess("gui_scope_displace", "xxii",
// cv,
// x,
// dx,
// dy);
canvas_fixlinesfor
(
cv
,
t
);
}
}
static
void
scope_select
(
t_gobj
*
z
,
t_glist
*
glist
,
int
state
)
static
void
scope_select
(
t_gobj
*
z
,
t_glist
*
glist
,
int
state
)
{
{
t_scope
*
x
=
(
t_scope
*
)
z
;
t_scope
*
x
=
(
t_scope
*
)
z
;
...
@@ -587,33 +606,37 @@ static void scope_select(t_gobj *z, t_glist *glist, int state)
...
@@ -587,33 +606,37 @@ static void scope_select(t_gobj *z, t_glist *glist, int state)
t_scopehandle
*
sh
=
(
t_scopehandle
*
)
x
->
x_handle
;
t_scopehandle
*
sh
=
(
t_scopehandle
*
)
x
->
x_handle
;
if
(
state
)
if
(
state
)
{
{
int
x1
,
y1
,
x2
,
y2
;
gui_vmess
(
"gui_gobj_select"
,
"xx"
,
cv
,
x
);
scope_getrect
(
z
,
glist
,
&
x1
,
&
y1
,
&
x2
,
&
y2
);
//int x1, y1, x2, y2;
//scope_getrect(z, glist, &x1, &y1, &x2, &y2);
sys_vgui
(
".x%x.c itemconfigure %s -outline blue -width %f -fill %s
\n
"
,
//
sys_vgui(".x%x.c itemconfigure %s -outline blue -width %f -fill %s\n",
cv
,
x
->
x_bgtag
,
SCOPE_SELBDWIDTH
,
SCOPE_SELCOLOR
);
//
cv, x->x_bgtag, SCOPE_SELBDWIDTH, SCOPE_SELCOLOR);
sys_vgui
(
"canvas %s -width %d -height %d -bg #fedc00 -bd 0 -cursor bottom_right_corner
\n
"
,
//sys_vgui("canvas %s -width %d -height %d "
sh
->
h_pathname
,
SCOPEHANDLE_WIDTH
,
SCOPEHANDLE_HEIGHT
);
// "-bg #fedc00 -bd 0 -cursor bottom_right_corner\n",
sys_vgui
(
".x%x.c create window %f %f -anchor nw\
// sh->h_pathname, SCOPEHANDLE_WIDTH, SCOPEHANDLE_HEIGHT);
-width %d -height %d -window %s -tags %s
\n
"
,
//sys_vgui(".x%x.c create window %f %f -anchor nw "
cv
,
x2
-
(
SCOPEHANDLE_WIDTH
-
SCOPE_SELBDWIDTH
),
// "-width %d -height %d -window %s -tags %s\n",
y2
-
(
SCOPEHANDLE_HEIGHT
-
SCOPE_SELBDWIDTH
),
// cv, x2 - (SCOPEHANDLE_WIDTH - SCOPE_SELBDWIDTH),
SCOPEHANDLE_WIDTH
,
SCOPEHANDLE_HEIGHT
,
// y2 - (SCOPEHANDLE_HEIGHT - SCOPE_SELBDWIDTH),
sh
->
h_pathname
,
x
->
x_tag
);
// SCOPEHANDLE_WIDTH, SCOPEHANDLE_HEIGHT,
sys_vgui
(
"bind %s <Button> {pd [concat %s _click 1 %%x %%y
\\
;]}
\n
"
,
// sh->h_pathname, x->x_tag);
sh
->
h_pathname
,
sh
->
h_bindsym
->
s_name
);
//sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n",
sys_vgui
(
"bind %s <ButtonRelease> {pd [concat %s _click 0 0 0
\\
;]}
\n
"
,
// sh->h_pathname, sh->h_bindsym->s_name);
sh
->
h_pathname
,
sh
->
h_bindsym
->
s_name
);
//sys_vgui("bind %s <ButtonRelease> "
sys_vgui
(
"bind %s <Motion> {pd [concat %s _motion %%x %%y
\\
;]}
\n
"
,
// "{pd [concat %s _click 0 0 0 \\;]}\n",
sh
->
h_pathname
,
sh
->
h_bindsym
->
s_name
);
// sh->h_pathname, sh->h_bindsym->s_name);
//sys_vgui("bind %s <Motion> {pd [concat %s _motion %%x %%y \\;]}\n",
// sh->h_pathname, sh->h_bindsym->s_name);
}
}
else
else
{
{
sys_vgui
(
".x%x.c itemconfigure %s -outline black -width %f\
gui_vmess
(
"gui_gobj_deselect"
,
"xx"
,
cv
,
x
);
-fill #%2.2x%2.2x%2.2x
\n
"
,
cv
,
x
->
x_bgtag
,
SCOPE_GRIDWIDTH
,
//sys_vgui(".x%x.c itemconfigure %s -outline black -width %f "
x
->
x_bgred
,
x
->
x_bggreen
,
x
->
x_bgblue
);
// "-fill #%2.2x%2.2x%2.2x\n", cv, x->x_bgtag, SCOPE_GRIDWIDTH,
sys_vgui
(
"destroy %s
\n
"
,
sh
->
h_pathname
);
//x->x_bgred, x->x_bggreen, x->x_bgblue);
//sys_vgui("destroy %s\n", sh->h_pathname);
}
}
}
}
...
@@ -892,6 +915,8 @@ static void scope_vis(t_gobj *z, t_glist *glist, int vis)
...
@@ -892,6 +915,8 @@ static void scope_vis(t_gobj *z, t_glist *glist, int vis)
scope_drawxy(x, cv);
scope_drawxy(x, cv);
else
else
scope_drawmono(x, cv);
scope_drawmono(x, cv);
if (glist_isselected(cv, (t_gobj *)x))
gui_vmess("
gui_gobj_select
", "
xx
", cv, x);
}
}
else
else
{
{
...
@@ -939,7 +964,7 @@ static t_widgetbehavior scope_widgetbehavior =
...
@@ -939,7 +964,7 @@ static t_widgetbehavior scope_widgetbehavior =
scope_delete,
scope_delete,
scope_vis,
scope_vis,
scope_click,
scope_click,
FORKY_WIDGETPADDING
scope_displace_wtag
};
};
static void scope_setxymode(t_scope *x, int xymode)
static void scope_setxymode(t_scope *x, int xymode)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment