Fnd_Tlbr
31 shared methods.
- Fnd_Tlbr_Button_Add
- Fnd_Tlbr_Button_Count
- Fnd_Tlbr_Button_Enabled
- Fnd_Tlbr_Button_Icon
- Fnd_Tlbr_Button_Insert
- Fnd_Tlbr_Button_Label
- Fnd_Tlbr_Button_Menu
- Fnd_Tlbr_Button_Method
- Fnd_Tlbr_Button_Name
- Fnd_Tlbr_Button_OnClicked
- Fnd_Tlbr_Button_OnShortcut
- Fnd_Tlbr_Button_Position
- Fnd_Tlbr_Button_Remove
- Fnd_Tlbr_Button_Shortcut
- Fnd_Tlbr_Clear
- Fnd_Tlbr_CurrentButton
- Fnd_Tlbr_Divider_Add
- Fnd_Tlbr_Divider_GetPicture
- Fnd_Tlbr_FormMethod
- Fnd_Tlbr_Info
- Fnd_Tlbr_Object_Draw
- Fnd_Tlbr_Object_GetNumber
- Fnd_Tlbr_Platform
- Fnd_Tlbr_Redraw
- Fnd_Tlbr_SetHostVars
- Fnd_Tlbr_SetVariables
- Fnd_Tlbr_ShortcutKeyName_Get
- Fnd_Tlbr_StatusMessage
- Fnd_Tlbr_Style
- Fnd_Tlbr_UpdateBackground
- Fnd_Tlbr_UpdateButtons
Fnd_Tlbr_Button_Add
Fnd_Tlbr_Button_Add (name; buttonText; iconName; method{; keystroke})
Adds a new button to the toolbar.
| Parameter | Type | Direction | Description |
|---|---|---|---|
buttonName | Text | in | A unique name for the button object |
buttonLabel | Text | in | The button label |
iconName | Text | in | A Picture Library name for the icon |
method | Text | in | The method to run when clicked |
shortcut | Text | in | The Command/Ctrl keyboard equivalent (optional) |
Fnd_Tlbr_Button_Count
Fnd_Tlbr_Button_Count --> Longint
Returns the number of buttons in the toolbar
| Parameter | Type | Direction | Description |
|---|---|---|---|
$0 | Longint | out | Count |
Fnd_Tlbr_Button_Enabled
Fnd_Tlbr_Button_Enabled (buttonName; state)
Set the enabled state of the toolbar item.
| Parameter | Type | Direction | Description |
|---|---|---|---|
objectName | Text | in | The button name to modify |
enabled | Boolean | in | True 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.
| Parameter | Type | Direction | Description |
|---|---|---|---|
buttonName | Text | in | The name of the button to modify |
iconName | Text | in | The name of the picture to use as the icon (optional) |
Result | Text | out | The 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.
| Parameter | Type | Direction | Description |
|---|---|---|---|
beforeButton | Text | in | The button in the position to insert the new button |
buttonName | Text | in | A unique name for the button object |
buttonLabel | Text | in | The button label |
iconName | Text | in | A Picture Library name for the icon |
method | Text | in | The method to run when clicked |
shortcut | Text | in | The Command/Ctrl keyboard equivalent (optional) |
Result | out | Nothing |
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.
| Parameter | Type | Direction | Description |
|---|---|---|---|
objectName | Text | in | The button name |
label | Text | in | The new button label (optional) |
Result | Text | out | The button label |
Fnd_Tlbr_Button_Menu
Fnd_Tlbr_Button_Menu (button name; ->menu items array)
Adds a menu to the specified button.
| Parameter | Type | Direction | Description |
|---|---|---|---|
buttonName | Text | in | The button name |
menuItems | Pointer | in | Array 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.
| Parameter | Type | Direction | Description |
|---|---|---|---|
buttonName | Text | in | The name of the button to modify |
methodName | Text | in | The name of the method to call (optional) |
Result | Text | out | The 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.
| Parameter | Type | Direction | Description |
|---|---|---|---|
index | Index :The index number of the buttton (1 - count) | in | |
Result | Text | out | Button 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)
| Parameter | Type | Direction | Description |
|---|---|---|---|
buttonClicked | Pointer | in | A 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.
| Parameter | Type | Direction | Description |
|---|---|---|---|
shortcutKey | Text | in | The shortcut key code |
Fnd_Tlbr_Button_Position
Fnd_Tlbr_Button_Position (button name; ->left; ->top; ->right; ->bottom)
Returns the coordinates of the specified button.
| Parameter | Type | Direction | Description |
|---|---|---|---|
buttonName | Text | in | The name of the button |
left | Pointer | in | Longint to receive the left coordinate |
top | Pointer | in | Longint to receive the top coordinate |
right | Pointer | in | Longint to receive the right coordinate |
bottom | Pointer | in | Longint 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.
| Parameter | Type | Direction | Description |
|---|---|---|---|
buttonName | Text | in | The name of the button to remove |
Fnd_Tlbr_Button_Shortcut
Fnd_Tlbr_Button_Shortcut (buttonName; shortcutKey)
Associates a Command key shortcut with the button.
| Parameter | Type | Direction | Description |
|---|---|---|---|
buttonName | Text | in | A button name |
shortcutKey | Text | in | The 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.
| Parameter | Type | Direction | Description |
|---|---|---|---|
newButtonName | Text | in | The name of the button to make the current button (optional) |
Result | Text | out | The 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.
| Parameter | Type | Direction | Description |
|---|---|---|---|
pictureName | Text | in | The name of the toolbar divider picture |
Result | Picture | out | The 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.
| Parameter | Type | Direction | Description |
|---|---|---|---|
request | Text | in | Info desired ("version" or "name") |
Result | Text | out | Response |
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.
| Parameter | Type | Direction | Description |
|---|---|---|---|
objectNumber | Text | in | The object number |
variation | Text | in | The object's variation |
leftOffset | Longint | in | The left offset |
topOffset | Longint | in | The 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.
| Parameter | Type | Direction | Description |
|---|---|---|---|
objectName | Text | in | A toolbar object name |
Result | Longint | out | The 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.
| Parameter | Type | Direction | Description |
|---|---|---|---|
requestedPlatform | Text | in | The platform to use (optional) |
Result | Text | out | The 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.
| Parameter | Type | Direction | Description |
|---|---|---|---|
hostPictureVariables | Pointer | in | Host picture variables |
hostPictureButtons | Pointer | in | Host picture buttons |
hostInfoVariables | Pointer | in | Host 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.
| Parameter | Type | Direction | Description |
|---|---|---|---|
keyCodeChar | Text | in | The Key Code character |
Result | Text | out | The 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.
| Parameter | Type | Direction | Description |
|---|---|---|---|
newStatus | Text | in | The text to set for the info line (optional) |
Result | Text | out | The 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"
| Parameter | Type | Direction | Description |
|---|---|---|---|
requestedStyle | Text | in | The style to use (optional) |
Result | Text | out | The 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.