skip to main content
OpenEdge Development: ADM Reference
Toolbar Objects and Their Methods and Properties : Toolbar methods for toolbar objects
 
Toolbar methods for toolbar objects
This section lists and describes the methods for Toolbar objects.
actionCanRun
Determines whether or not a target is valid and a procedure exists. If TRUE, the target is valid and the procedure exists.
Location: toolbar.p
Parameters:  
INPUT pcAction AS CHARACTER
The action of interest, of type RUN.
Returns: LOGICAL
Note: Called from buildMenu and createToolbar.
actionCaption
Override action class and caption.
Location: toolbar.p
Parameters:  
INPUT pcAction AS CHARACTER
The replacement action.
Returns: CHARACTER
Notes: None
actionCategoryIsHidden
Determines whether or not the category for an action is hidden. If TRUE, the category is hidden.
Location: toolbar.p
Parameters:  
INPUT pcAction AS CHARACTER
The action to be evaluated.
Returns: LOGICAL
Notes: None
actionChecked
Determines whether or not a call to getpropname returns a value that matches the actions checked. If TRUE , the call to getpropname returns a value that matches the actions checked.
Location: toolbar.p
Parameters:  
INPUT pcAction AS CHARACTER
Action ID of an action of type RUN.
Returns: LOGICAL
Note: Currently we only support logical values. If the get function does not exist, or the object is not valid, this function returns the undefined value.
actionLabel
Overrides the label of an action.
Location: toolbar.p
Parameters:  
INPUT pcAction AS CHARACTER
The overriding action.
Returns: CHARACTER
Notes: None
actionPublishCreate
Subscribes create events to objects.
Location: toolbar.p
Parameters:  
INPUT pcAction AS CHARACTER
The action of interest.
Returns: LOGICAL
Notes:  
*Subscribes both active and inactive/hidden objects. Target links are considered as multiple, source links as single.
*Using the publish/subscribe mechanism makes it possible to refer to SOURCE-PROCEDURE in the events.
actionTarget
Handle of the target. By default, this is the handle of CONTAINER-SOURCE.
Location: toolbar.p
Parameters:  
INPUT pcAction AS CHARACTER
The action of interest.
Returns: HANDLE
Note: Called by actions of type RUN and PROPERTY.
actionTooltip
Overrides the tooltip of an action.
Location: toolbar.p
Parameters:  
INPUT pcAction AS CHARACTER
The overriding action.
Returns: CHARACTER
Notes: None
buildAllMenus
Procedure that builds all submenu branches before the persistent trigger Menu-Drop creates them at the mouse click. As a result, accelerators (keyboard shortcuts) are enabled from startup.
Location: toolbar.p
Parameters: None
Notes: None
categoryActions
Returns the available actions for a specific category on this toolbar master.
Location: toolbar.p
Parameters:  
INPUT pcCategory AS CHARACTER
The category of interest. "*" means All ; the empty string means uncategorized.
Returns: CHARACTER
Note: Used in the Instance Property dialog to select MenuBands.
constructMenu
Runs from initializeMenu when toolbar instance is first instantiated. Returns TRUE if successful.
Location: toolbar.p
Parameters: None
Returns: LOGICAL
Note: This procedure must only be run ONCE and must be run before buildToolbar.
constructToolbar
Construct the toolbar from Repository data.
Location: toolbar.p
Parameters: None
Returns: LOGICAL
Note: This realizes bands read from the repository. Non-repository toolbars are created with createToolbar. Both use createToolbarAction to realize the actions/widgets.
createMenuTable
Creates a temp-table for a menu.
Location: toolbar.p
Parameters:  
INPUT pcParent AS CHARACTER
The unique action name of already-created parent. If blank, the table belongs to the menu bar.
INPUT pcName AS CHARACTER
A unique name.
INPUT phTarget AS HANDLE
The TARGET-PROCEDURE handle.
INPUT pcBefore AS CHARACTER
The unique action name of an already-created sibling.
Returns: LOGICAL PRIVATE
Note: This is done before it is built in order to be able to insert actions. Because some disable/enable actions might occur before initialization, some menu records might exist with "*" as parent.
createMenuTable2
Create the temp-table for a menu.
Location: toolbar.p
Parameters:  
INPUT pcParent AS CHARACTER
The unique action name of an existing parent, or the empty string if the new menu is the menu bar.
INPUT pcName AS CHARACTER
The name of the menu.
INPUT phTarget AS HANDLE
Where to create it.
INPUT pcBefore AS CHARACTER
The unique action name of an existing sibling.
Returns: HANDLE PRIVATE
Note: This is done before it is built in order to be able to insert actions. Because some disable and enable actions might take place BEFORE initialization, someMenu record might exist with "*" as parent.
createToolbar
Create a toolbar from non-Repository data.
Location: toolbar.p
Parameters:  
INPUT pcActions AS CHARACTER
Comma-separated list of actions or action-groups to include. RULE means a separator line.
Returns: LOGICAL
Notes: None
filterState
Procedure published from NAVIGATION-TARGET that enables the panel to filter action when it is linked.
Location: toolbar.p
Parameters:  
INPUT pcState AS CHARACTER
Valid value: FilterAvailable.
Notes: None
hideObject
Procedure that hides the object.
Location: toolbar.p
Parameters: None
Note: For sizing reasons, the label is not really a part of the object, but added as a text widget to the parent frame.
imageName
Returns the name of the specified button image.
Location: toolbar.p
Parameters:  
INPUT pcAction AS CHARACTER
The action of interest.
INPUT piNumber AS INTEGER
The image number, which can be 1 or 2.
Returns: CHARACTER
Note: This is published thru the container link and used mainly to validate that a FALSE value received in updateActive can be used to set UpdateActive. This is NOT intended to be called directly, but part of the logic that updates UpdateActive. These are the steps: (1) Updating objects publishes updateActive (TRUE or FALSE) to their container targets. (2) If the value is FALSE the container turns around and publishes this to ALL ContainerTargets before it is stored in UpdateActive. This way the value is only stored as FALSE if ALL contained objects are inactive.
initializeObject
Procedure that initializes the toolbar by creating all dynamic buttons and menus.
Location: toolbar.p
Parameters: None
Notes: None
insertMenu
Creates a set of menu items or submenus under a parent menu.
Location: toolbar.p
Parameters:  
INPUT pcParent AS CHARACTER
The unique action name of an already-inserted parent. Blank means this is the menu bar itself.
INPUT pcActions AS CHARACTER
Comma-separated list of actions or ActionGroups. The term RULE specifies that delimiter.
INPUT plExpand AS LOGICAL
If TRUE, all actions in the action group are added under this parent. If FALSE, action groups are created as submenus.
INPUT pcBefore AS CHARACTER
The unique action name of an already-inserted sibling.
Returns: LOGICAL
Notes: None
linkRuleBuffer
Creates the dynamic table used to check the rules against a target.
Location: toolbar.p
Parameters:  
pcLink AS CHAR
Name of the link.
phTarget AS Handle
Handle of any Target.
Returns: HANDLE
Notes:  
*The handle for the target is not created again if the link is changed. Instead, the same handle is used based on the assumption that all objects of the same type have the same API. If this is not TRUE, and the handle is not found, the data type is set to CHARACTER.
*This functionality is duplicated in panel.p.
linkState
Receives messages when an object linked to this object becomes active or activeTarget (when it is viewed) or inactive or inactiveTarget (when it is hidden).
Location: toolbar.p
Parameters:  
INPUT PARAMETER pcState AS CHARACTER
State of a linked object. Valid states are:
*active
*activeTarger
*inactive
*inactiveTarget
Note: Resets panel buttons to reflect the state of the object.
modifyDisabledActions
Modifies the DisabledActions property and makes it possible to permanently disable actions independent of state changes.
Location: toolbar.p
Parameters:  
INPUT pcMode AS CHARACTER
If ADD, adds the actions to the DisabledActions. If REMOVE, removes the actions from the DisabledActions.
INPUT pcActions AS CHARACTER
Comma-separated list of actions.
Returns: LOGICAL
Note: If pcMode = ADD, the actions are immediately disabled and subsequent calls to enableActions cannot enable them again. If pcMode = REMOVE, the actions that are removed from the list are enabled the next time they are called with enableActions.
onChoose
Procedure that is a persistent trigger code for dynamic menu and toolbar objects.
Location: toolbar.p
Parameters:  
INPUT pcName AS CHARACTER
The Action identifier.
Notes: None
onMenuDrop
Procedure used to identify what logic to execute when a submenu is dropped.
Location: toolbar.p
Parameters:  
INPUT pcAction AS CHARACTER
The action’s unique identifier.
Note: Added as a persistent trigger when the submenu is created.
onValueChanged
Procedure that is a persistent trigger for toggle menu-items.
Location: toolbar.p
Parameters:  
INPUT pcAction AS CHARACTER
Name of action.
Note: Added as a persistent trigger when the submenu is created. Currently supports only logical properties.
queryPosition
Procedure that captures state events for the associated query in the Panel’s NAVIGATION-TARGET. Invokes the setPanelState() function to store the new state in the object’s PanelState property. Then invokes the setButtons procedure to change the Panel.
Location: toolbar.p
Parameters:  
INPUT pcState AS CHARACTER
State of the Panel.
Note: For an UPDATE panel, first/last/notfirstorlast/only are all forms of recordAvailable.
repositionObject
Procedure that overrides default reposition. Because the coordinates are NOT assigned in design, the position only changes through direct manipulation and not when dropped in the container.
Location: toolbar.p
Parameters:  
INPUT pdRow AS DECIMA
INPUT pdCol AS DECIMAL
Note: The file toolbar.i defines EXCLUDE-repositionObject (for smart.i).
resetTargetActions
Procedure that resets target actions of some kind for an object.
Location: toolbar.p
Parameters:  
INPUT pcLink AS CHARACTER
The kind of actions to reset.
Notes: None
resetToolbar
Procedure that resets toolbar actions by calling resetTargetActions.
Location: toolbar.p
Parameters: None
Notes: None
resizeObject
Procedure that overrides the size after a resize. The only allowed sizing is shrinking to the last button.
Location: toolbar.p
Parameters:  
INPUT pd_height AS DECIMAL
INPUT pd_width AS DECIMAL
Note: Used internally. Calls to resizeObject are generated by the AppBuilder in adm-create-objects for objects that implement it. Having a resizeObject procedure is also the signal to the AppBuilder to allow the object to be resized at design time.
rowObjectState
Procedure that is published from COMMIT-TARGET to tell the panel when to enable/disable itself. The panel enables itself when there are uncommitted changes, and disables itself at other times.
Location: toolbar.p
Parameters:  
INPUT pcState AS CHARACTER
Valid values: NoUpdates, RowUpdated.
Note: This could be a property, but at present the solution is to just check the state of the Commit button.
runInfo
Procedure that returns the necessary information for RUN or PROPERTY.
Location: toolbar.p
Parameters:  
INPUT pcAction AS CHARACTER
Action Id where type = RUN.
OUTPUT pocProcedure AS CHARACTER
Target Procedure.
OUTPUT pocParam AS CHARACTER
Note: Encapsulates the logic that looks in the parent for this information, if it is not defined in the action itself.
storePendingSensitivity
Procedure used to store pending sensitivity settings used to resolve timing issues where sensitivity is set before the toolbar is built.
Location: toolbar.p
INPUT pcActions AS CHARACTER
INPUT plSensitive AS LOGICAL
Notes: None
targetActions
Returns the actions that apply to a specified target.
Location: toolbar.p
Parameters:  
INPUT pcLinkType AS CHARACTER
The type of target.
Returns: CHARACTER
Notes: None
updateActive
Procedure that is published from Toolbar-Target (the container) to signal that some of its objects have changed state. Runs resetToolbar in TARGET-PROCEDURE.
Location: toolbar.p
Parameters: None
Notes: None
updateCategoryLists
Procedure that updates the lists of available categories for the toolbar. Called from loadBands at design time. The result is stored in AvailMenuActions and AvailToolbarActions.
Location: toolbar.p
Parameters:  
INPUT pcBand AS CHARACTER
The band.
INPUT pcTopLevelType AS CHARACTER
The type of the band directly connected to the toolbar.
INPUT-OUTPUT pcMenuCategories AS CHARACTER
The list of categories.
INPUT-OUTPUT pcToolbarCategories AS CHARACTER
The list of categories.
Notes: None
updateState
Procedure that receives state message events related to record updates.
Location: toolbar.p
Parameters:  
INPUT pcState AS CHARACTER
Update state.
Notes: None
updateStates
Procedure that updates state temp-table whenever bands/actions are loaded. Adds actions to already-loaded states.
Location: toolbar.p
Parameters:  
INPUT pcState AS CHARACTER
The name of some state. Empty string means all.
Notes: None
viewHideActions
Procedure that sets actions to visible or hidden according to state (called from setbuttons). Loops through the pcViewActions list, then the pcHideActions.
Location: toolbar.p
Parameters:  
INPUT pcViewActions AS CHARACTER
List of actions to be made visible.
INPUT pcHideActions AS CHARACTER
List of actions to be made HIDDEN.
Note: For buttons we simply hide/view existing buttons and then remove them into new positions. For menu items we must reconstruct any submenus that have been modified as menu items do not have a hidden attribute.
viewObject
Procedure used to view an object. The purpose for the override is to add the menu bar handle to the window.
Location: toolbar.p
Parameters: None
Notes: None