ApOpenDBase()

Open a module as a widget database

Synopsis:

#include <Ap.h>

ApDBase_t *ApOpenDBase( 
              ApEventLink_t const *link_callback );

Arguments:

link_callback
The ABM_ internal link manifest, generated by PhAB, of the module that you want to open.

Library:

Ap

Description:

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.

Returns:

A pointer to a PhAB picture database structure, or NULL for failure.

Examples:

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 );

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

ApAddClass(), ApCreateDBWidget(), ApCreateDBWidgetFamily(), ApCreateWidget(), ApCreateWidgetFamily(), ApGetDBWidgetInfo(), ApCloseDBase(), ApOpenDBaseFile()

Accessing PhAB Modules from Code chapter of the Photon Programmer's Guide