Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/wid_build/libs/ptfindresource.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/wid_build/libs/ptfindresource.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/wid_build/libs/ptfindresource.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/wid_build/libs/ptfindresource.html on line 8

PtFindResource()

Find the record associated with a resource

Synopsis:

PtResourceRec_t const * PtFindResource(
    long type,
    PtWidgetClass_t const * const a_class );

Arguments:

type
The resource you want to find (e.g. Pt_ARG_COLOR).
a_class
The widget class to search.

Description:

This function finds the resource record for the resource given by type in the a_class class or any of its superclasses. You can use this function to detect whether a widget implements a particular resource or not, or in your own Set Resource/Get Resource methods.

Returns:

A pointer to a resource record, or NULL if no resource is found.

Examples:

my_label_setcolor( PtWidget_t *widget, PgColor_t color )
{
  const PtResourceRec_t *res_rec;
  PtArg_t argt;
  PtSetArg( &argt, Pt_ARG_COLOR, color, 0 );
  res_rec = PtFindResource( Pt_ARG_COLOR,
                                  PtLabel->wclass );
  PtSetValue( widget, res_rec, &argt );
}

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtSetValue()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/wid_build/libs/ptfindresource.html on line 123

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/wid_build/libs/ptfindresource.html on line 123