PCE version 4C hlp_buffer first_fragment last_fragmenteditorsmodifiedundo_buffer_sizesyntax generationrequest_renumberfileOIxC hlp_fragment text_buffernextpreviousstylelabelOIxRIOIxRIC hlp_header text_buffernextpreviousstylelabelOIxRIOIxRIOIxRIOIxRIOIxRIOI xRIOI xRIOI xRIOI xRIOI xRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOI xRIOI!xRIOI"xRIOI#xRIOI$xRIOI%xRIOI&xRIOI'xRIOI(xRIOI)xRIOI*xRIOI+xRIOI,xRIOI-xRIOI.xRIOI/xRIOI0xRIOI1xRIOI2xRIOI3xRIOI4xRIOI5xRIOI6xRIOI7xRIOI8xRIOI9xRIOI:xRIOI;xRIOIxRIOI?xRIOI@xRIOIAxRIOIBxRIOICxRIOIDxRIOIExRIOIFxRIOIGxRIOIHxRIOIIxRIOIJxRIOIKxRIOILxRIOIMxRIOINxRIOIOxRIOIPxRIOIQxRIOIRxRIOISxRIOITxRIOIUxRIOIVxRIOIWxRIOIXxRIOIYxRIOIZxRIOI[xRIOI\xRIOI]xRIOI^xRIOI_xRIOI`xRIOIaxRIOIbxRIOIcxRIOIdxRIOIexRIOIfxRIOIgxRIOIhxRIOIixRIOIjxRIOIkxRIOIlxRIOImxRIOInxRIOIoxRIOIpxRIOIqxRIOIrxRIOIsxRIOItxRIOIuxRIOIvxRIOIwxRIOIxxRIOIyxRIOIzxRIOI{xRIOI|xRIOI}xRIOI~xRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRIOIxRInRINbuttonN51AQRINbuttonN49AC RINbuttonN12A?RINbuttonN47A+RINbuttonN46ARINbuttonN44A RINbuttonN11ARINbuttonN41@ RINbuttonN55@RINbuttonN53@ RINbuttonN51@ RINbuttonN38@RINbuttonN37@ RINbuttonN36@RINbuttonN35@RINbuttonN8@RINbuttonN32@ RINbuttonN31@ RINbuttonN42@u RINbuttonN41@pRINbuttonN38@\RINbuttonN27@O RINbuttonN user_guide@5RINbuttonN35@1RINbuttonN34@!RINbuttonN24@RINbuttonN30?RINbuttonN29?RINbuttonN19? RINbuttonN17?RINbuttonN22? RINbuttonN21?RINbuttonN3?RINbuttonN14?RINbuttonN13?)RINbuttonN17?~RINbuttonN2?nRINbuttonN16?iRINbuttonN2?eRINbuttonN8?]RINbuttonN7?URINbuttonN6?QRINbuttonN6?NRINbuttonN5?JRINbuttonN3?? RINbuttonN1?6RINbuttonN0?1RINsectionN9.__concept_index?RINkeywordN51>RIN subsectionN8.3.__prolog_customisation>RINexamplen=RINkeywordN31=> RIN subsubsectionN%8.2.2.__using_xterm-like_scroll-bars?<%RINkeywordN0<^RINkeywordN7:RIN subsubsectionN8.2.1.__changing_colours?:RIN subsectionN#8.2.__commonly_used_customisations?:#RINexamplen8RINexamplen7RIN subsubsectionN8.1.6.__constants?7RINexamplen5MRINexamplen5MTRIN subsubsectionN8.1.5.__conditional_resources?3~RINkeywordN380RIN subsubsectionN/8.1.4.__what_is_the_syntax_for_resource_values?0/RIN subsubsectionN<8.1.3.__what_is_the_syntax_to_use_for_specifying_a_resource?/Q:RIN subsubsectionN78.1.2.__how_do_i_find_attributes_that_can_be_specified?-47RINkeywordn,RINkeywordN17,RIN subsubsectionN)8.1.1.__where_do_i_specify_look-and-feel?,q)RIN subsectionN!8.1.__customising_`look-and-feel',N!RINbuttonN8.3.__prolog_customisation,2RINbuttonN%8.2.2.__using_xterm-like_scroll-bars?,%RINbuttonN8.2.1.__changing_colours?+RINbuttonN#8.2.__commonly_used_customisations?+#RINbuttonN8.1.6.__constants?+RINbuttonN8.1.5.__conditional_resources?+|RINbuttonN/8.1.4.__what_is_the_syntax_for_resource_values?+D/RINbuttonN<8.1.3.__what_is_the_syntax_to_use_for_specifying_a_resource?*N subsectionN03.1.__to_what_languages_has_xpce_been_connected?0RI=NbuttonN3.3.2.__ms-windows_on_pc?RI.: Where is described further below. The following example makes a default editor search, complete and replace case-sensitive: editor.exact_case: true 9.1.4. What is the syntax for resource values? The syntax for resource values is close to the Prolog syntax with a few exceptions: * Creating an instance that requires no initialisation arguments is done using (): `chain()' creates an empty chain. `new(chain)' as used from Prolog will try to make an instance of class `new' (and thus fail). * Atoms starting with a Capital do not need to be quoted (but may be) as this syntax defines no variables. * '[' {} ']' maps onto an XPCE chain and thus is equivalent to 'chain(' {} ')'. Parsing the string-value from the X11 resource database into an XPCE value is done by the object @resource_parser. Use the `Global Object' browser to see the documentation of this parser. 9.1.5. Conditional resources? Sometimes you would like to specify resource values conditionally, for example depending on whether or not you have a monochrome or colour display, on the size of your display, etc. The trick to use is to specify the value as function object (see ClassBrowser for full documentation). A function will be converted into an object of the requested type by (first) evaluation the function. Thus, the specification: Pce.Window.size: size(@display?height / 3, \ @display?width / 3) will define default windows to be 1/3 of the display's <-width and <-height, while: Pce.Window.background: when(@colour_display, \ grey95, white) will make window's background a little grey (so that coloured objects become much better visible) on colour displays and just white otherwise. The object @colour_display is a predefined conditional object. 9.1.6. Constants? Sometimes you would like to give various objects the same colour palette or define objects you can reuse in the further specification. For this reason, the resource: Pce.display.initialise describes an executable (code) object that will be converted and executed by `display ->open', which is before any other resource conversion will take place. Below is the defenition from the supplied `Pce' file: Pce.Display.initialise: \ and(_dialog_bg @= when(@colour_display, grey80, white), \ _win_pen @= when(@colour_display, 0, 1)) The symbol `@=' is an infix operator, which implies @= evaluates to an instance of class @= which, when executed will give the reference . Thus, after this object is executed, @_dialog_bg and @_graph_bg and @_win_pen are global objects that can be used in resource specifications. 9.2. Commonly used customisations? 9.2.1. Changing colours? The colours used for dialog-items are all mentioned in the main resource file (called `Pce') in the XPCE home directory (which you can find using `?- get(@pce, home, Home).'). Follow the redefinitions method described in "Customising `look-and-feel'" to change them. You can specify colours in four ways: colour(, , , ) #rgb colour() With the #rgb version, rgb is a tripple of 3 hexadecimal values with 2 or 4 digits each. #00FF00 refers to pure green. 9.2.2. Using xterm-like scroll-bars? Some people do and some people don't like the default OpenLook emulating scrollbars. To change them into xterm-compatible scrollbars, define the following resources: Pce.ScrollBar.look: x Pce.ScrollBar.distance: - @_win_pen Pce.ScrollBar.elevation: when(@colour_display, \ 1, \ elevation(@nil, 1, \ @grey50_image)) in your ~/.Xdefaults or by changing the Pce file. 9.3. Prolog customisation XPCE/Prolog reads the file ~/xpcerc when present *after* reading the normal Prolog initialisation file. 10. Concept Index #rgb $DISPLAY -d display AIX BM C++ colours compile GIF HPUX info@aiil.co.uk initialization/1 Interfacing PCE to a Programming Language Irix JPEG library(pce_main) Linix/ELF Look-and-feel mailing list NT OSF/1 PCE / Common Lisp Interface pce_main_loop/1 PNM Programming in PCE/Prolog ProWindows-3 qsave_program/[1,2] save save_program scrollbars shell-script SICStus Prolog Solaris SunOs SWI-Prolog syntax for resource values Win32 API Windows '95 X11 X11 resources XBM xhost xpce-request@swi.psy.uva.nl xpce@swi.psy.uva.nl XPM ~/.Xauthority ~/xpcerc rIxx