Copy a widget from a PhAB widget database
#include <Ap.h> int ApCopyDBWidget( ApDBase_t const *from_dbase, char const *from_name, ApDBase_t *to_dbase, char const *to_name );
Ap
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.
This function was previously called ApCopyWidget(). You should use the new name, although applications that use the old name will still work. |
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" );
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
ApDeleteDBWidget(), ApOpenDBase(), ApOpenDBaseFile(), ApSaveDBaseFile()
Accessing PhAB Modules from Code chapter of the Photon Programmer's Guide