Sage-ST ä

Ctrlgrid

Documentation

ControlCommand CurrentControlID CurrentDialogID DisableControl
EditCell EnableControl GetCellIndex GetCellInformation
GetCellText GetCurrentCellColors GetGridDimensions HideControl
Initialize IsEnabled Lock RedrawControl
Refresh Reset STRGetCellText STRSetCellText
STRSetColumnInfo STRSetCurrentCellText SetCellColors SetCellInfo
SetCellText SetColumnCount SetColumnInfo SetCurrentBorder
SetCurrentCellColors SetCurrentCellText SetFocus SetRange
SetScrollPosition ShowControl Unlock




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

  exports ControlCommand name 'CtrlGrid_ControlCommand';

  //*
  //  ControlCommand - Retrieves a command which has been sent from a control.
  //
  //
  //  This routine will retrieve a command which has been sent from the
  //  control to the ActionProc.
  //
  //  CALLING SEQUENCE -
  //
  //    command := ControlCommand (msgType, msgData)
  //
  //  ENTRY -
  //
  //    msgType : DWSpec.DisplayMessageType
  //      The msgType parameter which was passed into the ActionProc.
  //
  //    msgData : 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 'CtrlGrid_CurrentDialogID';

  //*
  //  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 : 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 'CtrlGrid_CurrentControlID';

  //*
  //  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 : 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 'CtrlGrid_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 'CtrlGrid_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 'CtrlGrid_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 'CtrlGrid_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 'CtrlGrid_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 'CtrlGrid_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 'CtrlGrid_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 GetCellIndex
             (const msgType  : DWSpec.DisplayMessageType;
              const msgData  : pointer;
              var   rowIndex : cardinal;
              var   colIndex : cardinal); stdcall;

  exports GetCellIndex name 'CtrlGrid_GetCellIndex';

  //*
  //  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 : DWSpec.DisplayMessageType
  //      The msgType parameter which was passed into the ActionProc.
  //
  //    msgData : pointer
  //      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
             (const dialogID  : cardinal;
              const controlID : cardinal); stdcall;

  exports Initialize name 'CtrlGrid_Initialize';

  //*
  //  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 : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //




  procedure Lock
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const Count     : cardinal); stdcall;

  exports Lock name 'CtrlGrid_Lock';

  //*
  //  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 : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //
  //    count : cardinal
  //      The number of columns to lock.  Locked columns must be
  //      sequential starting with the first.
  //




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

  exports Refresh name 'CtrlGrid_Refresh';




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

  exports Reset name 'CtrlGrid_Reset';

  //*
  //  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 : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //




  procedure SetCellColors
             (const dialogID   : cardinal;
              const controlID  : cardinal;
              const rowIndex   : cardinal;
              const colIndex   : cardinal;
              const textColor  : GridColorType;
              const bkGndColor : GridColorType); stdcall;

  exports SetCellColors name 'CtrlGrid_SetCellColors';

  //*
  //  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 : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //
  //    rowIndex : cardinal
  //      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 : cardinal
  //      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.
  //




  procedure SetScrollPosition
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const rowIndex  : cardinal;
              const colIndex  : cardinal); stdcall;

  exports SetScrollPosition name 'CtrlGrid_SetScrollPosition';

  //*
  //  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 : cardinal
  //      The number of the dialog box or window containing the control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //
  //    rowIndex : cardinal
  //      The row (1 .. n) in the grid to position to.  This row will be the top row
  //      on the display.
  //
  //    colIndex : cardinal
  //      The column (1 .. n) in the grid to postion to.  This column will be displayed
  //      following the locked columns.
  //




  procedure SetCellText
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const rowIndex  : cardinal;
              const colIndex  : cardinal;
              const Text      : array of char); overload; stdcall;

  exports SetCellText (const dialogID  : cardinal;
                       const controlID : cardinal;
                       const rowIndex  : cardinal;
                       const colIndex  : cardinal;
                       const Text      : array of char) name 'CtrlGrid_SetCellText';

  //*
  //  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 : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //
  //    rowIndex : cardinal
  //      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 : cardinal
  //      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 : array of char
  //      The text to place in the cell.
  //




  procedure SetCellText
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const rowIndex  : cardinal;
              const colIndex  : cardinal;
              const Text      : string); overload; stdcall;

  exports SetCellText (const dialogID  : cardinal;
                       const controlID : cardinal;
                       const rowIndex  : cardinal;
                       const colIndex  : cardinal;
                       const Text      : string) name 'CtrlGrid_STRSetCellText';

  //*
  //  STRSetCellText - See documentation of SetCellText.
  //




  procedure SetColumnCount
             (const msgType     : DWSpec.DisplayMessageType;
              const msgData     : pointer;
              const Count       : cardinal;
              const initVisible : cardinal;
              const initLocked  : cardinal); stdcall;

  exports SetColumnCount name 'CtrlGrid_SetColumnCount';

  //*
  //  SetColumnCount - Sets the number of columns and how many initially 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 : DWSpec.DisplayMessageType
  //      The msgType parameter which was passed into the ActionProc.
  //
  //    msgData : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //
  //    count : cardinal
  //      The total number of columns for the control.
  //
  //    initVisible : cardinal
  //      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
  //




  procedure SetColumnInfo
             (const msgType     : DWSpec.DisplayMessageType;
              const msgData     : pointer;
              const Text        : array of char;
              const Percent     : ModSys.FLOAT32;
              const headerAlign : TextAlignment;
              const cellAlign   : TextAlignment); overload; stdcall;

  exports SetColumnInfo (const msgType     : DWSpec.DisplayMessageType;
                         const msgData     : pointer;
                         const Text        : array of char;
                         const Percent     : ModSys.FLOAT32;
                         const headerAlign : TextAlignment;
                         const cellAlign   : TextAlignment) name 'CtrlGrid_SetColumnInfo';

  //*
  //  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, Text, percent, CellAlign)
  //
  //  ENTRY -
  //
  //    msgType : DWSpec.DisplayMessageType
  //      The msgType parameter which was passed into the ActionProc.
  //
  //    msgData : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //
  //    Text : array of char
  //      The text string which will appear in the column header.
  //
  //    percent : ModSys.FLOAT32
  //      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);
  //




  procedure SetColumnInfo
             (const msgType     : DWSpec.DisplayMessageType;
              const msgData     : pointer;
              const Text        : string;
              const Percent     : ModSys.FLOAT32;
              const headerAlign : TextAlignment;
              const cellAlign   : TextAlignment); overload; stdcall;

  exports SetColumnInfo (const msgType     : DWSpec.DisplayMessageType;
                         const msgData     : pointer;
                         const Text        : string;
                         const Percent     : ModSys.FLOAT32;
                         const headerAlign : TextAlignment;
                         const cellAlign   : TextAlignment) name 'CtrlGrid_STRSetColumnInfo';

  //*
  //  STRSetColumnInfo - See documentation of SetColumnInfo.
  //




  procedure SetCellInfo
             (const msgType    : DWSpec.DisplayMessageType;
              const msgData    : pointer;
              const textColor  : GridColorType;
              const bkGndColor : GridColorType;
              const showBorder : boolean); stdcall;

  exports SetCellInfo name 'CtrlGrid_SetCellInfo';

  //*
  //  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 : DWSpec.DisplayMessageType
  //      The msgType parameter which was passed into the ActionProc.
  //
  //    msgData : pointer
  //      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.
  //




  procedure GetCellInformation
             (const msgType    : DWSpec.DisplayMessageType;
              const msgData    : pointer;
              var   textColor  : GridColorType;
              var   bkGndColor : GridColorType;
              var   showBorder : boolean); stdcall;

  exports GetCellInformation name 'CtrlGrid_GetCellInformation';

  //*
  //  GetCellInformation - 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 -
  //
  //    GetCellInformation (msgType, msgData, textColor, bkGndColor, showBorder)
  //
  //  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 -
  //
  //    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
             (const msgType    : DWSpec.DisplayMessageType;
              const msgData    : pointer;
              const textColor  : GridColorType;
              const bkGndColor : GridColorType); stdcall;

  exports SetCurrentCellColors name 'CtrlGrid_SetCurrentCellColors';

  //*
  //  SetCurrentCellColors - Sets the text and background colors for a 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 : DWSpec.DisplayMessageType
  //      The msgType parameter which was passed into the ActionProc.
  //
  //    msgData : pointer
  //      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.
  //




  procedure GetCurrentCellColors
             (const msgType    : DWSpec.DisplayMessageType;
              const msgData    : pointer;
              var   textColor  : GridColorType;
              var   bkGndColor : GridColorType); stdcall;

  exports GetCurrentCellColors name 'CtrlGrid_GetCurrentCellColors';

  //*
  //  GetCurrentCellColors - Gets the text and background colors for a 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 : pointer
  //      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
             (const msgType  : DWSpec.DisplayMessageType;
              const msgData  : pointer;
              var   maxChars : cardinal;
              var   maxLines : cardinal); stdcall;

  exports GetGridDimensions name 'CtrlGrid_GetGridDimensions';

  //*
  //  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 : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //
  //  EXIT -
  //
  //    maxChars : cardinal
  //      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 : cardinal
  //      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
             (const msgType : DWSpec.DisplayMessageType;
              const msgData : pointer;
              const Text    : array of char); overload; stdcall;

  exports SetCurrentCellText (const msgType : DWSpec.DisplayMessageType;
                              const msgData : pointer;
                              const Text    : array of char) name 'CtrlGrid_SetCurrentCellText';

  //*
  //  SetCurrentCellText - Sets the text of the header or data item that is being 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 : DWSpec.DisplayMessageType
  //      The msgType parameter which was passed into the ActionProc.
  //
  //    msgData : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //
  //    text : array of char
  //      The text string which will appear in the SageGrid header or data.
  //




  procedure SetCurrentCellText
             (const msgType : DWSpec.DisplayMessageType;
              const msgData : pointer;
              const Text    : string); overload; stdcall;

  exports SetCurrentCellText (const msgType : DWSpec.DisplayMessageType;
                              const msgData : pointer;
                              const Text    : string) name 'CtrlGrid_STRSetCurrentCellText';

  //*
  //  STRSetCurrentCellText - See documentation of SetCurrentCellText.
  //




  procedure SetRange
             (const msgType : DWSpec.DisplayMessageType;
              const msgData : pointer;
              const total   : cardinal); stdcall;

  exports SetRange name 'CtrlGrid_SetRange';

  //*
  //  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 : DWSpec.DisplayMessageType
  //      The msgType parameter which was passed into the ActionProc.
  //
  //    msgData : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //
  //    total : cardinal
  //      The total number of rows of data to be placed in the list.
  //




  procedure SetCurrentBorder
             (const msgType    : DWSpec.DisplayMessageType;
              const msgData    : pointer;
              const showBorder : boolean); stdcall;

  exports SetCurrentBorder name 'CtrlGrid_SetCurrentBorder';

  //*
  //  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 : DWSpec.DisplayMessageType
  //      The msgType parameter which was passed into the ActionProc.
  //
  //    msgData : pointer
  //      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.
  //




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

  exports Unlock name 'CtrlGrid_Unlock';

  //*
  //  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 : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //




  procedure EditCell
             (const dialogID  : cardinal;
              const controlID : cardinal;
              const rowIndex  : cardinal;
              const colIndex  : cardinal); stdcall;

  exports EditCell name 'CtrlGrid_EditCell';

  //*
  //  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 : cardinal
  //      The number of the dialog box or window containing the
  //      control.
  //
  //    controlID : cardinal
  //      The control resource identifier.
  //
  //    rowIndex : cardinal
  //      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 : cardinal
  //      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.
  //




  procedure GetCellText
             (const msgType : DWSpec.DisplayMessageType;
              const msgData : pointer;
              var   Text    : array of char); overload; stdcall;

  exports GetCellText (const msgType : DWSpec.DisplayMessageType;
                       const msgData : pointer;
                       var   Text    : array of char) name 'CtrlGrid_GetCellText';

  //*
  //  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 : pointer
  //      The msgData parameter which was passed into the ActionProc.
  //
  //  EXIT -
  //
  //    text : array of char
  //      Where to place the text.
  //




  procedure GetCellText
             (const msgType : DWSpec.DisplayMessageType;
              const msgData : pointer;
              var   Text    : string); overload; stdcall;

  exports GetCellText (const msgType : DWSpec.DisplayMessageType;
                       const msgData : pointer;
                       var   Text    : string) name 'CtrlGrid_STRGetCellText';

  //*
  //  STRGetCellText - See documentation of GetCellText.
  //




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