Skip to content

Commit 9b6a1f2

Browse files
committed
revert add pd colors for now / clean up "mousestate"
1 parent 3dd7d96 commit 9b6a1f2

File tree

4 files changed

+313
-420
lines changed

4 files changed

+313
-420
lines changed

cyclone_objects/binaries/audio/scope.c

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ static void scope_draw_handle(t_scope *x, int state){
9999
if(state){
100100
sys_vgui("canvas %s -width %d -height %d -bg %s -highlightthickness %d -cursor bottom_right_corner\n",
101101
sh->h_pathname, HANDLE_SIZE, HANDLE_SIZE,
102-
THISGUI->i_selectcolor->s_name, 2*x->x_zoom);
102+
// THISGUI->i_selectcolor->s_name, 2*x->x_zoom);
103+
"blue", 2*x->x_zoom);
103104
int x1, y1, x2, y2;
104105
scope_getrect((t_gobj *)x, x->x_glist, &x1, &y1, &x2, &y2);
105106
sys_vgui(".x%lx.c create window %d %d -anchor nw -width %d -height %d -window %s -tags all%lx\n",
@@ -195,10 +196,12 @@ static void scope_draw_inlets(t_scope *x){
195196
int xpos = text_xpix(&x->x_obj, x->x_glist), ypos = text_ypix(&x->x_obj, x->x_glist);
196197
sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill %s -tags {%lx_in1 inlets%lx all%lx}\n",
197198
cv, xpos, ypos, xpos+(IOWIDTH*x->x_zoom), ypos+(IHEIGHT*x->x_zoom),
198-
THISGUI->i_foregroundcolor->s_name, x, x, x);
199+
// THISGUI->i_foregroundcolor->s_name, x, x, x);
200+
"black", x, x, x);
199201
sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill %s -tags {%lx_in2 inlets%lx all%lx}\n",
200202
cv, xpos+x->x_width, ypos, xpos+x->x_width-(IOWIDTH*x->x_zoom), ypos+(IHEIGHT*x->x_zoom),
201-
THISGUI->i_foregroundcolor->s_name, x, x, x);
203+
// THISGUI->i_foregroundcolor->s_name, x, x, x);
204+
"black", x, x, x);
202205
}
203206
}
204207

@@ -336,11 +339,14 @@ static void scope_select(t_gobj *z, t_glist *glist, int state){
336339
t_canvas *cv = glist_getcanvas(glist);
337340
x->x_select = state;
338341
if(state)
339-
sys_vgui(".x%lx.c itemconfigure bg%lx -outline %s -width %d -fill #%.2x%.2x%.2x\n",
340-
cv, x, THISGUI->i_selectcolor->s_name, x->x_zoom, x->x_bg[0], x->x_bg[1], x->x_bg[2]);
342+
sys_vgui(".x%lx.c itemconfigure bg%lx -outline %s -width %d -fill #%.2x%.2x%.2x\n", cv, x,
343+
// THISGUI->i_selectcolor->s_name,
344+
"blue",
345+
x->x_zoom, x->x_bg[0], x->x_bg[1], x->x_bg[2]);
341346
else
342347
sys_vgui(".x%lx.c itemconfigure bg%lx -outline %s -width %d -fill #%.2x%.2x%.2x\n",
343-
cv, x, THISGUI->i_foregroundcolor->s_name,
348+
// cv, x, THISGUI->i_foregroundcolor->s_name,
349+
cv, x, "black",
344350
x->x_zoom, x->x_bg[0], x->x_bg[1], x->x_bg[2]);
345351
}
346352

@@ -619,7 +625,9 @@ static void handle__click_callback(t_handle *sh, t_floatarg f){
619625
int x1, y1, x2, y2;
620626
scope_getrect((t_gobj *)x, x->x_glist, &x1, &y1, &x2, &y2);
621627
sys_vgui(".x%lx.c create rectangle %d %d %d %d -outline %s -width %d -tags %s\n",
622-
x->x_cv, x1, y1, x2, y2, THISGUI->i_selectcolor->s_name,
628+
x->x_cv, x1, y1, x2, y2,
629+
// THISGUI->i_selectcolor->s_name,
630+
"blue",
623631
SCOPE_SELBDWIDTH*x->x_zoom, sh->h_outlinetag);
624632
sh->h_dragx = sh->h_dragy = 0;
625633
}

cyclone_objects/binaries/control/comment.c

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@ static void comment_draw_outline(t_comment *x){
162162
(unsigned long)x, // %lx_outline
163163
(unsigned long)x, // all%lx
164164
x->x_zoom,
165-
x->x_select ?
166-
THISGUI->i_selectcolor->s_name :
167-
THISGUI->i_foregroundcolor->s_name);
165+
x->x_select ? "blue" : "black");
166+
// THISGUI->i_selectcolor->s_name :
167+
// THISGUI->i_foregroundcolor->s_name);
168168
}
169169
}
170170

@@ -177,7 +177,9 @@ static void comment_draw_handle(t_comment *x){
177177
if(x->x_resized)
178178
x2 = x1 + x->x_max_pixwidth * x->x_zoom;
179179
sys_vgui("canvas %s -width %d -height %d -bg %s -cursor sb_h_double_arrow\n",
180-
ch->h_pathname, COMMENT_HANDLE_WIDTH, x->x_height, THISGUI->i_selectcolor->s_name);
180+
ch->h_pathname, COMMENT_HANDLE_WIDTH, x->x_height,
181+
// THISGUI->i_selectcolor->s_name);
182+
"blue");
181183
sys_vgui("bind %s <Button> {pdsend [concat %s _click 1 \\;]}\n", ch->h_pathname, ch->h_bindsym->s_name);
182184
sys_vgui("bind %s <ButtonRelease> {pdsend [concat %s _click 0 \\;]}\n", ch->h_pathname, ch->h_bindsym->s_name);
183185
sys_vgui("bind %s <Motion> {pdsend [concat %s _motion %%x %%y \\;]}\n", ch->h_pathname, ch->h_bindsym->s_name);
@@ -201,7 +203,8 @@ static void comment_draw_inlet(t_comment *x){
201203
sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill %s -tags [list %lx_in all%lx]\n",
202204
cv, xpos, ypos, xpos+(IOWIDTH*x->x_zoom),
203205
ypos+(IHEIGHT*x->x_zoom)-x->x_zoom,
204-
THISGUI->i_foregroundcolor->s_name,
206+
// THISGUI->i_foregroundcolor->s_name,
207+
"black",
205208
(unsigned long)x, (unsigned long)x);
206209
}
207210
}
@@ -238,7 +241,8 @@ static void comment_draw(t_comment *x){
238241
y2 + 2*x->x_zoom,
239242
(unsigned long)x,
240243
(unsigned long)x,
241-
x->x_outline ? THISGUI->i_foregroundcolor->s_name : x->x_bgcolor,
244+
// x->x_outline ? THISGUI->i_foregroundcolor->s_name : x->x_bgcolor,
245+
x->x_outline ? "black" : x->x_bgcolor,
242246
x->x_bgcolor);
243247
}
244248
char buf[COMMENT_OUTBUFSIZE], *outbuf, *outp;
@@ -253,7 +257,8 @@ static void comment_draw(t_comment *x){
253257
text_ypix((t_text *)x, x->x_glist) + x->x_zoom, // %d
254258
x->x_fontname->s_name, // {%s}
255259
x->x_fontsize * x->x_zoom, // -%d
256-
x->x_select ? THISGUI->i_selectcolor->s_name : x->x_color, // %s
260+
// x->x_select ? THISGUI->i_selectcolor->s_name : x->x_color, // %s
261+
x->x_select ? "blue" : x->x_color, // %s
257262
x->x_bufsize, // %.
258263
x->x_buf, // *s
259264
x->x_max_pixwidth * x->x_zoom, // %d
@@ -397,10 +402,13 @@ static void comment_select(t_gobj *z, t_glist *glist, int state){
397402
x->x_select = state;
398403
if(!state && x->x_active)
399404
comment_activate(z, glist, 0);
400-
sys_vgui(".x%lx.c itemconfigure txt%lx -fill %s\n", x->x_cv, (unsigned long)x, state ? THISGUI->i_selectcolor->s_name : x->x_color);
405+
sys_vgui(".x%lx.c itemconfigure txt%lx -fill %s\n", x->x_cv, (unsigned long)x,
406+
// state ? THISGUI->i_selectcolor->s_name : x->x_color);
407+
state ? "blue" : "black");
401408
sys_vgui(".x%lx.c itemconfigure %lx_outline -width %d -outline %s\n",
402409
x->x_cv, (unsigned long)x, x->x_zoom,
403-
state ? THISGUI->i_selectcolor->s_name : THISGUI->i_foregroundcolor->s_name);
410+
// state ? THISGUI->i_selectcolor->s_name : THISGUI->i_foregroundcolor->s_name);
411+
state ? "blue" : "black");
404412
// A regular rtext should set 'canvas_editing' variable to its canvas, we don't do it coz
405413
// we get keys via global binding to "#key" (and coz 'canvas_editing' isn't exported).
406414
}
@@ -909,7 +917,8 @@ static void comment_bgcolor(t_comment *x, t_float r, t_float g, t_float b){
909917
sys_vgui(".x%lx.c itemconfigure bg%lx -outline %s -fill %s\n",
910918
x->x_cv,
911919
(unsigned long)x,
912-
x->x_outline ? THISGUI->i_foregroundcolor->s_name : x->x_bgcolor,
920+
// x->x_outline ? THISGUI->i_foregroundcolor->s_name : x->x_bgcolor,
921+
x->x_outline ? "black" : x->x_bgcolor,
913922
x->x_bgcolor);
914923
}
915924
}
@@ -993,7 +1002,9 @@ static void comment_outline(t_comment *x, t_floatarg outline){
9931002
if(x->x_outline || x->x_edit){
9941003
comment_draw_outline(x);
9951004
if(x->x_bg_flag)
996-
sys_vgui(".x%lx.c itemconfigure bg%lx -outline %s\n", x->x_cv, (unsigned long)x, THISGUI->i_foregroundcolor->s_name);
1005+
sys_vgui(".x%lx.c itemconfigure bg%lx -outline %s\n", x->x_cv, (unsigned long)x,
1006+
// THISGUI->i_foregroundcolor->s_name);
1007+
"black");
9971008
}
9981009
else{
9991010
sys_vgui(".x%lx.c delete %lx_outline\n", (unsigned long)x->x_cv, (unsigned long)x);

0 commit comments

Comments
 (0)