Sage-ST ä

Ctrlrich

Documentation

Global Declarations (Constants, Types, Variables)
CancelAutoSave ControlCommand CurrentControlID
CurrentDialogID DisableControl EnableControl ForceSave
GetDataPosition GetDataSize HideControl IsEnabled
LoadData PrintContent RedrawControl Reset
ResetFile RetrieveData SetColors SetFocus
ShowControl





  type ControlMessage is (Unknown,    -- Unknown command
                          AutoSave,   -- The SageRich box is about to save the data

                          -- related procedures -> AutoSaveData
                          GetData,   -- SageRich box requests data

                          -- related procedures -> GetDataPosition, LoadData
                          SaveData);   -- SageRich box returning data




  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 for which 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 : 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 Reset
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural);

  --*
  --  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 : 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 ResetFile
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              filePath  : in     string);

  --*
  --  ResetFile - Resets the file which a control is displaying.
  --
  --
  --  This routine will cause a SageRich control which is displaying a file
  --  to reset and display a different file.  The current file will be saved
  --  before the new file is loaded.
  --
  --  CALLING SEQUENCE -
  --
  --    ResetFile (DialogId, ControlId, filePath)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    filePath : string
  --      The path and file name of the new file to load.  This value is
  --      limited to 128 characters.
  --
  --  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 CancelAutoSave
             (msgType : in     DisplayW.DisplayMessageType;
              msgData : in     System.Address);

  --*
  --  CancelAutoSave - Tells the SageRich control to NOT save the data.
  --
  --
  --  The SageRich control sends a AutoSave message when the Sage Data Field
  --  option has been selected in the resource file and the control is about
  --  to save its data.  This will occur either when the control loses focus
  --  or when the dialog is about to close.  This routine can be used to
  --  tell the control not to save any changes which have been made to the data.
  --  If this procedure is not called, the default response is to save the data.
  --
  --  CALLING SEQUENCE -
  --
  --    CancelAutoSave (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 -
  --
  --    None
  --      N/A
  --




  procedure GetDataPosition
             (msgType : in     DisplayW.DisplayMessageType;
              msgData : in     System.Address;
              LoadPos :    out ModSys.S_Natural;
              LoadMax :    out ModSys.S_Natural);

  --*
  --  GetDataPosition - Retrieves position and max size of data request.
  --
  --
  --  The SageRich control sends a GetData message when the User Supplied
  --  Data option has been selected in the resource file and the controls
  --  needs data.  This routine can be used to determine what position in
  --  the data block the SageRich control is requesting data from and the
  --  max size of data that can be returned in this iteration.
  --
  --  CALLING SEQUENCE -
  --
  --    GetDataPosition (msgType, msgData, LoadPos, LoadMax)
  --
  --  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 -
  --
  --    LoadPos : Modsys.S_Natural
  --      The current position in the buffer needing data.
  --
  --    LoadMax : Modsys.S_Natural
  --      The max size of data that can be returned to the control.
  --




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

  --*
  --  GetDataSize - Get the size of the data.
  --
  --
  --  The SageRich control sends a SaveData message when the User Supplied
  --  Data option has been selected in the resource and it needs to write
  --  out its data.  This routine can be used to determine how much data the
  --  SageRich control wishes to save.
  --
  --  CALLING SEQUENCE -
  --
  --    dataSize := GetDataSize (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 -
  --
  --    dataSize : ModSys.S_Natural
  --      The size of the data block to save.
  --




  procedure LoadData
             (msgType  : in     DisplayW.DisplayMessageType;
              msgData  : in     System.Address;
              dataPos  : in     ModSys.S_Natural;
              DataSize : in     ModSys.S_Natural;
              Data     : in     System.Address);

  --*
  --  LoadData - Sends data to a SageRich Control.
  --
  --
  --  The SageRich control sends a GetData message when the User Supplied
  --  Data option has been selected in the resource file and the controls
  --  needs data.  This routine can be used to send data to a SageRich
  --  control.  As the SageRich control may send the GetData message
  --  many times, the programmer should use the GetDataPosition routine to
  --  determine what the starting position of the requested data is.
  --
  --  NOTE - If the date being sent is larger than the LoadMax value
  --         returned from the CtrlRich.GetDataPosition routine then the
  --         data exceeding the value will be lost.
  --
  --  CALLING SEQUENCE -
  --
  --    LoadData (msgType, msgData, dataPos, dataSize, data)
  --
  --  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.
  --
  --    dataPos : ModSys.S_Natural
  --      The position in the SageRich control data for the current data
  --      block. (1 .. N)
  --
  --    dataSize : ModSys.S_Natural
  --      The size of the data block being returned.
  --
  --    data : System.Address
  --      The address of the data being returned.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure RetrieveData
             (msgType  : in     DisplayW.DisplayMessageType;
              msgData  : in     System.Address;
              dataPos  : in out ModSys.S_Natural;
              DataSize : in out ModSys.S_Natural;
              Data     : in     System.Address);

  --*
  --  RetrieveData - Gets data from a SageRich Control.
  --
  --
  --  The SageRich control sends a SaveData message when the User Supplied
  --  Data option has been selected in the resource file and the controls
  --  needs to write out its data.  This routine can be used to get the data
  --  which the control is writing out.  As the SageRich control may send
  --  the SaveData message many times, the programmer should use the
  --  GetDataSize routine each time to determine what size of data buffer needs
  --  to be allocated.
  --
  --  CALLING SEQUENCE -
  --
  --    RetrieveData (msgType, msgData, dataPos, dataSize, data)
  --
  --  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 -
  --
  --    dataPos : ModSys.S_Natural
  --      The position in the SageRich control data for the current data
  --      block.  (1 .. N)
  --
  --    dataSize : ModSys.S_Natural
  --      The size of the data block to write out.
  --
  --    data : System.Address
  --      The address of the data being written out.
  --




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

  --*
  --  ForceSave - Forces a save of the data RichEdit is working with.
  --
  --
  --  This routine will cause a SageRich control which is displaying a file
  --  to save the data it is displaying.
  --
  --  NOTE - This routine currently only does this if the control is defined
  --         as Sage data or User data.  It does not work if the control is
  --         defined as File data.
  --
  --  CALLING SEQUENCE -
  --
  --    ForceSave (DialogId, ControlId)
  --
  --  ENTRY -
  --
  --    DialogId : CARDINAL
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : CARDINAL
  --      The control resource identifier.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




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

  --*                                       --
  --  PrintContent - Allows printing of a richedit control.
  --
  --
  --  This routine will allow a SageRich control which is displaying to
  --  be printed.
  --
  --  CALLING SEQUENCE -
  --
  --    PrintContent (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 SetColors
             (dialogID   : in     ModSys.S_Natural;
              controlID  : in     ModSys.S_Natural;
              textColor  : in     RTColorType;
              bkGndColor : in     RTColorType);

  --*
  --  SetColors - Sets the text and background colors of the control.
  --
  --  This routine will change the text and background colors of
  --  the SageRich 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 : RTColorType
  --      The color for the text.  Must be one of the RTColorTypes.
  --      The Default color is determined by the current Windows
  --      configuration.
  --
  --    bkGndColor : RTColorType
  --      The color for the background.  Must be one of the
  --      RTColorTypes.  The Default color is determined by the
  --      current Windows configuration.
  --
  --  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