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
Find the record associated with a resource
PtResourceRec_t const * PtFindResource(
long type,
PtWidgetClass_t const * const a_class );
- type
- The resource you want to find (e.g. Pt_ARG_COLOR).
- a_class
- The widget class to search.
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.
A pointer to a resource record, or NULL if no resource is found.
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 );
}
Photon
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
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