[PD-dev] defining a widget behavior (GUI externals)
t.grill at gmx.net
Sun Jul 20 17:48:48 CEST 2003
flext (cvs version) now contains an attribute editor that can be accessed
with the "properties" context menu function of any attribute-enabled
flext-based external .
However, i'm not really satisfied with the implementation... maybe someone
can help me with that:
Is there a portable way to e.g use only the "properties" or the "save"
method of the widget behavior but leave the others as they are (for normal
object box behavior)? Using these functions is a good thing for
non-graphical objects also.
Currently, there seem to be only two non-satisfying ways:
1) when the class setup function is called by PD the class widget-structure
is already initialized with the functions for normal object behavior.
Copy these to a new structure and modify only the needed ones (e.g. only the
"save" method") (as implemented in flext now)
This has the drawback that the class structure must be known, which implies
the usage of m_imp.h instead of m_pd.h which is not available publicly in
/usr/include for linux installations
2) Initialize the new widget behavior structure with the PD-internal widget
methods along with one new "save" method.
However, these internal PD methods are not exposed in m_pd.h but statically
defined. To use them the API has to be changed.
Am i missing something obvious? Are there other ways, or how can the
situation be made better?
thanks for any input,
More information about the Pd-dev