Sage-ST ä

Ctrledit

Documentation

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




  function ControlCommand
             (const msgType : DWSpec.DisplayMessageType;
              const msgData : pointer) : ControlMessage; stdcall;

  exports ControlCommand name 'CtrlEdit_ControlCommand';

  //*
  //  ControlCommand - Retrieves 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 : pointer
  //      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
             (const msgData : pointer) : cardinal; stdcall;

  exports CurrentDialogID name 'CtrlEdit_CurrentDialogID';

  //*
  //  CurrentDialogID - Retrieves ID of 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 : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //
  //  EXIT -
  //
  //    dialogID : cardinal
  //      The ID of the dialog receiving a message.
  //




  function CurrentControlID
             (const msgData : pointer) : cardinal; stdcall;

  exports CurrentControlID name 'CtrlEdit_CurrentControlID';

  //*
  //  CurrentControlID - Retrieves 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 : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //
  //  EXIT -
  //
  //    controlID : cardinal
  //      The ID of the control.
  //




  function IsEnabled
             (const dialogID  : cardinal;
              const controlID : cardinal) : boolean; stdcall;

  exports IsEnabled name 'CtrlEdit_IsEnabled';

  //*
  //  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); stdcall;

  exports EnableControl name 'CtrlEdit_EnableControl';

  //*
  //  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.
  //




  procedure DisableControl
             (const dialogID  : cardinal;
              const controlID : cardinal); stdcall;

  exports DisableControl name 'CtrlEdit_DisableControl';

  //*
  //  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.
  //




  procedure HideControl
             (const dialogID  : cardinal;
              const controlID : cardinal); stdcall;

  exports HideControl name 'CtrlEdit_HideControl';

  //*
  //  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.
  //




  procedure ShowControl
             (const dialogID  : cardinal;
              const controlID : cardinal); stdcall;

  exports ShowControl name 'CtrlEdit_ShowControl';

  //*
  //  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.
  //




  procedure SetFocus
             (const dialogID  : cardinal;
              const controlID : cardinal); stdcall;

  exports SetFocus name 'CtrlEdit_SetFocus';

  //*
  //  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.
  //




  procedure RedrawControl
             (const dialogID  : cardinal;
              const controlID : cardinal); stdcall;

  exports RedrawControl name 'CtrlEdit_RedrawControl';

  //*
  //  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.
  //




  procedure Flush
             (const dialogID  : cardinal;
              const controlID : cardinal); stdcall;

  exports Flush name 'CtrlEdit_Flush';

  //*
  //  Flush - Writes contents of Sage control to 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.
  //




  procedure GetText
             (const dialogID  : cardinal;
              const controlID : cardinal;
              var   Text      : array of char); overload; stdcall;

  exports GetText (const dialogID  : cardinal;
                   const controlID : cardinal;
                   var   Text      : array of char) name 'CtrlEdit_GetText';

  //*
  //  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 GetText
             (const dialogID  : cardinal;
              const controlID : cardinal;
              var   Text      : string); overload; stdcall;

  exports GetText (const dialogID  : cardinal;
                   const controlID : cardinal;
                   var   Text      : string) name 'CtrlEdit_STRGetText';

  //*
  //  STRGetText - See documentation of GetText.
  //




  procedure GetValidateCharData
             (const msgType : DWSpec.DisplayMessageType;
              const msgData : pointer;
              var   Table   : array of char;
              var   Field   : array of char;
              var   Value   : array of char;
              var   offset  : cardinal); overload; stdcall;

  exports GetValidateCharData (const msgType : DWSpec.DisplayMessageType;
                               const msgData : pointer;
                               var   Table   : array of char;
                               var   Field   : array of char;
                               var   Value   : array of char;
                               var   offset  : cardinal) name 'CtrlEdit_GetValidateCharData';

  //*
  //  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 : pointer
  //      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 GetValidateCharData
             (const msgType : DWSpec.DisplayMessageType;
              const msgData : pointer;
              var   Table   : string;
              var   Field   : string;
              var   Value   : string;
              var   offset  : cardinal); overload; stdcall;

  exports GetValidateCharData (const msgType : DWSpec.DisplayMessageType;
                               const msgData : pointer;
                               var   Table   : string;
                               var   Field   : string;
                               var   Value   : string;
                               var   offset  : cardinal) name 'CtrlEdit_STRGetValidateCharData';

  //*
  //  STRGetValidateCharData - See documentation of GetValidateCharData.
  //




  procedure GetValidateValueData
             (const msgType : DWSpec.DisplayMessageType;
              const msgData : pointer;
              var   Table   : array of char;
              var   Field   : array of char;
              var   Value   : array of char); overload; stdcall;

  exports GetValidateValueData (const msgType : DWSpec.DisplayMessageType;
                                const msgData : pointer;
                                var   Table   : array of char;
                                var   Field   : array of char;
                                var   Value   : array of char) name 'CtrlEdit_GetValidateValueData';

  //*
  //  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 : pointer
  //      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 GetValidateValueData
             (const msgType : DWSpec.DisplayMessageType;
              const msgData : pointer;
              var   Table   : string;
              var   Field   : string;
              var   Value   : string); overload; stdcall;

  exports GetValidateValueData (const msgType : DWSpec.DisplayMessageType;
                                const msgData : pointer;
                                var   Table   : string;
                                var   Field   : string;
                                var   Value   : string) name 'CtrlComb_STRGetValidateValueData';

  //*
  //  STRGetValidateValueData - See documentation of GetValidateValueData.
  //




  procedure Reset
             (const dialogID  : cardinal;
              const controlID : cardinal); stdcall;

  exports Reset name 'CtrlEdit_Reset';

  //*
  //  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.
  //




  procedure SetColors
             (const dialogID   : cardinal;
              const controlID  : cardinal;
              const textColor  : EditColorType;
              const bkGndColor : EditColorType); stdcall;

  exports SetColors name 'CtrlEdit_SetColors';

  //*
  //  SetColors - Sets 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.
  //




  procedure SetText
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const Text      : array of char); overload; stdcall;

  exports SetText (const dialogID  : cardinal;
                   const controlID : cardinal;
                   const Text      : array of char) name 'CtrlEdit_SetText';

  //*
  //  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.
  //




  procedure SetText
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const Text      : string); overload; stdcall;

  exports SetText (const dialogID  : cardinal;
                   const controlID : cardinal;
                   const Text      : string) name 'CtrlEdit_STRSetText';

  //*
  //  STRSetText - See documentation of SetText.
  //




  procedure SetUpperCaseOnly
             (const dialogID  : cardinal;
              const controlID : cardinal); stdcall;

  exports SetUpperCaseOnly name 'CtrlEdit_SetUpperCaseOnly';

  //*
  //  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.
  //




  procedure SetLowerCaseOnly
             (const dialogID  : cardinal;
              const controlID : cardinal); stdcall;

  exports SetLowerCaseOnly name 'CtrlEdit_SetLowerCaseOnly';

  //*
  //  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.
  //




  procedure SetValidationStatus
             (const msgType : DWSpec.DisplayMessageType;
              const msgData : pointer;
              const valid   : boolean); stdcall;

  exports SetValidationStatus name 'CtrlEdit_SetValidationStatus';

  //*
  //  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 : pointer
  //      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.
  //




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