Building VDA Tools
Read this section if you intend to develop VDA Tools or if you wish to customize or modify existing VDA Tools.
What Are VDA Tools?
VDA Tools represent a new paradigm in PV‑WAVE application development.
On the surface, a VDA Tool is a PV‑WAVE application with a Motif or Microsoft Windows Graphical User Interface (GUI). (See
Figure 4-1: WzSurface Tool. The VDA Tool WzSurface displays 3D surface data. Menu commands, button bar functions, and other controls let you manipulate, annotate, and print the view.) Multiple instances of this VDA Tool can be run at once. Each instance shares the same source code, yet is independent of other instances. VDA Tools resemble WAVE Widgets applications; however, VDA Tools provide a level of flexibility and independence that distinguishes them from typical WAVE Widgets applications.
This section lists the main features of VDA Tools. Subsequent sections describe VDA Tools on a more technical level and discuss how to build VDA Tools. The final section describes how you can create a Navigator interface for one or more VDA Tools.
Multiple Instances from Same Source Code
Consider the VDA Tool WzPlot. The source code resides in one file: wzplot.pro. As with any VDA Tool, you can call WzPlot as many times as you wish. Each time you call WzPlot, a new WzPlot window is created on your screen. Each of these windows is a separate instance of this VDA Tool. Each instance can display a different variable. In one instance, data is plotted in red, in another, data is green. One instance might have a legend, and another might have callout lines with associated text used to highlight a portion of the data.
Each instance of a VDA Tool is completely independent from all other instances of that same tool, even though they share the same source code. The VDA Tools Manager, described later, enables this VDA Tool independence. As a VDA Tool developer, you will use VDA Tools Manager Application Programming Interface (API) calls in your VDA Tool code to communicate with the Tools Manager.
Intertool Communication
Although multiple instances of VDA Tools are independent, the Tools Manager permits communication between tools. For example, you can export a variable from one tool to another or cut and paste graphical elements—rectangles, lines, legends, axes, bitmaps, and text—from one tool to another. For information on graphical elements, see
"Manipulating Graphical Elements".
In addition, data selection information is shared among VDA Tools. In other words, the selected portion of a variable is displayed as selected in every VDA Tool currently displaying that variable.
Called from the Command-line
Each VDA Tool can be run from the PV‑WAVE command line. In addition, VDA Tools can be run directly from an interface called a Navigator.
Non-blocking
VDA Tools do not block the PV‑WAVE command line, nor do they block one another.
Code Generation
If you are developing PV‑WAVE applications, you can use VDA Tools to generate PV‑WAVE code. The code generation feature allows the user to write the PV‑WAVE commands used to produce a VDA Tool result (plot data, import data, etc.) to a file.
Easy to Save and Restore
A save function lets you save the entire contents of a VDA Tool, which you can restore later. You can also save a template. A template is a “blank” VDA Tool. It includes the entire VDA Tool except for the data. In other words, you can restore a VDA Tool view, all of the color setups, annotations, and other modifications you have made, without restoring the data.
Portable
VDA Tools developed for an X Windows environment (under UNIX) are completely portable to Microsoft Windows. Likewise, VDA Tools developed under Windows can be run in an X Windows environment (under UNIX).
Native Look and Feel
In an X Windows environment, VDA Tools adopt the Motif interface conventions. Under Microsoft Windows, VDA Tools look and behave just like typical Windows applications.
Easy to Build and Customize
PV‑WAVE comes with a set of prewritten VDA Tools. By convention, the commands used to start these Tools all begin with the letters “Wz”, such as WzPlot and WzSurface. You can customize any of these existing VDA Tools, or build your own VDA Tools. You are free to use the existing VDA Tool routines as templates and examples.
Online Help
Each PV-WAVE VDA Tool comes with complete online Help. Select the Help menu on the right-hand side of the VDA Tool menu bar.