formZ SDK | 4.0 Call Back Reference | Object Attributes

# fz_attr_cbak_iface_tmpl_multi

Description

Custom attribute dialog function for displaying multiple attributes in the properties palette (Strongly Recommended). This function is called whenever an object is picked and its attributes are displayed in the properties palette. It is expected to create the editing items to display the content of the attribute. Noe, that this callback function should not create a new template via fz_fuim_tmpl_init. In addition this callback needs to handle mutiple attirbutes, which are passed in as an array. The items should be created based on the content of the first attribute in the array. Each template item needs to be assigned an item callback function. If the attribute value for that item is different in at least on other attribute (assuming there is more than one attibute passed in), the item callback function needs to respond to the FZ_FUIM_ACTN_GET_VALUE action, by setting the return value of the item callback to TRUE

Plugin Prototype

fzrt_int fz_attr_cbak_iface_tmpl_multi(

fzrt_int | windex,
fz_fuim_tmpl_ptr | fuim_tmpl,
short | parent,
fzrt_ptr * | attr_data )

Parameters

windex [Input]

project window index

fuim_tmpl [Input]

Pointer to the dialog template.

parent [Input]

the parent group for the items to be created.

attr_data [Input]

Array of pointers to "n_attr_data" attributes.

Returns

the dialog template index

Availability

7.0.0.0

Plugin Example

short my_item_func( fz_fuim_tmpl_ptr fuim_tmpl, fzrt_int action, short item_id, void *func_data, fz_fuim_type_td *rv_data) { short rv = FALSE; switch (action) { case FZ_FUIM_ACTN_GET_VALUE : switch ( item_id ) { case MY_ATTR_FIELD_1 :
// figure out whether this attr field has multiple values ...
if ( multi_values ) { rv = TRUE | 0x8001; }
break;
}
break;
case FZ_FUIM_ACTN_NEW_VALUE :
for (i = 1; i < n_attrs; i++) { switch ( item_id ) { case MY_ATTR_FIELD_1 :
// copy changed value from first attr to all other attributes ...
break; } }
rv = TRUE; break; }
return(rv); }

Function Set

fz_attr_cbak_fset

Defined in

fz_objt_attr_api.h