Navigation  without Java Scripts

New Features of Visual Prolog

Experts
Code Experts
Application Expert
Window Expert
Dialog Expert
Toolbar Expert
Editors
Dialog and Window Layout Editor
Menu Editor
Toolbar Editor
Icon, Cursor and Bitmap Editor
Additional Features
Integrated Make Facility
Source Code Browser
Text Editor with Token Coloring
High Level, Portable GUI API
Help Authoring System
Resource Import

Code Experts

The greatest strength of Visual Prolog is probably the combination of the Layout tools and the Code Experts. The code experts take care of much of the work for you, meaning that you can create a new application in a few minutes, and incrementally en-hance this from a prototype to your final application. Trivial work is done for you automatically

Application Expert

Screen Dump The application expert is used to create a new project. It creates all the basic components of a new application, a project file, source files, menus, toolbars, icons, bitmaps, and even a help file - This saves many hours of manual work!

The project created by the application expert can be compiled and executed immedia-tely. 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 VPI layer provides default behavior for all events, so you should only insert code for the events you want to handle explicitly. Create a new application in less than one minute

Window Expert

Screen Dump A GUI program must react to events such as a key-press, activation of a control, a menu item, or a mouse movement, when a window is resized or moved or when the window must be redrawn etc.

In Visual Prolog, this is done by connecting a Prolog predicate to a window. This predicate serves as the event-handler for the window, and will be called each time something happens for this window.

The main function of the Window expert is to handle the individual Prolog clauses (of the event-handler) that react to 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. For example we can choose to create a little pop-up window when the mouse is being pressed inside a window. We will add the code for the e_MouseDown event (The event generated when a mouse button is depressed). We select the e_MouseDown event in the code expert and press the Add Clause button:


BEGIN ww, e_MouseDown 
win_ww_eh(Window,e_MouseDown(pnt(X,Y),ShiftCtlAlt,MouseButton),0):-
    dlg_Note("Hi Mum").
%END ww, e_MouseDown 

  

Note that the clause is marked with a %BEGIN - %END pair of comments. 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.

The name of the event-handler predicate is win_ww_eh, and it has three arguments: the first is Window, a variable which is used in operations on the window. The next argument is a structure which itself has three arguments: 1) the position where the mouse was pressed, 2 the status of the Shift, Control and Alt keys when the mouse button was activated, and finally, which mouse button was pushed. The last argument for the predicate is a return value which just is zero in this case.

To call up the little dialog, the built-in dlg_Note predicate is used. 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.
Easy to add and locate code for the user-interface.

Dialog Expert

Screen Dump The core of the Code Expert for dialogs is a tool which allows you to specify a number of high-level 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 auto-matically. The only thing the programmer has to do is to supply a value for each field before the dialog is created, and to handle the returned values when the dialog is terminated. Dialog handling made easy.

Toolbar Expert

Visual Prolog supports toolbars, help lines, and even tooltips. The toolbar expert can assist you by generating default code for toolbar handling, and our toolbar editor is an exceptionally easy way to layout your toolbar dynamically and specify its properties. No programming needed for toolbars and help lines.

Layout Editors

The layout editors are used to interactively design the user interface for your applications.

Dialog and Window Layout Editor

Screen Dump

Dialogs and Windows are laid out using the dialog and window editor. You can use this to position controls like edit-fields, push-buttons, check boxes etc. inside a dialog or window.
There are numerous facilities to make it easy to get the right layout: a group of controls can be aligned in various ways, resized or moved. The "tabstops" and "visit order" for using the tab key can be set.
For each control, a number of its basic attributes can be set. Each control is given a name which becomes a source code constant. These constants connect the layout to the code, and are used when the content of a control should be retrieved or changed, a check box should be checked etc. When Compile or Build is selected from the menu, these constants are written into a file, which is included in your source files. Easy layout of dialogs and windows

Menu Editor

Screen Dump

Pulldown (or popup) menus can be readily created using the menu editor. For each menu entry a constant is specified (or automatically generated) which will be passed to the event handler when the menu choice is activated. The menu editor also handles the definition of accelerator keys for special commands. In the Window expert it is possible to specify interactively what code should be called when a menu item is activated. Design menus interactively

Toolbar Editor

Screen Dump

The toolbar editor allows easy visual creation of toolbars. A toolbar can be built-up interactively with icon buttons, icon checkboxes, static texts, combo boxes, context sensitive fields or separators.

Toolbars can be attached to the top, bottom, left or right side of a window, or they can be either fixed or floating inside of a window.
Easy layout of toolbars and help lines

 

Icon, Cursor and Bitmap Editor

Screen Dump

Windows programs use bitmaps in many places: Icons, Cursors, Bitmap buttons, Toolbars -- all require some small pictures. Visual Prolog incorporates an image editor that is specially geared to editing such bitmaps.
The image editor can rotate or move pictures. There is a special mirror facility, which makes it easy to create symmetric images. Hotspots can be set for cursors etc. All Cursors, Icons and Bitmaps that are created in the project can easily be selected from the other editors. For example, if the bitmaps are already created, it takes only a few minutes to create a toolbar that uses them. Convenient design of small bitmaps

Additional Features

Integrated Make Facility

Screen Dump

The Make facility handles all the complexity of compiling, linking, resource compilation and resource binding etc. The make facility checks on time stamps in order to recompile only the necessary files. The dependencies can be displayed as a tree in order to visualize the structure of the project. Building the application is done automatically

Source Code Browser

Screen Dump

The Visual Prolog compiler generates information for the code browser, so it is possible to inspect the predicates in a module, browse all the global predicates in the project or locate where any predicate or domain is either declared or defined. Easy navigation in the source code

Text Editor with Token Coloring

Screen Dump
Visual Prolog contains a powerful editor with color-coding of Visual Prolog keywords and other language elements. The colors make it much easier to differentiate between predicate names, parameters, comments, etc. as, for example, integer constants could be assigned to display in red.
The editor supports an unlimited undo and redo facility, search and replace, cut, copy, paste, and drag and drop for quick block movements. And, as with previous PDC editors, you can include it in your own applications!
A unique feature of the editor as used within the VDE is that it knows about all the predicates, user interface components, colors, constants etc. of Visual Prolog - you can paste any of them into the source code with a click of the mouse.
Fast creation of easily read of Prolog code

High Level, Portable GUI API (The VPI).

A portable Prolog GUI API has been defined. The API is an abstraction of the facilities found in the basic windowing environments of the Windows 3.x, Windows 95, Windows NT, OS/2 PM, UNIX Motif and Macintosh platforms. This gives the Visual Prolog programmer an API which is both portable and easier to use than programming to the native API. However, in order not to restrict users, the API also contains platform-specific facilities and options which are non portable. If these facilities are used the application is either not portable, or conditional compilation must be used to provide alternative behavior on each platform. It is also possible to program directly to the underlying windowing API as illustrated in the current WINBIND or PMBIND subdirectories. Your program is not bound to one platform

Help Authoring System

Screen Dump
The built-in help authoring system makes it very easy to provide your application with on-line Help.
The authoring system is based on the PDC Hypertext Abstract Machine (HAM). In the Help authoring system it is possible to enter help text interactively, mark new links with the mouse, and to follow existing links during the design phase. The help authoring system outputs both the windows .RTF format and the OS/2 IPF format so it is possible to generate native help systems for both OS/2 and Windows. (The Help compiler HC.EXE is not included with Visual Prolog)
Easy to support on-line Help for applications

Resource Import

Screen Dump

In addition to creating new resource definitions, you can also import resources from existing .VPR, .RES, .EXE or .DLL files. You might have created an application already, and want to move this to the new Visual Prolog environment.