Set the pointer to the child-redirector function
int PtContainerChildRedirect(
PtWidget_t *container,
PtWidget_t *(*redirect)(
PtWidget_t *container,
PtWidgetClassRef_t *child_class_ref ));
This function sets the provided container's child-redirector function to the given redirect function. The child-redirector function is invoked whenever a user attempts to create a widget within the immediate child of container.
The container parameter in the callback must be a pointer to the container itself. The child_class_ref pointer points to the child's class reference, which indicates what class of widget is being created.
The PtWidget_t * return type of your redirector function will be used as the ultimate parent of the newly created widget.
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |