![]() |
|
![]() |
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 Reset
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL);
(**
Reset - Resets the control.
This routine will cause the control to be reset. If the control
is associated with a Sage table and field, the current contents
of the memory record will be reflected.
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 ResetFile
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL;
CONST filePath : ARRAY OF CHAR);
(**
ResetFile - Resets the file which a control is displaying.
This routine will cause a SageRich control which is displaying a file
to reset and display a different file. The current file will be saved
before the new file is loaded.
CALLING SEQUENCE -
ResetFile (dialogID, controlID, filePath)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
filePath : ARRAY OF CHAR
The path and file name of the new file to load. This value is
limited to 128 characters.
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 CancelAutoSave
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS);
(**
CancelAutoSave - Tells the control to NOT save the data.
The SageRich control sends a AutoSave message when the Sage Data Field
option has been selected in the resource file and the control is about
to save its data. This will occur either when the control loses focus
or when the dialog is about to close. This routine can be used to
tell the control not to save any changes which have been made to the data.
If this procedure is not called, the default response is to save the data.
CALLING SEQUENCE -
CancelAutoSave (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 -
None
N/A
*)
PROCEDURE GetDataPosition
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS;
VAR LoadPos : CARDINAL;
VAR LoadMax : CARDINAL);
(**
GetDataPosition - Retrieves position and max size of data request.
The SageRich control sends a GetData message when the User Supplied
Data option has been selected in the resource file and the controls
needs data. This routine can be used to determine what position in
the data block the SageRich control is requesting data from and the
max size of data that can be returned in this iteration.
CALLING SEQUENCE -
GetDataPosition (msgType, msgData, LoadPos, LoadMax)
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 -
LoadPos : CARDINAL
The current position in the buffer needing data.
LoadMax : CARDINAL
The max size of data that can be returned to the control.
*)
PROCEDURE GetDataSize
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS) : CARDINAL;
(**
GetDataSize - Get the size of the data.
The SageRich control sends a SaveData message when the User Supplied
Data option has been selected in the resource and it needs to write
out its data. This routine can be used to determine how much data the
SageRich control wishes to save.
CALLING SEQUENCE -
dataSize := GetDataSize (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 -
dataSize : CARDINAL
The size of the data block to save.
*)
PROCEDURE LoadData
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS;
CONST dataPos : CARDINAL;
CONST DataSize : CARDINAL;
CONST Data : SYSTEM.ADDRESS);
(**
LoadData - Sends data to a SageRich Control.
The SageRich control sends a GetData message when the User Supplied
Data option has been selected in the resource file and the controls
needs data. This routine can be used to send data to a SageRich
control. As the SageRich control may send the GetData message
many times, the programmer should use the GetDataPosition routine to
determine what the starting position of the requested data is.
NOTE - If the date being sent is larger than the LoadMax value
returned from the CtrlRich.GetDataPosition routine then the
data exceeding the value will be lost.
CALLING SEQUENCE -
LoadData (msgType, msgData, dataPos, dataSize, data)
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.
dataPos : CARDINAL
The position in the SageRich control data for the current data
block. (1 .. N)
dataSize : CARDINAL
The size of the data block being returned.
data : SYSTEM.ADDRESS
The address of the data being returned.
*)
PROCEDURE RetrieveData
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS;
VAR dataPos : CARDINAL;
VAR DataSize : CARDINAL;
CONST Data : SYSTEM.ADDRESS);
(**
RetrieveData - Gets data from a SageRich Control.
The SageRich control sends a SaveData message when the User Supplied
Data option has been selected in the resource file and the controls
needs to write out its data. This routine can be used to get the data
which the control is writing out. As the SageRich control may send
the SaveData message many times, the programmer should use the
GetDataSize routine each time to determine what size of data buffer needs
to be allocated.
CALLING SEQUENCE -
RetrieveData (msgType, msgData, dataPos, dataSize, data)
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 -
dataPos : CARDINAL
The position in the SageRich control data for the current data
block. (1 .. N)
dataSize : CARDINAL
The size of the data block to write out.
data : SYSTEM.ADDRESS
The address of the data being written out.
*)
PROCEDURE ForceSave
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL);
(**
ForceSave - Forces a save of the data RichEdit is working with.
This routine will cause a SageRich control which is displaying a file
to save the data it is displaying.
NOTE - This routine currently only does this if the control is defined
as Sage data or User data. It does not work if the control is
defined as File data.
CALLING SEQUENCE -
ForceSave (dialogID, controlID)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
EXIT -
None
N/A
*)
PROCEDURE PrintContent
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL);
(**
PrintContent - Allows printing of a richedit control.
This routine will allow a SageRich control which is displaying to
be printed.
CALLING SEQUENCE -
PrintContent (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 SetColors
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL;
CONST textColor : RTColorType;
CONST bkGndColor : RTColorType);
(**
SetColors - Sets the text and background colors of the control.
This routine will change the text and background colors of
the SageRich control.
CALLING SEQUENCE -
SetColors (dialogID, controlID, textColor, bkGndColor)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
textColor : RTColorType
The color for the text. Must be one of the RTColorTypes.
The Default color is determined by the current Windows
configuration.
bkGndColor : RTColorType
The color for the background. Must be one of the
RTColorTypes. The Default color is determined by the
current Windows configuration.
EXIT -
None
*)
PROCEDURE FindText
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL;
CONST FindRecord : FindStruct;
CONST highlight : BOOLEAN) : INTEGER;
(**
FindText - Finds the text specified in findRecord and highlights it.
CALLING SEQUENCE -
FindText (dialogID, controlID, findRecord)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
findRecrd : FindStruct
A FindStruct structure contianing information about the find
operation.
highlight : BOOLEAN
Determines whether the searched text is highlighted
EXIT -
Return value
< 0 = The text was not found in the dialog box within the given
search range
>= 0 = The starting position of the text within the control.
*)
PROCEDURE ReplaceText
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL;
CONST replaceRecord : ReplaceStruct;
CONST highlight : BOOLEAN);
(**
ReplaceText - Finds and replaces the text specified in replaceRecord.
If the replaceAll flag is set in the replaceRecord structure then all
occurrences of the find string in the entire control are replaced. If
the flag is not set then the current selection is replaced. The current
selection must be the find string or the replace will no take place.
After the replace the next occurence of the find string will be
highlighted.
CALLING SEQUENCE -
ReplaceText (dialogID, controlID, replaceRecord)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
replaceRecrod : ReplaceStruct
A ReplaceStruct structure contianing information about the find
and replace operation.
highlight : BOOLEAN
Determines whether the next match is highlighted
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