![]() |
|
![]() |
type ControlMessage is (Unknown, -- Unknown command
DoubleClick, -- An item has been double clicked
-- related procedures -> SelectedItemIndex
FindItem, -- Get the specified item
-- related procedures -> ItemIndex, SetItemValue
ListDone, -- The list has finsished displaying
-- related procedures -> GetListInfo
RangeMsg, -- Get the total # of items in the list
-- related procedures -> SetRange
SearchChange, -- The search criteria has changed
-- related procedures -> GetSearchValue, SetSearchResult
SearchClear, -- Clear the internal search criteria
-- related procedures -> none
SelectedCancel, -- The selected item has been canceled
-- related procedures -> SelectedItemIndex
SelectedChange); -- The selected item has been changed
-- related procedures -> SelectedItemIndex
MAX_TAB_ARRAY_SIZE : constant := 20;
SLB_OK : constant := 0;
SLB_ERR : constant := -1;
SLB_ENDOFFILE : constant := -1;
subtype ListColorType is ModSys.S_Integer;
DarkBlue : constant ListColorType := 8_388_608; -- RGB(0,0,128) Low Intensity Blue
DarkGreen : constant ListColorType := 32_768; -- RGB(0,128,0) Low Intensity Green
DarkRed : constant ListColorType := 128; -- RGB(128,0,0) Low Intensity Red
DarkCyan : constant ListColorType := 8_421_376; -- RGB(0,128,128) Low Intensity Cyan
DarkMagenta : constant ListColorType := 8_388_736; -- RGB(128,0,128) Low Intensity Magenta
DarkYellow : constant ListColorType := 32_896; -- RGB(128,128,0) Low Intensity Yellow
DarkGray : constant ListColorType := 8_421_504; -- RGB(128,128,128) High Intensity Black
Black : constant ListColorType := 0; -- RGB(0,0,0) Low Intensity Black
Gray : constant ListColorType := 12_632_256; -- RGB(192,192,192) Low Intensity White
Blue : constant ListColorType := 16_711_680; -- RGB(0,0,255) High Intensity Blue
Green : constant ListColorType := 65_280; -- RGB(0,255,0) High Intensity Green
Red : constant ListColorType := 255; -- RGB(255,0,0) High Intensity Red
Cyan : constant ListColorType := 16_776_960; -- RGB(0,255,255) High Intensity Cyan
Magenta : constant ListColorType := 16_711_935; -- RGB(255,0,255) High Intensity Magenta
Yellow : constant ListColorType := 65_535; -- RGB(255,255,0) High Intensity Yellow
White : constant ListColorType := 16_777_215; -- RGB(255,255,255) High Intensity White
Default : constant ListColorType := ModSys.S_Integer'last;
function ControlCommand
(msgType : in DisplayW.DisplayMessageType;
msgData : in System.Address) return ControlMessage;
--*
-- ControlCommand - Retrieves a command which has been sent from a control.
--
--
-- This routine will retrieve a command which has been sent from the
-- control to the ActionProc.
--
-- CALLING SEQUENCE -
--
-- command := ControlCommand (msgType, msgData)
--
-- ENTRY -
--
-- msgType : DisplayW.DisplayMessageType
-- The msgType parameter which was passed into the ActionProc.
--
-- msgData : System.Address
-- The msgData parameter which was passed into the ActionProc.
--
-- EXIT -
--
-- command : ControlMessage
-- The command which has been sent. Must be one of the Control
-- Messages defined for the control receiving the command. The
-- command Unknown indicates an undefined command has been sent.
--
function CurrentDialogID
(msgData : in System.Address) return ModSys.S_Natural;
--*
-- CurrentDialogID - Retrieves the ID of a dialog to which a message was sent.
--
--
-- This routine will retrieve a the ID of a dialog to which a message
-- has been sent.
--
-- CALLING SEQUENCE -
--
-- DialogId := CurrentDialogID (msgData)
--
-- ENTRY -
--
-- msgData : System.Address
-- The msgData parameter which was passed into the ActionProc.
--
-- EXIT -
--
-- DialogId : Modsys.S_Natural
-- The ID of the dialog receiving a message.
--
function CurrentControlID
(msgData : in System.Address) return ModSys.S_Natural;
--*
-- CurrentControlID - Retrieves the ID of a control for which a message is intended.
--
--
-- This routine will retrieve the ID of a control for which a message
-- is intended.
--
-- CALLING SEQUENCE -
--
-- ControlId := CurrentControlID (msgData)
--
-- ENTRY -
--
-- msgData : System.Address
-- The msgData parameter which was passed into the ActionProc.
--
-- EXIT -
--
-- ControlId : Modsys.S_Natural
-- The ID of the control.
--
function IsEnabled
(dialogID : in ModSys.S_Natural;
controlID : in ModSys.S_Natural) return boolean;
--*
-- IsEnabled - Checks to see if a control is enabled.
--
--
-- This routine will determine whether a control is enabled or
-- disabled (grayed).
--
-- CALLING SEQUENCE -
--
-- status := IsEnabled (DialogId, ControlId)
--
-- ENTRY -
--
-- DialogId : Modsys.S_Natural
-- The number of the dialog box or window containing the
-- control.
--
-- ControlId : Modsys.S_Natural
-- The control resource identifier.
--
-- EXIT -
--
-- status : boolean
-- TRUE if the control is enabled.
--
procedure EnableControl
(dialogID : in ModSys.S_Natural;
controlID : in ModSys.S_Natural);
--*
-- EnableControl - Enables a control.
--
--
-- This routine will enable the specified control.
--
-- CALLING SEQUENCE -
--
-- EnableControl (DialogId, ControlId)
--
-- ENTRY -
--
-- DialogId : Modsys.S_Natural
-- The number of the dialog box or window containing the
-- control.
--
-- ControlId : Modsys.S_Natural
-- The control resource identifier.
--
-- EXIT -
--
-- None
-- N/A
--
procedure DisableControl
(dialogID : in ModSys.S_Natural;
controlID : in ModSys.S_Natural);
--*
-- DisableControl - Disables a control.
--
--
-- This routine will disable (gray) the specified control.
--
-- CALLING SEQUENCE -
--
-- DisableControl (DialogId, ControlId)
--
-- ENTRY -
--
-- DialogId : Modsys.S_Natural
-- The number of the dialog box or window containing the
-- control.
--
-- ControlId : Modsys.S_Natural
-- The control resource identifier.
--
-- EXIT -
--
-- None
-- N/A
--
procedure HideControl
(dialogID : in ModSys.S_Natural;
controlID : in ModSys.S_Natural);
--*
-- HideControl - Hides a control.
--
--
-- This routine will hide the specified control.
--
-- CALLING SEQUENCE -
--
-- HideControl (DialogId, ControlId)
--
-- ENTRY -
--
-- DialogId : Modsys.S_Natural
-- The number of the dialog box or window containing the
-- control.
--
-- ControlId : Modsys.S_Natural
-- The control resource identifier.
--
-- EXIT -
--
-- None
-- N/A
--
procedure SetItemColors
(msgType : in DisplayW.DisplayMessageType;
msgData : in System.Address;
textColor : in ListColorType;
bkGndColor : in ListColorType);
--*
-- SetItemColors - Sets the text and background colors with the Owner Draw property.
--
--
-- Sets the text and background colors of an item of a SageList which has
-- been created with the Owner Draw property. The SagesList sends a FindItem
-- message in order to populate the SageList. The programmer should use this
-- routine to set text and background colors for the item being requested.
--
-- CALLING SEQUENCE -
--
-- SetItemValue (msgType, msgData, textColor, bkGndColor)
--
-- ENTRY -
--
-- msgType : DisplayW.DisplayMessageType
-- The msgType parameter which was passed into the ActionProc.
--
-- msgData : System.Address
-- The msgData parameter which was passed into the ActionProc.
--
-- textColor : ListColorType
-- The color in which to display the text. Must be one of the
-- colors defined in ListColorType.
--
-- bkGndColor : ListColorType
-- The color in which to display the background. Must be one of the
-- colors defined in ListColorType.
--
-- EXIT -
--
-- None
-- N/A
--
procedure ShowControl
(dialogID : in ModSys.S_Natural;
controlID : in ModSys.S_Natural);
--*
-- ShowControl - Shows a control.
--
--
-- This routine will show the specified control.
--
-- CALLING SEQUENCE -
--
-- ShowControl (DialogId, ControlId)
--
-- ENTRY -
--
-- DialogId : Modsys.S_Natural
-- The number of the dialog box or window containing the
-- control.
--
-- ControlId : Modsys.S_Natural
-- The control resource identifier.
--
-- EXIT -
--
-- None
-- N/A
--
procedure SetFocus
(dialogID : in ModSys.S_Natural;
controlID : in ModSys.S_Natural);
--*
-- SetFocus - Sets to focus to a control.
--
--
-- This routine will give the specified control focus.
--
-- CALLING SEQUENCE -
--
-- SetFocus (DialogId, ControlId)
--
-- ENTRY -
--
-- DialogId : Modsys.S_Natural
-- The number of the dialog box or window containing the
-- control.
--
-- ControlId : Modsys.S_Natural
-- The control resource identifier.
--
-- EXIT -
--
-- None
-- N/A
--
procedure RedrawControl
(dialogID : in ModSys.S_Natural;
controlID : in ModSys.S_Natural);
--*
-- RedrawControl - Redraws a control.
--
--
-- This routine will redraw the specified control.
--
-- CALLING SEQUENCE -
--
-- RedrawControl (DialogId, ControlId)
--
-- ENTRY -
--
-- DialogId : Modsys.S_Natural
-- The number of the dialog box or window containing the
-- control.
--
-- ControlId : Modsys.S_Natural
-- The control resource identifier.
--
-- EXIT -
--
-- None
-- N/A
--
procedure ClearAllMarks
(dialogID : in ModSys.S_Natural;
controlID : in ModSys.S_Natural);
--*
-- ClearAllMarks - Unmarks all items in a SageList.
--
--
-- This routine will unmark all items in a SageList.
--
-- CALLING SEQUENCE -
--
-- ClearAllMarks (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 ClearMark
(dialogID : in ModSys.S_Natural;
controlID : in ModSys.S_Natural;
index : in ModSys.S_Natural);
--*
-- ClearMark - Unmarks an item in a SageList.
--
--
-- This routine will unmark an item in a SageList. The programmer may
-- specify whether or not the SageList is immediately redrawn to
-- reflect the change.
--
-- CALLING SEQUENCE -
--
-- ClearMark (DialogId, ControlId, index, redraw)
--
-- ENTRY -
--
-- DialogId : Modsys.S_Natural
-- The number of the dialog box or window containing the
-- control.
--
-- ControlId : Modsys.S_Natural
-- The control resource identifier.
--
-- index : ModSys.S_Natural
-- The position (1..n) of the item in the SageList to unmark.
-- If the SageList is single select, then the marked item will
-- be unmarked regardless of this value.
--
-- EXIT -
--
-- None
-- N/A
--
procedure ClearSearch
(dialogID : in ModSys.S_Natural;
controlID : in ModSys.S_Natural);
--*
-- ClearSearch - Clears the current SageList search string.
--
--
-- This routine will clear the internal search string for the
-- SageList and cause a SearchClear message to be sent to the
-- ActionProc. It is the programmers responsiblity to reposition
-- the selected SageList item if desired.
--
-- CALLING SEQUENCE -
--
-- ClearSearch (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
--
function ItemIndex
(msgType : in DisplayW.DisplayMessageType;
msgData : in System.Address) return ModSys.S_Natural;
--*
-- ItemIndex - Returns index number of item that FindItem msg requests.
--
--
-- The SagesList sends a FindItem message in order to determine
-- the value of an item in a SageList. The programmer should
-- use this routine to determine the index number (1..n) of the
-- item which is being requested by the FindItem message.
--
-- CALLING SEQUENCE -
--
-- index := ItemIndex (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 -
--
-- index : ModSys.S_Natural
-- The index number (1..n) of the item which was requested by the
-- FindItem message.
--
procedure GetListInfo
(msgType : in DisplayW.DisplayMessageType;
msgData : in System.Address;
index : in out ModSys.S_Natural;
lines : in out ModSys.S_Natural);
--*
-- GetListInfo - Gets the # of display items and top of list.
--
--
-- The SageList sends a ListDone message when it is finished
-- responding to a user request to display data (i.e. the user
-- has moved the thumb position). This routine can be used
-- in response to a ListDone message to retrieve the # of items
-- displayed in the list and the index position of the item at
-- the top of the list.
--
-- CALLING SEQUENCE -
--
-- GetItemIndex (msgType, msgData, index, lines)
--
-- 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 -
--
-- index : ModSys.S_Natural
-- The position of the top item displayed in the list with respect
-- to the entire list. The first position is 1.
--
-- lines : ModSys.S_Natural
-- The number of items which can be displayed in the visible part of
-- the list.
--
procedure GetSearchValue
(msgType : in DisplayW.DisplayMessageType;
msgData : in System.Address;
Value : in out string);
--*
-- GetSearchValue - Retrieves the current search string from the list.
--
--
-- The SageList 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 SetSearchResult routine can then be used to tell the SageList
-- what the new position will be.
--
-- CALLING SEQUENCE -
--
-- GetSearchValue (msgType, msgData, value)
--
-- ENTRY -
--
-- msgType : DisplayW.DisplayMessageType
-- The msgType parameter which was passed into the ActionProc.
--
-- msgData : System.Address
-- The msgData parameter which was passed into the ActionProc.
--
-- value : string
-- The search string.
--
-- EXIT -
--
-- None
-- N/A
--
function IsMarked
(dialogID : in ModSys.S_Natural;
controlID : in ModSys.S_Natural;
index : in ModSys.S_Natural) return boolean;
--*
-- IsMarked - Checks the marked/unmarked status of an item in a list.
--
--
-- This routine will check the marked/unmarked status of an item
-- in a SageList.
--
-- CALLING SEQUENCE -
--
-- status := IsMarked (DialogId, ControlId, index)
--
-- ENTRY -
--
-- DialogId : Modsys.S_Natural
-- The number of the dialog box or window containing the
-- control.
--
-- ControlId : Modsys.S_Natural
-- The control resource identifier.
--
-- index : ModSys.S_Natural
-- The position (1..n) of the item in the SageList to check.
--
-- EXIT -
--
-- status : boolean
-- True if the item is marked. False if the item is not marked.
--
function MarkedCount
(dialogID : in ModSys.S_Natural;
controlID : in ModSys.S_Natural) return ModSys.S_Natural;
--*
-- MarkedCount - Gets the number of items marked in the SageList.
--
--
-- This routine will return the number of items in the SageList
-- which are marked.
--
-- CALLING SEQUENCE -
--
-- count := MarkedCount (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 -
--
-- count : ModSys.S_Natural
-- The number of marked items in the list. If no items are marked,
-- then count will be 0.
--
procedure MarkItem
(dialogID : in ModSys.S_Natural;
controlID : in ModSys.S_Natural;
index : in ModSys.S_Natural;
Redraw : in boolean);
--*
-- MarkItem - Marks an item in a SageList.
--
--
-- This routine will mark an item in a SageList. The programmer may
-- specify whether or not the SageList is immediately redrawn to
-- reflect the change.
--
-- CALLING SEQUENCE -
--
-- MarkItem (DialogId, ControlId, index, redraw)
--
-- ENTRY -
--
-- DialogId : Modsys.S_Natural
-- The number of the dialog box or window containing the
-- control.
--
-- ControlId : Modsys.S_Natural
-- The control resource identifier.
--
-- index : ModSys.S_Natural
-- The position (1..n) of the item in the SageList to mark.
-- If the SageList is multiple select, then any list items
-- which are already selected will remain selected.
--
-- redraw : boolean
-- Set to TRUE to have the SageList immediately reflect the change.
-- If set to FALSE, the change will happen only after a redraw of
-- the SageList has occurred.
--
-- EXIT -
--
-- None
-- N/A
--
function NextMarked
(dialogID : in ModSys.S_Natural;
controlID : in ModSys.S_Natural;
startPos : in ModSys.S_Natural) return ModSys.S_Natural;
--*
-- NextMarked - Gets the index of the next marked item in a list.
--
--
-- This routine will get the index number (1..n) of the next marked
-- item in the SageList with respect to the value passed in for index.
--
-- CALLING SEQUENCE -
--
-- index := MarkedCount (DialogId, ControlId, startPos)
--
-- 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 (1..n) in the SageList (inclusive of this
-- position) from which the search for the next marked item
-- will start. If set to 1 the first marked item will be found.
--
-- EXIT -
--
-- index : ModSys.S_Natural
-- The position (1..n) in the SageList of the next marked item.
-- This value will be SLB_ERR if no more items in the SageList
-- are marked.
--
procedure Reset
(dialogID : in ModSys.S_Natural;
controlID : in ModSys.S_Natural);
--*
-- Reset - Resets the control.
--
--
-- This routine will cause the control to be reset. This will result
-- in the list being cleared and a new RangeMsg message being sent.
--
-- CALLING SEQUENCE -
--
-- Reset (DialogId, ControlId)
--
-- ENTRY -
--
-- DialogId : Modsys.S_Natural
-- The number of the dialog box or window containing the
-- control.
--
-- ControlId : Modsys.S_Natural
-- The control resource identifier.
--
-- EXIT -
--
-- None
-- N/A
--
function SelectedItemIndex
(msgType : in DisplayW.DisplayMessageType;
msgData : in System.Address) return ModSys.S_Natural;
--*
-- SelectedItemIndex - Gets the index of the selected item.
--
--
-- The SageList sends a Click, DoubleClick, SelectedChange, or
-- SelectedCancel message when an item in the list has been selected.
-- The programmer can use this routine to get the index position of
-- the selected item.
--
-- CALLING SEQUENCE -
--
-- index := GetSelectedItemIndex (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 -
--
-- index : ModSys.S_Natural
-- The position in the list of the item which has been selected.
-- The first position is 1.
--
procedure SetItemValue
(msgType : in DisplayW.DisplayMessageType;
msgData : in System.Address;
Value : in string;
Status : in ModSys.S_Integer);
--*
-- SetItemValue - Sets the value of the item that FindItem msg requests.
--
--
-- The SagesList sends a FindItem message in order to determine
-- the value of an item in a SageList. The programmer should
-- use this routine to set that value.
--
-- CALLING SEQUENCE -
--
-- SetItemValue (msgType, msgData, index, value, status)
--
-- 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.
--
-- index : ModSys.S_Natural
-- The index number (1..n) of the item which was requested by the
-- FindItem message.
--
-- value : string
-- The text string which will appear in the SageList.
--
-- status : ModSys.S_Integer
-- Return one of the following values -
-- SLB_OK If able to obtain the value
-- SLB_ENDOFFILE If no more data is available (this will cause
-- the FindItem messages to stop)
-- SLB_ERR If there was a problem obtaining the data.
--
-- EXIT -
--
-- None
-- N/A
--
procedure SetRange
(msgType : in DisplayW.DisplayMessageType;
msgData : in System.Address;
index : in ModSys.S_Natural;
Status : in ModSys.S_Integer);
--*
-- SetRange - Sets the number of items to be in the SageList.
--
--
-- The SagesList sends a Range message in order to determine
-- the total number of items that will be in the list. The
-- programmer should use this routine to respond to the Range
-- message.
--
-- CALLING SEQUENCE -
--
-- SetRange (msgType, msgData, index, status)
--
-- 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.
--
-- index : ModSys.S_Natural
-- The total number of items to be placed in the list.
--
-- status : Modsys.S_Integer
-- Return one of the following
-- SLB_OK If able to obtain the range
-- SLB_ERR If the range cannot be determined
--
-- EXIT -
--
-- None
-- N/A
--
procedure SetSearchResult
(msgType : in DisplayW.DisplayMessageType;
msgData : in System.Address;
index : in ModSys.S_Natural;
Status : in ModSys.S_Integer);
--*
-- SetSearchResult - Instructs the SageList to reposition itself after search.
--
--
-- The SageList sends a SearchChange message when the search string
-- has changed. The programmer uses the GetSearchValue routines
-- to get the current search string. The programmer uses the
-- search string to determine if the list needs to be repositioned.
-- If so, the programmer can use this routines to reposition the
-- list to a new index.
--
-- CALLING SEQUENCE -
--
-- SetSearchResult (msgType, msgData, index, status)
--
-- 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.
--
-- index : ModSys.S_Natural
-- The index number (1..n) of the item which matched the search
-- conditions.
--
-- status : ModSys.S_Natural
-- Return one of the following
-- SLB_OK To reposition the list to the new index.
-- SLB_ERR If there was a problem with the search.
--
-- EXIT -
--
-- None
-- N/A
--
procedure SetTabs
(dialogID : in ModSys.S_Natural;
controlID : in ModSys.S_Natural;
numTabs : in ModSys.S_Natural;
tabs : in DisplayW.DWORD_u_array);
--*
-- SetTabs - Sets the tabs for a SageList.
--
--
-- This procecure allows the application programmer to set the
-- tab stops in a SageList for formatting the data.
--
-- CALLING SEQUENCE -
--
-- SetTabs (DialogId, ControlId, numTabs, tabs)
--
-- ENTRY -
--
-- DialogId : Modsys.S_Natural
-- The number of the dialog box or window containing the
-- control.
--
-- ControlId : Modsys.S_Natural
-- The control resource identifier.
--
-- numTabs : ModSys.S_Natural
-- The number of tabs being set (maximum is 20).
--
-- tabs : DisplayW.DWORD_u_array
-- Array containing up to 20 tab stop positions. Tab stop
-- positions are in units of pixels.
--
-- EXIT -
--
-- None
-- N/A
--
Send mail to
warren.merrill@inl.gov
with questions or comments about this web site.
Copyright © 1989-2006 Battelle Energy Alliance