Sage-ST ä

Ctrllv

Documentation

AdjustAndHighlightRow CalculateTopRow ColumnSize ControlCommand
CurrentControlID CurrentDialogID CurrentFont DATAISVALID
DeleteColumn DisableControl DummyCharValidateProc EditCell
EnableControl EndEdit GetAverageCharWidth GetColClicked
GetControlSize GetCurrentPosition GetDefaultColors GetEditExitFunction
GetHDC GetHighlightedPosition GetImageIndex GetItemNumber
GetItemState GetRowCol GetSearchStr GetValidationStr
HideControl HideGridlines InsertColumn IsEnabled
IsItemMarked KillEdit NextMarked RedrawControl
Refresh Reset ResetAndHighlightRow ResetColumns
SetAllItemStates SetColor SetColumnCount SetColumnInfo
SetCurrentRow SetDragging SetFocus SetHeaderFont
SetHighlightedPosition SetHighlighting SetIconMarkingMode SetImageCount
SetImageInfo SetItemFont SetItemFontColor SetItemNumber
SetItemPos SetItemRange SetItemState SetItemText
SetItemVisible SetLeftMouseClick SetMarkCursor SetSelectStyle
SetState SetStriping SetTotalStates SetViewKind
ShowControl ShowGridlines ShowIcon ShowOnlyMarked
ToggleState TotalMarked TurnOffDotDotDot TurnOnDotDotDot
UnSetMarkCursor




  PROCEDURE ControlCommand
             (CONST msgType : DWSpec.DisplayMessageType;
              CONST msgData : SYSTEM.ADDRESS) : 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 : DWSpec.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.
  *)




  PROCEDURE CurrentDialogID
             (CONST msgData : SYSTEM.ADDRESS) : CARDINAL;

  (**
      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 : CARDINAL
          The ID of the dialog receiving a message.
  *)




  PROCEDURE CurrentControlID
             (CONST msgData : SYSTEM.ADDRESS) : CARDINAL;

  (**
      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 : CARDINAL
          The ID of the control.
  *)




  PROCEDURE IsEnabled
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL) : 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 : 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);

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

      EXIT -

        None
  *)




  PROCEDURE DisableControl
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL);

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

      EXIT -

        None
  *)




  PROCEDURE HideControl
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL);

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

      EXIT -

        None
  *)




  PROCEDURE ShowControl
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL);

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

      EXIT -

        None
  *)




  PROCEDURE SetFocus
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL);

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

      EXIT -

        None
  *)




  PROCEDURE RedrawControl
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL);

  (**
      RedrawControl - repaints control .. essentially the same as Refresh.

      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.

      EXIT -

        None
  *)




  PROCEDURE Refresh
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL);

  (**
      Refresh - will reload the current page of data.

      This routine will reloads the current page.

      CALLING SEQUENCE -

        Refresh (dialogID, controlID)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

      EXIT -

        None
  *)




  PROCEDURE ResetColumns
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL);

  (**
      ResetColumns - Rest all columns.

      This routine will cause the list view column headers to be reinitialized.
      This will clear all column headers and reask for the column information.

      CALLING SEQUENCE -

        ResetColumns (dialogID, controlID)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

      EXIT -

        None
  *)




  PROCEDURE Reset
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST rowPos    : CARDINAL);

  (**
      Reset - Reset the control.

      This routine will cause the list view to be reinitialized, including
      asking for range and icon information, and asking for the item
      position to display first.  This also sets all states for all rows to 0.

      CALLING SEQUENCE -

        Reset (dialogID, controlID. rowPos)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        rowPos : CARDINAL
          The beginning item in the list to be displayed (1 .. n) (current page).

      EXIT -

        None
  *)




  PROCEDURE SetLeftMouseClick
             (CONST dialogID       : CARDINAL;
              CONST controlID      : CARDINAL;
              CONST setToCtrlClick : BOOLEAN);

  (**
      SetLeftMouseClick - Set the left mouse click.

      This routine will change the behavior of a left mouse click to match
      the behavior of a ctrl left mouse click.  That is, once an item has
      been clicked it stays selected until clicked again or cleared in some
      way other than clicking on another item (which is default behavior).
      This may be called during the Dialog.Initialize or any time after the
      Dialog has been initialized in response to any other ListView message.

      CALLING SEQUENCE -

        SetLeftMouseClick (dialogID, controlID. setToCtrlClick)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        setToCtrlClick : CARDINAL
          TRUE sets left click behavior to same as ctrl left click behavior;
          FALSE resets to default left click behavior

      EXIT -

        None
  *)




  PROCEDURE GetSearchStr
             (CONST msgData : SYSTEM.ADDRESS;
              VAR   Str     : ARRAY OF CHAR);

  (**
      GetSearchStr - Retrieves the current search string from the list.

      The list sends a SearchChange message when the search string
      has changed.  The programmer may use this routine to get the
      current search string.  The programmer can then use this value to
      perform a search to find a new index to position the list at.
      The SetItemPos routine can then be used to tell the list
      what the new position will be.

      CALLING SEQUENCE -

        GetSearchStr (msgData, str)

      ENTRY -

        msgData : SYSTEM.ADDRESS
          The msgData parameter which was passed into the ActionProc.

        str : ARRAY OF CHAR
          The current search string.

      EXIT -

        None
  *)




  PROCEDURE SetItemPos
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST Pos       : CARDINAL);

  (**
      SetItemPos - position data to specified position.

      This routine will change the page of the data so that "pos" is at or
      near the top of the page.  This will set the position and do a Refresh
      of the control.

      CALLING SEQUENCE -

        SetItemPos (dialogID, controlID. pos)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        pos : CARDINAL
          Data item (1 .. n) to be visible on current page.

      EXIT -

        None
  *)




  PROCEDURE SetItemText
             (CONST dialogID   : CARDINAL;
              CONST controlID  : CARDINAL;
              CONST rowIndex   : CARDINAL;
              CONST colIndex   : CARDINAL;
              CONST imageIndex : CARDINAL;
              CONST Text       : ARRAY OF CHAR);

  (**
      SetItemText - load the current "cell" with data.

      This routine is called in response to the GetItemInfo message. The
      user should first call GetRowCol to determine the rowIndex and colIndex,
      and then call this routine to load the data item.  rowIndex is the (1 .. n)
      data item or record, and colIndex is the (1 .. n) part of the data item.
      imageIndex is the 1 .. n relative image index associated with the data item
      (only 1 image per row)  0 indicates no image.

      CALLING SEQUENCE -

        SetItemText (dialogID, controlID. rowIndex, colIndex, imageIndex, text)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        rowIndex : CARDINAL
          The data row (1 .. n)

        colIndex : CARDINAL
          The data column (1 .. n)

        imageIndex : CARDINAL
          The image associated with the entire row (0 .. n) where 0 indicates
          no image.

      EXIT -

        None
  *)




  PROCEDURE SetColumnCount
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST Count     : CARDINAL);

  (**
      SetColumnCount - tell the list view how many columns of data to expect.

      This routine is called in response to the GetColumnCount message.
      count must be at least 1.

      CALLING SEQUENCE -

        SetColumnCount (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 of data.

      EXIT -

        None
  *)




  PROCEDURE SetColumnInfo
             (CONST dialogID     : CARDINAL;
              CONST controlID    : CARDINAL;
              CONST columnIndex  : CARDINAL;
              CONST columnWidth  : CARDINAL;
              CONST columnAlign  : AlignmentType;
              CONST columnHeader : ARRAY OF CHAR);

  (**
      SetColumnInfo - set the current column header text.

      This routine is called in response to the GetColumnInfo message. The
      user should first call GetRowCol to determine the columnIndex
      and then call this routine with that value and its header text
      (columnHeader). columnWidth is the width that you want the column to
      be, in average characters. columnAlign specifies Left, Center, or Right
      alignment of both the header and data.

      CALLING SEQUENCE -

        SetColumnInfo (dialogID, controlID. columnIndex, columnWidth,
                       columnAlign, columnHeader)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        columnIndex : CARDINAL
          The header column (1 .. n)

        columnWidth : CARDINAL
          The number of average characters wide to make the column.

        columnAlign : AlignmentType
          Left, Center, or Right justification of the column header and data.

      EXIT -

        None
  *)




  PROCEDURE SetImageCount
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST Count     : CARDINAL);

  (**
      SetImageCount - tell the list view how many different images will be referred to.

      This routine is called in response to the GetImageCount message.  Each row in the ListView
      can have an Icon (image) set in the first column.  The icon is set when the user calls the
      SetItemText in response to the GetItemInfo message.

      CALLING SEQUENCE -

        SetImageCount (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 different images (icons) to be used.

      EXIT -

        None
  *)




  PROCEDURE GetImageIndex
             (CONST msgData : SYSTEM.ADDRESS;
              VAR   idx     : CARDINAL);

  (**
      GetImageIndex - get the requested index position from the ActionProc.

      This routine is called in response to the GetImageInfo message.
      It will return the index of the image info wanted by the list.
      The programmer can then set the associated resource image id by
      calling SetImageInfo.

      CALLING SEQUENCE -

        GetImageIndex (msgData, str)

      ENTRY -

        msgData : SYSTEM.ADDRESS
          The msgData parameter which was passed into the ActionProc.

        idx : CARDINAL
          The 1 relative requested index to "assign" an image (icon) id.

      EXIT -

        None
  *)




  PROCEDURE SetImageInfo
             (CONST dialogID   : CARDINAL;
              CONST controlID  : CARDINAL;
              CONST imageID    : CARDINAL;
              CONST imageIndex : CARDINAL);

  (**
      SetImageInfo - add the resource image id to the list view image index.

      This routine is called in response to the GetImageInfo message. The
      user should first call GetImageIndex to determine the 1 relative
      image index to set, and then call this procedure to set the associated
      image resource id.  Thereafter, (in SetItemText) the image must be
      referred to by this indexIndex.

      CALLING SEQUENCE -

        SetImageInfo (dialogID, controlID. imageID, imageIndex)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        imageID : CARDINAL
          resource id of the (32x32) icon to put in the image list.

        imageIndex : CARDINAL
          The 1 relative index to refer to the imageID as in the future.

      EXIT -

        None
  *)




  PROCEDURE SetItemRange
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST Count     : CARDINAL);

  (**
      SetItemRange - tell the list view how many items (rows) of data are in the list.

      This routine is called in response to the GetItemCount message.

      CALLING SEQUENCE -

        SetItemRange (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 total number of data items (rows)

      EXIT -

        None
  *)




  PROCEDURE NextMarked
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST startPos  : CARDINAL;
              CONST state     : CARDINAL;
              VAR   markedRow : CARDINAL);

  (**
      NextMarked - get the next marked row.

      CALLING SEQUENCE -

        NextMarked (dialogID, controlID, startPos, state, markedRow)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        startPos : CARDINAL
          The position to begin looking for a marked item

        state : CARDINAL
          The state to match to get the next marke row.  If state = 0 then the
          returned value will be the next row that has a state other than 0.  If
          state > 0 then the returned value will be the next row that has a state
          the same as the one requested.

      EXIT -

        markedRow : CARDINAL
          The 1 relative row index of the first marked item starting
          from (and including) startPos.
  *)




  PROCEDURE ToggleState
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST rowIndex  : CARDINAL);

  (**
      ToggleState - Toggles the state of an item.

      Toggles the state of an item.  Increments the state
      of the rowIndex.  If incremented state is greater
      than the number of states requested (see SetTotalStates)
      then the state will be set to 0.

      CALLING SEQUENCE -

        ToggleMark (dialogID, controlID, rowIndex)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        rowIndex : CARDINAL
          The 1 relative index of the row to toggle

      EXIT -

        None
  *)




  PROCEDURE TotalMarked
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST state     : CARDINAL) : CARDINAL;

  (**
      TotalMarked - returns total marked rows.

      CALLING SEQUENCE -

        totalMarked := TotalMarked (dialogID, controlID, state)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        state : CARDINAL
          The state to get total of.

      EXIT -

        totalMarked : CARDINAL
          number of items marked in the list. If state = 0 then the returned
          value will be the total rows that have a state other than 0.  If
          state > 0 then the returned value will be the total rows that have
          a state the same as the one requested.
  *)




  PROCEDURE IsItemMarked
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST rowIndex  : CARDINAL;
              CONST state     : CARDINAL) : BOOLEAN;

  (**
      IsItemMarked - test a row to determine mark status.

      CALLING SEQUENCE -

        marked := IsItemMarked (dialogID, controlID, rowIndex, state)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        rowIndex : CARDINAL
          The 1 relative index of the row to mark

        state : CARDINAL
          The state to check against.

      EXIT -

        marked : BOOLEAN
          If state = 0 then the returned value will be TRUE if the row has
          a state other than 0.  If state > 0 then the returned value will
          be TRUE if the row has a state the same as the one requested.
          Otherwise FALSE will be returned.
  *)




  PROCEDURE SetIconMarkingMode
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST turnOn    : BOOLEAN);

  (**
      SetIconMarkingMode - Sets the control to act like the Windows NT Setup screen.

      If turnOn is set to TRUE then the only time you receive an indexChange message
      is when the user clicks on the ICON in the first column.  This also toggles the
      mark status of the row.  If any other place on the row is clicked the row will
      be highlighted but the mark status is not toggled.  This is normally called during
      the Dialog.Initialize message, however it may also be called in response to any ListView
      control message.

      CALLING SEQUENCE -

        SetIconMarkingMode (dialogID, controlID, turnOn)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        turnOn : BOOLEAN
          TRUE - sets control.
          FALSE - unsets control.

      EXIT -

        None
          N/A
  *)




  PROCEDURE GetControlSize
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              VAR   numChars  : CARDINAL;
              VAR   NumRows   : CARDINAL);

  (**
      GetControlSize - Returns the number of characters that will fit into the control.

      This procedure is used to get the number of average characters
      wide and number of visible rows of the control.  If this procedure
      is called during a GetColumnInfo or GetColumnCount message the numRows
      parameter may have a larger number than what actually shows in the
      control.  The control first send the GetColumnInfo and GetColumnCount
      messages first and the vert. scroll bar has not been set in place until
      after these two messages are completed.  If all of the columns do not fit
      into the viewable area of the control then a vert. scrollbar is then put
      up and the number of rows will be decrimented by as many as 2 rows.  For
      this reason you may want to call GetControlSize a second time (like during
      the Range message) to get the actual number of rows visible.  The number
      of visible rows can also be changed during the stretching of column headers
      so make sure that you call this procedure at the appropriate places.

      CALLING SEQUENCE -

        GetControlSize (dialogID, controlID, numChars, numRows)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

      EXIT -

        numChars : CARDINAL
          Number of characters that will fit into the width of the control.

        numRows : CARDINAL
          Number of rows that will fit into the control.
  *)




  PROCEDURE SetColor
             (CONST textColor  : LVColorType;
              CONST bkGndColor : LVColorType);

  (**
      SetColor - set the color of the current "cell" (row, col).

      This routine is called in response to the GetItemInfo message. The
      user can call GetRowCol to determine the rowIndex and colIndex.
      Valid colors can be any of the color constants included above, or
      a windows WIN32.COLORREF.  This should be called before the SetItemText
      call is made.

      CALLING SEQUENCE -

        SetColor (textColor, bkGndColor)

      ENTRY -

        textColor : LVColorType
          The color of the text of the current row, col

        bkGndColor : LVColorType
          The color of the background of the text of the current row, col

      EXIT -

        None
  *)




  PROCEDURE ColumnSize
             (CONST dialogID     : CARDINAL;
              CONST controlID    : CARDINAL;    (* LISTVIEW ID *)
              CONST columnNumber : CARDINAL) : CARDINAL;

  (**
      ColumnSize - get the current size, in average characters of the specified column.

      This routine returns the current size, in average characters, of
      the requested column.

      CALLING SEQUENCE -

        ColumnSize (dialogID, controlID, columnNumber)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        columnNumber : CARDINAL
          The 1 relative column to find the current size of

      EXIT -

        columnSize : CARDINAL
          The
  *)




  PROCEDURE GetRowCol
             (CONST msgData : SYSTEM.ADDRESS;
              VAR   row     : CARDINAL;
              VAR   col     : CARDINAL);

  (**
      GetRowCol - Retrieves the row and col index of the current item.

      This routine is called in response to a GetDataInfo or GetColumnInfo
      message. It returns the requested row, col (for GetDataInfo) or
      col (row is ignored for GetColumnInfo).

      CALLING SEQUENCE -

        GetRowCol (msgData, row, col)

      ENTRY -

        msgData : SYSTEM.ADDRESS
          The msgData parameter which was passed into the ActionProc.

      EXIT -

        row : CARDINAL
          The current row index (1 .. n)

        col : CARDINAL
          The current column index (1 .. m)
  *)




  PROCEDURE GetColClicked
             (CONST msgData : SYSTEM.ADDRESS;
              VAR   col     : CARDINAL);

  (**
      GetColClicked - Returns the column clicked on.

      This procedure is called in response to a ColumnClick message.
      It returns the 1 relative column the user just clicked on.  THe
      programmer can use this information to perform a sort or other programmer
      defined operation.

      CALLING SEQUENCE -

        GetColClicked (msgData, col)

      ENTRY -

        msgData : SYSTEM.ADDRESS
          The msgData parameter which was passed into the ActionProc.

        col : CARDINAL
          The 1 relative column clicked on.

      EXIT -

        None
  *)




  PROCEDURE GetHDC
             (CONST msgData : SYSTEM.ADDRESS;
              VAR   hdc     : WIN32.HDC;
              VAR   RECT    : WIN32.RECT);

  (**
      GetHDC - Retrieves the hdc of the current item.

      This routine is called in response to a GetItemPicture
      message. It returns the current hdc for the current cell.

      CALLING SEQUENCE -

        GetHDC (msgData, hdc, rect)

      ENTRY -

        msgData : SYSTEM.ADDRESS
          The msgData parameter which was passed into the ActionProc.

      EXIT -

        hdc : WIN32.HDC
          The current cell's device context.

        rect : WIN32.RECT
          Logical rectangle of cell to write to.
  *)




  PROCEDURE InsertColumn
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST columnPos : CARDINAL);

  (**
      InsertColumn - add a new column of data.

      This routine is called to add a new column to the list. If columnPos
      is less than or equal to the number of existing columns, then the
      old columnPos will be moved one to the right.

      CALLING SEQUENCE -

        InsertColumn (dialogID, controlID, columnPos)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        columnPos : CARDINAL
          The new column position (1 .. n+1)

      EXIT -

        None
  *)




  PROCEDURE DeleteColumn
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST columnPos : CARDINAL);

  (**
      DeleteColumn - add a new column of data.

      This routine is called to remove a column from the list.

      CALLING SEQUENCE -

        DeleteColumn (dialogID, controlID, columnPos)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        columnPos : CARDINAL
          The column position (1 .. n) to remove.

      EXIT -

        None
  *)




  PROCEDURE ShowOnlyMarked
             (CONST dialogID   : CARDINAL;
              CONST controlID  : CARDINAL;
              CONST markedOnly : BOOLEAN;
              CONST state      : CARDINAL);

  (**
      ShowOnlyMarked - Show only marked items.

      This routine is called as a toggle to show only marked items
      or all items.

      CALLING SEQUENCE -

        ShowOnlyMarked (dialogID, controlID, TRUE, astate)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        markedOnly : BOOLEAN
          If set to TRUE then only marked items will show in list.
          If set to FALSE then all items will show in list.

        state : CARDINAL
          The state of the items to show (only used if markedOnly set to TRUE).
          If the state is 0 then all non-zero items will be shown.  If state is
          greater than 0 then only those items with that state will be shown.

      EXIT -

        None
  *)




  PROCEDURE GetCurrentPosition
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL) : CARDINAL;

  (**
      GetCurrentPosition - get current position in list.

      This routine is called to get the current row in a list.  This is normally
      the row that has the selection box around it (the row with the dashed box).

      CALLING SEQUENCE -

        cPos := GetCurrentPosition (dialogID, controlID);

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

      EXIT -

        currentPosition : CARDINAL
          The current position in the list.
  *)




  PROCEDURE GetHighlightedPosition
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              VAR   row       : CARDINAL;
              VAR   column    : CARDINAL);

  (**
      GetHighlightedPosition - get current row and column position in list.

      This routine is called to get the current row and column in a list.  This is normally
      the row that has the selection box around it (the row with the dashed box).

      CALLING SEQUENCE -

        GetHighlightedPosition (dialogID, controlID, row, column);

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

      EXIT -

        row : CARDINAL
          The current position in the list.

        column : CARDINAL
          The current column position.
  *)




  PROCEDURE SetHighlightedPosition
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST row       : CARDINAL;
              CONST column    : CARDINAL);

  (**
      SetHighlightedPosition - Sets current row and column position in list.

      This routine is called to set the current row and column in a list.  This is normally
      the row that has the selection box around it (the row with the dashed box).

      CALLING SEQUENCE -

        SetHighlightedPosition (dialogID, controlID, row, column);

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        row : CARDINAL
          The current position in the list.

        column : CARDINAL
          The current column position.
  *)




  PROCEDURE SetSelectStyle
             (CONST dialogID       : CARDINAL;
              CONST controlID      : CARDINAL;
              CONST doSingleSelect : BOOLEAN);

  (**
      SetSelectStyle - Set if want to do single or multiple selection.

      This routine is called to set the selection style of a listview control.
      This clear all modes that were previously set (ie. SetIconMarkingMode).
      These will need to be reset if they are needed.

      CALLING SEQUENCE -

        SetSelectStyle (dialogID, controlID, FALSE);

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        doSingleSelect : BOOLEAN
          TRUE  - control does single selection
          FALSE - control doew multiple selection
  *)




  PROCEDURE GetDefaultColors
             (VAR   HText : LVColorType;
              VAR   HBg   : LVColorType;
              VAR   NText : LVColorType;
              VAR   NBg   : LVColorType);

  (**
      GetDefaultColors - Get System default colors for the listview control.

      This routine is called to get System default colors for the listview control.

      CALLING SEQUENCE -

        GetDefaultColors (HText, HBg, NText, NBg);

      ENTRY -

        None
          N/A

      EXIT -

        HText : LVColorType
          Highlight text color (foreground)

        HBg : LVColorType
          Highlight background color

        NText : LVColorType
          Normal text color (foreground)

        NBg : LVColorType
          Normal background color
  *)




  PROCEDURE SetTotalStates
             (CONST dialogID       : CARDINAL;
              CONST controlID      : CARDINAL;
              CONST numberOfStates : CARDINAL);

  (**
      SetTotalStates - Sets the number of states that an item can have assigned to it.

      This routine is called to set the number of states of an item.  Only call this
      if you want to have more than 2 states (the default is 2 states).  If
      numberOfStates > 2 then the IconMarkingMode will automatically be set to TRUE,
      meaning that an item changes state only when the item's icon is pressed.

      CALLING SEQUENCE -

        SetTotalStates (dialogID, controlID, numberOfStates);

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        numberOfStates : CARDINAL
          The number of states that are needed for an item.
  *)




  PROCEDURE GetItemState
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST rowIndex  : CARDINAL;
              VAR   state     : CARDINAL);

  (**
      GetItemState - Gets the state of selected item.

      This routine is called to get the state of an item.

      CALLING SEQUENCE -

        GetItemState (dialogID, controlID, item, state);

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        rowIndex : CARDINAL
          The item number you are requesting the state of.

      EXIT -

        state : CARDINAL
          The state of the item requested.
  *)




  PROCEDURE SetItemState
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST rowIndex  : CARDINAL;
              CONST state     : CARDINAL);

  (**
      SetItemState - Sets the state of selected item.

      This routine is called to set the state of an item.

      CALLING SEQUENCE -

        SetItemState (dialogID, controlID, item, state);

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        rowIndex : CARDINAL
          The item (row) number you are setting the state of.

        state : CARDINAL
          The state of the item to set (0 .. n).

      EXIT -

        None
          N/A
  *)




  PROCEDURE SetAllItemStates
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST state     : CARDINAL);

  (**
      SetAllItemStates - sets the state of all rows to the state requested (0 .. n).

      CALLING SEQUENCE -

        MarkAllItems (dialogID, controlID, state)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        state : CARDINAL
          The state to set all rows to.

      EXIT -

        None
  *)




  PROCEDURE SetState
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST state     : CARDINAL);

  (**
      SetState - Sets the state to check against.

      Sets the state to check against when the user presses
      the Ctrl-A (MarkAll) or the Ctrl-C (CopytoClipboard).

      CALLING SEQUENCE -

        SetState (dialogID, controlID, state)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        state : CARDINAL
          The state to set for marking all (Ctrl-A) or copying to Clipboard (Ctrl-C).

      EXIT -

        None
  *)




  PROCEDURE DummyCharValidateProc
             (VAR   ACHAR : CHAR;
              VAR   valid : BOOLEAN);

  (**
      DummyCharValidateProc - Empty (dummy) char validation proc.

      The user may use this for a default character validation
      procedure when calling the EditCell procedure.  If this procedure
      is called then all characters will be valid and all characters
      will be shown as typed.

      CALLING SEQUENCE -

        This is for use when using the EditCell procedure.

      ENTRY -

        aChar : CHAR
          The character that was pressed

      EXIT -

        aChar : CHAR
          The character that the user wants shown

        valid : BOOLEAN
          TRUE - if character is valid.
          FALSE - if character is not valid (the character will not be displayed)
  *)




  PROCEDURE EditCell
             (CONST msgData        : SYSTEM.ADDRESS;
              CONST row            : CARDINAL;
              CONST column         : CARDINAL;
              CONST totChars       : CARDINAL;
              CONST Data           : ARRAY OF CHAR;
              CONST upperCase      : BOOLEAN;
              CONST validationProc : CharIsValidType);

  (**
      EditCell - Edits a cell (row, col) on the ListView control.

      This procedure is called when a user wishes to edit a cell (row, col)
      in a ListView control.  This may be called anytime after the control
      has been initialized.  Under normal circumstances the user would call
      this in response to a Click or DoubleClick message and would call
      GetRowCol to get the row and column to edit.

      CALLING SEQUENCE -

        EditCell (msgData, row, col, 20, "abc", FALSE, DummyCharValidateProc);

      ENTRY -

        msgData : SYSTEM.ADDRESS
          The msgData parameter which was passed into the ActionProc.

        row : CARDINAL
          The 1 relative row to edit.

        col : CARDINAL
          The 1 relative column to edit.

        totChars : CARDINAL
          The number of characters that may be input in the edit.
          (if more than totChars are entered then those > totChars
             will be dicarded)

        data : ARRAY OF CHAR
          The initial data to edit. (this could be the original data that
          was in the cell (row, col)

        upperCase : BOOLEAN
          TRUE  - All characters entered will be capitalized.
          FALSE - All characters show as typed.

        validationProc : CharIsValidType
          The procedure to use for character validation.  DummyCharValidateProc
          can be used if no validation is required.  (see details of
          DummyCharValidateProc for more information)

      EXIT -

        None
  *)




  PROCEDURE GetEditExitFunction
             (CONST msgData      : SYSTEM.ADDRESS;
              VAR   exitFunction : CARDINAL);

  (**
      GetEditExitFunction - Gets the keystroke that caused the edit cell to terminate on the ListView control.

      This procedure is called when a user wishes to know why the celledit was exited
      in a ListView control.  This may be called anytime after the control
      has been initialized.  Under normal circumstances the user would call
      this in response to a Exit message.

      CALLING SEQUENCE -

        GetEditExitFunction (msgData, exitFunc);

      ENTRY -

        msgData : SYSTEM.ADDRESS
          The msgData parameter which was passed into the ActionProc.

        exitFunc : CARDINAL
          The key value hit that caused the edit cell to terminate.

      EXIT -

        None
          N/A
  *)




  PROCEDURE DataIsInvalid
             (CONST msgData : SYSTEM.ADDRESS);

  (**
      DataIsInvalid - States that the value from an edit is invalid.

      This procedure is called when a value from an edit is not valid and
      the user wishes to stay in the edit mode.  This call is only valid
      when the ValidateValue message is sent.

      CALLING SEQUENCE -

        DataIsInvalid (msgData);

      ENTRY -

        msgData : SYSTEM.ADDRESS
          The msgData parameter which was passed into the ActionProc.

      EXIT -

        None
  *)




  PROCEDURE GetValidationStr
             (CONST msgData : SYSTEM.ADDRESS;
              VAR   Str     : ARRAY OF CHAR);

  (**
      GetValidationStr - Returns the string from the ListView edit control.

      This procedure is called when the ListView edit control is ready to
      loose focus and the ValidateValue message has been received.  It will
      return the value entered in the ListView edit control.

      CALLING SEQUENCE -

        GetValidationStr (msgData, tStr);

      ENTRY -

        msgData : SYSTEM.ADDRESS
          The msgData parameter which was passed into the ActionProc.

      EXIT -

        str : ARRAY OF CHAR
          The value that is in the ListView edit control.
  *)




  PROCEDURE EndEdit
             (CONST msgData : SYSTEM.ADDRESS);

  (**
      EndEdit - Calling this procedure will exit the ListView edit control.

      This procedure should only be called when you wish to stop the edit
      with validation.  When called this procedure closes the ListView
      edit control and imediately returns focus to the ListView control.

      CALLING SEQUENCE -

        EndEdit (msgData);

      ENTRY -

        msgData : SYSTEM.ADDRESS
          The msgData parameter which was passed into the ActionProc.

      EXIT -

        NONE
  *)




  PROCEDURE KillEdit
             (CONST msgData : SYSTEM.ADDRESS);

  (**
      KillEdit - Calling this procedure will exit the ListView edit control.

      This procedure should only be called when you wish to stop the edit
      without validation.  When called this procedure closes the ListView
      edit control and imediately returns focus to the ListView control.

      CALLING SEQUENCE -

        KillEdit (msgData);

      ENTRY -

        msgData : SYSTEM.ADDRESS
          The msgData parameter which was passed into the ActionProc.

      EXIT -

        NONE
          N/A
  *)




  PROCEDURE SetHighlighting
             (CONST dialogID   : CARDINAL;
              CONST controlID  : CARDINAL;
              CONST highlight  : BOOLEAN;
              CONST columnOnly : BOOLEAN);

  (**
      SetHighlighting - sets the highlighting of a ListView control.

      This procedure is called only if you wish to show highlighting on a cell, or
      have no highlighting.  The default values when the control is initialized is
      highlight = TRUE and columnOnly = FALSE.

      CALLING SEQUENCE -

        SetHighlighting (dialogID, controlID, highlight, columnOnly)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        highlight : BOOLEAN
          TRUE  - highlighting will be turned on.
          FALSE - no highlighting will be performed.

        columnOnly : BOOLEAN
          TRUE  - only highlighting in a column will be turned on.
                    (This is only valid if highlight is set to TRUE)
          FALSE - complete row will be highlighted.

      EXIT -

        None
  *)




  PROCEDURE SetStriping
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST stripeOn  : BOOLEAN;
              CONST ODD       : BOOLEAN);

  (**
      SetStriping - sets the striping of a ListView control.

      This procedure is called only if you wish to show striping on odd or even lines
      of data.  The default values when the control is initialized is
      striping is off.

      CALLING SEQUENCE -

        SetStriping (dialogID, controlID, stripeOn, odd)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        stripeOn : BOOLEAN
          TRUE  - Striping will be turned on.
          FALSE - striping will be turned off.

        odd : BOOLEAN
          TRUE  - striping will be on odd rows.
          FALSE - striping will be on even rows.

      EXIT -

        None
  *)




  PROCEDURE SetCurrentRow
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST row       : CARDINAL);

  (**
      SetCurrentRow - sets the current row of a ListView control.

      This procedure is called to set the current row of a ListView control.
      The current row is defined as the row with the dashed border around it.
      This procedure does not need to be called under normal conditions.  One
      reason to call this procedure is to set the current row in the middle of
      the rows showing in the listview after doing a Reset.  If row is outside
      of the range of rows being displayed then nothing will be done.   This
      procedure will do nothing when control is in showMarkedOnly mode.

      CALLING SEQUENCE -

        SetCurrentRow (dialogID, controlID, row)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        row : CARDINAL
          The row to set as the current row. (The one with the dashed border)

      EXIT -

        None
  *)




  PROCEDURE GetAverageCharWidth
             (CONST dialogID     : CARDINAL;
              CONST controlID    : CARDINAL;
              CONST testStr      : ARRAY OF CHAR;
              VAR   AvgCharWidth : CARDINAL);

  (**
      GetAverageCharWidth - Gets number of average chars required to display the testStr.

      This procedure is called to get the number of average characters (in a particular
      controls font) required to display the testStr.

      CALLING SEQUENCE -

        GetAverageCharWidth (dialogID, controlID, "ABC", avgcharWidth)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        testStr : ARRAY OF CHAR
          The string to test for average character width.

      EXIT -

        avgCharWidth - CARDINAL
          The number of average characters required to display the testStr.
  *)




  PROCEDURE GetItemNumber
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST rowPos    : CARDINAL) : CARDINAL;




  PROCEDURE SetItemNumber
             (CONST dialogID   : CARDINAL;
              CONST controlID  : CARDINAL;
              CONST rowPos     : CARDINAL;
              CONST itemNumber : CARDINAL);




  PROCEDURE SetMarkCursor
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST cursorID  : CARDINAL);




  PROCEDURE UnSetMarkCursor
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL);




  PROCEDURE SetItemVisible
             (CONST dialogID   : CARDINAL;
              CONST controlID  : CARDINAL;
              CONST itemNumber : CARDINAL);




  PROCEDURE SetViewKind
             (CONST dialogID     : CARDINAL;
              CONST controlID    : CARDINAL;
              CONST listViewKind : ListViewType);




  PROCEDURE SetDragging
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST dragItems : BOOLEAN);




  PROCEDURE ShowIcon
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST iconID    : INTEGER;
              CONST ix        : INTEGER;
              CONST iy        : INTEGER;
              CONST iw        : INTEGER;
              CONST ih        : INTEGER);




  PROCEDURE SetItemFont
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST inFont    : WIN32.HFONT);

  (**
      SetItemFont - Sets the font of an Item or a cell.

      This procedure should be called directly after the GetCellFont message is sent.
      This function allows the user to set the font of the cell that is to be written
      next.

      CALLING SEQUENCE -

        SetItemFont (dialogID, controlID, inFont)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the
          control.

        controlID : CARDINAL
          The control resource identifier.

        inFont : WIN32.HFONT
          an HFONT structure containing the desired font of the cell that is to be written
          next
  *)




  PROCEDURE SetItemFontColor
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST inColor   : WIN32.COLORREF);

  (**
      SetItemFontColor - Sets the color of an Item or a cell.

      This procedure should be called directly after the GetCellFont message is sent.
      This function allows the user to set the color of the cell text next to be written

      CALLING SEQUENCE -

        SetItemFontColor (dialogID, controlID, inColor)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the control.

        controlID : CARDINAL
          The control resource identifier.

        inColor : WIN32.COLORREF
          a COLORREF to determine the desired font color of the cell next to be written
  *)




  PROCEDURE SetHeaderFont
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              CONST newFont   : WIN32.HFONT);

  (**
      SetHeaderFont - Sets the Font of the header for the list view.

      This procedure can be called at any time to change the font of the headers of the
      listview.  CtrlLV.ResetColumns should be called after this to make the changes
      visible

      CALLING SEQUENCE -

        SetHeaderFont (dialogID, controlID, newFont)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the control.

        controlID : CARDINAL
          The control resource identifier.

        newFont : WIN32.HFONT
          the structure containing the desired font for the headers
  *)




  PROCEDURE CurrentFont
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL;
              VAR   FontName  : ARRAY OF CHAR;
              VAR   Success   : BOOLEAN);

  (**
      SetItemFontColor - Sets the color of an Item or a cell.

      This procedure can be used when the listveiw is first created to determine the
      default font used.

      CALLING SEQUENCE -

        CurrentFont (dialogID, controlID, fontName, Success)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the control.

        controlID : CARDINAL
          The control resource identifier.

        fontName : ARRAY OF CHAR
          Name of the font.

      EXIT -

        Success : BOOLEAN
          TRUE - if the font name was retrieved.
          FALSE - could not get the font name.
  *)




  PROCEDURE TurnOnDotDotDot
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL);

  (**
      TurnOnDotDotDot - Turns on the dot dot dot feature.

      This is the default and only needs to be called if the dot dot dot feature is
      desired after it has been turned off.

      CALLING SEQUENCE -

        TurnOnDotDotDot (dialogID, controlID)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the control.

        controlID : CARDINAL
          The control resource identifier.
  *)




  PROCEDURE TurnOffDotDotDot
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL);

  (**
      TurnOffDotDotDot - Turns off the dot dot dot feature.

      The default is to have this feature on.  One possible use for this is if different
      fonts are used in the listview this may cause the dot dot dot feature to work
      improperly

      CALLING SEQUENCE -

        TurnOffDotDotDot (dialogID, controlID)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the control.

        controlID : CARDINAL
          The control resource identifier.
  *)




  PROCEDURE HideGridlines
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL);

  (**
      HideGridlines - Turns off the gridlines if they are currently in use.

      The default is to have gridlines off.

      CALLING SEQUENCE -

        HideGridlines (dialogID, controlID)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the control.

        controlID : CARDINAL
          The control resource identifier.
  *)




  PROCEDURE ShowGridlines
             (CONST dialogID  : CARDINAL;
              CONST controlID : CARDINAL);

  (**
      ShowGridlines - Turns on the gridline feature if it is currently not in use.

      The default is to have gridlines off.

      CALLING SEQUENCE -

        ShowGridlines (dialogID, controlID)

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the control.

        controlID : CARDINAL
          The control resource identifier.
  *)




  PROCEDURE CalculateTopRow
             (CONST dialogID      : CARDINAL;
              CONST controlID     : CARDINAL;
              CONST FirstRecord   : CARDINAL;
              CONST LastRecord    : CARDINAL;
              CONST DesiredRecord : CARDINAL;
              VAR   topRow        : CARDINAL);

  (**
      CalculateTopRow - Calculate which record should be the new top row.

      This routine calculates which record needs to be requested as the new
      top row in order to scroll a desired record into the approximate middle
      of the visible list of items.  The Reset procedure of the ListView control
      takes as it argument the value of TopRow to be the first record showing on
      the top of the list.  What this routine does is to help you calculate which
      record should be requested in order to make the record that you want to
      appear in the middle of the screen be in the correct position.

      All the data necessary to do this calculation is available to you by using a
      combination of the other calls provided in this package.  This routine is
      provided to you as a convenience to eliminate that effort on your part.

      CALLING SEQUENCE -

        CalculateTopRow (dialogID, controlID, FirstRecord,
                         LastRecord, DesiredRecord, TopRow);

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the control.

        controlID : CARDINAL
          The control resource identifier.

        FirstRecord : CARDINAL
          The number of the first record you are listing (you might be showing only
          a subset of the entire records so this may not always be 1).

        LastRecord : CARDINAL
          The number of the last record you are listing (you might be showing only
          a subset of the entire records so this may not always be N).

        DesiredRecord : CARDINAL
          The number of the desired record.  This a number within the range
          FirstRecord <= DesiredRecord >= LastRecord.

      EXIT -

        TopRow : CARDINAL
          The value to send to the Reset procedure in order to get the DesiredRecord
          visible in the middle of the screen if possible.

      EXAMPLE -

        This routine would typically be used in conjuction with the AdjustAndHighlight
        and ResetAndHighlight routines.

          CtrlLV.CalculateTopRow (ObjDialog.ReturnUniqueId (DataHandle),
                                  MyRes.LVW_My_ListView,
                                  1,
                                  Sage.TotalRecords ("MyRel"),
                                  DesiredRecord,
                                  TopRow);

          CtrlLV.ResetAndHighlightRow (ObjDialog.ReturnUniqueId (DataHandle),
                                       MyRes.LVW_My_ListView,
                                       TopRow,
                                       DesiredRow,
                                       DesiredState);
  *)




  PROCEDURE AdjustAndHighlightRow
             (CONST dialogID     : CARDINAL;
              CONST controlID    : CARDINAL;
              CONST topRow       : CARDINAL;
              CONST DesiredRow   : CARDINAL;
              CONST DesiredState : CARDINAL);

  (**
      AdjustAndHighlightRow - Adjust to show desired row in middle of the control.

      This routine adjust the ListView control to bring a desired record into the
      middle of the control and Highlight it.  This routine would typically be
      called in the Initialize message of the ActionProc to adjust the desired
      record into view.  This routine does this without doing a complete reset
      of the control.

      All the routines necessary to accomplish this task are available to you by
      using a combination of the other calls provided in this package.  This
      routine is provided to you as a convenience to eliminate that effort on your
      part.

      CALLING SEQUENCE -

        AdjustAndHighlightRow (dialogID, controlID, TopRow,
                               DesiredRow, DesiredState);

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the control.

        controlID : CARDINAL
          The control resource identifier.

        TopRow : CARDINAL
          The number of the record to be displayed as the top row of visible
          data.

        DesiredRow : CARDINAL
          The number of the desired record.  This is the record that you want to
          be as close to the center of the list of data as possible.  This record
          will also become the Highlighted record when this routine is exited.

        DesiredState : CARDINAL
          The state that you want this entry to have.

      EXAMPLE -

        This routine would typically be called in the Initialize message of the
        ActionProc to set the initial Highlighted item in the ListView.

          CtrlLV.AdjustAndHighlightRow (ObjDialog.ReturnUniqueId (DataHandle),
                                        MyRes.LVW_My_ListView,
                                        TopRow,
                                        DesiredRow,
                                        DesiredState);
  *)




  PROCEDURE ResetAndHighlightRow
             (CONST dialogID     : CARDINAL;
              CONST controlID    : CARDINAL;
              CONST topRow       : CARDINAL;
              CONST DesiredRow   : CARDINAL;
              CONST DesiredState : CARDINAL);

  (**
      ResetAndHighlightRow - Adjust to show desired row in middle of the control.

      This routine adjust the ListView control to bring a desired record into the
      middle of the control and Highlight it.  This routine would typically be
      called in the Initialize message of the ActionProc to adjust the desired
      record into view.  This routine does this by doing a complete reset of the
      control.

      All the routines necessary to accomplish this task are available to you by
      using a combination of the other calls provided in this package.  This
      routine is provided to you as a convenience to eliminate that effort on your
      part.

      CALLING SEQUENCE -

        ResetAndHighlightRow (dialogID, controlID, TopRow,
                              DesiredRow, DesiredState);

      ENTRY -

        dialogID : CARDINAL
          The number of the dialog box or window containing the control.

        controlID : CARDINAL
          The control resource identifier.

        TopRow : CARDINAL
          The number of the record to be displayed as the top row of visible
          data.

        DesiredRow : CARDINAL
          The number of the desired record.  This is the record that you want to
          be as close to the center of the list of data as possible.  This record
          will also become the Highlighted record when this routine is exited.

        DesiredState : CARDINAL
          The state that you want this entry to have.

      EXAMPLE -

        This routine would typically be used in conjuction with the CalculateTopRow
        routine to change the visible row.  One example would be when adding a new
        record into the list you would want the new record to be in the center of the
        list and to be Highlighted.   If the list of items scrolled is a relation you
        could get the KeyPosition of the new record, set DesiredRecord to that value and
        then make the following calls to end up with that record in the desired position.

          CtrlLV.CalculateTopRow (ObjDialog.ReturnUniqueId (DataHandle),
                                  MyRes.LVW_My_ListView,
                                  1,
                                  Sage.TotalRecords ("MyRel"),
                                  DesiredRecord,
                                  TopRow);

          CtrlLV.ResetAndHighlightRow (ObjDialog.ReturnUniqueId (DataHandle),
                                       MyRes.LVW_My_ListView,
                                       TopRow,
                                       DesiredRow,
                                       DesiredState);
  *)




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