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 );
Description:
ApModuleLocation() is used to specify the module location for a PhAB internal link. The loc_type is one of the following:
- AB_LOC_BELOW_WGT
- AB_LOC_ABOVE_WGT
- AB_LOC_RIGHT_WGT
- AB_LOC_LEFT_WGT
- AB_LOC_TOP_LEFT
- AB_LOC_TOP_RIGHT
- AB_LOC_BOT_LEFT
- AB_LOC_BOT_RIGHT
- AB_LOC_CENTER
- AB_LOC_REL_CURSOR
- AB_LOC_REL_MODULE
- AB_LOC_DEFAULT - let the window manager determine the position. The offsets are ignored.
- AB_LOC_ABSOLUTE - x_offset and y_offset are the absolute coordinates for the module.
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 |
