spacing_select

Description

spacing_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 “Inter-Row Spacings” within the “Submetrix 2000 unraveller” application. This dialog provides text input fields for users to configure critical transducer spacing parameters for both port and starboard sides, including nominal spacings and various ratio values (e.g., AB-AC, AB-AD ratios). These parameters are essential for accurate phase-to-angle conversion in phase-measuring sonar systems.

How It Works

This file uses Motif (Xm) and Xt Intrinsics libraries to define and instantiate GUI widgets.

  1. create_SpacingShell(Widget parent) function:
    • Creates a DialogShell widget (SpacingShell) as the top-level window for the dialog.
    • Creates an XmForm widget (SpacingForm) as the main layout manager, containing an XmBulletinBoard (SpacingBB) for arranging labels and text input fields.
    • Sets the dialog title to “Inter-Row Spacings”.
    • Input Fields: Creates several XmLabel widgets (e.g., PreLabel1 to PreLabel6) for descriptive text and corresponding XmText widgets (e.g., SpacingText1 to SpacingText6) for user input. These are arranged to accept values for:
      • Port AB Spacing (SpacingText1)
      • Port AB-AC ratio (SpacingText2)
      • Port AB-AD ratio (SpacingText3)
      • Starboard AB Spacing (SpacingText4)
      • Starboard AB-AC ratio (SpacingText5)
      • Starboard AB-AD ratio (SpacingText6)
    • Action Buttons: Creates “OK” (OKButton), “Apply” (ApplyButton), and “Cancel” (CancelButton) XmPushButton widgets.
    • Callbacks: Attaches callback functions (SpacingOKCallback, SpacingApplyCallback, SpacingCancelCallback, 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.