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.

  1. create_ThresholdShell(Widget parent) function:
    • Creates a DialogShell widget (ThresholdShell) as the top-level window for the dialog.
    • Creates an XmForm widget (ThresholdForm) as the main layout manager, containing an XmBulletinBoard (ThresholdBB) for arranging labels and text input fields.
    • Sets the dialog title to “Amplitude and Phase Thresholds”.
    • Input Fields: Creates several XmLabel widgets (e.g., T_PreLabel1 to T_PreLabel5) for descriptive text and corresponding XmText widgets (e.g., ThresholdText1 to ThresholdText5) 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)
    • Action Buttons: Creates “OK” (T_OKButton), “Apply” (T_ApplyButton), and “Cancel” (T_CancelButton) XmPushButton widgets.
    • Callbacks: Attaches callback functions (ThresholdOKCallback, ThresholdApplyCallback, ThresholdCancelCallback, likely defined in callbacks.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.