Picking Library


Defined Callbacks

The point action routines, the horizon action routines, and the AutoPick action routine implemented by the Picking Library execute callback procedures registered with a Picking Record. You use Picking Library functions to register your callback procedures with a Picking Record.

Callback TypeDescription
select_point_callbackCalled when a point is selected with the PointSelect action.
add_point_callbackCalled when a point is added with the PointInsert action.
delete_point_callbackCalled when a point is added with the PointDelete or DeleteLastPoint actions.
move_point_callbackCalled when a point is moved with the PointEndMove action.
select_horizon_callbackCalled when a horizon is selected with the PointSelect action or with the XintPickingRecordSetCurrentHorizon function.
add_horizon_callbackCalled when a horizon is created with the HorizonCreate action.
delete_horizon_callbackCalled when a horizon is deleted with the HorizonDelete action.
move_horizon_callbackCalled when a horizon is moved with the HorizonEndMove action.
snap_callbackCalled when a point is created via the PointInsert action or the XintPointCreate function if the snap mode is not XintNO_SNAP.
tracker_callbackCalled when the automatic tracker is activated via the AutoPick action.


Point Callbacks

You can register one or more of the point callbacks, select_point_callback, add_point_callback, or delete_point_callback with a Picking Record using the Picking Library function, XintPickingRecordPointCallback. You use the Picking Library function, XintPickingRecordPointMoveCallback to register a move_point_callback with a picking record. The callback procedures for the point actions use the following arguments in their argument lists.

Data TypeArg NameDescription
WidgetwidgetWidget where the point action has occurred.
XtPointercallback_dataAddress of the application defined data structure passed to the callback procedure.
XintPoint *pointPointer to the Point structure of the point of interest.
Boolean *doit(Defined for delete_point_callback and move_point_callback only) specifies whether the action routine should perform the action on the point.

The doit flag will be set to True by the move point or delete point action routine before it calls the corresponding callback procedure. If the callback procedure decides that the move or delete action should not be performed on the point, then the callback procedure should set the doit flag to False before returning to the action routine. When the action routine checks the value of doit, if its value is False then the point will not be moved or deleted.


Horizon Callbacks

You can register one or more of the horizon callbacks ( select_horizon_callback, add_horizon_callback, delete_horizon_callback) with a Picking Record using the Picking Library function, XintPickingRecordHorizonCallback. You use the Picking Library function, XintPickingRecordHorizonMoveCallback to register a move_horizon_callback with a picking record. The callback procedures for the horizon actions use the following arguments in their argument lists.

Data TypeArg NameDescription
WidgetwidgetWidget where the horizon action has occurred.
XtPointercallback_dataAddress of the application defined data structure passed to the callback procedure.
XintHorizon *horizonPointer to the Horizon structure of the horizon of interest.
Boolean *doit(Defined for delete_horizon_callback and move_horizon_callack only) specifies whether the action routine should perform the action on the horizon.


Snap Callback

The Picking Library defines a default snap callback that you can override by substituting your own callback. You associate your snap callback procedure with a Picking Record using the Picking Library function XintPickingRecordSetSnapCallback. The description of how to create and integrate your own snap callback is not described in this document.

Tracker Callback

The Picking Library defines a default Tracker that you can override by substituting your own callback. You associate your tracker callback procedure with a Picking Record using the Picking Library function, XintPickingRecordSetTrackerCallback. The description of how to create and integrate your own tracker callback is not described in this document.