![]() |
|
![]() |
PROCEDURE ControlCommand
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS) : ControlMessage;
(**
ControlCommand - Retrieves a command which has been sent from a control.
This routine will retrieve a command which has been sent from the
control to the ActionProc.
CALLING SEQUENCE -
command := ControlCommand (msgType, msgData)
ENTRY -
msgType : DWSpec.DisplayMessageType
The msgType parameter which was passed into the ActionProc.
msgData : SYSTEM.ADDRESS
The msgData parameter which was passed into the ActionProc.
EXIT -
command : ControlMessage
The command which has been sent. Must be one of the Control
Messages defined for the control receiving the command. The
command Unknown indicates an undefined command has been sent.
*)
PROCEDURE CurrentDialogID
(CONST msgData : SYSTEM.ADDRESS) : CARDINAL;
(**
CurrentDialogID - Retrieves the ID of a dialog to which a message was sent.
This routine will retrieve a the ID of a dialog to which a message
has been sent.
CALLING SEQUENCE -
dialogID := CurrentDialogID (msgData)
ENTRY -
msgData : SYSTEM.ADDRESS
The msgData parameter which was passed into the ActionProc.
EXIT -
dialogID : CARDINAL
The ID of the dialog receiving a message.
*)
PROCEDURE CurrentControlID
(CONST msgData : SYSTEM.ADDRESS) : CARDINAL;
(**
CurrentControlID - Retrieves the ID of a control for which a message is intended.
This routine will retrieve the ID of a control for which a message
is intended.
CALLING SEQUENCE -
controlID := CurrentControlID (msgData)
ENTRY -
msgData : SYSTEM.ADDRESS
The msgData parameter which was passed into the ActionProc.
EXIT -
controlID : CARDINAL
The ID of the control.
*)
PROCEDURE IsEnabled
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL) : BOOLEAN;
(**
IsEnabled - Checks to see if a control is enabled.
This routine will determine whether a control is enabled or
disabled (grayed).
CALLING SEQUENCE -
status := IsEnabled (dialogID, controlID)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
EXIT -
status : BOOLEAN
TRUE if the control is enabled.
*)
PROCEDURE EnableControl
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL);
(**
EnableControl - Enables a control.
This routine will enable the specified control.
CALLING SEQUENCE -
EnableControl (dialogID, controlID)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
EXIT -
None
*)
PROCEDURE DisableControl
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL);
(**
DisableControl - Disables a control.
This routine will disable (gray) the specified control.
CALLING SEQUENCE -
DisableControl (dialogID, controlID)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
EXIT -
None
*)
PROCEDURE HideControl
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL);
(**
HideControl - Hides a control.
This routine will hide the specified control.
CALLING SEQUENCE -
HideControl (dialogID, controlID)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
EXIT -
None
*)
PROCEDURE ShowControl
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL);
(**
ShowControl - Shows a control.
This routine will show the specified control.
CALLING SEQUENCE -
ShowControl (dialogID, controlID)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
EXIT -
None
*)
PROCEDURE SetFocus
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL);
(**
SetFocus - Sets to focus to a control.
This routine will give the specified control focus.
CALLING SEQUENCE -
SetFocus (dialogID, controlID)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
EXIT -
None
*)
PROCEDURE RedrawControl
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL);
(**
RedrawControl - Redraws a control.
This routine will redraw the specified control.
CALLING SEQUENCE -
RedrawControl (dialogID, controlID)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
EXIT -
None
*)
PROCEDURE GetCellIndex
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS;
VAR rowIndex : CARDINAL;
VAR colIndex : CARDINAL);
(**
GetCellIndex - Gets the row and column index number of the grid item.
The SagesGrid sends a FindDataItem or GetColumnInfo message in order
to populate the SageGrid. The programmer should use this routine to
determine the row and column index number (1 .. n) of the item which is
being requested.
CALLING SEQUENCE -
GetCellIndex (msgType, msgData, rowIndex, colIndex)
ENTRY -
msgType : DWSpec.DisplayMessageType
The msgType parameter which was passed into the ActionProc.
msgData : SYSTEM.ADDRESS
The msgData parameter which was passed into the ActionProc.
EXIT -
rowIndex : CARDINAL
The row in the grid for which the FindDataItem message is
requesting data. This value will be 0 if the GetColumnInfo
has been sent.
colIndex : CARDINAL
The column in the grid for which the FindDataItem or GetColumnInfo
message is requesting data.
*)
PROCEDURE Initialize
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL);
(**
Initialize - Initializes and Resets the control.
This routine will cause the control to be re initialized and reset.
The programmer will receive GetColumnCount, GetColumnInfo, and Range
message. They may respond to these messages to change the attributes
of the control.
CALLING SEQUENCE -
Initialize (dialogID, controlID)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
EXIT -
None
*)
PROCEDURE Lock
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL;
CONST Count : CARDINAL);
(**
Lock - Locks columns for horizontal scrolling.
This routine will lock columns in the grid so that they will not
scroll horizontally.
CALLING SEQUENCE -
Lock (dialogID, controlID, count)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
count : CARDINAL
The number of columns to lock. Locked columns must be
sequential starting with the first.
EXIT -
None
*)
PROCEDURE Refresh
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL);
PROCEDURE Reset
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL);
(**
Reset - Resets the control.
This routine will cause the control to be reset. This will result
in the grid being cleared and a new Range message being sent.
CALLING SEQUENCE -
Reset (dialogID, controlID)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
EXIT -
None
*)
PROCEDURE SetCellColors
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL;
CONST rowIndex : CARDINAL;
CONST colIndex : CARDINAL;
CONST textColor : GridColorType;
CONST bkGndColor : GridColorType);
(**
SetCellColors - Changes the colors of a cell.
This routine allows the programmer to change the text and background
colors of a cell.
CALLING SEQUENCE -
SetCellColors (dialogID, controlID, rowIndex, colIndex,
textColor, bkGndColor)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
rowIndex : CARDINAL
The row (1 .. n) in the grid which contains the cell to be changed.
If the specified row is not visible, no change will be made.
has been sent.
colIndex : CARDINAL
The column (1 .. n) in the grid which contains the cell to be
changed. If the specified column is not visible, the change
will not take effect until the column is scrolled into view.
textColor : GridColorType
The color for the text in the header or cell. Must be one of
the GridColorTypes.
bkGndColor : GridColorType
The color for the background of the header or cell. Must be one
of the GridColorTypes.
EXIT -
None
*)
PROCEDURE SetScrollPosition
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL;
CONST rowIndex : CARDINAL;
CONST colIndex : CARDINAL);
(**
SetScrollPosition - Changes the position of the grid display.
This routine allows the programmer to change the position of the grid display.
CALLING SEQUENCE -
SetScrollPosition (dialogID, controlID, rowIndex, colIndex);
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the control.
controlID : CARDINAL
The control resource identifier.
rowIndex : CARDINAL
The row (1 .. n) in the grid to position to. This row will be the top row
on the display.
colIndex : CARDINAL
The column (1 .. n) in the grid to postion to. This column will be displayed
following the locked columns.
EXIT -
None
*)
PROCEDURE SetCellText
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL;
CONST rowIndex : CARDINAL;
CONST colIndex : CARDINAL;
CONST Text : ARRAY OF CHAR);
(**
SetCellText - Changes the text of a cell.
This routine allows the programmer to change the text of a cell.
CALLING SEQUENCE -
SetCellText (dialogID, controlID, rowIndex, colIndex, text)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
rowIndex : CARDINAL
The row (1 .. n) in the grid which contains the cell to be changed.
If the specified row is not visible, no change will be made.
has been sent.
colIndex : CARDINAL
The column (1 .. n) in the grid which contains the cell to be
changed. If the specified column is not visible, the change
will not take effect until the column is scrolled into view.
text : ARRAY OF CHAR
The text to place in the cell.
EXIT -
None
*)
PROCEDURE SetColumnCount
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS;
CONST Count : CARDINAL;
CONST initVisible : CARDINAL;
CONST initLocked : CARDINAL);
(**
SetColumnCount - Sets the number of columns and how many initially visible.
The SageGrid sends a GetColumnCount message in order to determine
the number of total columns in the grid, and the number that will
be initially visible. The programmer should use this routine to
set the requested values. These values will override the settings
specified in the resource editor.
CALLING SEQUENCE -
SetColumnCount (msgType, msgData, count, initVisible)
ENTRY -
msgType : DWSpec.DisplayMessageType
The msgType parameter which was passed into the ActionProc.
msgData : SYSTEM.ADDRESS
The msgData parameter which was passed into the ActionProc.
count : CARDINAL
The total number of columns for the control.
initVisible : CARDINAL
The number of columns to be initially visible in the control.
The user will be able to scroll to any columns which are not
initially visible.
initLocked : CARDINAL
The number of columns to be initially locked in the control.
The locked columns will not scroll
EXIT -
None
*)
PROCEDURE SetColumnInfo
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS;
CONST Value : ARRAY OF CHAR;
CONST Percent : REAL;
CONST headerAlign : TextAlignment;
CONST cellAlign : TextAlignment);
(**
SetColumnInfo - Sets the attributes of a column in the grid control.
The SageGrid sends a GetColumnInfo message in order to determine
the attributes of each column in the grid. The programmer should
use this routine to set the header text value, column size (in
percent of the entire grid size), and the text alignment for that
column. The GetCellIndex routine must be called to determine which
column in the grid is being requested.
CALLING SEQUENCE -
SetColumnInfo (msgType, msgData, value, percent, alignment)
ENTRY -
msgType : DWSpec.DisplayMessageType
The msgType parameter which was passed into the ActionProc.
msgData : SYSTEM.ADDRESS
The msgData parameter which was passed into the ActionProc.
value : ARRAY OF CHAR
The text string which will appear in the column header.
percent : REAL
The size of the column with respect to the total size of the
grid. Set this value to 0 to use the attribute specified in
the resource editor.
headerAlign : TextAlignment
The method of aligning text for the column header. Must be one
of the following - (Left, Center, Right);
cellAlign : TextAlignment
The method of aligning text for all the cells in the column.
Must be one of the following - (Left, Center, Right);
EXIT -
None
*)
PROCEDURE SetCellInfo
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS;
CONST textColor : GridColorType;
CONST bkGndColor : GridColorType;
CONST showBorder : BOOLEAN);
(**
SetCellInfo - Sets the attributes of a cell in the grid control.
The SageGrid sends a GetCellInfo message in order to determine
the attributes of each cell in the grid. The programmer should
use this routine to set the cell colors and border attributes.
The GetCellIndex routine can be called to determine which
column in the grid is being requested.
CALLING SEQUENCE -
SetCellInfo (msgType, msgData, textColor, bkGndColor, showBorder)
ENTRY -
msgType : DWSpec.DisplayMessageType
The msgType parameter which was passed into the ActionProc.
msgData : SYSTEM.ADDRESS
The msgData parameter which was passed into the ActionProc.
textColor : GridColorType
The color of the text in the grid.
bkGndColor : GridColorType
The color of the background in the cell.
showBorder : BOOLEAN
If TRUE, then the border will be shown.
EXIT -
None
*)
PROCEDURE GetCellInformation
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS;
VAR textColor : GridColorType;
VAR bkGndColor : GridColorType;
VAR showBorder : BOOLEAN);
(**
GetCellInformation - Gets the attributes of a cell in the grid control.
The SageGrid sends a GetCellInfo message in order to determine
the attributes of each cell in the grid. The programmer should
use this routine to get the cell colors and border attributes that
currently being used. The GetCellIndex routine can be called to
determine which column in the grid is being requested.
CALLING SEQUENCE -
GetCellInformation (msgType, msgData, textColor, bkGndColor, showBorder)
ENTRY -
msgType : DWSpec.DisplayMessageType
The msgType parameter which was passed into the ActionProc.
msgData : SYSTEM.ADDRESS
The msgData parameter which was passed into the ActionProc.
EXIT -
textColor : GridColorType
The color of the text in the grid.
bkGndColor : GridColorType
The color of the background in the cell.
showBorder : BOOLEAN
If TRUE, then the border will be shown.
*)
PROCEDURE SetCurrentCellColors
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS;
CONST textColor : GridColorType;
CONST bkGndColor : GridColorType);
(**
SetCurrentCellColors - Sets the text and background colors for a header or cell.
The SageGrid sends a GetColumnInfo or FindDataItem message to obtain
the header or cell data in order to populate a SageGrid. This routine
can be used to set either the header colors (when responding to a
GetColumnInfo message) or the cell colors (when responding to the
FindDataItem message). Additionally, it can be used when responding
to CellClick or CellDblClick messages to change the colors of the cell
which has been selected by the user.
CALLING SEQUENCE -
SetCurrentCellColors (msgType, msgData, textColor, bkGndColor)
ENTRY -
msgType : DWSpec.DisplayMessageType
The msgType parameter which was passed into the ActionProc.
msgData : SYSTEM.ADDRESS
The msgData parameter which was passed into the ActionProc.
textColor : GridColorType
The color for the text in the header or cell. Must be one of
the GridColorTypes.
bkGndColor : GridColorType
The color for the background of the header or cell. Must be one
of the GridColorTypes.
EXIT -
None
*)
PROCEDURE GetCurrentCellColors
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS;
VAR textColor : GridColorType;
VAR bkGndColor : GridColorType);
(**
GetCurrentCellColors - Gets the text and background colors for a header or cell.
The SageGrid sends a GetColumnInfo or FindDataItem message to obtain
the header or cell data in order to populate a SageGrid. This routine
can be used to get either the header colors (when responding to a
GetColumnInfo message) or the cell colors (when responding to the
FindDataItem message). Additionally, it can be used when responding
to CellClick or CellDblClick messages to get the colors of the cell
which has been selected by the user.
CALLING SEQUENCE -
GetCurrentCellColors (msgType, msgData, textColor, bkGndColor)
ENTRY -
msgType : DWSpec.DisplayMessageType
The msgType parameter which was passed into the ActionProc.
msgData : SYSTEM.ADDRESS
The msgData parameter which was passed into the ActionProc.
EXIT -
textColor : GridColorType
The color for the text in the header or cell.
bkGndColor : GridColorType
The color for the background of the header or cell.
*)
PROCEDURE GetGridDimensions
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS;
VAR maxChars : CARDINAL;
VAR maxLines : CARDINAL);
(**
GetGridDimensions - Gets the maximum number of rows and lines in grid definition.
The SageGrid sends a GetColumnCount message to obtain the number of columns,
etc for the grid. At this time, the control also calculates and provides the
maximum number of characters and lines that the grid can hold.
This information can be used to calculate the column information that is
returned to the grid control. This call is valid only after a GetColumCount message.
CALLING SEQUENCE -
GetGridDimensions (msgType, msgData, maxChars, maxLines)
ENTRY -
msgType : DWSpec.DisplayMessageType
The msgType parameter which was passed into the ActionProc.
msgData : SYSTEM.ADDRESS
The msgData parameter which was passed into the ActionProc.
EXIT -
maxChars : CARDINAL
The maximum number of characters that can be stored in the grid using
the current grid font. This is calculated from the size of the control
and the average width of a character using the current font, therefore,
the number returned will be greater that the actual size.
maxLines : CARDINAL
The maximum number of lines that will fit in the grid. Again, this is
calculated from the font average character height and will actually be
less than what is returned.
*)
PROCEDURE SetCurrentCellText
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS;
CONST Text : ARRAY OF CHAR);
(**
SetCurrentCellText - Sets the text of the header or data item that is being requested.
The SageGrid sends a FindDataItem message in order to populate the
cells of a SageGrid. The programmer should use this routine to
set the requested value.
CALLING SEQUENCE -
SetCurrentCellText (msgType, msgData, value)
ENTRY -
msgType : DWSpec.DisplayMessageType
The msgType parameter which was passed into the ActionProc.
msgData : SYSTEM.ADDRESS
The msgData parameter which was passed into the ActionProc.
text : ARRAY OF CHAR
The text string which will appear in the SageGrid header or data.
EXIT -
None
*)
PROCEDURE SetRange
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS;
CONST total : CARDINAL);
(**
SetRange - Sets the number of rows of data to be in the SageGrid.
The SagesGrid sends a Range message in order to determine
the total number of rows of data that will be in the grid. The
programmer should use this routine to respond to the Range
message.
CALLING SEQUENCE -
SetRange (msgType, msgData, total)
ENTRY -
msgType : DWSpec.DisplayMessageType
The msgType parameter which was passed into the ActionProc.
msgData : SYSTEM.ADDRESS
The msgData parameter which was passed into the ActionProc.
total : CARDINAL
The total number of rows of data to be placed in the list.
EXIT -
None
*)
PROCEDURE SetCurrentBorder
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS;
CONST showBorder : BOOLEAN);
(**
SetCurrentBorder - Turns the border on or off for the current grid header or cell.
The SagesGrid sends a GetColumnInfo or a FindItem message in order to
get the data for the header or cell. The user can call this routine to
turn on or off the border for the header or cell.
CALLING SEQUENCE -
SetCurrentBorder (msgType, msgData, showBorder)
ENTRY -
msgType : DWSpec.DisplayMessageType
The msgType parameter which was passed into the ActionProc.
msgData : SYSTEM.ADDRESS
The msgData parameter which was passed into the ActionProc.
showBorder : BOOLEAN
TRUE if the border is to be shown. By default it is always shown.
EXIT -
None
*)
PROCEDURE Unlock
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL);
(**
Unlock - Unlocks columns which have been locked.
This routine will unlock columns in a grid which have been locked.
CALLING SEQUENCE -
Unlock (dialogID, controlID)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
EXIT -
None
*)
PROCEDURE EditCell
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL;
CONST rowIndex : CARDINAL;
CONST colIndex : CARDINAL);
(**
EditCell - Allow editing of a cell.
This routine allows the user to edit the contents of a cell.
CALLING SEQUENCE -
EditCell (dialogID, controlID, rowIndex, colIndex)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
rowIndex : CARDINAL
The row (1 .. n) in the grid which contains the cell to be changed.
If the specified row is not visible, no change will be made.
has been sent.
colIndex : CARDINAL
The column (1 .. n) in the grid which contains the cell to be
changed. If the specified column is not visible, the change
will not take effect until the column is scrolled into view.
EXIT -
None
*)
PROCEDURE GetCellText
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS;
VAR Text : ARRAY OF CHAR);
(**
GetCellText - Retrieves the text of a cell.
This routine allows the programmer to retrieve the text of a cell.
CALLING SEQUENCE -
GetCellText (msgType, msgData, text)
ENTRY -
msgType : DWSpec.DisplayMessageType
The msgType parameter which was passed into the ActionProc.
msgData : SYSTEM.ADDRESS
The msgData parameter which was passed into the ActionProc.
EXIT -
text : ARRAY OF CHAR
Where to place the text.
*)
Send mail to
warren.merrill@inl.gov
with questions or comments about this web site.
Copyright © 1989-2006 Battelle Energy Alliance