Sage-ST ä

Ctrlcomb

Documentation

AppendItem ControlCommand CurrentControlID CurrentDialogID
DeleteItem DisableControl EnableControl Flush
GetChangeInfo GetSelectedItem GetValidateValueData HideControl
InsertItem IsEnabled ItemIndex RedrawControl
Reset SetEditItem SetFocus SetInitItem
SetItem SetRange 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 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 AppendItem
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST Value     : ARRAY OF CHAR);

  (**
      AppendItem - Appends an item to the bottom of a SageComb list.


      This routine will append an item to the bottom of an existng
      SageComb list.

      CALLING SEQUENCE -

        AppendItem (dialogID, controlID, value)

      ENTRY -

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

        controlID : CARDINAL
          The control resource identifier.

        value : ARRAY OF CHAR
          The text to append to the list.

      EXIT -

        None
  *)




  PROCEDURE DeleteItem
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST index     : CARDINAL);

  (**
      DeleteItem - Deletes an item from a SageComb list.


      This routine will delete an item from an existng SageComb list.

      CALLING SEQUENCE -

        DeleteItem (dialogID, controlID, value)

      ENTRY -

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

        controlID : CARDINAL
          The control resource identifier.

        index : CARDINAL
          The index (1 .. n) of the list item to delete.

      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 dialog 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 GetChangeInfo
             (CONST msgType : DWSpec.DisplayMessageType;
              CONST msgData : SYSTEM.ADDRESS;
              VAR   Table   : ARRAY OF CHAR;
              VAR   Field   : ARRAY OF CHAR;
              VAR   Value   : ARRAY OF CHAR;
              VAR   index   : CARDINAL);

  (**
      GetChangeInfo - Gets information about the item which has been selected or changed.


      The SageComb sends a SelectedChange message when an item in a Sage
      Comb control with the Drop Down List style has been selected,
      or  a DataChange message when the edit part of a Sage Comb control
      with the Simple or Drop Down style has changed.  The programmer
      can use this routine to get the table, field, value, and index of
      the selected item.

      CALLING SEQUENCE -

        GetChangeInfo (msgType, msgData, table, field, value, index)

      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 SageComb control.  Only
          applies to controls with the Sage Database Link Style.

        field : ARRAY OF CHAR
          The Sage field associated with the SageComb control.  Only
          applies to controls with the Sage Database Link Style.

        value : ARRAY OF CHAR
          The string value of the currently selected or changed item.

        index : CARDINAL
          The index (1 .. n) of the selected or changedlist item.
  *)




  PROCEDURE GetSelectedItem
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              VAR   Value     : ARRAY OF CHAR);

  (**
      GetSelectedItem - Gets the value of the selected item in a SageComb control.


      This routine will return the value of the item of a SageComb
      control which has been selected.

      CALLING SEQUENCE -

        GetSelectedItem (dialogID, controlID, value)

      ENTRY -

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

        controlID : CARDINAL
          The control resource identifier.

      EXIT -

        value : ARRAY OF CHAR
          The string value of the currently selected item.
  *)




  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 SageComb control sends a ValidateValue message when the
      ValidateValue resource option is enabled and the SageComb control is
      about to write its value out to the memory record.  This can occur
      when the SageComb control has lost user input focus or when the dialog
      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 SageComb 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 SageComb control.

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

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




  PROCEDURE InsertItem
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST index     : CARDINAL;
              CONST Value     : ARRAY OF CHAR);

  (**
      InsertItem - Inserts an item into a SageComb list.


      This routine will append an item into an existng SageComb list.

      CALLING SEQUENCE -

        InsertItem (dialogID, controlID, index, value)

      ENTRY -

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

        controlID : CARDINAL
          The control resource identifier.

        index : CARDINAL
          The index (1 .. n) position in the list to place the item.  The
          existing item at this position will be shifted down in the list.

        value : ARRAY OF CHAR
          The text to insert into the list.

      EXIT -

        None
  *)




  PROCEDURE ItemIndex
             (CONST msgType : DWSpec.DisplayMessageType;
              CONST msgData : SYSTEM.ADDRESS) : CARDINAL;

  (**
      ItemIndex - Gets index number of item that FindItem or FindInitItem is requesting.


      The SageComb control sends a FindItem or FindInitItem message
      when it is loading items into the SageComb list.  This routine
      can be used to determine the index number of the item the SageComb
      control is trying to load.  If the Sage Database Link option is set
      in the Resource editor, then the programmer should use this index
      number to load the proper value into the memory record associated
      with the Sage Table and Field for this SageComb control.  If the
      User Database Link option is set in the Resource editor, then the
      programmer should call SetItem or SetInitItem to load the item
      into the list.

      CALLING SEQUENCE -

        index := ItemIndex (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 -

        index : CARDINAL
          the index (1 .. n) of the item the SageComb control is trying
          to load.
  *)




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

  (**
      Reset - Resets the control.


      This routine will cause the control to be reset.  This will result
      in the list being cleared and a new Range message being sent.

      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 SetEditItem
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST Value     : ARRAY OF CHAR);

  (**
      SetEditItem - Sets the text item in the edit part of the control.


      This routine can be used to set the text in the edit part of a
      SageComb control.  It can only be used with controls which
      have the Simple or Drop Down styles.

      CALLING SEQUENCE -

        SetEditItem (msgType, msgData, 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.

        value : ARRAY OF CHAR
          The text value to place in the edit part of the SageComb
          control.

      EXIT -

        None
  *)




  PROCEDURE SetInitItem
             (CONST msgType : DWSpec.DisplayMessageType;
              CONST msgData : SYSTEM.ADDRESS;
              CONST Value   : ARRAY OF CHAR);

  (**
      SetInitItem - Sets the initial value for a SageComb list.


      The SagesComb control sends a FindInitItem message when it is
      about to load the list item which will be the initially selected
      item.  If the programmer has called SetRange with the SCB_NOINDEX
      value for index, then this routine can be used to set the text
      value which will initially be in the edit part of the SageComb
      control.  (NOTE : If the SageComb control has the Drop Down List
      style, then this routine cannot be used since that style of SageComb
      control does not contain an edit part.

      CALLING SEQUENCE -

        SetInitItem (msgType, msgData, 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.

        value : ARRAY OF CHAR
          The text value to initially be in the edit part of the SageComb
          control.

      EXIT -

        None
  *)




  PROCEDURE SetItem
             (CONST msgType : DWSpec.DisplayMessageType;
              CONST msgData : SYSTEM.ADDRESS;
              CONST Value   : ARRAY OF CHAR);

  (**
      SetItem - Sets a list item value for a SageComb list.


      The SagesComb control sends a FindItem message when it is
      about to load a list item.  If the programmer has set the
      User Database Link  property in the resource editor, then they
      must use this routine to set the text for that list item.

      CALLING SEQUENCE -

        SetItem (msgType, msgData, 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.

        value : ARRAY OF CHAR
          The text value to set the list item to.

      EXIT -

        None
  *)




  PROCEDURE SetRange
             (CONST msgType   : DWSpec.DisplayMessageType;
              CONST msgData   : SYSTEM.ADDRESS;
              CONST totalVals : CARDINAL;
              CONST index     : CARDINAL);

  (**
      SetRange - Sets the number of items to be in the SageComb list.


      The SagesComb control sends a Range message in order to determine
      the total number of items that will be in the list, and which
      item will be initially selected.  The programmer should use this
      routine to respond to the Range message.

      CALLING SEQUENCE -

        SetRange (msgType, msgData, totalVals, index)

      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.

        totalVals : CARDINAL
          The total number of values which will be in the SageComb list.

        index : CARDINAL
          The list index (1 .. n) of the item to initially select when the
          list is loaded.  Set to SCB_NOINDEX to be able to have an initial
          value different from one in the list.  (NOTE - If the SageComb
          control has the Drop Down List style, then SCB_NOINDEX cannot be
          used since there cannot be a selected value which is not in the list).

      EXIT -

        None
  *)




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

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


      The SageComb control sends a ValidateValue message to give the
      programmer a chance to validate a value in the control.  This
      routine can be used to inform the SageComb 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 SageComb
          control will accept the value.  If valid is FALSE, the SageComb
          control will highlight the invalid value and not allow the user
          to leave the SageComb control.

      EXIT -

        None
  *)




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