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/lib_ref/pt/ptdestroywidget.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/lib_ref/pt/ptdestroywidget.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/lib_ref/pt/ptdestroywidget.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/lib_ref/pt/ptdestroywidget.html on line 8

PtDestroyWidget()

Remove a widget from the widget family hierarchy

Synopsis:

int PtDestroyWidget( PtWidget_t *widget );

Library:

ph

Description:

This function performs the following on the specified widget:

The widget's resources aren't freed until the return of PtEventHandler().


Note: You might get callbacks from the widget after PtDestroyWidget() has returned. To determine if this is happening, check the widget's Pt_DESTROYED flag. For example:
if (PtWidgetFlags(widget) & Pt_DESTROYED)
{
   return( Pt_CONTINUE );
}

Returns:

0
Success.
-1
An error occurred.

Examples:

See PtContainerBox().

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtEventHandler(), PtCreateWidget(), PtRealizeWidget(), PtUnrealizeWidget(), PtWidgetFlags()

Pt_ARG_FLAGS, Pt_CB_DESTROYED, Pt_CB_IS_DESTROYED resources of PtWidget in the Widget Reference

Widget life cycle in the Introduction to the Photon Programmer's Guide


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/lib_ref/pt/ptdestroywidget.html on line 146

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/lib_ref/pt/ptdestroywidget.html on line 146