diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js index 6bc6599b17627ae229afe2928d39352b3fa89c71..420b6183ada53ba62f468eff39e2a790d5d79359 100644 --- a/pd/nw/pdgui.js +++ b/pd/nw/pdgui.js @@ -3201,6 +3201,11 @@ function gui_iemgui_dialog(did, attr_array) { attr_array_to_object(attr_array)); } +function gui_dialog_set_field(did, field_name, value) { + var elem = dialogwin[did].window.document.getElementsByName(field_name)[0]; + elem.value = value; +} + function gui_create_array(did, count) { var attr_array = [{ array_gfxstub: did, diff --git a/pd/src/g_all_guis.c b/pd/src/g_all_guis.c index 7ec07cd51e3b3d1b9d869176a1cc998ef6f9841a..a0b25113a3f08a6b4c8553693068c5560be8435b 100644 --- a/pd/src/g_all_guis.c +++ b/pd/src/g_all_guis.c @@ -795,8 +795,14 @@ void scalehandle_free(t_scalehandle *h) { } void properties_set_field_int(long props, const char *gui_field, int value) { - sys_vgui(".gfxstub%lx.%s delete 0 end\n", props, gui_field); - sys_vgui(".gfxstub%lx.%s insert 0 %d\n", props, gui_field, value); + //sys_vgui(".gfxstub%lx.%s delete 0 end\n", props, gui_field); + //sys_vgui(".gfxstub%lx.%s insert 0 %d\n", props, gui_field, value); + char tagbuf[MAXPDSTRING]; + sprintf(tagbuf, ".gfxstub%lx", props); + gui_vmess("gui_dialog_set_field", "ssi", + tagbuf, + gui_field, + value); }; void scalehandle_dragon_label(t_scalehandle *h, float mouse_x, float mouse_y) { @@ -813,8 +819,8 @@ void scalehandle_dragon_label(t_scalehandle *h, float mouse_x, float mouse_y) { { int new_x = x->x_ldx + h->h_dragx; int new_y = x->x_ldy + h->h_dragy; - properties_set_field_int(properties,"label.xy.x_entry",new_x); - properties_set_field_int(properties,"label.xy.y_entry",new_y); + properties_set_field_int(properties, "x-offset", new_x); + properties_set_field_int(properties, "y-offset", new_y); } x->x_ldx += dx; x->x_ldy += dy; diff --git a/pd/src/g_bang.c b/pd/src/g_bang.c index 37962b947d045832c09fb8ea216bb5296bbbca6a..cdf9d72f3486e8b72eef737acf80f168d9725b90 100644 --- a/pd/src/g_bang.c +++ b/pd/src/g_bang.c @@ -202,7 +202,7 @@ static void bng__motionhook(t_scalehandle *sh, if (properties) { int new_w = x->x_gui.x_w + sh->h_dragx; - properties_set_field_int(properties,"dim.w_ent",new_w); + properties_set_field_int(properties,"size",new_w); } } scalehandle_dragon_label(sh,mouse_x, mouse_y); diff --git a/pd/src/g_numbox.c b/pd/src/g_numbox.c index b33381dbb8d1714e18cf6dde7ebb2ba130ac1013..a9221b32efb56f5f92f8890fdcdfed4e44b75051 100644 --- a/pd/src/g_numbox.c +++ b/pd/src/g_numbox.c @@ -369,9 +369,9 @@ static void my_numbox__motionhook(t_scalehandle *sh, int properties = gfxstub_haveproperties((void *)x); if (properties) { - properties_set_field_int(properties,"dim.w_ent",x->x_scalewidth); - properties_set_field_int(properties,"dim.h_ent",x->x_scaleheight); - properties_set_field_int(properties,"label.fontsize_entry",x->x_tmpfontsize); + properties_set_field_int(properties,"width",x->x_scalewidth); + properties_set_field_int(properties,"height",x->x_scaleheight); + properties_set_field_int(properties,"font-size",x->x_tmpfontsize); } } scalehandle_dragon_label(sh,mouse_x, mouse_y); diff --git a/pd/src/g_radio.c b/pd/src/g_radio.c index 8993246833a62b0a754cfe8903b32fceec9835ad..8a73cc971d60fe82b75cf3d8d88a8d6df395d450 100644 --- a/pd/src/g_radio.c +++ b/pd/src/g_radio.c @@ -190,7 +190,7 @@ static void radio__motionhook(t_scalehandle *sh, t_floatarg mouse_x, t_floatarg int properties = gfxstub_haveproperties((void *)x); if (properties) { - properties_set_field_int(properties,"dim.w_ent", x->x_orient ? + properties_set_field_int(properties,"size", x->x_orient ? x->x_gui.x_h + sh->h_dragy : x->x_gui.x_w + sh->h_dragx); } diff --git a/pd/src/g_slider.c b/pd/src/g_slider.c index 143bedbc24c521f0a7bc0fed9fe0278dbf907c85..5fab445793dcef0f62340def9fd99a3ae534e568 100644 --- a/pd/src/g_slider.c +++ b/pd/src/g_slider.c @@ -183,8 +183,8 @@ static void slider__motionhook(t_scalehandle *sh, t_floatarg mouse_x, t_floatarg { int new_w = x->x_gui.x_w + sh->h_dragx; int new_h = x->x_gui.x_h + sh->h_dragy; - properties_set_field_int(properties,"dim.w_ent",new_w); - properties_set_field_int(properties,"dim.h_ent",new_h); + properties_set_field_int(properties,"width",new_w); + properties_set_field_int(properties,"height",new_h); } } scalehandle_dragon_label(sh,mouse_x, mouse_y); diff --git a/pd/src/g_toggle.c b/pd/src/g_toggle.c index 089115e538664de3189237d9ca2feb81b6cf3377..9316e1135b5cfde6ee38c8847a02684a0342fb37 100644 --- a/pd/src/g_toggle.c +++ b/pd/src/g_toggle.c @@ -159,13 +159,12 @@ static void toggle__motionhook(t_scalehandle *sh, t_floatarg mouse_x, t_floatarg if (properties) { int new_w = x->x_gui.x_w + sh->h_dragx; - properties_set_field_int(properties,"dim.w_ent",new_w); + properties_set_field_int(properties,"size",new_w); } } scalehandle_dragon_label(sh,mouse_x, mouse_y); } - void toggle_draw(t_toggle *x, t_glist *glist, int mode) { if(mode == IEM_GUI_DRAW_MODE_UPDATE) sys_queuegui(x, x->x_gui.x_glist, toggle_draw_update); diff --git a/pd/src/g_vumeter.c b/pd/src/g_vumeter.c index 7e09183f1cf8b16e866c9400c7ea05b1ddbee2d4..65ef77d26f2376e192b41005e82d74229f861c62 100644 --- a/pd/src/g_vumeter.c +++ b/pd/src/g_vumeter.c @@ -354,8 +354,8 @@ static void vu__motionhook(t_scalehandle *sh, t_floatarg mouse_x, t_floatarg mou { int new_w = x->x_gui.x_w + sh->h_dragx; int new_h = x->x_gui.x_h + sh->h_dragy; - properties_set_field_int(properties,"dim.w_ent",new_w); - properties_set_field_int(properties,"dim.h_ent",new_h); + properties_set_field_int(properties,"width",new_w); + properties_set_field_int(properties,"height",new_h); } } scalehandle_dragon_label(sh,mouse_x, mouse_y);