Quintus Prolog Manual
The resource file and how it is used in customizing QUI is discussed in {manual(c-7-1)} and {manual(c-7-2)}.
Restrictions on developing programs under QUI are the topic of {manual(c-7-3)}.
By convention, applications developed for the X11 Window System maintain a database of resources. This database is built at run time from application defaults and user preferences.
A resource, in the context of X11, is any customizable data that controls the behaviour and appearance of the application. This includes just about everything: colors, fonts, images, text, titles, sizes, positions, flags, etc.
Quintus ships QUI with a default resource file that defines the "standard" QUI look. This file is located in the directory Quintus-Directory/qui3.3. This file must exist for correct operation of QUI.
We only document some of the resources that QUI uses. The X resource database provides no mechanism for distinguishing between those resources that can be customized and those that can not. Some QUI resources can be customized while modifying others will break QUI. Therefore, if you modify any QUI resource you run the risk of breaking QUI. We suggest that you only change QUI resources for minor enhancements. Quintus reserves the right to change the format and structure of the resource file in future releases.
If you still want to change resources, do not modify the default QUI resource file itself. Rather, create the file (A) that is, a file named Qui3.3 in your home directory, and add the QUI resources you want to modify to it. Alternatively, you can add QUI resources to your existing X defaults file (B).
$HOME/Qui3.3 (A)
$HOME/.Xdefaults (B)
Adding resources to either of these files will override the resources specified in the default QUI resource file.
See your Motif, Xt and Xlib documentation for more information on the X resource database format and use.
The easiest way to find the name of the resource you want to change is to look in the default QUI resource file. Once you know the full name of the resource, you can put a line with the same name and a new value in your personal QUI defaults file in your home directory. Note that case is significant in naming a resource and comment lines start with a ! character.
This section offers a few guidelines on how to identify the QUI resources you may wish to customize.
qui.loadOnlyAtTopLevel: True
If set to False, file loading by QUI menus will be disabled only while Prolog code is running.
qui*main*dialogTitle: Quintus User Interface
The main title displayed by QUI on its startup window.
qui*background: wheat
The background color used in QUI windows.
qui*foreground: black
The foreground color used in QUI windows.
qui*fontList: fixed
The font used in most QUI windows, except for the help system .
qui*qui_window.iconName: Qui
The icon name for QUI .
The text that QUI displays in all of its buttons, menus and dialogs can be customized by changing the appropriate resources.
To change a button or menu label, look for the labelString resources. For example:
qui*main*commands*interrupt.labelString: Interrupt
Sets the text displayed by the "Interrupt" button.
qui*main*menuBar*load.labelString: Load...
Sets the text displayed by the "Load" entry in the "File" menu of the main QUI Window
qui*qui_window*yesNoProceed*okLabelString: Yes
Sets the text displayed by the "OK" button in the "Yes/No" confirmation popup dialog.
To change the text of a message, look for the messageString resources. For example:
qui*main*exitWarning*messageString:
Do you really want to exit Prolog?
Sets the message displayed by the "Exit Warning" popup dialog.
To customize a QUI menu entry there are potentially four resources that have to be changed. These are:
For example, the "Frame Up" entry in the debugger "Travel" menu is defined by the following resources
qui*debugger*frame_up.labelString: Frame Up
Sets the text of the "Frame Up" menu entry in the QUI debugger
qui*debugger*travelmenu*frame_up.mnemonic: U
Sets the single character 'U' as the mnemonic for the "Frame Up" menu entry in the QUI debugger. This character will be shown underlined in the menu.
qui*debugger*travelmenu*frame_up.accelerator:
Ctrl<Key>U
Binds the Control-U character to the "Frame Up" menu entry action in the QUI debugger. Typing a Control-U character will be equivalent to use the mouse to select the "Frame Up" menu entry.
qui*debugger*travelmenu*frame_up.acceleratorText:
Ctrl + U
Sets the text to be displayed next to the "Frame Up" menu entry to show the user the accelerator keys for the command.
All of the QUI text widgets have a set of default key bindings to perform certain operations. These are all translations resources.
The value of a translation resource is a set of lines with an escaped new line character at the end of each line, except the last one. Each line associates a mouse/keyboard event with an internal action. For example
qui*prolog*translations: #override\n\
Ctrl<Key>C: qpinterrupt() \n\
Ctrl<Key>D: qpeof() delete-next-character()\n\
Ctrl<Key>U: kill-to-prompt()\n\
<Key>Delete: delete-previous-character()\n\
Ctrl<Key>K: kill-to-end-of-line()\n\
Ctrl<Key>W: kill-previous-word()\n\
Ctrl<Key>P: previous-line()\n\
Ctrl<Key>N: next-line()\n\
Ctrl<Key>A: beginning-of-line()\n\
Ctrl<Key>E: end-of-line()\n\
Ctrl<Key>B: backward-character()\n\
Ctrl<Key>F: forward-character()
Sets the default key bindings for the QUI prolog query interpreter window.
All the QUI editor resources have names that starts with qui*editor. Resources specific to the QUI editor include
qui*editor.generateBackup: True
To prevent the QUI editor from generating backup files set the value to False.
qui*editor.backupSuffix: .Bak
Sets the suffix that the QUI editor uses to generate backup files.
Many of the editor text messages have a resource name that ends in Msg, for example
qui*editor.qofFileMsg:
File is a Quintus Object Format file
Sets the message to be displayed when attempting to load a QOF file into the editor.
All the QUI debugger resources have names that start with qui*debugger. Resources specific to the QUI debugger include
qui*debugger*debugger_main_window.title:
Quintus Debugger
The title at the top of the QUI debugger window.
qui*debugger*debugger_main_window.geometry: 583x600
Sets the default window size for the QUI debugger.
All the QUI help system resources have names that start with qui*help_window. Resources specific to the QUI help system include
qui*help_window*helpSystem*fontList:
-*-courier-bold-r-normal--14-*
Sets the default font for the QUI help system windows.
qui*help_window*helpSystem*maxHistory: 10
Sets the maximum number of items to be kept in the history pulldown menu of the QUI help window.
qui*help_window*helpSearDialog.wrapAround: False
Sets the default value of Wraparound in the Search dialog to on.
message_hook/3: If this predicate is defined in your program, it must be defined as a multifile predicate.
Also, there are restrictions on how you can use message_hook/3 under QUI. In particular, error messages (terms with severity 'error') may not be seen by your message_hook/3 clauses. QUI catches these messages and displays an error dialog.
Since it may be unpredictable whether user-supplied clauses for message_hook/3 come before or after QUI's message_hook/3 clauses, it is also recommended that any message_hook/3 clauses you do supply should fail. See {manual(g-20-3-3)}, as well as the reference page for message_hook/3, for more information.
QU_initio(): QUI has already defined this Prolog embedding I/O initialization function. Users' programs linked with QUI cannot redefine the function.
Unix SIGIO signal: This signal is used in QUI. No programs developed under QUI should catch this signal.
Unix SIGPIPE signal: The signal handler of this signal is set to SIG_IGN in QUI. Resetting the signal handler to SIG_DEL may cause QUI to exit unexpectedly.
contact: product
support sales information