Sage-ST ä

Ctrlcomb

Documentation

Global Declarations (Constants, Types, Variables)
AppendItem ControlCommand CurrentControlID
CurrentDialogID DeleteItem DisableControl EnableControl
GetChangeInfo GetSelectedItem GetValidateValueData HideControl
InsertItem IsEnabled ItemIndex RedrawControl
Reset SetEditItem SetFocus SetInitItem
SetItem SetRange SetValidationStatus ShowControl





  type ControlMessage is (Unknown,      -- Unknown command
                          DataChange,   -- The edit data has changed

                          -- related procedures ->  GetChangeInfo
                          FindInitItem,   -- Load data for the first selected item

                          -- related procedures -> ItemIndex, SetInitItem
                          FindItem,   -- Load data for a item

                          -- related procedures -> ItemIndex, SetItem
                          RangeMsg,   -- Get the total # of items in list

                          -- related procedures -> SetRange
                          SelectedChange,   -- The selected item has changed

                          -- related procedures -> GetChangeInfo
                          ValidateValue);   -- Value needs validation

  -- related procedures -> GetValidateValueData, SetValidationStatus
  SCB_NOINDEX : constant := -1;




  function ControlCommand
            (msgType : in     DisplayW.DisplayMessageType;
             msgData : in     System.Address) return 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 : DisplayW.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.
  --




  function CurrentDialogID
            (msgData : in     System.Address) return ModSys.S_Natural;

  --*
  --  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 : Modsys.S_Natural
  --      The ID of the dialog receiving a message.
  --




  function CurrentControlID
            (msgData : in     System.Address) return ModSys.S_Natural;

  --*
  --  CurrentControlID - Retrieves the ID of a control of the message.
  --
  --
  --  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 : Modsys.S_Natural
  --      The ID of the control.
  --




  function IsEnabled
            (dialogID  : in     ModSys.S_Natural;
             controlID : in     ModSys.S_Natural) return 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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --          control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --  EXIT -
  --
  --    status : boolean
  --      TRUE if the control is enabled.
  --




  procedure EnableControl
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural);

  --*
  --  EnableControl - Enables a control.
  --
  --
  --  This routine will enable the specified control.
  --
  --  CALLING SEQUENCE -
  --
  --    EnableControl (DialogId, ControlId)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --          control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure DisableControl
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural);

  --*
  --  DisableControl - Disables a control.
  --
  --
  --  This routine will disable (gray) the specified control.
  --
  --  CALLING SEQUENCE -
  --
  --    DisableControl (DialogId, ControlId)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --          control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure HideControl
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural);

  --*
  --  HideControl - Hides a control.
  --
  --
  --  This routine will hide the specified control.
  --
  --  CALLING SEQUENCE -
  --
  --    HideControl (DialogId, ControlId)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --          control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure ShowControl
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural);

  --*
  --  ShowControl - Shows a control.
  --
  --
  --  This routine will show the specified control.
  --
  --  CALLING SEQUENCE -
  --
  --    ShowControl (DialogId, ControlId)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure SetFocus
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural);

  --*
  --  SetFocus - Sets to focus to a control.
  --
  --
  --  This routine will give the specified control focus.
  --
  --  CALLING SEQUENCE -
  --
  --    SetFocus (DialogId, ControlId)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure RedrawControl
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural);

  --*
  --  RedrawControl - Redraws a control.
  --
  --
  --  This routine will redraw the specified control.
  --
  --  CALLING SEQUENCE -
  --
  --    RedrawControl (DialogId, ControlId)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure AppendItem
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              Value     : in     string);

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    value : string
  --      The text to append to the list.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure DeleteItem
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              index     : in     ModSys.S_Natural);

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    index : INTEGER
  --      The index (1..n) of the list item to delete.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure GetChangeInfo
             (msgType : in     DisplayW.DisplayMessageType;
              msgData : in     System.Address;
              Table   : in out string;
              Field   : in out string;
              Value   : in out string;
              index   : in out ModSys.S_Natural);

  --*
  --  GetChangeInfo - Gets information about the selected or changed item.
  --
  --
  --  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 : DisplayW.DisplayMessageType
  --      The msgType parameter which was passed into the ActionProc.
  --
  --    msgData : System.Address
  --      The msgData parameter which was passed into the ActionProc.
  --
  --  EXIT -
  --
  --    table : string
  --      The Sage relation associated with the SageComb control.
  --
  --    field : string
  --      The Sage field associated with the SageComb control.
  --
  --    value : string
  --      The string value of the currently selected or changed item.
  --
  --    index : ModSys.S_Natural
  --      The position in the list of the currently selected item.
  --




  procedure GetSelectedItem
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              Value     : in out string);

  --*
  --  GetSelectedItem - Gets the value of the selected item.
  --
  --
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --          control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --  EXIT -
  --
  --    value : string
  --      The string value of the currently selected item.
  --




  procedure GetValidateValueData
             (msgType : in     DisplayW.DisplayMessageType;
              msgData : in     System.Address;
              Table   : in out string;
              Field   : in out string;
              Value   : in out string);

  --*
  --  GetValidateValueData - Retrieve data for validating.
  --
  --
  --  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 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 SageComb control of the status of the validation.
  --
  --  CALLING SEQUENCE -
  --
  --    GetValidateValueData (msgType, msgData, table, field, value)
  --
  --  ENTRY -
  --
  --    msgType : DisplayW.DisplayMessageType
  --      The msgType parameter which was passed into the ActionProc.
  --
  --    msgData : System.Address
  --      The msgData parameter which was passed into the ActionProc.
  --
  --  EXIT -
  --
  --    table : string
  --      The Sage relation associated with the SageComb control.
  --
  --    field : string
  --      The Sage field associated with the SageComb control.
  --
  --    value : string
  --      The text string to validate.
  --




  procedure InsertItem
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              index     : in     ModSys.S_Natural;
              Value     : in     string);

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    index : INTEGER
  --      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 : string
  --      The text to insert into the list.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  function ItemIndex
            (msgType : in     DisplayW.DisplayMessageType;
             msgData : in     System.Address) return ModSys.S_Natural;

  --*
  --  ItemIndex - Get index number of the item that FindItem or FindInitItem message 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 : DisplayW.DisplayMessageType
  --      The msgType parameter which was passed into the ActionProc.
  --
  --    msgData : System.Address
  --      The msgData parameter which was passed into the ActionProc.
  --
  --  EXIT -
  --
  --    index : INTEGER
  --      the index (1..n) of the item the SageComb control is trying
  --          to load.
  --




  procedure Reset
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural);

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --          control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure SetEditItem
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              Value     : in     string);

  --*
  --  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 -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    value : ModSys.S_Natural
  --      The text value to place in the edit part of the SageComb
  --      control.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure SetInitItem
             (msgType : in     DisplayW.DisplayMessageType;
              msgData : in     System.Address;
              Value   : in     string);

  --*
  --  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 : DisplayW.DisplayMessageType
  --      The msgType parameter which was passed into the ActionProc.
  --
  --    msgData : System.Address
  --      The msgData parameter which was passed into the ActionProc.
  --
  --    value : string
  --      The text value to initially be in the edit part of the SageComb
  --      control.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure SetItem
             (msgType : in     DisplayW.DisplayMessageType;
              msgData : in     System.Address;
              Value   : in     string);

  --*
  --  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 : DisplayW.DisplayMessageType
  --      The msgType parameter which was passed into the ActionProc.
  --
  --    msgData : System.Address
  --      The msgData parameter which was passed into the ActionProc.
  --
  --    value : string
  --      The text value to set the list item to.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure SetRange
             (msgType   : in     DisplayW.DisplayMessageType;
              msgData   : in     System.Address;
              totalVals : in     ModSys.S_Natural;
              index     : in     ModSys.S_Natural);

  --*
  --  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 : DisplayW.DisplayMessageType
  --      The msgType parameter which was passed into the ActionProc.
  --
  --    msgData : System.Address
  --      The msgData parameter which was passed into the ActionProc.
  --
  --    totalVals : ModSys.S_Natural
  --      The total number of values which will be in the SageComb list.
  --
  --    index : ModSys.S_Natural
  --      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
  --      N/A
  --




  procedure SetValidationStatus
             (msgType : in     DisplayW.DisplayMessageType;
              msgData : in     System.Address;
              valid   : in     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 : DisplayW.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
  --      N/A
  --




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