Skip to content

VIP ToolBar

VIPTBAR is a Method provided by Thoroughbred Software that allows you to control toolbar presentation and behavior from within your application software. VIPTBAR uses the toolbar definitions maintained by the WorkStation Manager please see the WorkStation Manager manual (Toolbar Maintenance option).

In VIP you can create and edit toolbars using Toolbar Maintenance. When you create a toolbar VIP creates two files:

  • A toolbar definition file with a def extension.
  • An image file with a bmp extension.

VIP then stores them in the vip-data-path \ToolBar\WsnMgr folder.

All images used by the toolbars must be stored in the vip-data-path\ToolBar folder.

VIP shares the same toolbar definitions as the WorkStation Manager toolbar but displays them inside the main VIP GUI Server window.

VIP also supports a dynamic toolbar stack. Host application code can create and manage a stack of multiple toolbar definitions and dynamically control which toolbar definition is available to the user. For example, it is possible to have one toolbar displayed when doing screen processing and another toolbar displayed with doing view processing.

The VIPTBAR Method performs one of five functions:

  • Define a toolbar. This function exposes an existing toolbar definition to VIP for subsequent processing. Defining a toolbar adds a toolbar definition to the toolbar stack, it does not activate a toolbar.
  • Modify a toolbar. Modify some behavior of the toolbar such as location, docking options, floating options, ToolTip options, and hide and pop options.
  • Activate a toolbar and change its location.
  • Deactivate a toolbar.
  • Pop a toolbar from the toolbar stack.
METHOD FUNC$,TBL$[ALL]
FUNC$ Function:
"00"Define toolbar. You must define a toolbar before any other message structures can reference it. Defining a toolbar does not activate it. See 02.
"01"Modify toolbar. This allows you to redefine a toolbar. The arguments are identical to those required by the 00 function. If any of the arguments are left blank (except Toolbar name), the original values from the 00 function are used. This allows modification to a toolbar without having to duplicate all the arguments. For more information see TBL$[4].
"02"

Activate toolbar.

"03"

Deactivate toolbar.

"04"

Pop toolbar.

TBL$[0]

Status. Returns “.” if the CALL to VIPTBAR was successful. Anything else indicates the CALL failed.

TBL$[1]

Toolbar name. Required for all functions. This is the user defined name (alias) by which the host refers to the specific toolbar object. The maximum length is 8 characters.

TBL$[2]

Toolbar definition name. Function 00 only. This is the name of the toolbar bitmap definition file on the workstation in the vip-data-path
\ToolBar folder. The format for the toolbar name complies with the name format currently used by the Toolbar Maintenance module. The maximum length is 15 characters.

TBL$[3]

Toolbar title. Function 00 and 01. This only applies when the toolbar position is F (Floating). The maximum length is 15 characters.

TBL$[4]

Toolbar options.
(1,1) Initial Toolbar position. Functions 00 and 01. The default is R.
When used with function 02, it overrides the original definition. If
function 02 is used and the toolbar position is F, the toolbar position
defined in the 00 and 01 function will be used.
F - Floating.
R - Docked right.
L - Docked left.
T - Docked top.
B - Docked bottom.
(2,1) Enable Float. Functions 00 and 01. The default is 2.
1 - User may undock the toolbar.
2 - User may not undock the toolbar.

(3,1) Enable Dock. Functions 00 and 01. The default is 2.
1 - User may dock the toolbar.
2 - User may not dock the toolbar.
(4,1) Enable ToolTip. Functions 00 and 01. The default is 1.
1 - Allow ToolTips.
2 - No ToolTips.
(5,1) Enable Hide Toolbar. Functions 00 and 01. The default is 0.
1 - User may hide the toolbar by clicking on the x box (upper right corner
of the window) wile the toolbar is floating.
0 - User may not hide the toolbar.
(6,1) Toolbar Pop options. Function 04 only. The default is 1.
0 - When a toolbar is popped, the next toolbar in the stack remains hidden.
1 - When a toolbar is popped, the next toolbar in the stack is activated.

Example:

DIM TMSG$[4]; !Dim toolbar array
LET FUNC$="00", !Set function to define a toolbar
TMSG$[1]="TBO", !Set local name for toolbar
TMSG$[2]="Toolbar2.def", !Set definition name
TMSG$[3]="My Toolbar", !Set toolbar title
TMSG$[4]="R" + !Set dock toolbar right +
"1" + !Enable floating +
"1" + !Enable docking +
"1" + !Enable tooltips +
"1" !Enable hide toolbar
!Note: pop option not set, use
!default ("1")
CALL"VIPTBAR",FUNC$,TMSG$[ALL] !Call VIPTBAR to define (expose) the
!toolbar
IF TMSG$[0]<>"."THEN
TERMINATE !If not successful terminate
!processing
ENDIF
LET FUNC$="02" !Set function to activate the toolbar
CALL"VIPTBAR",FUNC$,TMSG$[ALL] !Call to activate the toolbar
IF TMSG$[0]<>"."THEN
TERMINATE !If not successful, terminate
!processing
ENDIF
CONNECT SCREEN 'OESCUST" !Do connect screen

From the VIP for Dictionary-IV Reference, version 8.9.1. Open this page in the PDF