Sage-ST ä

Ctrledit

Documentation

ControlCommand CurrentControlID CurrentDialogID DisableControl
EnableControl Flush GetText GetValidateCharData
GetValidateValueData HideControl IsEnabled RedrawControl
Reset SetColors SetFocus SetLowerCaseOnly
SetText SetUpperCaseOnly SetValidationStatus ShowControl




  PROCEDURE ControlCommand
             (CONST msgType : DWSpec.DisplayMessageType;
              CONST msgData : SYSTEM.ADDRESS) : ControlMessage;

  (**
      ControlCommand - Retrieves a command which has been sent from a control.


      This routine will retrieve a command which has been sent from the
      control to the ActionProc.

      CALLING SEQUENCE -

        command := ControlCommand (msgType, msgData)

      ENTRY -

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

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

      EXIT -

        command : ControlMessage
          The command which has been sent.  Must be one of the Control
          Messages defined for the control receiving the command.  The
          command Unknown indicates an undefined command has been sent.
  *)




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

  (**
      CurrentDialogID - Retrieves the ID of a dialog to which a message was sent.


      This routine will retrieve a the ID of a dialog to which a message
      has been sent.

      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 CurrentControlID
             (CONST msgData : SYSTEM.ADDRESS) : CARDINAL;

  (**
      CurrentControlID - Retrieves the ID of a control for which a message is intended.


      This routine will retrieve the ID of a control for which a message
      is intended.

      CALLING SEQUENCE -

        controlID := CurrentControlID (msgData)

      ENTRY -

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

      EXIT -

        controlID : CARDINAL
          The ID of the control.
  *)




  PROCEDURE IsEnabled
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL) : BOOLEAN;

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


      This routine will determine whether a control is enabled or
      disabled (grayed).

      CALLING SEQUENCE -

        status := IsEnabled (dialogID, controlID)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

      EXIT -

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




  PROCEDURE EnableControl
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL);

  (**
      EnableControl - Enables a control.


      This routine will enable the specified control.

      CALLING SEQUENCE -

        EnableControl (dialogID, controlID)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

      EXIT -

        None
  *)




  PROCEDURE DisableControl
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL);

  (**
      DisableControl - Disables a control.


      This routine will disable (gray) the specified control.

      CALLING SEQUENCE -

        DisableControl (dialogID, controlID)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

      EXIT -

        None
  *)




  PROCEDURE HideControl
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL);

  (**
      HideControl - Hides a control.


      This routine will hide the specified control.

      CALLING SEQUENCE -

        HideControl (dialogID, controlID)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

      EXIT -

        None
  *)




  PROCEDURE ShowControl
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL);

  (**
      ShowControl - Shows a control.


      This routine will show the specified control.

      CALLING SEQUENCE -

        ShowControl (dialogID, controlID)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

      EXIT -

        None
  *)




  PROCEDURE SetFocus
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL);

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


      This routine will give the specified control focus.

      CALLING SEQUENCE -

        SetFocus (dialogID, controlID)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

      EXIT -

        None
  *)




  PROCEDURE RedrawControl
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL);

  (**
      RedrawControl - Redraws a control.


      This routine will redraw the specified control.

      CALLING SEQUENCE -

        RedrawControl (dialogID, controlID)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

      EXIT -

        None
  *)




  PROCEDURE Flush
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL);

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


      This routine will cause the Sage control have its contents written to the
      current memory record.  Note : Sage controls are automatically written
      out when the form is terminated.

      CALLING SEQUENCE -

        Flush (dialogID, controlID)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

      EXIT -

        None
  *)




  PROCEDURE GetText
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              VAR   Text      : ARRAY OF CHAR);

  (**
      GetText - Retrieves the text from the control.


      This routine will return the text contained in the specified
      SageEdit control.

      WARNING - This routine ALWAYS puts a null character at the end of the
      text even if that means overwriting the last character.  For example
      if you pass in a string that is eight characters long and the user has
      entered eight characters of text you will get back seven characters and
      a null.  You should always pass a string that allows for the full text
      length plus one null character.

      CALLING SEQUENCE -

        GetText (dialogID, controlID, text)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

      EXIT -

        text : ARRAY OF CHAR
          The label text from the control.
  *)




  PROCEDURE GetValidateCharData
             (CONST msgType : DWSpec.DisplayMessageType;
              CONST msgData : SYSTEM.ADDRESS;
              VAR   Table   : ARRAY OF CHAR;
              VAR   Field   : ARRAY OF CHAR;
              VAR   Value   : ARRAY OF CHAR;
              VAR   offset  : CARDINAL);

  (**
      GetValidateCharData - Retrieve data needed for validating a character.


      The SageEdit control sends a ValidateChar message when the ValidateChar
      resource option is enabled and a character has been entered into the
      control.  The message is sent to allow the programmer to validate the
      character.  This routine will allow the programmer to retrieve the
      data need to perform the validation.  The programmer should respond
      with the SetValidationStatus routine to inform the SageEdit control of
      the status of the validation.

      CALLING SEQUENCE -

        GetValidateCharData (msgType, msgData, table, field, value, offset)

      ENTRY -

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

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

      EXIT -

        table : ARRAY OF CHAR
          The Sage relation associated with the SageEdit control.

        field : ARRAY OF CHAR
          The Sage field associated with the SageEdit control.

        value : ARRAY OF CHAR
          Contains the ENTIRE string value of the control as it will appear
          AFTER the keystroke is accepted.  For example if the field contains
          the value AB and the user hits the character C at the end of the
          field then value is returned as ABC.

        offset : CARDINAL
          The offset (NOT the position) into the string where the character just
          hit appears.  For example if a user is sitting in an empty control and
          hits a key the value of offset is 0.  If the control contains AB, the
          cursor is at the end of that string and the user hits a key the value
          of offset is 2.
  *)




  PROCEDURE GetValidateValueData
             (CONST msgType : DWSpec.DisplayMessageType;
              CONST msgData : SYSTEM.ADDRESS;
              VAR   Table   : ARRAY OF CHAR;
              VAR   Field   : ARRAY OF CHAR;
              VAR   Value   : ARRAY OF CHAR);

  (**
      GetValidateValueData - Retrieve data needed for validating the value.


      The SageEdit control sends a ValidateValue message when the
      ValidateValue resource option is enabled and the SageEdit controlis
      about to write its value out to the memory record.  This can occur
      when the SageEdit control has lost user input focus or when the form it
      is on is about to be closed.  The message is sent to allow the
      programmer the chance to validate the value.  This routine will allow
      the programmer to retrieve the data needed to perform the validation.
      The programmer should respond with the SetValidationStatus routine
      to inform the SageEdit control of the status of the validation.

      CALLING SEQUENCE -

        GetValidateValueData (msgType, msgData, table, field, value)

      ENTRY -

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

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

      EXIT -

        table : DWSpec.TableString
          The Sage relation associated with the SageEdit control.

        field : DWSpec.FieldString
          The Sage field associated with the SageEdit control.

        value : ARRAY OF CHAR
          The text string to validate.
  *)




  PROCEDURE Reset
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL);

  (**
      Reset - Resets the control.


      This routine will cause the control to be reset.  If the control
      is associated with a Sage table and field, the current contents
      of the memory record will be reflected.

      CALLING SEQUENCE -

        Reset (dialogID, controlID)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

      EXIT -

        None
  *)




  PROCEDURE SetColors
             (CONST dialogID   : CARDINAL;
              CONST controlID  : CARDINAL;
              CONST textColor  : EditColorType;
              CONST bkGndColor : EditColorType);

  (**
      SetColors - Sets the text and background colors of the control.


      This routine will change the text and background colors of
      the SageEdit control.

      CALLING SEQUENCE -

        SetColors (dialogID, controlID, textColor, bkGndColor)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        textColor : EditColorType
          The color for the text.  Must be one of the EditColorTypes.
          The Default color is determined by the current Windows
          configuration.

        bkGndColor : EditColorType
          The color for the background.  Must be one of the
          EditColorTypes.  The Default color is determined by the
          current Windows configuration.

      EXIT -

        None
  *)




  PROCEDURE SetText
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST Text      : ARRAY OF CHAR);

  (**
      SetText - Sets the text of the control.


      This routine will place the given text string in the specified SageEdit
      control.

      CALLING SEQUENCE -

        SetText (dialogID, controlID, text)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        text : ARRAY OF CHAR
          The text to set in the control.

      EXIT -

        None
  *)




  PROCEDURE SetUpperCaseOnly
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL);

  (**
      SetUpperCaseOnly - Sets the edit style for upper case only.


      This routine will set the edit style for upper case only.

      CALLING SEQUENCE -

        SetUpperCaseOnly (dialogID, controlID)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

      EXIT -

        None
  *)




  PROCEDURE SetLowerCaseOnly
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL);

  (**
      SetLowerCaseOnly - Sets the edit style for lower case only.


      This routine will set the edit style for lower case only.

      CALLING SEQUENCE -

        SetLowerCaseOnly (dialogID, controlID)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

      EXIT -

        None
  *)




  PROCEDURE SetValidationStatus
             (CONST msgType : DWSpec.DisplayMessageType;
              CONST msgData : SYSTEM.ADDRESS;
              CONST valid   : BOOLEAN);

  (**
      SetValidationStatus - Inform the SageEdit control of the status of a validation.


      The SageEdit control sends a ValidateChar or ValidateValue message to
      give the programmer a chance to validate a character or value in
      the control.  This routine can be used to inform the SageEdit control
      of the results of the validation.

      CALLING SEQUENCE -

        SetValidationStatus (msgType, msgData, valid)

      ENTRY -

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

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

        valid : BOOLEAN
          The status of the validation.  If valid is TRUE, the SageEdit
          control will accept the character or value.  If valid is FALSE,
          the SageEdit control will highlight the invalid character or
          value and not allow the user to leave the SageEdit control.

      EXIT -

        None
  *)




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