Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

PtCreateClassStyle()

Create a class style

Synopsis:

PtWidgetClassStyle_t *PtCreateClassStyle(
   char *name );

Library:

ph

Description:

This function creates a new class style and calls the style name.

Returns:

A pointer to a new class style, or NULL if the wasn't enough memory to create it.

Examples:

This example is based on the one in Widget Styles in the Managing Widgets in Application Code chapter of the Photon Programmer's Guide:

PtWidgetClassStyle_t *new_style =
   PtCreateClassStyle("blue");

PtSetStyleMember( new_style, Pt_STYLE_DRAW,
                  blue_draw);
PtAddClassStyle( PtButton, new_style);

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtAddClassStyle(), PtDupClassStyle(), PtFindClassStyle(), PtGetStyleMember(), PtGetWidgetStyle(), PtSetClassStyleMethods(), 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