Hi.
i have many widgets on main form in scrollarea.
i need atach callbacks to this widgets.
callback for mouse button press|release and boundary.
well, press and release works fine, but for boundary widgets don’t invoke callcbak for Ph_EV_BOUNDARY.
Widgets i did in PhAb, not in code.
sample of my code
int CallBack(PtWidget_t *widget, void * data, PtCallbackInfo_t *cbinfo)
{
printf("Type %d Subtype %d\t",cbinfo->event->type,cbinfo->event->subtype);
switch (cbinfo->event->type)
{
case Ph_EV_BOUNDARY:
switch (cbinfo->event->subtype)
{
case Ph_EV_PTR_ENTER: printf("Enter\n"); break;
case Ph_EV_PTR_LEAVE: printf("Leave\n"); break;
}
break;
case Ph_EV_BUT_PRESS: printf("Press\n"); break;
case Ph_EV_BUT_RELEASE: printf("Release\n"); break;
}
return Pt_CONTINUE;
}
and now i attach this callback to some test widget(PtRect in my case) on app’s startup
PtAddEventHandler(sv_arr[0]->Border,Ph_EV_PTR_MOTION_NOBUTTON | Ph_EV_BUT_RELEASE | Ph_EV_BUT_PRESS | Ph_EV_BOUNDARY,CallBack,NULL);
well, when i\m clicking on it - events for Release and Press - works fine.
when i moving mouse pointer in/out widget - nothing happens!
but if i attach this callbacks throuh PhAB - all events work fine.
any suggestions?