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

ApAddClass()

Indicate the widgets likely to be encountered in a widget database

Synopsis:

#include <Ap.h>

int ApAddClass( 
        char const * class_name_string,
        PtWidgetClassRef_t * const *wgt_class);

Arguments:

class_name_string
The name of the class (for example, "PtButton").
wgt_class
A predefined widget class; specify the name of the class preceded by an ampersand (for example, &PtButton).

Library:

Ap

Description:

This function lets you indicate which widget classes you're likely to encounter when you call ApOpenDBaseFile().

When you link your application, only those widgets it needs are linked into it. If you access widgets that aren't in your application because they're in an external database, you must add them to your internal class table so that they can be linked in at compile time.

Any widgets used when you build a PhAB application are automatically included in the internal class table (see the generated abmain.c file). When you use widgets from an external database, PhAB doesn't know which widgets you need to access, so you'll have to use this function to include them.

If you're loading a DLL that adds classes, you should call ApRemoveClass() to remove the classes before you unload the DLL.

Returns:

0
Success.
-1
There isn't enough memory to add the widget class, or you've already added a different widget class with the same name.

Examples:

base_setup ( ... )
{

    ApAddClass ("PtProgress", &PtProgress);
   
    return (Pt_CONTINUE);
}

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

ApOpenDBaseFile(), ApRemoveClass()

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/apaddclass.html on line 155

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/apaddclass.html on line 155