Sage-ST ä

Ctrlgrid

Documentation

Global Declarations (Constants, Types, Variables)
ControlCommand CurrentControlID CurrentDialogID
DisableControl EditCell EnableControl GetCellIndex
GetCellInformation GetCellText GetCurrentCellColors GetGridDimensions
HideControl Initialize IsEnabled Lock
RedrawControl Reset SetCellColors SetCellInfo
SetCellText SetColumnCount SetColumnInfo SetCurrentBorder
SetCurrentCellColors SetCurrentCellText SetFocus SetRange
SetScrollPosition ShowControl Unlock





  type ControlMessage is (Unknown,     -- Unknown command
                          CellClick,   -- A cell has been clicked on

                          -- related procedures -> GetCellIndex, SetCurrentCellColors,
                          --                       SetCurrentCellText
                          CellDblClick,   -- A cell has been double clicked on

                          -- related procedures -> GetCellIndex, SetCurrentCellColors,
                          --                       SetCurrentCellText
                          CellDataChanged,   -- A cell's data has been changed

                          -- related procedures -> GetCellIndex, GetCellText,
                          --                       SetCurrentCellText
                          FindDataItem,   -- Get the specified item

                          -- related procedures -> GetCellIndex, SetCurrentCellColors,
                          --                       SetCurrentCellText
                          GetColumnInfo,   -- Get information about a column

                          -- related procedures -> GetCellIndex, SetColumnInfo
                          GetColumnCount,   -- Get the number of columns the grid will have

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

                          -- related procedures -> SetRange
                          GetCellInfo);   -- Get the information about a cell

  -- related procedures -> SetCellInfo, GetCellInfo

  type TextAlignment is (Left,
                         Center,
                         Right);

  subtype GridColorType is ModSys.S_Natural;
  DarkBlue : constant GridColorType := 8_388_608;   -- RGB(0,0,128)     Low Intensity Blue

  DarkGreen : constant GridColorType := 32_768;   -- RGB(0,128,0)     Low Intensity Green

  DarkRed : constant GridColorType := 128;   -- RGB(128,0,0)     Low Intensity Red

  DarkCyan : constant GridColorType := 8_421_376;   -- RGB(0,128,128)   Low Intensity Cyan

  DarkMagenta : constant GridColorType := 8_388_736;   -- RGB(128,0,128)   Low Intensity Magenta

  DarkYellow : constant GridColorType := 32_896;   -- RGB(128,128,0)   Low Intensity Yellow

  DarkGray : constant GridColorType := 8_421_504;   -- RGB(128,128,128) High Intensity Black

  Black : constant GridColorType := 0;   -- RGB(0,0,0)       Low Intensity Black

  Gray : constant GridColorType := 12_632_256;   -- RGB(192,192,192) Low Intensity White

  Blue : constant GridColorType := 16_711_680;   -- RGB(0,0,255)     High Intensity Blue

  Green : constant GridColorType := 65_280;   -- RGB(0,255,0)     High Intensity Green

  Red : constant GridColorType := 255;   -- RGB(255,0,0)     High Intensity Red

  Cyan : constant GridColorType := 16_776_960;   -- RGB(0,255,255)   High Intensity Cyan

  Magenta : constant GridColorType := 16_711_935;   -- RGB(255,0,255)   High Intensity Magenta

  Yellow : constant GridColorType := 65_535;   -- RGB(255,255,0)   High Intensity Yellow

  White : constant GridColorType := 16_777_215;   -- RGB(255,255,255) High Intensity White

  Default : constant GridColorType := ModSys.S_Natural'last;




  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 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 : 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
  -- Sage Grid control specific commands
  --




  procedure GetCellIndex
             (msgType  : in     DisplayW.DisplayMessageType;
              msgData  : in     System.Address;
              rowIndex : in out ModSys.S_Natural;
              colIndex : in out ModSys.S_Natural);

  --*
  --  GetCellIndex - Gets the row and column index number of the grid item.
  --
  --  The SagesGrid sends a FindDataItem or GetColumnInfo message in order
  --  to populate the SageGrid.  The programmer should use this routine to
  --  determine the row and column index number (1..n) of the item which is
  --  being requested.
  --
  --  CALLING SEQUENCE -
  --
  --    GetCellIndex (msgType, msgData, rowIndex, colIndex)
  --
  --  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 -
  --
  --    rowIndex : CARDINAL
  --      The row in the grid for which the FindDataItem message is
  --      requesting data.  This value will be 0 if the GetColumnInfo
  --      has been sent.
  --
  --    colIndex : CARDINAL
  --      The column in the grid for which the FindDataItem or GetColumnInfo
  --      message is requesting data.
  --




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

  --*
  --  Initialize - Initializes and Resets the control.
  --
  --  This routine will cause the control to be re initialized and reset.
  --  The programmer will receive GetColumnCount, GetColumnInfo, and Range
  --  message.  They may respond to these messages to change the attributes
  --  of the control.
  --
  --  CALLING SEQUENCE -
  --
  --    Initialize (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 Lock
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              Count     : in     ModSys.S_Natural);

  --*
  --  Lock - Locks columns for horizontal scrolling.
  --
  --  This routine will lock columns in the grid so that they will not
  --  scroll horizontally.
  --
  --  CALLING SEQUENCE -
  --
  --    Lock (DialogId, ControlId, count)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    count : modsys.S_Natural
  --      The number of columns to lock.  Locked columns must be
  --      sequential starting with the first.
  --
  --  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.  This will result
  --  in the grid 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 SetCellColors
             (dialogID   : in     ModSys.S_Natural;
              controlID  : in     ModSys.S_Natural;
              rowIndex   : in     ModSys.S_Natural;
              colIndex   : in     ModSys.S_Natural;
              textColor  : in     GridColorType;
              bkGndColor : in     GridColorType);

  --*
  --  SetCellColors - Changes the colors of a cell.
  --
  --  This routine allows the programmer to change the text and background
  --  colors of a cell.
  --
  --  CALLING SEQUENCE -
  --
  --    SetCellColors (DialogId, ControlId, rowIndex, colIndex,
  --                   textColor, bkGndColor)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    rowIndex : ModSys.S_Natural
  --      The row (1..n) in the grid which contains the cell to be changed.
  --      If the specified row is not visible, no change will be made.
  --      has been sent.
  --
  --    colIndex : ModSys.S_Natural
  --      The column (1..n) in the grid which contains the cell to be
  --      changed.  If the specified column is not visible, the change
  --      will not take effect until the column is scrolled into view.
  --
  --    textColor : GridColorType
  --      The color for the text in the header or cell.  Must be one of
  --      the GridColorTypes.
  --
  --    bkGndColor : GridColorType
  --      The color for the background of the header or cell.  Must be one
  --      of the GridColorTypes.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure SetScrollPosition
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              rowIndex  : in     ModSys.S_Natural;
              colIndex  : in     ModSys.S_Natural);

  --*
  --  SetScrollPosition - Changes the position of the grid display.
  --
  --  This routine allows the programmer to change the position of the grid display.
  --
  --  CALLING SEQUENCE -
  --
  --    SetScrollPosition (DialogId, ControlId, rowIndex, colIndex);
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    rowIndex : ModSys.S_Natural
  --      The row (1..n) in the grid to position to.  This row will be the top row
  --      on the display.
  --
  --    colIndex : ModSys.S_Natural
  --      The column (1..n) in the grid to postion to.  This column will be displayed
  --      following the locked columns.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure SetCellText
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              rowIndex  : in     ModSys.S_Natural;
              colIndex  : in     ModSys.S_Natural;
              Text      : in     string);

  --*
  --  SetCellText - Changes the text of a cell.
  --
  --  This routine allows the programmer to change the text of a cell.
  --
  --  CALLING SEQUENCE -
  --
  --    SetCellText (DialogId, ControlId, rowIndex, colIndex, text)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    rowIndex : ModSys.S_Natural
  --      The row (1..n) in the grid which contains the cell to be changed.
  --      If the specified row is not visible, no change will be made.
  --      has been sent.
  --
  --    colIndex : ModSys.S_Natural
  --      The column (1..n) in the grid which contains the cell to be
  --      changed.  If the specified column is not visible, the change
  --      will not take effect until the column is scrolled into view.
  --
  --    text : String
  --      The text to place in the cell.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure SetColumnCount
             (msgType     : in     DisplayW.DisplayMessageType;
              msgData     : in     System.Address;
              Count       : in     ModSys.S_Natural;
              initVisible : in     ModSys.S_Natural;
              initLocked  : in     ModSys.S_Natural);

  --*
  --  SetColumnCount - Sets number of columns and how many will be visible.
  --
  --  The SageGrid sends a GetColumnCount message in order to determine
  --  the number of total columns in the grid, and the number that will
  --  be initially visible.  The programmer should use this routine to
  --  set the requested values.  These values will override the settings
  --  specified in the resource editor.
  --
  --  CALLING SEQUENCE -
  --
  --    SetColumnCount (msgType, msgData, count, initVisible)
  --
  --  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.
  --
  --    count : ModSys.S_Natural
  --      The total number of columns for the control.
  --
  --    initVisible : ModSys.S_Natural
  --      The number of columns to be initially visible in the control.
  --      The user will be able to scroll to any columns which are not
  --      initially visible.
  --
  --    initLocked : CARDINAL
  --      The number of columns to be initially locked in the control.
  --      The locked columns will not scroll
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure SetColumnInfo
             (msgType     : in     DisplayW.DisplayMessageType;
              msgData     : in     System.Address;
              Value       : in     string;
              Percent     : in     ModSys.S_Float;
              headerAlign : in     TextAlignment;
              cellAlign   : in     TextAlignment);

  --*
  --  SetColumnInfo - Sets the attributes of a column in the grid control.
  --
  --  The SageGrid sends a GetColumnInfo message in order to determine
  --  the attributes of each column in the grid.  The programmer should
  --  use this routine to set the header text value, column size (in
  --  percent of the entire grid size), and the text alignment for that
  --  column.  The GetCellIndex routine must be called to determine which
  --  column in the grid is being requested.
  --
  --  CALLING SEQUENCE -
  --
  --    SetColumnInfo (msgType, msgData, value, percent, alignment)
  --
  --  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 string which will appear in the column header.
  --
  --    percent : Modsys.S_Float
  --      The size of the column with respect to the total size of the
  --      grid.  Set this value to 0 to use the attribute specified in
  --      the resource editor.
  --
  --    headerAlign : TextAlignment
  --      The method of aligning text for the column header.  Must be one
  --      of the following - (Left, Center, Right);
  --
  --    cellAlign : TextAlignment
  --      The method of aligning text for all the cells in the column.
  --      Must be one of the following - (Left, Center, Right);
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure SetCellInfo
             (msgType    : in     DisplayW.DisplayMessageType;
              msgData    : in     System.Address;
              textColor  : in     GridColorType;
              bkGndColor : in     GridColorType;
              showBorder : in     boolean);

  --*
  --  SetCellInfo - Sets the attributes of a cell in the grid control.
  --
  --
  --  The SageGrid sends a GetCellInfo message in order to determine
  --  the attributes of each cell in the grid.  The programmer should
  --  use this routine to set the cell colors and border attributes.
  --  The GetCellIndex routine can be called to determine which
  --  column in the grid is being requested.
  --
  --  CALLING SEQUENCE -
  --
  --    SetCellInfo (msgType, msgData, textColor, bkGndColor, showBorder)
  --
  --  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.
  --
  --    textColor : GridColorType
  --      The color of the text in the grid.
  --
  --    bkGndColor : GridColorType
  --      The color of the background in the cell.
  --
  --    showBorder : boolean
  --      If TRUE, then the border will be shown.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure GetCellInformation
             (msgType    : in     DisplayW.DisplayMessageType;
              msgData    : in     System.Address;
              textColor  :    out GridColorType;
              bkGndColor :    out GridColorType;
              showBorder :    out boolean);

  --*
  --  GetCellInfo - Gets the attributes of a cell in the grid control.
  --
  --
  --  The SageGrid sends a GetCellInfo message in order to determine
  --  the attributes of each cell in the grid.  The programmer should
  --  use this routine to get the cell colors and border attributes that
  --  currently being used.  The GetCellIndex routine can be called to
  --  determine which column in the grid is being requested.
  --
  --  CALLING SEQUENCE -
  --
  --    GetCellInfo (msgType, msgData, textColor, bkGndColor, showBorder)
  --
  --  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 -
  --
  --    textColor : GridColorType
  --      The color of the text in the grid.
  --
  --    bkGndColor : GridColorType
  --      The color of the background in the cell.
  --
  --    showBorder : boolean
  --      If TRUE, then the border will be shown.
  --




  procedure SetCurrentCellColors
             (msgType    : in     DisplayW.DisplayMessageType;
              msgData    : in     System.Address;
              textColor  : in     GridColorType;
              bkGndColor : in     GridColorType);

  --*
  --  SetCurrentCellColors - Sets the text and background colors for header or cell.
  --
  --  The SageGrid sends a GetColumnInfo or FindDataItem message to obtain
  --  the header or cell data in order to populate a SageGrid.  This routine
  --  can be used to set either the header colors (when responding to a
  --  GetColumnInfo message) or the cell colors (when responding to the
  --  FindDataItem message).  Additionally, it can be used when responding
  --  to CellClick or CellDblClick messages to change the colors of the cell
  --  which has been selected by the user.
  --
  --  CALLING SEQUENCE -
  --
  --    SetCurrentCellColors (msgType, msgData, textColor, bkGndColor)
  --
  --  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.
  --
  --    textColor : GridColorType
  --      The color for the text in the header or cell.  Must be one of
  --      the GridColorTypes.
  --
  --    bkGndColor : GridColorType
  --      The color for the background of the header or cell.  Must be one
  --      of the GridColorTypes.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure GetCurrentCellColors
             (msgType    : in     DisplayW.DisplayMessageType;
              msgData    : in     System.Address;
              textColor  :    out GridColorType;
              bkGndColor :    out GridColorType);

  --*
  --  GetCurrentCellColors - Gets text and background colors for header or cell.
  --
  --
  --  The SageGrid sends a GetColumnInfo or FindDataItem message to obtain
  --  the header or cell data in order to populate a SageGrid.  This routine
  --  can be used to get either the header colors (when responding to a
  --  GetColumnInfo message) or the cell colors (when responding to the
  --  FindDataItem message).  Additionally, it can be used when responding
  --  to CellClick or CellDblClick messages to get the colors of the cell
  --  which has been selected by the user.
  --
  --  CALLING SEQUENCE -
  --
  --    GetCurrentCellColors (msgType, msgData, textColor, bkGndColor)
  --
  --  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 -
  --
  --    textColor : GridColorType
  --      The color for the text in the header or cell.
  --
  --    bkGndColor : GridColorType
  --      The color for the background of the header or cell.
  --




  procedure GetGridDimensions
             (msgType  : in     DisplayW.DisplayMessageType;
              msgData  : in     System.Address;
              maxChars :    out ModSys.S_Natural;
              maxLines :    out ModSys.S_Natural);

  --*
  --  GetGridDimensions - Gets the maximum number of rows and lines in grid definition.
  --
  --
  --  The SageGrid sends a GetColumnCount message to obtain the number of columns,
  --  etc for the grid.  At this time, the control also calculates and provides the
  --  maximum number of characters and lines that the grid can hold.
  --  This information can be used to calculate the column information that is
  --  returned to the grid control.  This call is valid only after a GetColumCount message.
  --
  --  CALLING SEQUENCE -
  --
  --    GetGridDimensions (msgType, msgData, maxChars, maxLines)
  --
  --  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 -
  --
  --    maxChars : Modsys.S_Natural
  --      The maximum number of characters that can be stored in the grid using
  --      the current grid font.  This is calculated from the size of the control
  --      and the average width of a character using the current font, therefore,
  --      the number returned will be greater that the actual size.
  --
  --    maxLines : Modsys.S_Natural
  --      The maximum number of lines that will fit in the grid.  Again, this is
  --      calculated from the font average character height and will actually be
  --      less than what is returned.
  --




  procedure SetCurrentCellText
             (msgType : in     DisplayW.DisplayMessageType;
              msgData : in     System.Address;
              Text    : in     string);

  --*
  --  SetCurrentCellText - Sets the text of the header or data item that is requested.
  --
  --  The SageGrid sends a FindDataItem message in order to populate the
  --  cells of a SageGrid.  The programmer should use this routine to
  --  set the requested value.
  --
  --  CALLING SEQUENCE -
  --
  --    SetCurrentCellText (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.
  --
  --    text : String
  --      The text string which will appear in the SageGrid header or data.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




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

  --*
  --  SetRange - Sets the number of rows of data to be in the SageGrid.
  --
  --  The SagesGrid sends a Range message in order to determine
  --  the total number of rows of data that will be in the grid.  The
  --  programmer should use this routine to respond to the Range
  --  message.
  --
  --  CALLING SEQUENCE -
  --
  --    SetRange (msgType, msgData, total)
  --
  --  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.
  --
  --    total : Modsys.S_Natural
  --      The total number of rows of data to be placed in the list.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure SetCurrentBorder
             (msgType    : in     DisplayW.DisplayMessageType;
              msgData    : in     System.Address;
              showBorder : in     boolean);

  --*
  --  SetCurrentBorder - Turns the border on or off for the current grid header or cell.
  --
  --
  --  The SagesGrid sends a GetColumnInfo or a FindItem message in order to
  --  get the data for the header or cell.  The user can call this routine to
  --  turn on or off the border for the header or cell.
  --
  --  CALLING SEQUENCE -
  --
  --    SetCurrentBorder (msgType, msgData, showBorder)
  --
  --  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.
  --
  --    showBorder : boolean
  --      TRUE if the border is to be shown.  By default it is always shown.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




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

  --*
  --  Unlock - Unlocks columns which have been locked.
  --
  --  This routine will unlock columns in a grid which have been locked.
  --
  --  CALLING SEQUENCE -
  --
  --    Unlock (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 EditCell
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              rowIndex  : in     ModSys.S_Natural;
              colIndex  : in     ModSys.S_Natural);

  --*
  --  EditCell - Allow editing of a cell.
  --
  --
  --  This routine allows the user to edit the contents of a cell.
  --
  --  CALLING SEQUENCE -
  --
  --    EditCell (DialogId, ControlId, rowIndex, colIndex)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    rowIndex : ModSys.S_Natural
  --      The row (1..n) in the grid which contains the cell to be changed.
  --      If the specified row is not visible, no change will be made.
  --      has been sent.
  --
  --    colIndex : ModSys.S_Natural
  --      The column (1..n) in the grid which contains the cell to be
  --      changed.  If the specified column is not visible, the change
  --      will not take effect until the column is scrolled into view.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure GetCellText
             (msgType : in     DisplayW.DisplayMessageType;
              msgData : in     System.Address;
              Text    : in out string);

  --*
  --  GetCellText - Retrieves the text of a cell.
  --
  --
  --  This routine allows the programmer to retrieve the text of a cell.
  --
  --  CALLING SEQUENCE -
  --
  --    GetCellText (msgType, msgData, text)
  --
  --  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 -
  --
  --    text : string
  --      Where to place the text.
  --




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