threshold_select
Description
threshold_select.c is a Motif GUI source file, typically generated by an interface builder tool like X-Designer. Its purpose is to create and manage a dialog box titled “Amplitude and Phase Thresholds” within the “Submetrix 2000 unraveller” application. This dialog provides text input fields for users to configure various parameters critical for bottom detection and data quality filtering, specifically related to amplitude and phase data. These include thresholds for logarithmic amplitude, phase difference, window sizes, and criteria for qualifying samples.
How It Works
This file uses Motif (Xm) and Xt Intrinsics libraries to define and instantiate GUI widgets.
create_ThresholdShell(Widget parent)function:- Creates a
DialogShellwidget (ThresholdShell) as the top-level window for the dialog. - Creates an
XmFormwidget (ThresholdForm) as the main layout manager, containing anXmBulletinBoard(ThresholdBB) for arranging labels and text input fields. - Sets the dialog title to “Amplitude and Phase Thresholds”.
- Input Fields: Creates several
XmLabelwidgets (e.g.,T_PreLabel1toT_PreLabel5) for descriptive text and correspondingXmTextwidgets (e.g.,ThresholdText1toThresholdText5) for user input. These are arranged to accept values for:- Log amplitude threshold (
ThresholdText1) - Phase difference threshold (
ThresholdText2) - Window size (
ThresholdText3) - Number of qualifying samples (
ThresholdText4) - Starting sample (
ThresholdText5)
- Log amplitude threshold (
- Action Buttons: Creates “OK” (
T_OKButton), “Apply” (T_ApplyButton), and “Cancel” (T_CancelButton)XmPushButtonwidgets. - Callbacks: Attaches callback functions (
ThresholdOKCallback,ThresholdApplyCallback,ThresholdCancelCallback, likely defined incallbacks.c) to these buttons, which handle reading the input values and applying or canceling the changes. - Manages the children widgets to lay them out within the dialog. This file is primarily a structural definition of a GUI element; the logic for processing the input values and updating internal application parameters resides in the associated callback functions.
- Creates a