Foundation 6

Fnd_Tlbr

31 shared methods.

Fnd_Tlbr_Button_Add

Fnd_Tlbr_Button_Add (name; buttonText; iconName; method{; keystroke})

Adds a new button to the toolbar.

ParameterTypeDirectionDescription
buttonNameTextinA unique name for the button object
buttonLabelTextinThe button label
iconNameTextinA Picture Library name for the icon
methodTextinThe method to run when clicked
shortcutTextinThe Command/Ctrl keyboard equivalent (optional)

Fnd_Tlbr_Button_Count

Fnd_Tlbr_Button_Count --> Longint

Returns the number of buttons in the toolbar

ParameterTypeDirectionDescription
$0LongintoutCount

Fnd_Tlbr_Button_Enabled

Fnd_Tlbr_Button_Enabled (buttonName; state)

Set the enabled state of the toolbar item.

ParameterTypeDirectionDescription
objectNameTextinThe button name to modify
enabledBooleaninTrue to enable the button

Fnd_Tlbr_Button_Icon

Fnd_Tlbr_Button_Icon (button name{; icon name}) --> Text

Call this method to specify the name of a picture library image to use as the button's icon.

ParameterTypeDirectionDescription
buttonNameTextinThe name of the button to modify
iconNameTextinThe name of the picture to use as the icon (optional)
ResultTextoutThe name of the button's icon

Fnd_Tlbr_Button_Insert

Fnd_Tlbr_Button_Insert (beforeButton; name; buttonText; iconName; method{; keystroke})

Inserts a new button to the toolbar.

ParameterTypeDirectionDescription
beforeButtonTextinThe button in the position to insert the new button
buttonNameTextinA unique name for the button object
buttonLabelTextinThe button label
iconNameTextinA Picture Library name for the icon
methodTextinThe method to run when clicked
shortcutTextinThe Command/Ctrl keyboard equivalent (optional)
ResultoutNothing

Fnd_Tlbr_Button_Label

Fnd_Tlbr_Button_Label (button name{; label}) --> Text

Returns the label for the button with the specified name.

If a label is passed, this method first sets the button label.

ParameterTypeDirectionDescription
objectNameTextinThe button name
labelTextinThe new button label (optional)
ResultTextoutThe button label

Fnd_Tlbr_Button_Menu

Fnd_Tlbr_Button_Menu (button name; ->menu items array)

Adds a menu to the specified button.

ParameterTypeDirectionDescription
buttonNameTextinThe button name
menuItemsPointerinArray of menu items

Fnd_Tlbr_Button_Method

Fnd_Tlbr_Button_Method (button name{; method name}) --> Text

Call this method to specify the name of the method to call when the button is clicked.

ParameterTypeDirectionDescription
buttonNameTextinThe name of the button to modify
methodNameTextinThe name of the method to call (optional)
ResultTextoutThe name of the method called by the button Toolbar Component - © mitchenall.com 2002

Fnd_Tlbr_Button_Name

Fnd_Tlbr_Button_Name (index) --> name

Returns the name of the nth button in the toolbar.

ParameterTypeDirectionDescription
indexIndex :The index number of the buttton (1 - count)in
ResultTextoutButton name

Fnd_Tlbr_Button_OnClicked

Fnd_Tlbr_Button_OnClicked (->form button object)

Called whenever a button is clicked. Each button in the toolbar has the following script for their On Clicked event.... Fnd_Tlbr_Button_OnClicked (Self)

ParameterTypeDirectionDescription
buttonClickedPointerinA pointer to the clicked picture button object

Fnd_Tlbr_Button_OnShortcut

Fnd_Tlbr_Button_OnShortcut (shortcut key)

Called from the On Clicked form event of all of the shortcut key buttons.

ParameterTypeDirectionDescription
shortcutKeyTextinThe shortcut key code

Fnd_Tlbr_Button_Position

Fnd_Tlbr_Button_Position (button name; ->left; ->top; ->right; ->bottom)

Returns the coordinates of the specified button.

ParameterTypeDirectionDescription
buttonNameTextinThe name of the button
leftPointerinLongint to receive the left coordinate
topPointerinLongint to receive the top coordinate
rightPointerinLongint to receive the right coordinate
bottomPointerinLongint to receive the bottom coordinate

Fnd_Tlbr_Button_Remove

Fnd_Tlbr_Button_Remove (buttonName)

Call this method to remove the button with the specified name from the toolbar.

ParameterTypeDirectionDescription
buttonNameTextinThe name of the button to remove

Fnd_Tlbr_Button_Shortcut

Fnd_Tlbr_Button_Shortcut (buttonName; shortcutKey)

Associates a Command key shortcut with the button.

ParameterTypeDirectionDescription
buttonNameTextinA button name
shortcutKeyTextinThe shortcut letter to assign

Fnd_Tlbr_Clear

Fnd_Tlbr_Clear

Clears all items from the toolbar.

No parameters.

Fnd_Tlbr_CurrentButton

Fnd_Tlbr_CurrentButton ({button name}) --> Text

Sets and gets the button specified as the "current" button.

This is for the new Mac OS X style "Prefs" style button.

ParameterTypeDirectionDescription
newButtonNameTextinThe name of the button to make the current button (optional)
ResultTextoutThe name of the current button

Fnd_Tlbr_Divider_Add

Fnd_Tlbr_Divider_Add

Adds a divider line to the toolbar object list.

No parameters.

Fnd_Tlbr_Divider_GetPicture

Fnd_Tlbr_Divider_GetPicture (divider picture name) --> Picture

Returns the toolbar divider picture * 4 so it works as a button object.

This is the divider version of the Fnd_Bttn_GetPicture method.

ParameterTypeDirectionDescription
pictureNameTextinThe name of the toolbar divider picture
ResultPictureoutThe buttonized toolbar divider picture

Fnd_Tlbr_FormMethod

Fnd_Tlbr_FormMethod

To be called from any form method that inherits the toolbar form.

Expects the On Load and On Resize form events to be enabled.

No parameters.

Fnd_Tlbr_Info

Fnd_Tlbr_Info (label) --> Text

Returns requested information. See the Fnd_Gen_ComponentInfo method for more information.

ParameterTypeDirectionDescription
requestTextinInfo desired ("version" or "name")
ResultTextoutResponse

Fnd_Tlbr_Object_Draw

Fnd_Tlbr_Object_Draw (object number; variation; left offset; top offset)

Draws a toolbar object in the specified position. Doesn't actually do any drawing. It just moves a picture button into the right location and makes it visible.

ParameterTypeDirectionDescription
objectNumberTextinThe object number
variationTextinThe object's variation
leftOffsetLongintinThe left offset
topOffsetLongintinThe top offset

Fnd_Tlbr_Object_GetNumber

Fnd_Tlbr_Object_GetNumber (object name) --> Number

Returns the object number (array element number) for the specified object name.

ParameterTypeDirectionDescription
objectNameTextinA toolbar object name
ResultLongintoutThe array element number

Fnd_Tlbr_Platform

Fnd_Tlbr_Platform ({platform name}) --> Text

Sets and gets the toolbar platform name.

Can be: "Win" "Mac" "Auto" Only "Mac" or "Win" will be returned.

ParameterTypeDirectionDescription
requestedPlatformTextinThe platform to use (optional)
ResultTextoutThe selected platform

Fnd_Tlbr_Redraw

Fnd_Tlbr_Redraw

Updates the toolbar.

No parameters.

Fnd_Tlbr_SetHostVars

Fnd_Tlbr_SetHostVars (->pointer array; ->pointer array; ->text)

Called by the first toolbar button method of the Fnd_Tlbr_Toolbar form to pass some pointers to host variables to the component.

ParameterTypeDirectionDescription
hostPictureVariablesPointerinHost picture variables
hostPictureButtonsPointerinHost picture buttons
hostInfoVariablesPointerinHost info variables

Fnd_Tlbr_SetVariables

Fnd_Tlbr_SetVariables

Updates the toolbar variables depending on the current platform and size settings.

No parameters.

Fnd_Tlbr_ShortcutKeyName_Get

Fnd_Tlbr_ShortcutKeyName_Get (Character) --> Text

Because it's not easy putting the actual keycode into the buttons on the toolbar Master form for trapping shortcuts, we have names for some of them, and this routine converts the single character keycode into that name.

ParameterTypeDirectionDescription
keyCodeCharTextinThe Key Code character
ResultTextoutThe Key Code Alias Name //Author: Mark Mitchenall //Created: 16/4/02 at 2:20 AM //Toolbar Component - © mitchenall.com 2002 WBS 03 December 2024: Swap to var syntax for declarations ---------------------------------------------------- #DECLARE($keyCodeChar_t : Text)->$keyCodeName_t : Text ARRAY TEXT($keyCodeNames; 127) $keyCodeNames{3}:="Enter" $keyCodeNames{127}:="Del" $keyCodeNames{28}:="Left" $keyCodeNames{29}:="Right" $keyCodeNames{30}:="Up" $keyCodeNames{31}:="Down" $keyCodeNames{8}:="Backspace" $keyCodeNames{27}:="Esc" $keyCodeNames{Character code(".")}:="Period" If ((Character code($keyCodeChar_t[[1]])>0) & (Character code($keyCodeChar_t[[1]])<128)) If ($keyCodeNames{Character code($keyCodeChar_t[[1]])}#"") $keyCodeName_t:=$keyCodeNames{Character code($keyCodeChar_t[[1]])} Else $keyCodeName_t:=$keyCodeChar_t End if Else $keyCodeName_t:=$keyCodeChar_t End if

Fnd_Tlbr_StatusMessage

Fnd_Tlbr_StatusMessage ({new text}) --> Text

Allows for the getting and setting of the information text line displayed in the standard toolbar output form.

ParameterTypeDirectionDescription
newStatusTextinThe text to set for the info line (optional)
ResultTextoutThe text that's displayed in the info line.

Fnd_Tlbr_Style

Fnd_Tlbr_Style ({style name}) --> Text

Sets and gets the toolbar style name.

Can be: "Large" "Prefs" "Small1" "Small2"

ParameterTypeDirectionDescription
requestedStyleTextinThe style to use (optional)
ResultTextoutThe selected style

Fnd_Tlbr_UpdateBackground

Fnd_Tlbr_UpdateBackground

Updates the toolbar background.

No parameters.

Fnd_Tlbr_UpdateButtons

Fnd_Tlbr_UpdateButtons

Redraws the toolbar, but only if it needs it. If no code has been called which effects the toolbar, then there is no reason to redraw it.

No parameters.