Update of /cvsroot/pure-data/externals/tkwidgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28881
Modified Files: checkbutton.c Log Message: added displace function from text.c
Index: checkbutton.c =================================================================== RCS file: /cvsroot/pure-data/externals/tkwidgets/checkbutton.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** checkbutton.c 22 Nov 2007 00:37:59 -0000 1.2 --- checkbutton.c 22 Nov 2007 02:50:23 -0000 1.3 *************** *** 42,45 **** --- 42,48 ---- int width; int height; + + int x_resizing; + int x_selected;
/* IDs for Tk widgets */ *************** *** 176,179 **** --- 179,196 ---- }
+ static void checkbutton_displace(t_gobj *z, t_glist *glist, int dx, int dy) + { + t_checkbutton *x = (t_checkbutton *)z; + x->x_obj.te_xpix += dx; + x->x_obj.te_ypix += dy; + if (glist_isvisible(glist)) + { + set_tkwidgets_ids(x,glist_getcanvas(glist)); + sys_vgui("%s move %s %d %d\n", x->canvas_id->s_name, x->all_tag->s_name, dx, dy); + sys_vgui("%s move RSZ %d %d\n", x->canvas_id->s_name, dx, dy); + canvas_fixlinesfor(glist_getcanvas(glist), (t_text*) x); + } + } + static void checkbutton_delete(t_gobj *z, t_glist *glist) { *************** *** 271,275 ****
checkbutton_widgetbehavior.w_getrectfn = checkbutton_getrect; ! checkbutton_widgetbehavior.w_displacefn = NULL; checkbutton_widgetbehavior.w_selectfn = NULL; checkbutton_widgetbehavior.w_activatefn = NULL; --- 288,292 ----
checkbutton_widgetbehavior.w_getrectfn = checkbutton_getrect; ! checkbutton_widgetbehavior.w_displacefn = checkbutton_displace; checkbutton_widgetbehavior.w_selectfn = NULL; checkbutton_widgetbehavior.w_activatefn = NULL;