Find the next widget in an area
PtWidget_t * PtContainerBox( PtWidget_t *container, PtWidget_t *start, PhRect_t const *rect );
ph
This function returns a pointer to the first widget within the specified container that intersects with the rectangle defined in the PhRect_t structure pointed to by rect.
The widget identified by start tells the function where to start looking for intersections. First, the function checks start's brother behind. Then, it then checks the brother behind that, and so on.
If no widget after start intersects with rect or if the provided container pointer doesn't actually point to a container, the function returns NULL.
PtWidget_t *target_widget, *my_pane; ... // In my_pane's RAW callback: int my_raw_cb( PtWidget_t *container, void *data, PtCallbackInfo_t *cbinfo ) { ... rect = PhGetRects( cbinfo->event ); if( target_widget = PtContainerBox( widget, PtWidgetChildFront( container ) , &rect ) ) PtDestroyWidget( target_widget ); ...
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PhGetRects(), PhRect_t, PtContainerHit(), PtWidgetChildFront()