![]() |
![]() |
![]() |
![]() |
Open a module as a widget database
#include <Ap.h>
ApDBase_t *ApOpenDBase(
ApEventLink_t const *link_callback );
Ap
ApOpenDBase() opens the given module as a widget database. Typically, the module is a picture, but it can also be a window or dialog.
ApOpenDBaseFile() lets you open an external module file as a widget database.
A pointer to a PhAB picture database structure, or NULL for failure.
ApDBase_t *mydbase;
PtArg_t args[2];
mydbase = ApOpenDBase( ABM_mypicture );
PtSetArg( &args[0], Pt_ARG_TEXT_STRING,
"This Widget", 0 );
ApCreateWidget( mydbase, "my_label_widget", 10, 10, 1,
args );
PtSetArg( &args[0], Pt_ARG_TEXT_STRING,
"That Widget", 0 );
PtSetArg( &args[1], Pt_ARG_FILL_COLOR, Pg_WHITE, 0 );
ApCreateWidget( mydbase, "my_label_widget", 10, 30, 2,
args );
ApCloseDBase( mydbase );
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
ApAddClass(), ApCreateDBWidget(), ApCreateDBWidgetFamily(), ApCreateWidget(), ApCreateWidgetFamily(), ApGetDBWidgetInfo(), ApCloseDBase(), ApOpenDBaseFile()
Accessing PhAB Modules from Code chapter of the Photon Programmer's Guide
![]() |
![]() |
![]() |
![]() |