Resource configuration

Many aspects of Visual Logic's appearance can be modified by configuring the resource file. In MS-Windows systems, the resource file is named 'Pce' and is located in the XPCE home directory; in Unix systems, it is the X11 resource file. The basic format is:

Pce.ClassName.attribute: value

For example, to have VL start up in Query mode (the default is Explore), set the default_mode attribute of class visual_logic to query as follows:

Pce.VisualLogic.default_mode: query

Note the capitalization of the class name and the removal of the underscore. Wild cards may be used in place of class name. For example,

Pce.*.conflicted: style(colour := red,font := @helvetica_bold_14)

sets the font style of 'conflicted' nodes for all classes to red, bold, 14 point helvetica.

Below is the complete list of resources (with default values) for classes in Visual Logic. The XPCE format is used here; however, there should be little difficulty converting to the required X11 format.

:- pce_begin_class( visual_logic, frame,"Top class visual logic").

resource( position, point, 'point( 20, 20)', "Initial position of main window").
resource( default_mode, {query,explore}, 'explore', "Default mode at startup").

:- pce_begin_class( vl_explore, frame, "Explore window").

resource( position, point, 'point( 5,90)', "Initial position of Explore window").
resource( size, size, 'size( ?(@display,width) / 2, ?(@display,height) - 190)', "Initial size").

:- pce_begin_class( vl_explore_node, node, "Tree node in Explore").

	(All of these attributes specify the font style for nodes in the Explore window.)
resource( na, style, 'style(colour := black,font := @helvetica_roman_14)').
resource( evident, style, 'style(colour := blue,font := @helvetica_bold_14)').
resource( blocked, style, 'style(colour := red,font := @helvetica_roman_14)').
resource( repeat, style, 'style(colour := red4,font := @helvetica_roman_14)').
resource( ancestry, style, 'style(colour := green4,font := @helvetica_roman_14)').
resource( true, style, 'style(colour := green4,font := @helvetica_roman_14)').

:-pce_begin_class( vl_watch, browser, "Watch window for explore node").

resource( size, size, 'size( 45,10)', "Size in chars X lines").
resource( used, style, 'style(colour := black,font := system)', "font style for used clauses").
resource( unused, style, 'style(colour := green4,font := fixed)', "style for unused clauses").

:- pce_begin_class( vl_results, frame, "results window").

resource( position, point, 'point( 5,90)', "Initial position of result window").

:- pce_begin_class( vl_results_browser, browser, "browser contained in result window").

resource( size, size, 'size( 25,20)', "Size in chars X lines").
resource( evident, style, 'style(colour := blue,font := @helvetica_bold_14)').
resource( supported, style, 'style(colour := magenta4,font := @helvetica_bold_14)').
resource( conflicted, style, 'style(colour := red,font := @helvetica_bold_14)').
resource( moot, style, 'style(colour := black,font := @helvetica_bold_14)').

:- pce_begin_class( vl_notepad, view, "Simple editor").

resource( size, size, 'size( 65, 25)', "size in characters x lines").
resource( position, point, 'point( 80, 20)', "initial position of editor window").
resource( font, font, '@screen_roman_15', "text font used in editor window").

:- pce_begin_class( vl_listing, view, "clause listing window").

resource( size, size, 'size( 65, 25)').
resource( position, point, 'point( 80, 20)').
resource( font, font, '@screen_roman_15').

:- pce_begin_class( vl_query, frame, "Query window").

resource( position, point, 'point( 5,90)', "Initial position").
resource( size, size, 'size( ?(@display,width) - 220, ?(@display,height) - 190)', "Initial size").

:- pce_begin_class( vl_query_browser, browser, "browser contained in query window").

resource( width, int, 25).
resource( label, style, 'style(colour := black,font := @helvetica_roman_12)').
resource( evident, style, 'style(colour := blue,font := @helvetica_bold_14)').
resource( supported, style, 'style(colour := magenta4,font := @helvetica_bold_14)').
resource( conflicted, style, 'style(colour := red,font := @helvetica_bold_14)').

:- pce_begin_class( vl_query_node, node, "Graphical node in query window").

	(All of these attributes specify the font style for nodes in the Query window.)
resource( na, style, 'style(colour := black,font := @helvetica_roman_12)').
resource( evident, style, 'style(colour := blue,font := @helvetica_bold_14)').
resource( ancestry, style, 'style(colour := green4,font := @helvetica_roman_12)').
resource( true, style, 'style(colour := green4,font := @helvetica_roman_12)').
resource( conflicted, style, 'style(colour := red,font := @helvetica_bold_14)').
resource( supported, style, 'style(colour := magenta,font := @helvetica_bold_14)').
resource( moot, style, 'style(colour := black,font := @helvetica_bold_14)').


luutran@cs.sci.csupomona.edu