Sage-ST ä

Ctrllv

Documentation

Global Declarations (Constants, Types, Variables)
AdjustAndHighlightRow CalculateTopRow ColumnSize
ControlCommand CurrentControlID CurrentDialogID CurrentFont
DataIsInvalid DeleteColumn DisableControl DummyCharValidateProc
EditCell EnableControl EndEdit GetAverageCharWidth
GetColClicked GetControlSize GetCurrentPosition GetDefaultColors
GetEditExitFunction GetHDC GetHighlightedPosition GetImageIndex
GetItemState GetRowCol GetSearchStr GetValidationStr
HideControl HideGridlines InsertColumn IsEnabled
IsItemMarked NextMarked RedrawControl Refresh
Reset ResetAndHighlightRow ResetColumns SetAllItemStates
SetColor SetColumnCount SetColumnInfo SetCurrentRow
SetFocus SetHeaderFont SetHighlightedPosition SetHighlighting
SetIconMarkingMode SetImageCount SetImageInfo SetItemFont
SetItemFontColor SetItemPos SetItemRange SetItemState
SetItemText SetLeftMouseClick SetSelectStyle SetState
SetStriping SetTotalStates ShowControl ShowGridlines
ShowOnlyMarked ToggleState TotalMarked TurnOffDotDotDot
TurnOnDotDotDot





  --*
  --  CtrlLV - Listview controls.
  --
  --
  --  The following provides an overview of what the ListView control is and how
  --  it works.
  --
  -- Description:
  --  The ListView contains a header (for column headings), rows (for displaying
  --  data), and scroll bars for viewing more data as needed.  Each row contains one
  --  or more columns.  The columns can be resized by placing the cursor
  --  on the header break line and dragging it right or left depending if you want
  --  to widen or shrink the column size.  The first column of the ListView may
  --  contain an icon along with the text for that item.  This is a virtual
  --  ListView control.
  --
  -- How it Works:
  --  The ListView control sends messages to the 'users program' (hereafter refered
  --  to as the user) to get information needed to show the control and to provide
  --  information to the user.  Certain messages require that the user responds with
  --  the appropriate response.  To show how the messages are used we will
  --  discuss the contorl message and what might be called in response to them.
  --
  --   Control Message
  --
  --   GetColumnCount -
  --      This is the first message the user receives.  This message is asking that
  --      the user to supply how many columns they want displayed.   The user will
  --      respond by calling SetColumnCount with the number of columns to show.
  --
  --   GetColumnInfo -
  --      This message is asking the user to supply the width of the column (the
  --      number of characters), the alignment of the column text for both header
  --      and column data (right,center,left), and what the header text will be.
  --      The user will respond by calling SetColumnCount with the appropriate
  --      parameters. To get the column number, that the GetColumnInfo message is
  --      requesting information about, the user will call GetRowCol which provides
  --      the number requested in the column parameter. The user may also call
  --      GetControlSize to get the size of the control (the number of characters
  --      that will fit into the control) to be used in determining how large a
  --      column should be.
  --
  --   GetImageCount -
  --      This message is asking for the number of 'different' images (icons) that
  --      the user will be using in this control.  The user will respond by calling
  --      SetImageCount and supplying the number of 'different' images that will be
  --      used.
  --
  --   GetImageInfo -
  --      This message is asking the user to supply information about each of the
  --      images (icons) that the user said was going to be used.  These are the
  --      icons that go on the left side of the first column.  The user will
  --      call GetImageIndex which will give the user the number (one relative) of
  --      the image it is requesting information for.  This number will be used in
  --      identifying which icon to use when the user sets the text to show for the
  --      first column.  The user will then respond by calling SetImageInfo and
  --      supplying the image id defined in the .RES file for the image along with
  --      the identfying number.
  --
  --   Range -
  --      This message is asking for the total number of items (records/rows) that
  --      will need to be shown.  The user will call SetItemRange and provide the
  --      total number of items in the list.  The user may also call SetTotalStates
  --      if the number of states is greater than 2.  The SetTotalStates call MUST
  --      PRECEED the call SetItemRange if it is to be used.
  --
  --   GetItemInfo -
  --      This message is requesting that the user supply the text to put into a
  --      cell (row/column).  The user will call GetRowCol to find out what cell
  --      the request is for.  SetItemText will then be called to set the text
  --      and icon (if it is the first column) for that cell.  If the user wishes to
  --      change the color of the cell call SetColor before calling SetItemText.
  --      The user may call IsItemMarked to see if an item is marked, this might be
  --      used in determining what icon to show.
  --
  --   IndexChanged -
  --      This message is received when a row has been selected (clicked on).  The
  --      user does not have to respond to this message.  This is where the user
  --      might update other parts (details) of the dialog based upon the
  --      highlighted item.
  --
  --   DoubleClick -
  --      This message is received when a row has been double clicked.  The user
  --      does not have to respond to this message.  The user may use this message
  --      to act like a button was pushed that acted upon the highlighted item.
  --      The user may call GetRowCol to get the item that was double clicked.
  --
  --   ColumnClick -
  --      This message is received when a column header has been clicked.  The user
  --      does not have to respond to this message.  Normally this message would
  --      mean to sort and display the data on the column clicked.  The user may
  --      call GetColClicked to find out what column header was clicked.  The user
  --      would then call Reset which would trigger the sending of GetItemInfo
  --      messages where the user would supply the data in sorted order.
  --
  --   SearchChange -
  --      This message is received when an ascii keyboard character has been
  --      pressed.  The user does not have to respond to this message.  Normally
  --      this message would mean that a search is in progress and the highlighted
  --      item needs to be repositioned.  The user may call GetSearchStr to help in
  --      repositioning the highlighted item.  They may also call Reset to
  --      reposition the data to the correct location.
  --
  --   MarkAll -  This message is received when a Ctrl-A has been hit for marking all
  --      items.  The user does not have to respond to this message.  The user may call
  --      SetState to set the state of the items that have a 0 state.  The default state
  --      is 1 which says that all items with a 0 state will be changed to a state of 1.
  --      If the user calls SetState with the state of 0 then all items with a state of
  --      0 will be set with a state of 1.  If the user calls SetState with a state > 0
  --      then all items with a state of 0 will be set with that state.  In order to set
  --      all the items to one state the user can call SetAllItemStates.
  --
  --   CopyClipBoard -  This message is received when a Ctrl-C has been hit for copying all
  --      marked items to the clipboard.  The user does not have to respond to this message.
  --      The user may call SetState to set the state of the items that are to be copied
  --      to the clipboard.  The default state is 0 which says that all items that have
  --      a state > 0 will be copied to the clipboard.  If the user calls SetState with a
  --      state > 0 then only those items that have that state will be copied to the
  --      clipboard.
  --
  --   Click -  This message is received when the left mouse button has been pressed.  The
  --      user does not have to respond to this message.  The user may call GetRowCol to
  --      get the item (row,col) that was clicked.  EditItem may be called if the user
  --      wishes to edit the cell (row,col).
  --
  --   ValidateValue -  This message is received when the edit of a cell is ready to loose
  --      focus.  The user does not have to respond to this message.  The user may call
  --      GetValidationStr which returns the value from the edit(this would be used to
  --      update a database or for screen display).  The user may also call
  --      DataIsInvalid if the data is deemed invalid (this will keep the user in the edit
  --      control).
  --
  --   HasFocus - This message is received when a list view control has received focus.
  --      The user does not have to respond to this message.  The user can change pop-up
  --      menus or anything else that is needed if the list view is in focus.
  --
  --   ColumnWidthChange - This message is received when the user changes with width of a
  --      column.  The user does not have to respond to this message.  The user may call
  --      ColumnSize which returns the number of characters that will now fit in the column.
  --
  --
  --
  -- During the Dialog.Initialize message the user may call any of the following
  -- procedures:
  --   SetAllItemStates
  --   Refresh
  --   Reset
  --   SetLeftMouseClick
  --   ShowOnlyMarked
  --   SetItemState
  --   SetIconMarkingMode
  --   GetDefaultColors
  --
  --
  -- This ListView control gets refreshed even if the dialog it is in is not the
  -- active dialog.  For this reason you may want to use the sage calls that do not
  -- affect the memory record of a read record.  By using the following calls you
  -- will be able to populate the ListView control and still have a record
  -- positioned to do a rewrite of that record. The Sage calls to make are
  -- ReadRecordNX, GetFieldAX, GetFieldCX, GetFieldFX, GetFieldLFX, GetFieldIX,
  -- GetFieldLIX, and CloseRecordX.
  --

  type ControlMessage is (Unknown,        -- Unknown command
                          IndexChanged,   -- The highlighted item has been changed

                          -- related procedures -> GetRowCol
                          DoubleClick,     -- Item was double clicked
                          GetColumnInfo,   -- Get information about a column

                          -- related procedures -> GetRowCol, SetColumnInfo, GetControlSize
                          GetColumnCount,   -- Get the number of columns the list will have

                          -- related procedures ->  SetColumnCount
                          GetImageInfo,   -- Get image information

                          -- related procedures ->  GetImageIndex, SetImageText
                          GetImageCount,   -- get number of different images
                          RangeMsg,        -- Get the total # of items in the list

                          -- related procedures -> SetItemRange
                          GetItemInfo,   -- Get the information about an item

                          -- related procedures -> GetRowCol, SetItemInfo, SetColor
                          SearchChange,   -- A search char has been entered
                          ColumnClick,    -- A column header has been clicked on
                          MarkAll,        -- A Ctrl-A has been pressed

                          -- related procedures -> SetState
                          CopyClipBoard,   -- A Ctrl-C has been pressed

                          -- related procedures -> SetState
                          Click,               -- mouse click
                          ValidateValue,       -- validate the Cell value stored in messagedata from the edit
                          HasFocus,            -- List view control received focus
                          ColumnWidthChange,   -- List view column width was changed by user
                          GetCellFont,         -- Request for the text format of a cell if not responded to default used
                          ExitCell,            -- Exit the cell with a key stroke
                          GetItemPicture);

  type AlignmentType is (Left,
                         Right,
                         Center);

  type ListViewType is (   --not available : LargeIcon, SmallIcon, List,
                        Report);

  subtype LVColorType is ModSys.S_Natural;

  type CharIsValidType is access
  procedure (ACHAR : in out character;
             valid : in out boolean);

  pragma Convention
          (WIN32,
           CharIsValidType);

  DarkBlue : constant LVColorType := 8_388_608;   -- RGB(0,0,128)     Low Intensity Blue

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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




  function ControlCommand
            (msgType : in     DisplayW.DisplayMessageType;
             msgData : in     System.Address) return ControlMessage;

  --*
  --  ControlCommand - Retrieves a command which has been sent from a control.
  --
  --  This routine will retrieve a command which has been sent from the
  --  control to the ActionProc.
  --
  --  CALLING SEQUENCE -
  --
  --    command := ControlCommand (msgType, msgData)
  --
  --  ENTRY -
  --
  --    msgType : DisplayW.DisplayMessageType
  --      The msgType parameter which was passed into the ActionProc.
  --
  --    msgData : System.Address
  --      The msgData parameter which was passed into the ActionProc.
  --
  --  EXIT -
  --
  --    command : ControlMessage
  --      The command which has been sent.  Must be one of the Control
  --      Messages defined for the control receiving the command.  The
  --      command Unknown indicates an undefined command has been sent.
  --




  function CurrentDialogID
            (msgData : in     System.Address) return ModSys.S_Natural;

  --*
  --  CurrentDialogID - Retrieves the ID of a dialog to which message was sent.
  --
  --  This routine will retrieve a the ID of a dialog to which a message
  --  has been sent.
  --
  --  CALLING SEQUENCE -
  --
  --    DialogId := CurrentDialogID (msgData)
  --
  --  ENTRY -
  --
  --    msgData : System.Address
  --      The msgData parameter which was passed into the ActionProc.
  --
  --  EXIT -
  --
  --    DialogId : Modsys.S_Natural
  --      The ID of the dialog receiving a message.
  --




  function CurrentControlID
            (msgData : in     System.Address) return ModSys.S_Natural;

  --*
  --  CurrentControlID - Retrieves the ID of a control for which message is intended.
  --
  --  This routine will retrieve the ID of a control for which a message
  --  is intended.
  --
  --  CALLING SEQUENCE -
  --
  --    ControlId := CurrentControlID (msgData)
  --
  --  ENTRY -
  --
  --    msgData : System.Address
  --      The msgData parameter which was passed into the ActionProc.
  --
  --  EXIT -
  --
  --    ControlId : Modsys.S_Natural
  --      The ID of the control.
  --




  function IsEnabled
            (dialogID  : in     ModSys.S_Natural;
             controlID : in     ModSys.S_Natural) return boolean;

  --*
  --  IsEnabled - Checks to see if a control is enabled.
  --
  --  This routine will determine whether a control is enabled or
  --  disabled (grayed).
  --
  --  CALLING SEQUENCE -
  --
  --    status := IsEnabled (DialogId, ControlId)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --  EXIT -
  --
  --    status : Boolean
  --      TRUE if the control is enabled.
  --




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

  --*
  --  EnableControl - Enables a control.
  --
  --  This routine will enable the specified control.
  --
  --  CALLING SEQUENCE -
  --
  --    EnableControl (DialogId, ControlId)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




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

  --*
  --  DisableControl - Disables a control.
  --
  --  This routine will disable (gray) the specified control.
  --
  --  CALLING SEQUENCE -
  --
  --    DisableControl (DialogId, ControlId)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




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

  --*
  --  HideControl - Hides a control.
  --
  --  This routine will hide the specified control.
  --
  --  CALLING SEQUENCE -
  --
  --    HideControl (DialogId, ControlId)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




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

  --*
  --  ShowControl - Shows a control.
  --
  --  This routine will show the specified control.
  --
  --  CALLING SEQUENCE -
  --
  --    ShowControl (DialogId, ControlId)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




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

  --*
  --  SetFocus - Sets to focus to a control.
  --
  --  This routine will give the specified control focus.
  --
  --  CALLING SEQUENCE -
  --
  --    SetFocus (DialogId, ControlId)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




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

  --*
  --  RedrawControl - repaints control..essentially the same as Refresh.
  --
  --  This routine will redraw the specified control.
  --
  --  CALLING SEQUENCE -
  --
  --    RedrawControl (DialogId, ControlId)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




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

  --*
  --  Refresh - will reload the current page of data.
  --
  --  This routine will reloads the current page.
  --
  --  CALLING SEQUENCE -
  --
  --    Refresh (DialogId, ControlId)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




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

  --*
  --  ResetColumns - Reset 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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure Reset
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              rowPos    : in     ModSys.S_Natural);

  --*
  --  Reset - Reset the control.
  --
  --  This routine will cause the list view to be reinitialized, including
  --  asking for range and icon information, including asking for the item
  --  position to display first.
  --
  --  CALLING SEQUENCE -
  --
  --    Reset (DialogId, ControlId. rowPos)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    rowPos : ModSys.S_Natural
  --      The beginning item in the list to be displayed (1..n)(current page).
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure SetLeftMouseClick
             (dialogID       : in     ModSys.S_Natural;
              controlID      : in     ModSys.S_Natural;
              setToCtrlClick : in     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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    setToCtrlClick : ModSys.S_Natural
  --      TRUE sets left click behavior to same as ctrl left click behavior;
  --      FALSE resets to default left click behavior
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure GetSearchStr
             (msgData : in     System.Address;
              Str     : in out string);

  --*
  --  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 : String
  --      The current search string.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure SetItemPos
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              Pos       : in     ModSys.S_Natural);

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    pos : ModSys.S_Natural
  --      Data item (1..n) to be visible on current page.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




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

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    rowIndex : ModSys.S_Natural
  --      The data row (1..n)
  --
  --    colIndex : ModSys.S_Natural
  --      The data column (1..n)
  --
  --    imageIndex : ModSys.S_Natural
  --      The image associated with the entire row (0..n) where 0 indicates
  --      no image.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure SetColumnCount
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              Count     : in     ModSys.S_Natural);

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    count : ModSys.S_Natural
  --      The number of columns of data.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure SetColumnInfo
             (dialogID     : in     ModSys.S_Natural;
              controlID    : in     ModSys.S_Natural;
              columnIndex  : in     ModSys.S_Natural;
              columnWidth  : in     ModSys.S_Natural;
              columnAlign  : in     AlignmentType;
              columnHeader : in     string);

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    columnIndex : ModSys.S_Natural
  --      The header column (1..n)
  --
  --    columnWidth : ModSys.S_Natural
  --      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
  --      N/A
  --




  procedure SetImageCount
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              Count     : in     ModSys.S_Natural);

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    count : ModSys.S_Natural
  --      The number of different images (icons) to be used.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure GetImageIndex
             (msgData : in     System.Address;
              idx     : in out ModSys.S_Natural);

  --*
  --  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 : ModSys.S_Natural
  --      The 1 relative requested index to "assign" an image (icon) id.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure SetImageInfo
             (dialogID   : in     ModSys.S_Natural;
              controlID  : in     ModSys.S_Natural;
              imageID    : in     ModSys.S_Natural;
              imageIndex : in     ModSys.S_Natural);

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    imageID : ModSys.S_Natural
  --      resource id of the (32x32) icon to put in the image list.
  --
  --    imageIndex : ModSys.S_Natural
  --      The 1 relative index to refer to the imageID as in the future.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure SetItemRange
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              Count     : in     ModSys.S_Natural);

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    count : ModSys.S_Natural
  --      The total number of data items (rows)
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure NextMarked
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              startPos  : in     ModSys.S_Natural;
              state     : in     ModSys.S_Natural;
              markedRow : in out ModSys.S_Natural);

  --*
  --  NextMarked - get the next marked row.
  --
  --  CALLING SEQUENCE -
  --
  --    NextMarked (DialogId, ControlId, startPos, astate, markedRow)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    startPos : ModSys.S_Natural
  --      The position to begin looking for a marked item
  --
  --    state : ModSys.S_Natural
  --      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 : ModSys.S_Natural
  --      The 1 relative row index of the first marked item starting
  --      from (and including) startPos.
  --




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

  --*
  --  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 : ModSys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : ModSys.S_Natural
  --      The control resource identifier.
  --
  --    rowIndex : ModSys.S_Natural
  --      The 1 relative index of the row to toggle
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  function TotalMarked
            (dialogID  : in     ModSys.S_Natural;
             controlID : in     ModSys.S_Natural;
             state     : in     ModSys.S_Natural) return ModSys.S_Natural;

  --*
  --  TotalMarked - returns total marked rows.
  --
  --  CALLING SEQUENCE -
  --
  --    totalMarked := TotalMarked (DialogId, ControlId, astate)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    state : ModSys.S_Natural
  --      The state to get total of.
  --
  --  EXIT -
  --
  --    totalMarked : ModSys.S_Natural
  --      number of items marked in the list
  --




  function IsItemMarked
            (dialogID  : in     ModSys.S_Natural;
             controlID : in     ModSys.S_Natural;
             rowIndex  : in     ModSys.S_Natural;
             state     : in     ModSys.S_Natural) return boolean;

  --*
  --  IsItemMarked - test a row to determine mark status.
  --
  --  CALLING SEQUENCE -
  --
  --    marked := IsItemMarked (DialogId, ControlId, rowIndex, astate)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    rowIndex : ModSys.S_Natural
  --      The 1 relative index of the row to mark
  --
  --    state : ModSys.S_Natural
  --      The state to check against.
  --
  --  EXIT -
  --
  --    marked : Boolean
  --      TRUE if rowIndex is marked; FALSE otherwise.
  --




  procedure SetIconMarkingMode
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              turnOn    : in     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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    turnOn : Boolean
  --      TRUE - sets control.
  --      FALSE - unsets control.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure GetControlSize
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              numChars  : in out ModSys.S_Natural;
              NumRows   : in out ModSys.S_Natural);

  --*
  --  GetControlSize - Returns the number of width characters and rows that will fit.
  --
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --  EXIT -
  --
  --    numChars : ModSys.S_Natural
  --      Number of characters that will fit into the width of the control.
  --
  --    numRows : ModSys.S_Natural
  --      Number of rows that will fit into the control.
  --




  procedure SetColor
             (textColor  : in     LVColorType;
              bkGndColor : in     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 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
  --      N/A
  --




  function ColumnSize
            (dialogID     : in     ModSys.S_Natural;
             controlID    : in     ModSys.S_Natural;   -- LISTVIEW ID
             columnNumber : in     ModSys.S_Natural) return ModSys.S_Natural;

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    columnNumber : ModSys.S_Natural
  --      The 1 relative column to find the current size of
  --
  --  EXIT -
  --
  --    columnSize : ModSys.S_Natural
  --      The
  --




  procedure GetRowCol
             (msgData : in     System.Address;
              row     : in out ModSys.S_Natural;
              col     : in out ModSys.S_Natural);

  --*
  --  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, itemNumber, selected)
  --
  --  ENTRY -
  --
  --    msgData : System.Address
  --      The msgData parameter which was passed into the ActionProc.
  --
  --    row : ModSys.S_Natural
  --      The current row index (1..n)
  --
  --    col : ModSys.S_Natural
  --      The current column index (1..m)
  --
  --    selected : ModSys.S_Natural
  --      TRUE if marked or FALSE if not
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure GetColClicked
             (msgData : in     System.Address;
              col     : in out ModSys.S_Natural);

  --*
  --  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 : ModSys.S_Natural
  --      The 1 relative column clicked on.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure GetHDC
             (msgData : in     System.Address;
              Hdc     : in out WinSys.Hdc;
              RECT    : in out WinSys.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 : Winsys.HDC
  --      The current cell's device context.
  --
  --    rect : Winsys.RECT
  --      Logical rectangle of cell to write to.
  --




  procedure InsertColumn
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              columnPos : in     ModSys.S_Natural);

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    columnPos : ModSys.S_Natural
  --      The new column position (1..n+1)
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure DeleteColumn
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              columnPos : in     ModSys.S_Natural);

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    columnPos : ModSys.S_Natural
  --      The column position (1..n) to remove.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure ShowOnlyMarked
             (dialogID   : in     ModSys.S_Natural;
              controlID  : in     ModSys.S_Natural;
              markedOnly : in     boolean;
              state      : in     ModSys.S_Natural);

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      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 : ModSys.S_Natural
  --      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
  --      N/A
  --




  function GetCurrentPosition
            (dialogID  : in     ModSys.S_Natural;
             controlID : in     ModSys.S_Natural) return ModSys.S_Natural;

  --*
  --  GetCurrentPosition - Get the current row in a 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).
  --
  --  This routine is called to get the current row in a list.
  --
  --  CALLING SEQUENCE -
  --
  --    cPos := GetCurrentPosition (DialogId, ControlId);
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --  EXIT -
  --
  --    currentPosition : ModSys.S_Natural
  --      The current position in the list.
  --




  procedure GetHighlightedPosition
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              row       : in out ModSys.S_Natural;
              column    : in out ModSys.S_Natural);

  --*
  --  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 : ModSys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    controlID : ModSys.S_Natural
  --      The control resource identifier.
  --
  --  EXIT -
  --
  --    row : ModSys.S_Natural
  --      The current position in the list.
  --
  --    column : ModSys.S_Natural
  --      The current column position.
  --




  procedure SetHighlightedPosition
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              row       : in     ModSys.S_Natural;
              column    : in     ModSys.S_Natural);

  --*
  --  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 : ModSys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    controlID : ModSys.S_Natural
  --      The control resource identifier.
  --
  --    row : ModSys.S_Natural
  --      The current position in the list.
  --
  --    column : ModSys.S_Natural
  --      The current column position.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure SetSelectStyle
             (dialogID       : in     ModSys.S_Natural;
              controlID      : in     ModSys.S_Natural;
              doSingleSelect : in     boolean);

  --*
  --  SetSelectStyle - Set if want to do single or multiple selection.
  --
  --  This routine is called to set the selection style of a listview control.
  --
  --  CALLING SEQUENCE -
  --
  --    SetSelectStyle (DialogId, ControlId, FALSE);
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    doSingleSelect : Boolean
  --      TRUE  - control does single selection
  --      FALSE - control doew multiple selection
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure GetDefaultColors
             (HText : in out LVColorType;
              HBg   : in out LVColorType;
              NText : in out LVColorType;
              NBg   : in out 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
             (dialogID       : in     ModSys.S_Natural;
              controlID      : in     ModSys.S_Natural;
              numberOfStates : in     ModSys.S_Natural);

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    numberOfStates : ModSys.S_Natural
  --      The number of states that are needed for an item.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure GetItemState
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              rowIndex  : in     ModSys.S_Natural;
              state     : in out ModSys.S_Natural);

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    rowIndex : ModSys.S_Natural
  --      The item number you are requesting the state of.
  --
  --  EXIT -
  --
  --    state : ModSys.S_Natural
  --      The state of the item requested.
  --




  procedure SetItemState
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              rowIndex  : in     ModSys.S_Natural;
              state     : in     ModSys.S_Natural);

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    rowIndex : ModSys.S_Natural
  --      The item (row) number you are setting the state of.
  --
  --    state : ModSys.S_Natural
  --      The state of the item to set (0..n).
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure SetAllItemStates
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              state     : in     ModSys.S_Natural);

  --*
  --  SetAllItemStates - sets the state of all rows to the state requested (0..n).
  --
  --  CALLING SEQUENCE -
  --
  --    MarkAllItems (DialogId, ControlId, state)
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    state : ModSys.S_Natural
  --      The state to set all rows to.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure SetState
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              state     : in     ModSys.S_Natural);

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    state : ModSys.S_Natural
  --      The state to set for marking all (Ctrl-A) or copying to Clipboard(Ctrl-C).
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure DummyCharValidateProc
             (ACHAR : in out character;
              valid : in out boolean);

  --*
  --  DummyCharValidateProc - May be used as an accept all 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 : character
  --      The character that was pressed
  --
  --  EXIT -
  --
  --    aChar : character
  --      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
             (msgData        : in     System.Address;
              row            : in     ModSys.S_Natural;
              column         : in     ModSys.S_Natural;
              totChars       : in     ModSys.S_Natural;
              Data           : in     string;
              upperCase      : in     boolean;
              validationProc : in     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 : ModSys.S_Natural
  --      The 1 relative row to edit.
  --
  --    col : ModSys.S_Natural
  --      The 1 relative column to edit.
  --
  --    totChars : ModSys.S_Natural
  --      The number of characters that may be input in the edit.
  --      (if more than totChars are entered then those > totChars
  --       will be dicarded)
  --
  --    data : string
  --      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
  --      N/A
  --




  procedure GetEditExitFunction
             (msgData      : in     System.Address;
              exitFunction : in     ModSys.S_Natural);

  --*
  --  GetEditExitFunction - Gets the keystroke that caused the edit cell to terminate.
  --
  --  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 : ModSys.S_Natural
  --      The key value hit that caused the edit cell to terminate.
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure DataIsInvalid
             (msgData : in     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
  --      N/A
  --




  procedure GetValidationStr
             (msgData : in     System.Address;
              Str     : in out string);

  --*
  --  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 : string
  --      The value that is in the ListView edit control.
  --




  procedure EndEdit
             (msgData : in     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
  --  without 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
  --      N/A
  --




  procedure SetHighlighting
             (dialogID   : in     ModSys.S_Natural;
              controlID  : in     ModSys.S_Natural;
              highlight  : in     boolean;
              columnOnly : in     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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      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
  --      N/A
  --




  procedure SetStriping
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              stripeOn  : in     boolean;
              ODD       : in     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 : ModSys.S_natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    controlID : ModSys.S_natural
  --      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
  --      N/A
  --




  procedure SetCurrentRow
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              row       : in     ModSys.S_Natural);

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    row : ModSys.S_Natural
  --      The row to set as the current row. (The one with the dashed border)
  --
  --  EXIT -
  --
  --    None
  --      N/A
  --




  procedure GetAverageCharWidth
             (dialogID     : in     ModSys.S_Natural;
              controlID    : in     ModSys.S_Natural;
              testStr      : in     string;
              AvgCharWidth : in out ModSys.S_Natural);

  --*
  --  GetAverageCharWidth - Gets number of average characters required to display 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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    testStr : String
  --      The string to test for average character width.
  --
  --  EXIT -
  --
  --    avgCharWidth - ModSys.S_Natural
  --      The number of average characters required to display the testStr.
  --




  procedure SetItemFont
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              inFont    : in     WinSys.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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the
  --      control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    inFont : WinSys.Hfont
  --      an HFONT structure containing the desired font of the cell that is to be written
  --      next
  --




  procedure SetItemFontColor
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              inColor   : in     WinSys.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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    inColor : WinSys.ColorRef
  --      a COLORREF to determine the desired font color of the cell next to be written
  --




  procedure SetHeaderFont
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              newFont   : in     WinSys.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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    newFont : WinSys.Hfont
  --      the structure containing the desired font for the headers
  --




  procedure CurrentFont
             (dialogID  : in     ModSys.S_Natural;
              controlID : in     ModSys.S_Natural;
              FontName  : in out string;
              Success   : in out 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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    fontName : string
  --      Name of the font.
  --
  --  EXIT -
  --
  --    Success : boolean
  --      TRUE - if the font name was retrieved.
  --      FALSE - could not get the font name.
  --




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

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --




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

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --




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

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --




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

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --




  procedure CalculateTopRow
             (dialogID      : in     ModSys.S_Natural;
              controlID     : in     ModSys.S_Natural;
              FirstRecord   : in     ModSys.S_Natural;
              LastRecord    : in     ModSys.S_Natural;
              DesiredRecord : in     ModSys.S_Natural;
              topRow        :    out ModSys.S_Natural);

  --*
  --  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 (DataHandle, LvId, FirstRecord,
  --                     LastRecord, DesiredRecord, TopRow);
  --
  --  ENTRY -
  --
  --    DialogId : Modsys.S_Natural
  --      The number of the dialog box or window containing the control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    FirstRecord : Modsys.S_Natural
  --      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 : Modsys.S_Natural
  --      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 : Modsys.S_Natural
  --      The number of the desired record.  This a number within the range
  --      FirstRecord <= DesiredRecord >= LastRecord.
  --
  --  EXIT -
  --
  --    TopRow : Modsys.S_Natural
  --      The value to send to the Reset procedure in order to get the DesiredRecord
  --      visible in the middle of the screen if possible.
  --




  procedure AdjustAndHighlightRow
             (dialogID     : in     ModSys.S_Natural;
              controlID    : in     ModSys.S_Natural;
              topRow       : in     ModSys.S_Natural;
              DesiredRow   : in     ModSys.S_Natural;
              DesiredState : in     ModSys.S_Natural);

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    TopRow : Modsys.S_Natural
  --      The number of the record to be displayed as the top row of visible
  --      data.
  --
  --    DesiredRow : Modsys.S_Natural
  --      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 : Modsys.S_Natural
  --      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
             (dialogID     : in     ModSys.S_Natural;
              controlID    : in     ModSys.S_Natural;
              topRow       : in     ModSys.S_Natural;
              DesiredRow   : in     ModSys.S_Natural;
              DesiredState : in     ModSys.S_Natural);

  --*
  --  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 : Modsys.S_Natural
  --      The number of the dialog box or window containing the control.
  --
  --    ControlId : Modsys.S_Natural
  --      The control resource identifier.
  --
  --    TopRow : Modsys.S_Natural
  --      The number of the record to be displayed as the top row of visible
  --      data.
  --
  --    DesiredRow : Modsys.S_Natural
  --      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 : Modsys.S_Natural
  --      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