Seismic Widget Class


Defined Callbacks

The following callbacks are defined (or inherited) by a Seismic widget.

NameStructureReason
XmNannotationCallbackXintSeismicAnnotation-
CallbackStruct
XintCR_TRACE_ANNOTATION
XmNareaSelectionCallbackXintSeismicAreaSelection-
CallbackStruct
XintCR_AREA_SELECTION
XmNchangePanelCallbackXintSeismic-
CallbackStruct
XintCR_CHANGE_PANEL
XmNexposeCallbackXintSeismic-
CallbackStruct
XintCR_EXPOSE
XmNlocatorCallbackXintSeismicLocator-
CallbackStruct
XintCR_LOCATOR
XmNnewPixmapCallbackXintSeismicNewPixmap-
CallbackStruct
XintCR_NEW_PIXMAP
XmNprocessTraceCallbackXintSeismicProcessTrace-
CallbackStruct
XintCR_PROCESS_TRACE
XmNresizeCallbackXintSeismic-
CallbackStruct
XintCR_RESIZE
XmNselectionCallbackXintSeismicSelection-
CallbackStruct
XintCR_SELECTION
XmNtraceColorCallbackXintSeismicTraceColor-
CallbackStruct
XintCR_SELECTION


XintSeismicAnnotationCallbackStruct

The following ordered table lists the members of the callback structure, XintSeismicAnnotationCallbackStruct, returned to each procedure in the callback list specified by the resource XmNannotationCalback.

Data TypeMemberDescription
intreasonIndicates why the callback was invoked.
XEvent *eventPointer to the XEvent that triggered the callback.
DrawabledwWhere to draw the annotation.
GCgcGraphics context to be used to draw the annotation.
intxThe x coordinate (in the window coordinate system) of the location to start drawing the annotation.
intyThe y coordinate (in the window coordinate system) of the location to start drawing the annotation.
floatdelta_traceThe distance between traces (in the window coordinate system).


XintSeismicAreaSelectionCallbackStruct

The following ordered table lists the members of the callback structure, XintSeismicAreaSelectionCallbackStruct, returned to each procedure in the callback list specified by the resource XmNareaSelectionCallback.

Data TypeMemberDescription
intreasonIndicates why the callback was invoked.
XEvent *eventPointer to the XEvent that triggered the callback.
intx_startX coordinate of the starting point of the selected area in the window coordinate system.
intx_endX coordinate of the ending point of the selected area in the window coordinate system.
inty_startY coordinate of the starting point of the selected area in the window coordinate system.
inty_endY coordinate of the ending point of the selected area in the window coordinate system.
floattime_startThe time value of the starting point of the selected area.
floattime_endThe time value of the ending point of the selected area.
intpkey_startThe primary key value of the starting point of the selection.
intpkey_endThe primary key value of the ending point of the selection.
intskey_startThe secondary key value of the starting point of the selection.
intskey_endThe secondary key value of the ending point of the selection.
inttn_startThe trace number value of the starting point of the selection.
inttn_endThe trace number value of the ending point of the selection.


XintSeismicCallbackStruct

The following ordered table lists the members of the callback structure, XintSeismicCallbackStruct, used by the Seismic widget for the expose, resize and change panel callbacks

Data TypeMemberDescription
intreasonIndicates why the callback was invoked.
XEvent *eventPointer to the XEvent that triggered the callback.
WindowwindowPointer to the window containing the Seismic widget.


XintSeismicLocatorCallbackStruct

The following ordered table lists the members of the callback structure, XintSeismicLocatorCallbackStruct, returned to each procedure in the callback list specified by the resource XmNlocatorCallback.

Data TypeMemberDescription
intreasonIndicates why the callback was invoked.
XEvent *eventPointer to the XEvent that triggered the callback.
floatfloat_tnIndicates the floating point interpolation of the trace numbers to the left and to the right of the cursor location.
floattimeIndicates the time value at the cursor location.
intpkeyIndicates the primary key value at the cursor location.
intskeyIndicates the secondary key value at the cursor location.
inttnIndicates the trace number of the trace closest to the cursor location.


XintSeismicNewPixmapCallbackStruct

The following ordered table lists the members of the callback structure, XintSeismicNewPixmapCallbackStruct, returned to each procedure in the callback list specified by the resource, XmNnewPixmapCallback.

Data TypeMemberDescription
intreasonIndicates why the callback was invoked.
XEvent *eventPointer to the XEvent that triggered the callback.
PixmappixmapID of the pixmap used to display the seismic section.
intpixmap_widthWidth (in the window coordinate system) of the pixmap.
intpixmap_heightHeight (in the window coordinate system) of the pixmap.
intpixmap_depthDepth (in number of planes) of the pixmap.


XintSeismicProcessTraceCallbackStruct

The following ordered table lists the members of the callback structure, XintSeismicProcessTraceCallbackStruct, returned to each procedure in the callback list specified by the resource XmNprocessTraceCallback.

Data TypeMemberDescription
intreasonIndicates why the callback was invoked.
XEvent *eventPointer to the XEvent that triggered the callback.
float *tracePointer to the array of samples in the trace to be processed.
intnsampleIndicates the number of samples in the trace.
floatsample_rateSample rate (in milliseconds) of the sample in the trace.
inttrace_numberIndicates the number of the trace to be processed.
Booleanagc_flagFlag indicating whether the Seismic widget should apply its AGC operation to the trace.
Booleanfilter_flag Flag indicating whether the Seismic widget should apply its bandpass filter operation to the trace.


XintSeismicSelectionCallbackStruct

The following ordered table lists the members of the callback structure, XintSeismicSelectionCallbackStruct, returned to each procedure in the callback list specified by the resource XmNselectionCallback.

Data TypeMemberDescription
intreasonIndicates why the callback was invoked.
XEvent *eventPointer to the XEvent that triggered the callback.
intxHorizontal position (in the window coordinate system) of the selection.
intyVertical position (in the window coordinate system) of the selection.
intpkeyThe primary key value at the position of the selection.
intskeyThe secondary key value at the position of the selection.
inttnThe trace number of the trace nearest to the position of the selection.
floattimeThe time value at the position of the selection.

XintSeismicTraceColorCallbackStruct

The following ordered table lists the members of the callback structure, XintSei smicTraceColorCallbackStruct, returned to each procedure in the callback list sp ecified by the resource XmNtraceColorCallback.

Data TypeMemberDescription
intreasonIndicates why the call back was invoked.
XEvent *eventPointer to the XEv ent that triggered the callback.
inttrace_numberTrace number to apply the color pixel array to.
intfirst_sampleFirst sample to apply first element of the color pixel array.
intlast_sampleLast sample to ap ply last element of the color pixel array.
intsample_rateSample rate of da ta.
Pixel *color_arrayArray of colo rs to apply to the trace.
BooleandoitSet to True to apply the color_array to the current trace.


Annotation callback

This list of callback procedures is called whenever the annotation on the horizontal axis needs to be updated. The application can use this type of callback to draw its own annotation in addition to, or instead of, the annotation drawn by the widget. If you do not want the widget to draw any annotation on the horizontal axis, specify NULL as the values of the XmNprimaryAnnotationName and XmNsecondaryAnnotationName resources. The callback structure, XintSeismicAnnotationCallbackStruct, will contain the location information needed by the application to draw the annotation along the horizontal axis of the seismic section display.

Area selection callback

This list of callback procedures is called by the EndAreaSelection action procedure after the area selection has been made. The callback structure, XintSeismicAreaSelectionCallbackStruct, will contain the coordinates of the diagonal vertices of the rectangular area that was selected.

Change panel callback

This list of callback procedures is called by the EditPlot action procedure so that the application can display (or not display) a panel for changing the attributes of seismic section display. To display the default resource editor panel, register XintSeismicChangePanelCallback as the callback attached to resource XmNchangePanelCallback. You can also write your own resource editor callback.

Expose callback

This list of callback procedures is called whenever the Seismic widget's window is exposed so that the application can redraw anything that it is displaying in the Seismic widget's window.

Locator callback

This list of callback procedures is called by the Locator action procedure so that the application can get the current position (in terms of trace and time or depth) of the cursor in the Seismic widget's window.

New pixmap callback

This list of callback procedures is called whenever the pixmap used to represent the seismic section has changed. This callback is only called if the resource XmNbuildPixmap is set to True. You can use this callback for augmenting the displayed seismic section by drawing on the pixmap used to represent the section. You must specify, at widget creation time, the callback list as the value of the resource, XmNnewPixmapCallback.

Process trace callback

This list of callback procedures is called by the Seismic widget before each trace is rasterized so that the application can process the trace. The callback structure, XintSeismicProcessTraceCallbackStruct, will contain a pointer to the trace to be processed and flags that the application can set to indicate whether the Seismic widget should apply automatic gain control or the bandpass filter to the trace after the application has processed it. Use the resource XmNprocessTraceCallback to specify this list of callbacks so that the Seismic widget can call the callback procedures starting the first time a trace needs to be processed.

Resize callback

This list of callback procedures is called whenever the Seismic widget's window is resized so that the application can redraw anything that it is displaying in the Seismic widget's window. The callback structure XintSeismicCallbackStruct passed to each procedure in the callback list will contain the ID of the Seismic widget's window so that the application can determine the current size of the window.

Selection callback

This list of callbacks is called by the SelectionCallback action procedure whenever the end-user has made a selection in the seismic section via an event sequence defined in the translation table. The callback structure XintSeismicSelectionCallbackStruct passed to each procedure in the callback list will contain information about the location of the selection.


Trace Color Callback

This list of callbacks is called by the Seismic widget before each trace is rast erized so that the application can supply a color sample array to apply to the s pecified samples of the trace.