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/ap/apcopydbwidget.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/ap/apcopydbwidget.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/ap/apcopydbwidget.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/ap/apcopydbwidget.html on line 8

ApCopyDBWidget()

Copy a widget from a PhAB widget database

Synopsis:

#include <Ap.h>

int ApCopyDBWidget( ApDBase_t const *from_dbase,
                    char const *from_name,
                    ApDBase_t *to_dbase,
                    char const *to_name );

Arguments:

from_dbase
A pointer to a PhAB widget database structure, returned by ApOpenDBase() or ApOpenDBaseFile(), for the database that you want to copy a widget from.
from_name
The name of the widget that you want to copy.
to_dbase
A pointer to a PhAB widget database structure for the database that you want to copy the widget to.
to_name
The name to use for the copy of the widget.

Library:

Ap

Description:

ApCopyDBWidget() copies a widget from one PhAB widget database to another. The from_name parameter indicates which widget to copy from the database, and to_name lets you rename the copy. Only one widget can be copied at a time. If you copy a container-class widget, only the container widget is copied, not its children.


Note: This function was previously called ApCopyWidget(). You should use the new name, although applications that use the old name will still work.

Returns:

0
Success.
-1
Failure.

Examples:

ApDBase_t *from_dbase, *to_dbase;

from_dbase = ApOpenDBaseFile( "/home/me/mydbase.wgtp" );
to_dbase   = ApOpenDBaseFile( "/home/joe/his_dbase.wgtp" );
ApCopyDBWidget( from_dbase, "my_icon", to_dbase, "his_icon" );
ApSaveDBaseFile( to_dbase, "/home/joe/his_dbase.wgtp" );

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

ApDeleteDBWidget(), ApOpenDBase(), ApOpenDBaseFile(), ApSaveDBaseFile()

Accessing PhAB Modules from Code chapter of 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/ap/apcopydbwidget.html on line 161

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/ap/apcopydbwidget.html on line 161