Copy a widget from a PhAB widget database
#include <Ap.h>
int ApCopyWidget( ApDBase_t const *from_dbase,
char const *from_name,
ApDBase_t *to_dbase,
char const *to_name );
ApCopyWidget() 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.
ApDBase_t *from_dbase, *to_dbase; from_dbase = ApOpenDBaseFile( "/home/me/mydbase.wgtp" ); to_dbase = ApOpenDBaseFile( "/home/joe/his_dbase.wgtp" ); ApCopyWidget( from_dbase, "my_icon", to_dbase, "his_icon" ); ApSaveDBaseFile( to_dbase, "/home/joe/his_dbase.wgtp" );
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
ApOpenDBase(), ApOpenDBaseFile(), ApSaveDBaseFile()