Opaque dragging in PhInitDrag

I wrote 2 programs:

First - using PhAB and the second “manually” (w/o PhAB).
In both I used operation “dragg” for a widget (e.g. vertical
selector PtSelector - used as “cursor line” for a graph).
In the program maked using PhAB the both methods of “dragg”
works correctly (outline dragging and opaque dragging).

In my code wrotten “manually” (w/o PhAB) I used exactly
the same callback functions for dragging. Unfortunately,
works only “outline dragging”. “opaque dragging” doesn’t
work, and that’s just what I need …

My question is: Why there works only the first (outline) method
of dragging, ad the second doesn’t? The only one difference is
another value in the second parameter PhInitDragg() funtion!

int kursor_dragging_cb( PtWidget_t *w, void *dane, PtCallbackInfo_t
*cbinfo )
PhRect_t rect, boundary;

PtWidgetExtent( w, &rect );

PtWidgetExtent( grid_wykresy, &boundary );

PhInitDrag( PtWidgetRid( pane_wykresy ),
Ph_TRACK_DRAG | Ph_DRAG_TRACK, << — doesn’t work
&rect, with

return( Pt_CONTINUE );

} // kurosr_dragging_cb

/* ------------------------------------ */

int raw_dragging_cb( PtWidget_t *w, void *dane, PtCallbackInfo_t *cbinfo
PhEvent_t *Event;
PhDragEvent_t *dragev;
PhPoint_t new_pos;

Event = cbinfo->event;

if ( Event->subtype != Ph_EV_DRAG_COMPLETE
&& Event->subtype != Ph_EV_DRAG_MOVE )
return( Pt_CONTINUE );

dragev = PhGetData( cbinfo->event );

new_pos.x = dragev->rect.ul.x + cbinfo->event->translation.x;
new_pos.y = dragev->rect.ul.y + cbinfo->event->translation.y;

return( Pt_CONTINUE );

} // raw_dragging_cb

/* ------------------------------------ */



Arkadiusz Benes

ZEiSAP MikroB S.A. Oddzial Wroclaw
ul.Leszczynskiego 4, 50-078 Wroclaw
tel./fax (+71) 344-22-55 http://www.mikrobsa.com.pl/