Navigation  without Java Scripts

Code Experts

You will find many advantages from working with Visual Prolog. Perhaps the greatest strength of Visual Prolog is that the various layout editors are closely integrated with the code experts in the Visual Development Environment, which makes it very easy to shift between layout, and connecting code to the layout.

Application Expert
Window Expert
Dialog Expert
Toolbar Expert

The Application Expert

The Application Expert is used to create a new project. It generates all the basic parts of a new application, a project file, source files, menus, toolbars, icons, bitmaps and even a help file - in the old days, this used to take several days to set up !

The application expert allows you to choose the platform on which you want your program to run.

Should it be good (or bad) old DOS?
A DOS- extended application? (Requires the Phar Lap '286 Extender)
Do you want to make an application that works directly with the Windows API (we shouldn't say its hard - some things are impossible in the VPI many will still have to do this way)?
Or do you see all the benefits and make the right choice which is the powerful, portable VPI interface? If you choose VPI, you can have your program running in 32bit NT or Win32 mode or even on the native OS/2 Presentation Manager platform, all without any source changes!

The application expert will also set up the right structure for all the tools you want to use. Do you want to access an SQL database? Do you need an editor? A tree display? Do you want MDI behavior? A 3-dimensional look for your application? Should it have toolbars and help lines? Should C or C++ be the main program?

Once the application expert has created the project, it can be compiled and executed immediately. The generated code serves as a framework into which you can easily add the specifics of your application, and you need not worry about many of the details you would have to consider in ordinary Windows programming.

The Window Expert

The main function of the Window expert is to automatically generate Prolog clauses that handle the various events from the windowing system. In the expert dialog (see figure), all the event types can be seen, and pressing the "Add Clause" button adds a clause for the selected event. As an example, the following code will be generated if a clause is added for the move event (The event generated when a window is moved to another location):

%BEGIN mywin, e_Move 
   win_mywin_eh(_Win,e_Move(_X,_Y),0):-!,
   !.
%END mywin, e_Move

Note that the clause is marked with a %BEGIN - %END pair. These are used by the Window Expert to locate the code later. In particular, once a clause exists for the event, the "Add Clause" button changes to "Edit Clause", which can be used to quickly position you within the source module to edit or add functionality. Popup menus within the editor allow you to quickly paste in calls to built-in and user defined predicates, constants, domain names, keywords, resource identifiers etc. for nearly keyboard-less programming.

The VPI layer provides default behavior for all events, so you will only insert code for the events you want to handle explicitly.

The Dialog Expert

The core of the code expert for Dialogs is a tool which makes it possible to select a number of properties for controls, and also to select which program variables to associate with control values. Various validations like checking to see if a field is an integer, lies within a given range, if a string has exceeded a maximum length etc. are done automatically. The only thing the programmer has to do is to supply a value for each field before the dialog is created, and when the dialog is terminated, handle the returned values. 

The Toolbar Expert

Toolbars and help lines are supported both in the Development Environment and in your applications. The toolbar expert can assist you by generating default code for toolbar handling, and our toolbar editor is one of the easiest ways available to layout a toolbar dynamically and specify its properties.

All Cursors, Icons and Bitmaps that are created in the project can easily be selected from all editors. If the button bitmaps are already created, it takes only a few minutes to create a fully functional toolbar.