PtSetClassStyleMethods()

Set multiple members of a style from an array

Synopsis:

int PtSetClassStyleMethods(
       PtWidgetClassStyle_t *style,
       int num_methods,
       PtStyleMethods_t *meth_array );

Library:

ph

Description:

This function is similar to PtSetStyleMember(), but lets you specify an array of (manifest, value) pairs to set multiple members in a single call.

Returns:

0 on success, or the number of the first manifest that wasn't successfully set.


Note: If the return is greater than 0, subtract 1 from it to determine the index into the array of manifests. For example, if PtSetClassStyleMethods() returns 1, meth_array[0] contains the first manifest that couldn't be set.

Examples:

…

PtStyleMethods_t neon_methods[2] = {
                    {Pt_STYLE_DRAW, neon_draw},
                    {Pt_STYLE_SIZING, neon_sizing}
                 };
…
PtSetClassStyleMethods (neon_style, 2, neon_methods);

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtAddClassStyle(), PtCreateClassStyle(), PtDupClassStyle(), PtFindClassStyle(), PtGetStyleMember(), PtGetWidgetStyle(), PtSetStyleMember(), PtSetStyleMembers(), PtSetWidgetStyle()

Pt_ARG_STYLE resource of PtBasic in the Photon Widget Reference

Widget Styles in the Managing Widgets in Application Code chapter of the Photon Programmer's Guide