[PD-dev] devel_0_37: widgetbehavior, garray dirty flag

Thomas Grill t.grill at gmx.net
Sat Aug 2 23:02:41 CEST 2003

Hi all,
i added two more smaller things to the devel_0_37 cvs branch:

1) after the recent communication about cloning widget behavior i found the
easiest and equally portable solution to expose the text_widgetbehavior
structure in g_canvas.h so that one can copy the respective functions to an
object's own widgetbehavior structure,
e.g. (from the attribute editor in flext)

//cloned functions
widgetbehavior.w_getrectfn = text_widgetbehavior.w_getrectfn;
widgetbehavior.w_displacefn = text_widgetbehavior.w_displacefn;
widgetbehavior.w_selectfn = text_widgetbehavior.w_selectfn;
widgetbehavior.w_activatefn = text_widgetbehavior.w_activatefn;
widgetbehavior.w_deletefn = text_widgetbehavior.w_deletefn;
widgetbehavior.w_clickfn = text_widgetbehavior.w_clickfn;
// special functions
widgetbehavior.w_propertiesfn = cb_GfxProperties;
widgetbehavior.w_savefn = cb_GfxSave;
widgetbehavior.w_visfn = cb_GfxVis;
class_setwidget(c, &widgetbehavior);

2) in order to know when an array has been updated and use this information
in an external graphical arrays have got a dirty flag in devel_0_36. I
introduced this feature into devel_0_37 along with the exported function
double garray_updatetime(t_garray *x) in m_pd.h
to get the last update time (with the time base of clock_getlogicaltime)

best greetings,

More information about the Pd-dev mailing list