Sage-ST ä

Dialog

Documentation

Close CreateCustomDialog CreateDialogHandle CreateModal
CreateModalExtra CreateModeless CreateModelessExtra CurrentDialogID
DestroyDialogHandle DialogCommand Disable Enable
Flush GetContextHelpControlID GetContextHelpID GetCustomDialogExtra
GetDialogPositionInfo GetExtra GetOriginalDialogID Hide
IsEnabled Redraw Reset SetContextHelpMsg
SetCustomDialogExtra SetCustomDialogPropSheetFlag SetCustomDialogUserProc SetFocus
SetParent Show




  PROCEDURE DialogCommand
             (CONST msgType : DWSpec.DisplayMessageType) : DialogMessage;

  (**
      DialogCommand - Retrieves a command which has been sent to a dialog.


      This routine will retrieve a command which has been sent to the
      dialog's ActionProc.

      CALLING SEQUENCE -

        command := DialogCommand (msgType)

      ENTRY -

        msgType : DWSpec.DisplayMessageType
          The msgType parameter which was passed into the ActionProc.

      EXIT -

        command : DialogMessage
          The command which has been sent.  Must be one of the Dialog
          Messages.  The command Unknown indicates an undefined command
          has been sent.
  *)




  PROCEDURE Close
             (CONST dialogID : CARDINAL);

  (**
      Close - Closes a dialog.


      This routine will close the specified dialog.  A Terminate message
      will be sent to the ActionProc to allow clean up to occur before the
      dialog is destroyed.  If the user handles the Terminate message and
      returns TRUE, this indicates that they wish for the dialog to continue
      execution and the Terminate is canceled.  If FALSE is returned, this
      indicates that they are not going to override the Terminate and that
      the Terminate will proceed as usual.

      CALLING SEQUENCE -

        Close (dialogID)

      ENTRY -

        dialogID : CARDINAL
          The ID of the dialog box.

      EXIT -

        None
  *)




  PROCEDURE CreateModal
             (CONST dialogID    : CARDINAL;
              CONST dialogProce : DWSpec.ActionProc) : CARDINAL;

  (**
      CreateModal - Creates a Modal dialog.


      This routine is used to create a modal dialog and associate an
      ActionProc with that dialog.

      CALLING SEQUENCE -

        status := CreateModal (dialogID, dialogProc)

      ENTRY -

        dialogID : CARDINAL
          The resource ID of the dialog box to create.

        dialogProc : ActionProc
          The user supplied ActionProc for the dialog.

      EXIT -

        status : CARDINAL
          The dialogID of the displayed dialog.  Same as 'dialogID' is
          the first one, or a new ID.
  *)




  PROCEDURE CreateModalExtra
             (CONST dialogID   : CARDINAL;
              CONST dialogProc : DWSpec.ActionProc;
              CONST extra      : SYSTEM.ADDRESS) : CARDINAL;

  (**
      CreateModalExtra - Creates a Modal dialog with extra data.


      This routine is used to create a modal dialog and associate an
      ActionProc with that dialog.  It also allows the address of some
      user defined extra data to be stored with the dialog.  The GetExtra
      routine may be called at any point in the ActionProc to retreive
      the address of the extra data.

      CALLING SEQUENCE -

        status := CreateModalExtra (dialogID, dialogProc, extra)

      ENTRY -

        dialogID : CARDINAL
          The resource ID of the dialog box to create.

        dialogProc : ActionProc
          The user supplied ActionProc for the dialog.

        extra : ADDRESS
          The address of the extra data to associate with the dialog.

      EXIT -

        status : CARDINAL
          The dialogID of the displayed dialog.  Same as 'dialogID' is
          the first one, or a new ID.
  *)




  PROCEDURE CreateModeless
             (CONST dialogID   : CARDINAL;
              CONST dialogProc : DWSpec.ActionProc) : CARDINAL;

  (**
      CreateModeless - Creates a Modeless dialog.


      This routine is used to create a modeless dialog and associate an
      ActionProc with that dialog.

      CALLING SEQUENCE -

        status := CreateModeless (dialogID, dialogProc)

      ENTRY -

        dialogID : CARDINAL
          The resource ID of the dialog box to create.

        dialogProc : ActionProc
          The user supplied ActionProc for the dialog.

      EXIT -

        status : CARDINAL
          The dialogID of the displayed dialog.  Same as 'dialogID' is
          the first one, or a new ID.
  *)




  PROCEDURE CreateModelessExtra
             (CONST dialogID   : CARDINAL;
              CONST dialogProc : DWSpec.ActionProc;
              CONST extra      : SYSTEM.ADDRESS) : CARDINAL;

  (**
      CreateModelessExtra - Creates a Modeless dialog with extra data.


      This routine is used to create a modeless dialog and associate an
      ActionProc with that dialog.  It also allows the address of some
      user defined extra data to be stored with the dialog.  The GetExtra
      routine may be called at any point in the ActionProc to retreive
      the address of the extra data.

      CALLING SEQUENCE -

        status := CreateModelessExtra (dialogID, dialogProc, extra)

      ENTRY -

        dialogID : CARDINAL
          The resource ID of the dialog box to create.

        dialogProc : ActionProc
          The user supplied ActionProc for the dialog.

        extra : ADDRESS
          The address of the extra data to associate with the dialog.

      EXIT -

        status : CARDINAL
          The dialogID of the displayed dialog.  Same as 'dialogID' is
          the first one, or a new ID.
  *)




  PROCEDURE CreateDialogHandle
             (VAR   wHandle : DialogHandle);

  (**
      CreateDialogHandle - Creates a DialogHandle.

      This routine is used to create a Dialog handle for a custom Dialog.
      Each custom Dialog should have its own Dialog handle.  The following
      routines can be called to change the attributes of a custom Dialog :
        SetCustomDialogExtra
        SetCustomDialogUserProc

      CALLING SEQUENCE -

        CreateDialogHandle (wHandle)

      ENTRY -

        None
          N/A

      EXIT -

        wHandle : DialogHandle
          A handle containing the styles and attributes of the custom
          Dialog.
  *)




  PROCEDURE DestroyDialogHandle
             (VAR   wHandle : DialogHandle);

  (**
      DestroyDialogHandle - Destroys a DialogHandle.

      This routine is used to destroy a Dialog handle which is no longer
      needed.

      CALLING SEQUENCE -

        DestroyDialogHandle (wHandle)

      ENTRY -

        wHandle : DialogHandle
          A handle containing the styles and attributes of the custom
          Dialog.

      EXIT -

        None
  *)




  PROCEDURE SetCustomDialogUserProc
             (CONST dHandle  : DialogHandle;
              CONST UserProc : DWSpec.UserDlgProc);

  (**
      SetCustomDialogUserProc - Set up a procedure to handle raw Dialogs messages.

      This routine will allow the user to set up a procecure for a custom
      Dialog which will handle raw Dialogs messages.  This procedure will be
      called each time the Dialog receives a message.  THIS IS NOT THE ONLY
      EVENT HANDLING PROCEDURE USED IN THE SYSTEM.  If a message is not
      handled by this procedure, simply return a value of false.

      CALLING SEQUENCE -

        SetSetCustomDialogUserProc (wHandle, userProc)

      ENTRY -

        dHandle : DialogHandle
          A handle containing the styles and attributes of the custom
          Dialog.

        userProc : DWSpec.UserDlgProc
          The procedure to receive the raw Dialogs messages.

          The proc has the following parameters -

              hwnd - WIN32.HWND
                The WIN32.HWND of the Dialog.

              message - UINT
                The Dialog message.

              wParam - WIN32.WPARAM
                The WIN32.WPARAM value passed in with the message.

              lParam - WIN32.LPARAM
                The WIN32.LPARAM value passed in with the message.

      EXIT -

        bResult : BOOL
          The result to return for the message.  If this is returned
          as true, no further processing will be
          performed.

          Some things to keep in mind when using a UserWndProc -

              1.  Do not return a true value if you have not
                  processed the message completely.

      EXIT -

        dHandle : DialogHandle
          A handle containing the styles and attributes of the custom
          Dialog including the new UserDlgProc.
  *)




  PROCEDURE SetCustomDialogExtra
             (CONST dHandle    : DialogHandle;
              CONST extraBytes : SYSTEM.ADDRESS);

  (**
      SetCustomDialogExtra - Pass extra, private data to be used in action and event procs.

      This routine, used in conjunction with CreateCustomDialog,
      CreateDialogHandle, and DestroyDialogHandle, is a way to send extra
      data to the dialog procedures (which can be retrieved using
      GetCustomDialogExtra or GetExtra inside the scope of the dialog procs).
      This is a way to avoid global variables. It is an alternative to the
      CreateMod*Extra routines.

      CALLING SEQUENCE -

        SetCustomDialogExtra (wHandle, extraH)

      ENTRY -

        dHandle : DialogHandle
          A handle containing the styles and attributes of the custom
          Dialog.

        extraBytes : SYSTEM.ADDRESS
          The address of the private, extra data to be made available

      EXIT -

        dHandle : DialogHandle
          A handle containing the styles and attributes of the custom
          Dialog including the extra Data.
  *)




  PROCEDURE SetCustomDialogPropSheetFlag
             (CONST dHandle          : DialogHandle;
              CONST isPropSheet      : BOOLEAN;
              CONST isPropSheetModal : BOOLEAN);




  PROCEDURE CreateCustomDialog
             (CONST dHandle    : DialogHandle;
              CONST dialogID   : CARDINAL;
              CONST modal      : BOOLEAN;
              CONST dialogProc : DWSpec.ActionProc) : CARDINAL;




  PROCEDURE GetCustomDialogExtra
             (CONST hWnd : WIN32.HWND) : SYSTEM.ADDRESS;




  PROCEDURE CurrentDialogID
             (CONST msgData : SYSTEM.ADDRESS) : CARDINAL;

  (**
      CurrentDialogID - Retrieves the unique ID of a dialog.


      This routine will retrieve the unique ID of a dialog to which a message
      has been sent.  This will usually be the same number as the dialog's
      resource ID; however, if multiple instances of the same dialog exist
      simultaneously, then you will get a different, unique number for
      each additional instance.

      CALLING SEQUENCE -

        dialogID := CurrentDialogID (msgData)

      ENTRY -

        msgData : SYSTEM.ADDRESS
          The msgData parameter which was passed into the ActionProc.

      EXIT -

        dialogID : CARDINAL
          The ID of the dialog receiving a message.
  *)




  PROCEDURE GetOriginalDialogID
             (CONST dialogID : CARDINAL) : CARDINAL;

  (**
      GetOriginalDialogID - Retrieves the resource ID of a dialog.

      Given the run-time assigned number of a dialog, this routine returns
      the resource ID that was used to create the dialog.

      CALLING SEQUENCE -

        dialogID := OriginalDialogID (msgData)

      ENTRY -

        dialogID : CARDINAL
          The unique dialog ID for an instance of a dialog.

      EXIT -

        resourceID : CARDINAL
          The ID of the resource used to create the instance of the dialogID.
  *)




  PROCEDURE Disable
             (CONST dialogID : CARDINAL);

  (**
      Disable - Disables a dialog.


      This routine will disable (prevent keyboard and mouse input) to
      the specified dialog.

      CALLING SEQUENCE -

        Disable (dialogID)

      ENTRY -

        dialogID : CARDINAL
          The ID of the dialog box.

      EXIT -

        None
  *)




  PROCEDURE Enable
             (CONST dialogID : CARDINAL);

  (**
      Enable - Enables a dialog.


      This routine will enable the specified dialog.  This is the reverse
      of the Dialog.Disable procedure.

      CALLING SEQUENCE -

        Enable (dialogID)

      ENTRY -

        dialogID : CARDINAL
          The ID of the dialog box.

      EXIT -

        None
          N/A
  *)




  PROCEDURE Flush
             (CONST dialogID : CARDINAL);

  (**
      Flush - Writes the contents of all Sage controls to the current memory record.


      This routine will cause all Sage controls on the dialog which are linked
      to Sage tables and fields to have their contents written to the
      current memory record.  Note : Sage controls are automatically written
      out when the dialog is terminated.

      CALLING SEQUENCE -

        Flush (dialogID)

      ENTRY -

        dialogID : CARDINAL
          The ID of the dialog box.

      EXIT -

        None
  *)




  PROCEDURE GetExtra
             (CONST dialogID : CARDINAL) : SYSTEM.ADDRESS;

  (**
      GetExtra - Retreives the extra information associated with a dialog.


      This routine will return the address of the extra information associated
      with the specified dialog.

      CALLING SEQUENCE -

        extra := GetExtra (dialogID)

      ENTRY -

        dialogID : CARDINAL
          The ID of the dialog box.

      EXIT -

        extra : ADDRESS
          The address of the extra information associated with this dialog.
  *)




  PROCEDURE Hide
             (CONST dialogID : CARDINAL);

  (**
      Hide - Hides a dialog.


      This routine will hide the specified dialog.

      CALLING SEQUENCE -

        Hide (dialogID)

      ENTRY -

        dialogID : CARDINAL
          The ID of the dialog box.

      EXIT -

        None
  *)




  PROCEDURE IsEnabled
             (CONST dialogID : CARDINAL) : BOOLEAN;

  (**
      IsEnabled - Checks to see if a dialog is enabled.


      This routine will determine whether a dialog is enabled (receives
      keyboard and mouse input) or is disabled.

      CALLING SEQUENCE -

        status := IsEnabled (dialogID)

      ENTRY -

        dialogID : CARDINAL
          The ID of the dialog box.

      EXIT -

        status : BOOLEAN
          TRUE if the dialog is enabled.
  *)




  PROCEDURE Reset
             (CONST dialogID : CARDINAL);

  (**
      Reset - Causes all the Sage controls to reload themselves from memory record.


      This routine will cause all Sage controls on the dialog which are linked
      to Sage tables and fields to have their contents updated from the
      current memory record.  Note : Sage controls are automatically loaded
      when the dialog is first created.

      CALLING SEQUENCE -

        Reset (dialogID)

      ENTRY -

        dialogID : CARDINAL
          The ID of the dialog box.

      EXIT -

        None
  *)




  PROCEDURE Redraw
             (CONST dialogID : CARDINAL);

  (**
      Redraw - Redraws a dialog.


      This routine will redraw the specified dialog.

      CALLING SEQUENCE -

        Redraw (dialogID)

      ENTRY -

        dialogID : CARDINAL
          The ID of the dialog box.

      EXIT -

        None
  *)




  PROCEDURE SetFocus
             (CONST dialogID : CARDINAL);

  (**
      SetFocus - Sets to focus to a dialog.


      This routine will give focus to the specified dialog.

      CALLING SEQUENCE -

        SetFocus (dialogID)

      ENTRY -

        dialogID : CARDINAL
          The ID of the dialog box.

      EXIT -

        None
  *)




  PROCEDURE SetParent
             (CONST childID     : CARDINAL;
              CONST newParentID : CARDINAL) : CARDINAL;

  (**
      SetParent - Assigns a parent to a child window or dialog by id.


      This procedure assigns a parent to a child window or dialog, and
      returns the ID of the previously assigned parent.  The child
      window or dialog must currently exist.  If the parent does not
      currently exist, the child will be made a top level window.
      Windows can be parents of both windows and dialogs, as can dialogs.

      CALLING SEQUENCE -

        oldID := SetParent (childID, parentID)

      ENTRY -

        childID : CARDINAL
          The ID of the child window or dialog.

        parentID : CARDINAL
          The ID of the parent window or dialog.

      EXIT -

        oldID : CARDINAL
          The ID of the previous parent window or dialog.
  *)




  PROCEDURE Show
             (CONST dialogID : CARDINAL);

  (**
      Show - Shows a dialog.


      This routine will show the specified dialog.

      CALLING SEQUENCE -

        Show (dialogID)

      ENTRY -

        dialogID : CARDINAL
          The ID of the dialog box.

      EXIT -

        None
  *)




  PROCEDURE GetContextHelpControlID
             (CONST msgData : SYSTEM.ADDRESS) : CARDINAL;

  (**
      GetContextHelpControlID - Gets the ControlId pointed to by context help.

      09/12/1996

      This routine will return the ControlId pointed to by context help.

      CALLING SEQUENCE -

        controlID := GetContextHelpControlID (msgData)

      ENTRY -

        msgData : SYSTEM.ADDRESS
          The msgData passed in to the dialog proc.

      EXIT -

        controlID : CARDINAL
          The ID of the ControlId pointed to by context help.
  *)




  PROCEDURE GetContextHelpID
             (CONST msgData : SYSTEM.ADDRESS) : CARDINAL;

  (**
      GetContextHelpID - Gets the helpId pointed to by context help.

      09/12/1996

      This routine will return the helpId pointed to by context help.

      CALLING SEQUENCE -

        helpID := GetContextHelpID (msgData)

      ENTRY -

        msgData : SYSTEM.ADDRESS
          The msgData passed in to the dialog proc.

      EXIT -

        helpID : CARDINAL
          The help ID pointed to by context help.
  *)




  PROCEDURE SetContextHelpMsg
             (CONST helpID   : CARDINAL;
              CONST helpFile : ARRAY OF CHAR;
              CONST helpType : ContextHelpType;
              CONST msgData  : SYSTEM.ADDRESS);

  (**
      SetContextHelpMsg - sets the Help message data.

      09/12/1996

      This routine will set the needed items for context help.

      CALLING SEQUENCE -

        SetContextHelpMsg (201, "help.hlp", msgData)

      ENTRY -

        helpID : CARDINAL
          The ID of where to point in the help file.

        helpFile : ARRAY OF CHAR
          The help file.

        msgData : SYSTEM.ADDRESS
          The msgData passed in to the dialog proc.

      EXIT -

        none
          NOTES -  after calling this procedure make sure to set the
                   exit flag to TRUE  or if you are using ObjDialog
                   then call 'ObjDialog.SetActionResponse (handle, TRUE);'
                   to set the flag true.  If this is not done no help
                   will be displayed.
  *)




  PROCEDURE GetDialogPositionInfo
             (CONST dialogID     : CARDINAL;
              VAR   DialogXPos   : INTEGER;
              VAR   DialogYPos   : INTEGER;
              VAR   DialogWidth  : INTEGER;
              VAR   DialogHeight : INTEGER);

  (**
      GetDialogPositionInfo - Returns the position information on the specified dialog.


      This routine gets the position information for the specified dialog.

      CALLING SEQUENCE -

        GetDialogPositionInfo (DialogID, DialogXPos, DialogYPos,
                               DialogWidth, DialogHeight);

      ENTRY -

        DialogID : CARDINAL
          The ID of the window.

      EXIT -

        DialogXPos : CARDINAL
          The X position of the dialog.

        DialogYPos : CARDINAL
          The Y position of the dialog.

        DialogWidth : CARDINAL
          The width of the current dialog.

        DialogHeight : CARDINAL
          The height of the current dialog.
  *)




Send mail to   warren.merrill@inl.gov with questions or comments about this web site.
Copyright © 1989-2006 Battelle Energy Alliance