Commit 515b4261 authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

*fixed conflicts between Mathieu's and my own contributions

Merge branch 'master' of git://github.com/pd-l2ork/pd

Conflicts:
	pd/src/g_all_guis.c
	pd/src/g_vumeter.c
parents 0eea3541 5d6a6e09
......@@ -654,26 +654,25 @@ void scalehandle_draw_select(t_scalehandle *h, t_glist *canvas, int px, int py)
int sx = h->h_scale ? SCALEHANDLE_WIDTH : LABELHANDLE_WIDTH;
int sy = h->h_scale ? SCALEHANDLE_HEIGHT : LABELHANDLE_HEIGHT;
if (h->h_vis) scalehandle_draw_erase(h,canvas);
sys_vgui("canvas %s -width %d -height %d -bg $pd_colors(selection) -bd 0 "
// sys_vgui("canvas %s -width %d -height %d -bg #0080ff -bd 0 "
"-cursor %s\n", h->h_pathname, sx, sy, cursor);
// there was a %lxBNG tag (or similar) in every scalehandle,
// but it didn't seem to be used —mathieu
if (h->h_scale) {
sprintf(tags,"x%lx %lxSCALE iemgui",
(long)x,(long)x);
if (!h->h_vis) {
sys_vgui("canvas %s -width %d -height %d -bg $pd_colors(selection) -bd 0 "
"-cursor %s\n", h->h_pathname, sx, sy, cursor);
if (h->h_scale) {
sprintf(tags,"x%lx %lxSCALE iemgui", (long)x,(long)x);
} else {
sprintf(tags,"x%lx %lx%s iemgui", (long)x,
(long)x,pd_class((t_pd *)x)==canvas_class?"MOVE":"LABELH");
}
sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d "
"-window %s -tags {%s}\n", canvas,
x->x_obj.te_xpix+px-sx, x->x_obj.te_ypix+py-sy, sx, sy,
h->h_pathname, tags);
scalehandle_bind(h);
h->h_vis = 1;
} else {
//sprintf(tags,"%lx%s %lxLABEL %lxLABELH iemgui %s", // causes unknown option "-fill"
sprintf(tags,"x%lx %lx%s iemgui", (long)x,
(long)x,pd_class((t_pd *)x)==canvas_class?"MOVE":"LABELH");
sys_vgui(".x%x.c coords %s %d %d\n", canvas, h->h_pathname,
x->x_obj.te_xpix+px-sx, x->x_obj.te_ypix+py-sy);
}
sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d "
"-window %s -tags {%s}\n", canvas, x->x_obj.te_xpix+px-sx, x->x_obj.te_ypix+py-sy,
sx, sy, h->h_pathname, tags);
scalehandle_bind(h);
h->h_vis = 1;
}
extern t_class *my_canvas_class;
......@@ -695,14 +694,15 @@ void scalehandle_draw_select2(t_iemgui *x, t_glist *canvas) {
}
void scalehandle_draw_erase(t_scalehandle *h, t_glist *canvas) {
sys_vgui("destroy %s\n", h->h_pathname);
sys_vgui(".x%lx.c delete %lx%s\n", canvas, h->h_master, h->h_scale ? "SCALE" : "LABELH");
h->h_vis = 0;
if (!h->h_vis) return;
sys_vgui("destroy %s\n", h->h_pathname);
sys_vgui(".x%lx.c delete %lx%s\n", canvas, h->h_master, h->h_scale ? "SCALE" : "LABELH");
h->h_vis = 0;
}
void scalehandle_draw_erase2(t_iemgui *x, t_glist *canvas) {
t_scalehandle *sh = (t_scalehandle *)(x->x_handle);
t_scalehandle *lh = (t_scalehandle *)(x->x_lhandle);
t_scalehandle *sh = (t_scalehandle *)(x->x_handle);
t_scalehandle *lh = (t_scalehandle *)(x->x_lhandle);
if (sh->h_vis) scalehandle_draw_erase(sh,canvas);
if (lh->h_vis) scalehandle_draw_erase(lh,canvas);
}
......@@ -997,7 +997,6 @@ void iemgui_draw_new(t_iemgui *x, t_glist *glist) {
void iemgui_draw_erase(t_iemgui *x, t_glist *glist) {
t_canvas *canvas=glist_getcanvas(glist);
sys_vgui(".x%lx.c delete x%lx\n", canvas, x);
sys_vgui(".x%lx.c dtag all x%lx\n", canvas, x);
scalehandle_draw_erase2(x,glist);
x->x_vis = 0;
}
......
......@@ -198,13 +198,12 @@ static void my_numbox_draw_move(t_my_numbox *x, t_glist *glist)
static void my_numbox_draw_config(t_my_numbox* x,t_glist* glist)
{
t_canvas *canvas=glist_getcanvas(glist);
char fcol[8]; sprintf(fcol, "%6.6x", x->x_gui.x_fcol);
char fcol[8]; sprintf(fcol, "#%6.6x", x->x_gui.x_fcol);
int issel = x->x_gui.x_selected == canvas && x->x_gui.x_glist == canvas;
sys_vgui(".x%lx.c itemconfigure %lxNUMBER -font %s -fill %s\n",
canvas, x, iemgui_font(&x->x_gui), issel ? selection_color : fcol);
sys_vgui(".x%lx.c itemconfigure %lxBASE2 -stroke %s\n",
canvas, x, issel ? selection_color : fcol);
iemgui_label_draw_config(&x->x_gui,canvas);
sys_vgui(".x%lx.c itemconfigure %lxBASE1 -fill #%6.6x\n", canvas,
x, x->x_gui.x_bcol);
......@@ -434,23 +433,18 @@ static void my_numbox_properties(t_gobj *z, t_glist *owner)
}
sprintf(buf, "pdtk_iemgui_dialog %%s |nbx| \
-------dimensions(digits)(pix):------- %d %d width: %d %d height: \
-----------output-range:----------- %g min: %g max: %d \
%d lin log %d %d log-height: %d \
{%s} {%s} \
{%s} %d %d \
%d %d \
%d %d %d\n",
x->x_gui.x_w, 1, x->x_gui.x_h, 8,
x->x_min, x->x_max,
x->x_hide_frame, /*EXCEPTION: x_hide_frame instead of schedule*/
x->x_lin0_log1, x->x_gui.x_loadinit, -1,
x->x_log_height, /*no multi, but iem-characteristic*/
srl[0]->s_name, srl[1]->s_name,
srl[2]->s_name, x->x_gui.x_ldx, x->x_gui.x_ldy,
x->x_gui.x_font_style, x->x_gui.x_fontsize,
0xffffff & x->x_gui.x_bcol, 0xffffff & x->x_gui.x_fcol,
0xffffff & x->x_gui.x_lcol);
-------dimensions(digits)(pix):------- %d %d width: %d %d height: \
-----------output-range:----------- %g min: %g max: %d \
%d lin log %d %d log-height: %d {%s} {%s} {%s} %d %d %d %d %d %d %d\n",
x->x_gui.x_w, 1, x->x_gui.x_h, 8, x->x_min, x->x_max,
x->x_hide_frame, /*EXCEPTION: x_hide_frame instead of schedule*/
x->x_lin0_log1, x->x_gui.x_loadinit, -1,
x->x_log_height, /*no multi, but iem-characteristic*/
srl[0]->s_name, srl[1]->s_name, srl[2]->s_name,
x->x_gui.x_ldx, x->x_gui.x_ldy,
x->x_gui.x_font_style, x->x_gui.x_fontsize,
0xffffff & x->x_gui.x_bcol, 0xffffff & x->x_gui.x_fcol,
0xffffff & x->x_gui.x_lcol);
gfxstub_new(&x->x_gui.x_obj.ob_pd, x, buf);
}
......@@ -474,8 +468,8 @@ static void my_numbox_dialog(t_my_numbox *x, t_symbol *s, int argc,
iemgui_dialog(&x->x_gui, argc, argv);
x->x_numwidth = my_numbox_calc_fontwidth(x);
my_numbox_check_minmax(x, min, max);
iemgui_draw_erase(&x->x_gui, x->x_gui.x_glist);
iemgui_shouldvis(&x->x_gui, IEM_GUI_DRAW_MODE_NEW);
x->x_gui.x_draw(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_CONFIG);
x->x_gui.x_draw(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_MOVE);
scalehandle_draw(&x->x_gui, x->x_gui.x_glist);
iemgui_label_draw_new(&x->x_gui, x->x_gui.x_glist);
if (x->x_gui.x_selected)
......@@ -490,7 +484,7 @@ static void my_numbox_dialog(t_my_numbox *x, t_symbol *s, int argc,
static void my_numbox_motion(t_my_numbox *x, t_floatarg dx, t_floatarg dy)
{
double k2=1.0;
int old = x->x_val;
int old = x->x_val;
if(x->x_gui.x_finemoved)
k2 = 0.01;
......
......@@ -488,11 +488,9 @@ static void vu_properties(t_gobj *z, t_glist *owner)
static void vu_dialog(t_vu *x, t_symbol *s, int argc, t_atom *argv)
{
canvas_apply_setundo(x->x_gui.x_glist, (t_gobj *)x);
//t_symbol *srl[3];
int w = atom_getintarg(0, argc, argv);
int h = atom_getintarg(1, argc, argv);
int scale = !!atom_getintarg(4, argc, argv);
//srl[0] = s_empty;
int sr_flags = iemgui_dialog(&x->x_gui, argc, argv);
x->x_gui.x_loadinit = 0;
x->x_gui.x_w = iemgui_clip_size(w);
......@@ -500,8 +498,8 @@ static void vu_dialog(t_vu *x, t_symbol *s, int argc, t_atom *argv)
vu_scale(x, (t_float)scale);
x->x_gui.x_draw(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_CONFIG);
iemgui_draw_io(&x->x_gui, x->x_gui.x_glist, sr_flags);
scalehandle_draw(&x->x_gui, x->x_gui.x_glist);
iemgui_shouldvis(&x->x_gui, IEM_GUI_DRAW_MODE_MOVE);
scalehandle_draw(&x->x_gui, x->x_gui.x_glist);
scrollbar_update(x->x_gui.x_glist);
}
......@@ -617,7 +615,7 @@ static void *vu_new(t_symbol *s, int argc, t_atom *argv)
x->x_rms = 0;
x->x_fp = -101.0;
x->x_fr = -101.0;
iemgui_verify_snd_ne_rcv(&x->x_gui);
iemgui_verify_snd_ne_rcv(&x->x_gui); // makes no sense, because snd is unused
inlet_new(&x->x_gui.x_obj, &x->x_gui.x_obj.ob_pd, &s_float, gensym("ft1"));
x->x_out_rms = outlet_new(&x->x_gui.x_obj, &s_float);
x->x_out_peak = outlet_new(&x->x_gui.x_obj, &s_float);
......
Markdown is supported
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