![]() |
|
![]() |
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 ID of 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 AddItem
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL;
CONST Parent : TreeItemHandle;
CONST insAfter : TreeItemHandle;
CONST Value : ARRAY OF CHAR;
CONST bitmapIndex : CARDINAL;
CONST selectedIndex : CARDINAL;
VAR thisItem : TreeItemHandle);
(**
AddItem - Adds an item to a SageTree.
This routine will add an item to a SageTree.
CALLING SEQUENCE -
AddItem (dialogID, controlID, parent, insAfter, value, bitmapIndex,
thisItem)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
parent : TreeItemHandle
The handle of the parent of the item to add. Set to NIL
if adding an item to the root of the tree.
insAfter : TreeItemHandle
The handle of the sibling prior to the item to add. Mey be
one of the following types -
TreeRoot The start of the tree.
TreeFirst The first item in the tree.
TreeLast The last item in the tree.
value : ARRAY OF CHAR
The item text.
bitmapIndex : CARDINAL
If the bitmap style in the resource is set to <user defined>,
then set this to the List ID of the bitmap to show with the
item. Otherwise, set to 0.
selectedIndex : CARDINAL
If the bitmap style in the resource is set to <user defined>,
then set this to the List ID of the bitmap to show with when
the item is selected. Otherwise, set to bitmapIndex.
EXIT -
thisItem : TreeItemHandle
The handle of the item which has been added.
*)
PROCEDURE DeleteItem
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL;
CONST thisItem : TreeItemHandle);
(**
DeleteItem - Deletes an item from a SageTree.
This routine will delete an item from a SageTree.
CALLING SEQUENCE -
DeleteItem (dialogID, controlID, thisItem)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
thisItem : TreeItemHandle
The handle of the item to delete.
EXIT -
None
*)
PROCEDURE GetBmpIndex
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS) : CARDINAL;
(**
GetBmpIndex - Get the index position of bitmap requested by a FindItem message.
The FindItem message is sent when the programmer has specified in
the resource file that they wish to use user defined bitmaps.
The SageTree will build a list of all the bitmaps to be used with
the SageTree control. This list will contain a list index (0 .. n-1)
and its associated bitmap ID from the resource file. The programmer
will use the list index to refer to the bitmap when adding items
to the tree. The FindItem message is received once for each bitmap
the programmer specified in the SetRange routine. This routine is
used to get the list index of the bitmap that the SageTree is
requesting. The programmer uses this index to determine which bitmap
ID should be sent to the SageTree using the SetBmpID routine. Note :
the bitmaps defined in the resource must be of size 16X16.
CALLING SEQUENCE -
index := GetBmpIndex (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 -
index : CARDINAL
The list index of the bitmap that the SageTree is requesting.
*)
PROCEDURE GetItemHandle
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL;
CONST thisItem : TreeItemHandle;
CONST itemRequest : ItemRequestType;
VAR returnItem : TreeItemHandle);
(**
GetItemHandle - Gets the handle of the specified tree item.
This routine provides the ability to retreive the handle to an item
in the tree control.
CALLING SEQUENCE -
GetItemHandle (dialogID, controlID, thisItem, itemRequest, returnItem)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
thisItem : TreeItemHandle
The handle to a tree item which may be used as a point of
reference in performing the search requested by the
itemRequest flag.
itemRequest : ItemRequestType
Must be one of the following -
Selected - Returns the handle of the currently selected
tree item.
FirstChild - Returns the handle of the first child item.
DropTarget - Returns the handle of the item which is the target
of a drag and drop operation.
FirstVisible - Returns the handle of the first visible item.
NextSibling - Returns the handle of the next sibling of the
item identified by the thisItem handle.
NextVisible - Returns the handle of the next visible item
following the item specified by the thisItem
handle.
Parent - Returns the handle of the parent of the item
specified by the thisItem handle.
PreviousSibling - Returns the handle of the previous sibling of
the item identified by the thisItem handle.
PreviousVisible - Returns the handle of the visible item previous
to the item specified by the thisITem handle.
Root - Returns the handle of the topmost item in the
tree control.
EXIT -
returnItem : TreeItemHandle
The handle of the requested tree item.
*)
PROCEDURE GetChild
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL;
CONST thisItem : TreeItemHandle;
VAR child : TreeItemHandle);
PROCEDURE GetItemInfo
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL;
CONST thisItem : TreeItemHandle;
VAR Parent : TreeItemHandle;
VAR insAfter : TreeItemHandle;
VAR Value : ARRAY OF CHAR);
(**
GetItemInfo - Get information about a SageTree item.
This routine will return the parent, sibling, and value of an
item in a SageTree.
CALLING SEQUENCE -
GetItemInfo (dialogID, controlID, thisItem, parent, insAfter, value)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
thisItem : TreeItemHandle
The handle of the item to get information about.
EXIT -
parent : TreeItemHandle
The handle of the parent of the item.
insAfter : TreeItemHandle
The handle of the sibling prior to the item.
value : ARRAY OF CHAR
The text string associated with the tree item.
*)
PROCEDURE GetSelectedItemInfo
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS;
VAR Parent : TreeItemHandle;
VAR insAfter : TreeItemHandle;
VAR thisItem : TreeItemHandle;
VAR Value : ARRAY OF CHAR;
VAR bitmapIndex : CARDINAL;
VAR selectedIndex : CARDINAL);
(**
GetSelectedItemInfo - Get information about the selected SageTree item.
The SelectedChange, ExpandItem, or CollapseItem message is sent when the user
has selected, expanded, or collapsed an item in the SageTree. This routine can
be used to get information about the item which has been selected.
CALLING SEQUENCE -
GetSelectedITemInfo (msgType, msgData, parent, insAfter, thisItem, value,
bitmapIndex)
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 -
parent : TreeItemHandle
The handle of the parent of the selected item.
insAfter : TreeItemHandle
The handle of the sibling prior to the selected item.
thisItem : TreeItemHandle
The handle of the selected item.
value : ARRAY OF CHAR
The text string associated with the selected item.
bitmapIndex : CARDINAL
The bitmap list index of the selected item.
selectedIndex : CARDINAL
The bitmap list index of the bitmap used when the selected item is in the
selected state.
*)
PROCEDURE GetSelectedItemChild
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS;
VAR child : TreeItemHandle);
PROCEDURE ModifyItemBitmaps
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL;
CONST thisItem : TreeItemHandle;
CONST bitmapIndex : CARDINAL;
CONST selectedIndex : CARDINAL);
(**
ModifyItemBitmaps - Modifies item bitmaps in a SageTree.
This routine will replace the bitmaps in an item in
a SageTree.
CALLING SEQUENCE -
ModifyItemBitmaps (dialogID, controlID, thisItem, bitmapIndex, selectedIndex)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
thisItem : TreeItemHandle
The handle of the item to modify.
bitmapIndex : CARDINAL
The bitmap list index of the item.
selectedIndex : CARDINAL
The bitmap list index of the bitmap used when the item is in the
selected state.
EXIT -
None
*)
PROCEDURE ModifyItem
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL;
CONST thisItem : TreeItemHandle;
CONST Value : ARRAY OF CHAR);
(**
ModifyItem - Modifies an item in a SageTree.
This routine will replace the text in an item in
a SageTree.
CALLING SEQUENCE -
ModifyItem (dialogID, controlID, thisItem, value)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
thisItem : TreeItemHandle
The handle of the item to modify.
value : ARRAY OF CHAR
The text string to be associated with the tree item.
EXIT -
None
*)
PROCEDURE SelectItem
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL;
CONST thisItem : TreeItemHandle);
(**
SelectItem - Selects an item in a SageTree.
This routine will select an item in a SageTree. The SageTree will
be scrolled so that the item is visible.
CALLING SEQUENCE -
SelectItem (dialogID, controlID, thisItem)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
thisItem : TreeItemHandle
The handle of the item to select.
EXIT -
None
*)
PROCEDURE ExpandTheItem
(CONST dialogID : CARDINAL;
CONST controlID : CARDINAL;
CONST thisItem : TreeItemHandle;
CONST expandType : ExpandMethod);
(**
ExpandTheItem - Expands or collapse the specified item in a SageTree.
This routine will ex[and the specified item in a SageTree.
CALLING SEQUENCE -
ExpandTheItem (dialogID, controlID, thisItem, expandType)
ENTRY -
dialogID : CARDINAL
The number of the dialog box or window containing the
control.
controlID : CARDINAL
The control resource identifier.
thisItem : TreeItemHandle
The handle of the item to select.
expandType : ExpandMethod
The method to be used to expand/collapse the tree.
If expandType is "Collapse" then the item is collapsed.
If expandType is "CollapseReset" then the item is collapsed and children removed.
If expandType is "Expand" then the item is expanded.
If expandType is "Toggle" then the item is toggled.
EXIT -
None
*)
PROCEDURE SetBmpID
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS;
CONST userBmpID : CARDINAL);
(**
SetBmpID - Set the bitmap ID of the bitmap requested by a FindItem message.
The FindItem message is sent when the programmer has specified in
the resource file that they wish to use user defined bitmaps.
The SageTree will build a list of all the bitmaps to be used with
the SageTree control. This list will contain a list index (0 .. n-1)
and their associated bitmap IDs from the resource file. The
programmer will use the list index to refer to the bitmap when
adding items to the tree. The FindItem message is received once
for each bitmap the programmer specified in the SetRange routine.
This routine is used to set the bitmap ID at the list position
specified by the return value of the routine GetBmpIndex.
CALLING SEQUENCE -
SetBmpID (msgType, msgData, userBmpID)
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.
userBmpID : CARDINAL
The resource ID of the bitmap to be placed in the bitmap list
at the position indicated by GetBmpIndex.
EXIT -
None
N/A
*)
PROCEDURE SetBmpIDInstance
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS;
CONST userBmpID : CARDINAL;
CONST bInstance : WIN32.HINSTANCE);
(**
SetBmpIDInstance - Set the bitmap ID of the bitmap requested by a FindItem message.
The FindItem message is sent when the programmer has specified in
the resource file that they wish to use user defined bitmaps.
The SageTree will build a list of all the bitmaps to be used with
the SageTree control. This list will contain a list index (0 .. n-1)
and their associated bitmap IDs from the resource file. The
programmer will use the list index to refer to the bitmap when
adding items to the tree. The FindItem message is received once
for each bitmap the programmer specified in the SetRange routine.
This routine is used to set the bitmap ID at the list position
specified by the return value of the routine GetBmpIndex.
This procedure differs from the 'SetBmpID' procedure by allowing
the specification of the program or DLL instance handle associated
with the BMP ID if other than the current program.
CALLING SEQUENCE -
SetBmpIDInstance (msgType, msgData, userBmpID, bInstance))
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.
userBmpID : CARDINAL
The resource ID of the bitmap to be placed in the bitmap list
at the position indicated by GetBmpIndex.
bInstance : WIN32.HINSTANCE
The instance handle of the program/DLL containing the
referenced BMP ID.
EXIT -
None
N/A
*)
PROCEDURE SetRange
(CONST msgType : DWSpec.DisplayMessageType;
CONST msgData : SYSTEM.ADDRESS;
CONST userBmpTotal : CARDINAL);
(**
SetRange - Set the number of user defined bitmaps to be used with a SageTree.
The Range message is sent when the programmer has specified in the
resource file that they wish to use user defined bitmaps. This
routine is used to return the number of bitmaps that they plan to use
for the SageTree.
CALLING SEQUENCE -
SetRange (msgType, msgData, userBMPTotal)
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.
userBMPTotal : CARDINAL
The number of user defined bitmaps that will be used with the
SageTree.
EXIT -
None
*)
Send mail to
warren.merrill@inl.gov
with questions or comments about this web site.
Copyright © 1989-2006 Battelle Energy Alliance