![]() |
|
![]() |
type ControlMessage is (Unknown, -- Unknown command
DataChange, -- SageEdit control value has changed
EnterControl, -- SageEdit control received focus
ExitControl, -- SageEdit control lost focus
ValidateChar, -- Character needs validation
-- related procedures -> GetValidateCharData, SetValidationStatus
ValidateValue); -- Value needs validation
-- related procedures -> GetValidateValueData, SetValidationStatus
subtype EditColorType is ModSys.S_Natural;
DarkBlue : constant EditColorType := 8_388_608; -- RGB(0,0,128) Low Intensity Blue
DarkGreen : constant EditColorType := 32_768; -- RGB(0,128,0) Low Intensity Green
DarkRed : constant EditColorType := 128; -- RGB(128,0,0) Low Intensity Red
DarkCyan : constant EditColorType := 8_421_376; -- RGB(0,128,128) Low Intensity Cyan
DarkMagenta : constant EditColorType := 8_388_736; -- RGB(128,0,128) Low Intensity Magenta
DarkYellow : constant EditColorType := 32_896; -- RGB(128,128,0) Low Intensity Yellow
DarkGray : constant EditColorType := 8_421_504; -- RGB(128,128,128) High Intensity Black
Black : constant EditColorType := 0; -- RGB(0,0,0) Low Intensity Black
Gray : constant EditColorType := 12_632_256; -- RGB(192,192,192) Low Intensity White
Blue : constant EditColorType := 16_711_680; -- RGB(0,0,255) High Intensity Blue
Green : constant EditColorType := 65_280; -- RGB(0,255,0) High Intensity Green
Red : constant EditColorType := 255; -- RGB(255,0,0) High Intensity Red
Cyan : constant EditColorType := 16_776_960; -- RGB(0,255,255) High Intensity Cyan
Magenta : constant EditColorType := 16_711_935; -- RGB(255,0,255) High Intensity Magenta
Yellow : constant EditColorType := 65_535; -- RGB(255,255,0) High Intensity Yellow
White : constant EditColorType := 16_777_215; -- RGB(255,255,255) High Intensity White
Default : constant EditColorType := 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 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 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 Flush
(dialogID : in ModSys.S_Natural;
controlID : in ModSys.S_Natural);
procedure GetText
(dialogID : in ModSys.S_Natural;
controlID : in ModSys.S_Natural;
Text : in out string);
--*
-- GetText - Retrieves the text from the control.
--
--
-- This routine will return the text contained in the specified
-- SageEdit control.
--
-- WARNING - This routine ALWAYS puts a null character at the end of the
-- text even if that means overwriting the last character. For example
-- if you pass in a string that is eight characters long and the user has
-- entered eight characters of text you will get back seven characters and
-- a null. You should always pass a string that allows for the full text
-- length plus one null character.
--
-- CALLING SEQUENCE -
--
-- GetText (DialogId, ControlId, 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.
--
-- EXIT -
--
-- text : string
-- The text from the control.
--
procedure GetValidateCharData
(msgType : in DisplayW.DisplayMessageType;
msgData : in System.Address;
Table : in out string;
Field : in out string;
Value : in out string;
offset : in out ModSys.S_Integer16);
--*
-- GetValidateCharData - Retrieve character validation info.
--
--
-- The SageEdit control sends a ValidateChar message when the ValidateChar
-- resource option is enabled and a character has been entered into the
-- control. The message is sent to allow the programmer to validate the
-- character. This routine will allow the programmer to retrieve the
-- data need to perform the validation. The programmer should respond
-- with the SetValidationStatus routine to inform the SageEdit control of
-- the status of the validation.
--
-- CALLING SEQUENCE -
--
-- GetValidateCharData (msgType, msgData, table, field, value, offset)
--
-- 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 -
--
-- table : string
-- The Sage relation associated with the SageEdit control.
--
-- field : string
-- The Sage field associated with the SageEdit control.
--
-- value : string
-- Contains the ENTIRE string value of the control as it will appear
-- AFTER the keystroke is accepted. For example if the field contains
-- the value AB and the user hits the character C at the end of the
-- field then value is returned as ABC.
--
-- offset : ModSys.S_Integer16
-- The offset (NOT the position) into the string where the character just
-- hit appears. For example if a user is sitting in an empty control and
-- hits a key the value of offset is 0. If the control contains AB, the
-- cursor is at the end of that string and the user hits a key the value
-- of offset is 2.
--
procedure GetValidateValueData
(msgType : in DisplayW.DisplayMessageType;
msgData : in System.Address;
Table : in out string;
Field : in out string;
Value : in out string);
--*
-- GetValidateValueData - Retrieves field validation info.
--
--
-- The SageEdit control sends a ValidateValue message when the
-- ValidateValue resource option is enabled and the SageEdit controlis
-- about to write its value out to the memory record. This can occur
-- when the SageEdit control has lost user input focus or when the form it
-- is on is about to be closed. The message is sent to allow the
-- programmer the chance to validate the value. This routine will allow
-- the programmer to retrieve the data needed to perform the validation.
-- The programmer should respond with the SetValidationStatus routine
-- to inform the SageEdit control of the status of the validation.
--
-- CALLING SEQUENCE -
--
-- GetValidateValueData (msgType, msgData, table, field, 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.
--
-- EXIT -
--
-- table : string
-- The Sage relation associated with the SageEdit control.
--
-- field : string
-- The Sage field associated with the SageEdit control.
--
-- value : string
-- The text string to validate.
--
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 cause
-- the control to reload its contents from the current memory record.
--
-- 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
--
procedure SetColors
(dialogID : in ModSys.S_Natural;
controlID : in ModSys.S_Natural;
textColor : in EditColorType;
bkGndColor : in EditColorType);
--*
-- SetColors - Sets the text and background colors of the control.
--
--
-- This routine will change the text and background colors of
-- the SageEdit control.
--
-- CALLING SEQUENCE -
--
-- SetColors (DialogId, ControlId, textColor, bkGndColor)
--
-- ENTRY -
--
-- DialogId : Modsys.S_Natural
-- The number of the dialog box or window containing the
-- control.
--
-- ControlId : Modsys.S_Natural
-- The control resource identifier.
--
-- textColor : EditColorType
-- The color for the text. Must be one of the EditColorTypes.
-- The Default color is determined by the current Windows
-- configuration.
--
-- bkGndColor : EditColorType
-- The color for the background. Must be one of the
-- EditColorTypes. The Default color is determined by the
-- current Windows configuration.
--
-- EXIT -
--
-- None
-- N/A
--
procedure SetText
(dialogID : in ModSys.S_Natural;
controlID : in ModSys.S_Natural;
Text : in string);
--*
-- SetText - Sets the text of the control.
--
--
-- This routine will place the given text string in the specified SageEdit
-- control.
--
-- CALLING SEQUENCE -
--
-- SetText (DialogId, ControlId, 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.
--
-- text : string
-- The text to set in the control.
--
-- EXIT -
--
-- None
-- N/A
--
procedure SetUpperCaseOnly
(dialogID : in ModSys.S_Natural;
controlID : in ModSys.S_Natural);
--*
-- SetUpperCaseOnly - Sets the edit style for upper case only.
--
--
-- This routine will set the edit style for upper case only.
--
-- CALLING SEQUENCE -
--
-- SetUpperCaseOnly (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 SetLowerCaseOnly
(dialogID : in ModSys.S_Natural;
controlID : in ModSys.S_Natural);
--*
-- SetLowerCaseOnly - Sets the edit style for lower case only.
--
--
-- This routine will set the edit style for lower case only.
--
-- CALLING SEQUENCE -
--
-- SetLowerCaseOnly (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 SetValidationStatus
(msgType : in DisplayW.DisplayMessageType;
msgData : in System.Address;
valid : in boolean);
--*
-- SetValidationStatus - Inform edit control of validation status.
--
--
-- The SageEdit control sends a ValidateChar or ValidateValue message to
-- give the programmer a chance to validate a character or value in
-- the control. This routine can be used to inform the SageEdit control
-- of the results of the validation.
--
-- CALLING SEQUENCE -
--
-- SetValidationStatus (msgType, msgData, valid)
--
-- 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.
--
-- valid : boolean
-- The status of the validation. If valid is TRUE, the SageEdit
-- control will accept the character or value. If valid is FALSE,
-- the SageEdit control will highlight the invalid character or
-- value and not allow the user to leave the SageEdit control.
--
-- 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