Commit 406e41ed authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

clean up cyclone/Scope~ GUI code

parent 175a582c
......@@ -571,12 +571,7 @@ static void scope_displace(t_gobj *z, t_glist *glist, int dx, int dy)
{
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);
//canvas_fixlinesfor(cv, t);
}
}
......@@ -590,11 +585,6 @@ static void scope_displace_wtag(t_gobj *z, t_glist *glist, int dx, int dy)
{
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);
}
}
......@@ -882,7 +872,7 @@ static void scope_redrawxy(t_scope *x, t_canvas *cv)
static void scope_revis(t_scope *x, t_canvas *cv)
{
// sys_vgui(".x%x.c delete %s\n", cv, x->x_tag);
//sys_vgui(".x%x.c delete %s\n", cv, x->x_tag);
gui_vmess("gui_scope_clear_fg", "xx", cv, x);
if (x->x_xymode)
scope_drawxy(x, cv);
......@@ -1005,45 +995,46 @@ static void scope_tick(t_scope *x)
static void scopehandle__clickhook(t_scopehandle *sh, t_floatarg f, t_floatarg xxx, t_floatarg yyy)
{
t_scope *x = sh->h_master;
t_scope *x = sh->h_master;
// if (xxx) x->scale_offset_x = xxx;
// if (yyy) x->scale_offset_y = yyy;
//if (xxx) x->scale_offset_x = xxx;
//if (yyy) x->scale_offset_y = yyy;
// int newstate = (int)f;
// if (sh->h_dragon && newstate == 0)
// {
// /* done dragging */
// t_canvas *cv;
// if (sh->h_dragx || sh->h_dragy) {
// x->x_width = x->x_width + sh->h_dragx - x->scale_offset_x;
// x->x_height = x->x_height + sh->h_dragy - x->scale_offset_y;
// }
// if (cv = scope_isvisible(x))
// {
// sys_vgui(".x%x.c delete %s\n", cv, sh->h_outlinetag);
// scope_revis(x, cv);
// sys_vgui("destroy %s\n", sh->h_pathname);
// scope_select((t_gobj *)x, x->x_glist, 1);
// canvas_fixlinesfor(x->x_glist, (t_text *)x); /* 2nd inlet */
// }
// }
// else if (!sh->h_dragon && newstate)
// {
// /* dragging */
// t_canvas *cv;
// if (cv = scope_isvisible(x))
// {
// int x1, y1, x2, y2;
// scope_getrect((t_gobj *)x, x->x_glist, &x1, &y1, &x2, &y2);
// sys_vgui("lower %s\n", sh->h_pathname);
// sys_vgui(".x%x.c create rectangle %d %d %d %d\
// -outline $select_color -width %f -tags %s\n",
// cv, x1, y1, x2, y2, SCOPE_SELBDWIDTH, sh->h_outlinetag);
// }
// sh->h_dragx = 0;
// sh->h_dragy = 0;
// }
//int newstate = (int)f;
//if (sh->h_dragon && newstate == 0)
//{
// /* done dragging */
// t_canvas *cv;
// if (sh->h_dragx || sh->h_dragy)
// {
// x->x_width = x->x_width + sh->h_dragx - x->scale_offset_x;
// x->x_height = x->x_height + sh->h_dragy - x->scale_offset_y;
// }
// if (cv = scope_isvisible(x))
// {
// sys_vgui(".x%x.c delete %s\n", cv, sh->h_outlinetag);
// scope_revis(x, cv);
// sys_vgui("destroy %s\n", sh->h_pathname);
// scope_select((t_gobj *)x, x->x_glist, 1);
// canvas_fixlinesfor(x->x_glist, (t_text *)x); /* 2nd inlet */
// }
//}
//else if (!sh->h_dragon && newstate)
//{
// /* dragging */
// t_canvas *cv;
// if (cv = scope_isvisible(x))
// {
// int x1, y1, x2, y2;
// scope_getrect((t_gobj *)x, x->x_glist, &x1, &y1, &x2, &y2);
// sys_vgui("lower %s\n", sh->h_pathname);
// sys_vgui(".x%x.c create rectangle %d %d %d %d\
// -outline $select_color -width %f -tags %s\n",
// cv, x1, y1, x2, y2, SCOPE_SELBDWIDTH, sh->h_outlinetag);
// }
// sh->h_dragx = 0;
// sh->h_dragy = 0;
//}
sh->h_dragon = f;
}
......@@ -1067,25 +1058,25 @@ static void scopehandle__motionhook(t_scopehandle *sh,
scope_vis((t_gobj *)x, x->x_glist, 0);
scope_vis((t_gobj *)x, x->x_glist, 1);
}
// if (sh->h_dragon)
// {
// t_scope *x = sh->h_master;
// int dx = (int)f1, dy = (int)f2;
// int x1, y1, x2, y2, newx, newy;
// scope_getrect((t_gobj *)x, x->x_glist, &x1, &y1, &x2, &y2);
// newx = x2 - x->scale_offset_x + dx;
// newy = y2 - x->scale_offset_y + dy;
//
// if (newx > x1 + SCOPE_MINWIDTH && newy > y1 + SCOPE_MINHEIGHT)
// {
// t_canvas *cv;
// if (cv = scope_isvisible(x))
// sys_vgui(".x%x.c coords %s %d %d %d %d\n",
// cv, sh->h_outlinetag, x1, y1, newx, newy);
// sh->h_dragx = dx;
// sh->h_dragy = dy;
// }
// }
//if (sh->h_dragon)
//{
// t_scope *x = sh->h_master;
// int dx = (int)f1, dy = (int)f2;
// int x1, y1, x2, y2, newx, newy;
// scope_getrect((t_gobj *)x, x->x_glist, &x1, &y1, &x2, &y2);
// newx = x2 - x->scale_offset_x + dx;
// newy = y2 - x->scale_offset_y + dy;
// if (newx > x1 + SCOPE_MINWIDTH && newy > y1 + SCOPE_MINHEIGHT)
// {
// t_canvas *cv;
// if (cv = scope_isvisible(x))
// sys_vgui(".x%x.c coords %s %d %d %d %d\n",
// cv, sh->h_outlinetag, x1, y1, newx, newy);
// sh->h_dragx = dx;
// sh->h_dragy = dy;
// }
//}
}
/* wrapper method for forwarding "scopehandle" data */
......
#N canvas 1 25 559 519 10;
#X obj -1 611 cnv 15 552 21 empty \$0-pddp.cnv.footer empty 20 12 0
14 -233017 -33289 0;
#X obj -1 404 cnv 3 550 3 empty \$0-pddp.cnv.inlets inlets 8 12 0 13
-228856 -1 0;
#N canvas 633 310 345 214 META 0;
#X text -137 120 WEBSITE http://crca.ucsd.edu/~msp/;
#X text -137 25 LICENSE SIBSD;
#X text -137 101 AUTHOR Miller Puckette;
#X text -137 139 RELEASE_DATE 1997;
#X text -137 82 LIBRARY cyclone;
#X text -137 158 HELP_PATCH_AUTHORS Alex Cleveland updated this patch
for Pd-l2ork version 2013.05.28;
#X text -137 6 KEYWORDS signal graphic display graph;
#X text -137 44 DESCRIPTION graphic signal display;
#X text -137 63 INLET_0 signal buffsize range frgb brgb;
#X restore 502 613 pd META;
#X obj -1 529 cnv 3 550 3 empty \$0-pddp.cnv.outlets outlets 8 12 0
13 -228856 -1 0;
#X obj -1 566 cnv 3 550 3 empty \$0-pddp.cnv.argument arguments 8 12
0 13 -228856 -1 0;
#N canvas 332 419 428 109 Related_objects 0;
#X obj 0 0 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
14 -204280 -1 0;
#X text 6 1 Related Objects;
#X restore 211 613 pd Related_objects;
#X obj 71 413 cnv 17 3 104 empty \$0-pddp.cnv.let.0 0 5 9 0 16 -228856
-162280 0;
#X obj -1 0 cnv 15 552 40 empty \$0-pddp.cnv.header Scope~ 3 12 0 18
-204280 -1 0;
#X text 11 23 Graphic Signal Display;
#X text 98 412 signal;
#X text 264 413 - signal to display;
#X text 98 436 buffsize <int>;
#X text 264 436 - change buffer size;
#X text 98 459 range <int> <int>;
#X text 264 459 - change range of display;
#X text 98 480 frgb <int> <int> <int>;
#X text 98 540 (none);
#X obj 480 47 pddp/dsp;
#X obj 493 9 Scope~_;
#X text 98 579 (none);
#X text 264 501 - set color of graph in RGB values;
#X text 98 501 brgb <int> <int> <int>;
#X text 264 480 - set color of line in RGB values;
#X obj 84 251 Scope~ 245 119 256 3 100 -1 1 0 0 0 0 0 255 0 0 0 255
0;
#X msg 218 99 bufsize 100;
#X msg 218 126 range 1 2;
#X obj 84 99 osc~ 500;
#X obj 84 70 hsl 100 18 20 500 1 1 empty empty frequency 5 8 1 10 -262131
-1 -1 4200 0;
#X obj 84 208 *~;
#X obj 99 128 vsl 15 60 0.01 1 1 1 empty empty empty 0 -8 0 8 -225271
-1 -1 3200 0;
#X text 292 173 colors:;
#X text 336 302 <--this is the Scope~ object;
#X obj 18 612 pddp/pddplink @pd_help/all_about_help_patches.pd -text
Usage Guide;
#X msg 294 125 range -1 1;
#X msg 350 197 brgb 255 255 0;
#X msg 350 172 frgb 0 0 0;
#X msg 350 224 frgb 0 255 0 \, brgb 0 0 255;
#X connect 24 0 23 0;
#X connect 25 0 23 0;
#X connect 26 0 28 0;
#X connect 27 0 26 0;
#X connect 28 0 23 0;
#X connect 29 0 28 1;
#X connect 33 0 23 0;
#X connect 34 0 23 0;
#X connect 35 0 23 0;
#X connect 36 0 23 0;
......@@ -3590,10 +3590,6 @@ function gui_scope_clear_fg(cid, tag) {
scope_configure_fg(cid, tag, ".fgmono", []);
}
function gui_scope_displace(cid, tag, dx, dy) {
gui_text_displace(cid, tag, dx, dy);
}
// unauthorized/grid
function get_grid_data(w, h, x_l, y_l) {
......
Supports Markdown
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