ApModuleLocation()

Specify the module location for a PhAB internal link

Synopsis:

#include <Ap.h>

void ApModuleLocation( ApEventLink_t *link_callback,
                       int loc_type,
                       int x_offset,
                       int y_offset );

Arguments:

link_callback
The ABM_ link callback for the module whose location you want to specify.
loc_type
Where to place the module; one of the following:
x_offset, y_offset
The horizontal and vertical offsets for the module, relative to the given location.

Library:

Ap

Description:

ApModuleLocation() is used to specify the module location for a PhAB internal link.

The x_offset and y_offset pixel values are applied to the location determined from the loc_type. For example, if you want a dialog to appear 100 pixels from the top right edge of the screen, set the x_offset to -100 and the loc_type to AB_LOC_TOP_RIGHT.

When you create an internal link in PhAB, you can set the location. This function lets you change that value if required. The new location will remain in effect until changed again.

Examples:

/* place the module in the center of the screen */
ApModuleLocation( ABM_mydialog, AB_LOC_CENTER, 0, 0 );
ApCreateModule( ABM_mydialog, NULL, NULL );

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

ApModuleFunction()

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