Using Sun WorkShop

Appendix A Setting Sun WorkShop Resources

Sun WorkShop uses two resource files to determine the default colors and fonts used in its windows, and several other options. You may want to change some of these defaults to adapt the Sun WorkShop user interface to your individual preferences.

This appendix describes Sun WorkShop resources that you can set and gives you the information you need before changing the settings.

This appendix organized into the following sections:

Sun WorkShop Resource Files

Sun WorkShop uses two resource files:

Each resource file has two variations, one for CDE (Common Desktop Environment) and one for non-CDE. The files are located in the following directories in your Sun WorkShop installation directory (the default installation directory is /opt):

/opt/SUNWspro/WS5.0/lib/locale/<lang>/app-defaults/CDE

/opt/SunWspro/WS5.0/lib/locale/<lang>/app-defaults/non-CDE


Note -

Consult with your system administrator for assistance if you have difficulty locating the resource files; Sun WorkShop may be installed in a different directory at your site.


The Sun WorkShop program loads the correct resource file automatically based on whether the CDE window manager is running or not. The only difference between the CDE and non-CDE variations is that the latter does not define generalized color and font resources for Motif elements; it allows the CDE Style Manager control to these elements.

Resources Available for Editing

Both the WORKSHOP and ESERVE files contain comments that indicate what a group of resources pertains to. For example, the following group of resources controls the colors used in the text editors for highlighting:


! Resources for highlight colors used by WORKSHOP in the editors

WORKSHOP.curPCColor:   #8BD98B
WORKSHOP.visitPCColor:  #EDC9FF
WORKSHOP.breakptColor:   #FF9696

The types of Sun WorkShop resources you can edit include the following:

For details on each of the resources, see "Sun WorkShop Resources" and "ESERVE Resources".

Resources that affect components in the core Sun WorkShop product do not affect TeamWare components or any components started from the Tools menu. Be sure to read the comments that precede each set of resource definitions.

Changing a Resource

To change a resource definition, do the following:

  1. Create a file called WORKSHOP or ESERVE in your home directory or some other directory as specified in your XFILESEARCHPATH or XAPPLRESDIR environment variable.

  2. Change directories to the location of the file that contains the resource you want to change.

    The default path names for the WORKSHOP and ESERVE files are listed in "Sun WorkShop Resource Files". Consult with your system administrator for assistance if you have difficulty locating the files.

  3. Open the resource file and copy only the resource definitions you want to change.

  4. Paste the resource definitions into the file you created in your home directory.

  5. Change the resource settings and start Sun WorkShop.

    If Sun WorkShop is already running, exit and restart it.


    Note -

    If you modify the default colors in Sun WorkShop to use a non-specified color, you can cause Sun WorkShop to fill up the color map.


Changing Wide Character Fonts in Hyperlink Windows

Many of the windows in Sun WorkShop use hyperlinks to other windows to facilitate the display of related information. For example, clicking on a build error in the Building window causes an editor window to display the source code file that contains the error.

Certain resources serve as flags indicating that non-ASCII characters written to a hyperlink display are to be interpreted as multi-byte characters. The multi-byte characters are displayed in the font indicated by the resource.

The resources should be set only in locales in which there is to be multibyte interpretation of non-ASCII characters.

The names of these resources, as they would appear if set in the WORKSHOP resource file, are the following:

 WORKSHOP*HTML*WCfont:
 WORKSHOP*HTML*boldWCFont:
 WORKSHOP*HTML*plainWCFont:
 WORKSHOP*HTML*plainboldWCFont:
 WORKSHOP*HTML*Font:
 WORKSHOP*HTML*boldFont:
 WORKSHOP*HTML*plainFont:
 WORKSHOP*HTML*plainboldFont:

Each WC font resource corresponds to a non-WC font resource. If the WC font resource is set, WC font dimensions determine the line spacing and baseline of text elements written in both the WC font and corresponding non-WC font. The purpose is to produce consistent spacing of a line where ASCII and multi-byte characters are mixed. The WC font dimensions are also used for formatting a line written only in the non-WC fonts.


Note -

Where WC font resources are set for hyperlink displays of multi-byte characters and you change a WC font resource, the size and spacing of WC fonts should be proportional to the size and spacing of non-WC fonts. To get proportional formatting you might need to modify the resources for non-WC fonts.


Sun WorkShop Resources

Table A-1 through Table A-17 list the Sun WorkShop color and font resources that you can change in the WORKSHOP resource file.

Highlight Colors in Editor Windows

The resources listed in Table A-1 control the colors used to highlight functions, breakpoints, query matches, and build errors in source code displayed in the text editor windows (for an example of highlighting, see Figure 5-2).

Table A-1 Highlight Colors in Sun WorkShop Editors

Resource Name 

Description 

Default Value 

WORKSHOP.curPCColor: 

Current function 

#8BD98B 

WORKSHOP.visitPCColor: 

Visited function 

#EDC9FF 

WORKSHOP.breakptColor: 

Breakpoint 

#FF9696 

WORKSHOP.disabledBreakptColor 

Disabled breakpoint 

#BDBDBD 

WORKSHOP.matchColor: 

Pattern or symbol match 

#99CFFF 

WORKSHOP.errorColor: 

Current build error 

#FFCC40 

Data Graph Window Colors

The resources listed in Table A-2 control the colors used in the graph types in the Data Graph window of the debugger (see Debugging a Program With dbx).

Table A-2 Data Graph Window Colors

Resource Name 

Description 

Default Value 

WORKSHOP.dgLineColor: 

Color for Line graph type 

#OOOOFF 

WORKSHOP.dgFillColor: 

Color for Fill graph type 

#FDF5E6 

WORKSHOP.dgMeshColor: 

Color for Mesh graph type 

#OOOOFF 

Call Graph and Class Graph Window Colors

The resources listed in Table A-3 control the colors of the nodes, the lines (or arrows) connecting the nodes, and background color of the graph pane in the Call Graph window (see Figure 3-5) and the Class Graph window (see Figure 3-6).

Table A-3 Resources for Class Graph and Call Graph Windows

Resource Name 

Description 

Default Value 

WORKSHOP*labelNodeBackground: 

Background color of each node 

#EFEFEF 

WORKSHOP*viewBackground: 

Graph pane background (Default uses X's Old Lace) 

#FDF5E6 

Node properties when unhighlighted

WORKSHOP*arcForeground: 

Arrow between nodes 

#000000 

WORKSHOP*nodeForegroundColor: 

Node border 

#000000 

WORKSHOP*labelNodeForeground: 

Node text 

#000000 

Node properties when highlighted

WORKSHOP*arcHighlightColor:  

Arrow between nodes 

#FF0000 

WORKSHOP*nodeHighlightColor:  

Node border 

#FF0000 

Help Window Colors

Table A-4 lists the color resource settings for the standard Help window and the smaller Quick Help window.

Table A-4 Colors for General Help Viewer

Resource Name  

Description 

Default Value 

Colors for Help viewer

WORKSHOP*XmDialogShell.DtHelpDialog*DisplayArea.background: 

Background color  

White 

WORKSHOP*XmDialogShell*XmDialogShell.DtHelpDialog*DisplayArea.background 

Background color 

White 

WORKSHOP*XmDialogShell.DtHelpDialog*DisplayArea.foreground: 

Foreground color  

Black 

WORKSHOP*XmDialogShell*XmDialogShell.DtHelpDialog*DisplayArea.foreground 

Foreground color 

: Black 

Colors for Quick Help viewer

WORKSHOP*XmDialogShell.DtHelpQuickDialog*DisplayArea.background: 

Background color  

White 

WORKSHOP*XmDialogShell*XmDialogShell.DtHelpQuickDialog*DisplayArea.background 

Background color 

White 

WORKSHOP*XmDialogShell.DtHelpQuickDialog*DisplayArea.foreground:  

Foreground color  

Black 

WORKSHOP*XmDialogShell*XmDialogShell.DtHelpQuickDialog*DisplayArea.foreground 

Foreground color 

Black 

Audible Warnings

The resource listed in Table A-5 enables you to turn off audible warning beeps. The possible values are -XmBell and -XmNONE.

Table A-5 Resource for Audible Warnings
 Resource Name Description Default Value
 WORKSHOP*audibleWarning: Turns audible beeps on and off XmBell

Debugger Buttons

The resource listed in Table A-6 enables you to set the delay in milliseconds before debugger and text editor buttons are disabled when dbx starts. This disabling prevents button flashes when you are stepping through code. If you are running Sun WorkShop on a slow system or over an ISDN line, you may want to increase this delay.

Table A-6 Resource for Debugger Button Disable Delay
 Resource Name Description Default Value
 WORKSHOP.ButtonDisableDelayDelays disabling of debugger and text editor buttons when dbx starts 250

Dbx Commands and Program I/O Window Output Lines

The resource listed in Table A-7 sets the number of lines of output to save in the Dbx Commands window and the Program Input/Output window.

Table A-7 Number of Output Lines Saved in Dbx Commands and Program I/O Windows
 Resource Description Default Value
 WORKSHOP*dtTerm.saveLines Number of output lines saved 1000

Browser Used to Display Web Updates

The resource listed in Table A-8 enables you to change the default path for the browser used to display the Sun WorkShop Web Updates page (see "Web Updates").

Table A-8 Web Updates Browser
 Resource Description Default Value
 WORKSHOP.browser Path to browser used to display Web Updates sdtwebclient

Hyperlink Resources

The resources listed in Table A-9 set the font type, weight, and angle used in hyperlinks in the windows and dialog boxes of the English version of Sun WorkShop. For examples of hyperlinks in Sun WorkShop windows, see Figure 4-6, which shows build error links in the Building window, and Figure 5-1, which shows function links in the Stack pane of the Debugging window.

Table A-9 Hyperlink fonts for 'C' locale (English)

Resource Name 

Default Value 

WORKSHOP*HTML*BoldFont: 

-*-lucida-bold-r-normal-*-12-*-*-*-*-*-iso8859-1 

WORKSHOP*HTML*PlainFont: 

-*-lucidatypewriter-medium-r-normal-*-12-*-*-*-*-*-iso8859-1 

WORKSHOP*HTML*PlainboldFont: 

-*-lucidatypewriter-bold-r-normal-*-12-*-*-*-*-*-iso8859-1 

Table A-10 lists hyperlink WC font resources for locales with multi-byte characters. If set, non-ASCII characters written to HTML displays are interpreted as multi-byte characters and displayed with font indicated by the resource.

Table A-10 Hyperlink fonts for Japanese locale

Resource Name 

Default Value 

WORKSHOP*HTML*boldWCFont: 

-jis-fixed-medium-r-normal--16-150-75-75-c-160-*-0 

WORKSHOP*HTML*plainWCFont: 

-jis-fixed-medium-r-normal--16-150-75-75-c-160-*-0 

WORKSHOP*HTML*plainboldWCFont: 

-jis-fixed-medium-r-normal--16-150-75-75-c-160-*-0 

Automatic Text Wrapping

The resource listed in Table A-11 lets you set text to automatically wrap or start a new line in a Sun WorkShop window. The default value is true, meaning that text automatically wraps when it meets a window border.

Table A-11 Automatic Wrapping of Text

Resource Name 

Default Value 

WORKSHOP*HTML*wrapPreformatText: 

True 

The resource listed in Table A-12 enables you to turn vertical scrollbars off or on.

Table A-12 Availability of Vertical Scrollbars

Resource Name 

Default Value 

WORKSHOP*HTML*verticalScrollbarAlways: 

True 

Motif-specific Resources

Table A-13 through Table A-17 list resources that are specific to Motif environments only and are not used by CDE.

Table A-13 Fonts for Motif (non-CDE) Windowing Systems

Resource Name 

Description 

Default Value 

WORKSHOP.labelFontList: 

Font types for labels 

-*-lucida-medium-r-normal-*-12-*-*-*-*-*-*-* 

WORKSHOP.buttonFontList: 

Font types on buttons 

-*-lucida-medium-r-normal-*-12-*-*-*-*-*-*-* 

WORKSHOP.textFontList: 

Font types in lists 

-*-lucidatypewriter-medium-r-normal-*-12-*-*-*-*-*-*-* 

In your resource file, uncomment the resources listed in Table A-14 to change the fonts in a specific Sun WorkShop window.

Table A-14 Fonts for Specific Windows

Resource Name 

Default Value 

WORKSHOP*ipeDbxCommandWindow*userFont: 

-*-lucidatypewriter-medium-r-normal-*-12-*-*-*-*-*-iso8859-1: 

WORKSHOP*ipeProgramIOShell*userFont: 

-*-lucidatypewriter-medium-r-normal-*-12-*-*-*-*-*-iso8859-1: 

WORKSHOP*threadsList*fontList: 

-*-lucidatypewriter-medium-r-normal-*-12-*-*-*-*-*-iso8859-1 

WORKSHOP*handlerList*fontList: 

-*-lucidatypewriter-medium-r-normal-*-12-*-*-*-*-*-iso8859-1 

WORKSHOP*processList*fontList: 

-*-lucidatypewriter-medium-r-normal-*-12-*-*-*-*-*-iso8859-1 

This resource listed in Table A-15 is applicable to text in a tabular format, such as tables.

Table A-15 Font Used in Tabular Windows

Resource Name 

Default Value 

WORKSHOP.DataMonospacedFont: 

-*-lucidatypewriter-medium-r-normal-*-12-*-*-*-*-*-*-* 

Window Foreground and Background Colors

Table A-16 lists the resources that control the foreground and background colors used in most Sun WorkShop windows.

Table A-16 Colors for Sun WorkShop Windows, Dialog Boxes, Menus, and Buttons

Resource Name 

Description 

Default Value 

WORKSHOP*foreground: 

Foreground color of windows (text such as labels) 

#000000 

WORKSHOP*XmTextField*background: 

Background color of text boxes 

#FFFFFF 

WORKSHOP*XmText*background: 

Text color 

#FFFFFF 

WORKSHOP*threadsList.background: 

 Background color of Threads pane

#FFFFFF 

WORKSHOP*ipeDbxCommandWindow*dtTerm.background: 

Background color of Dbx Commands window 

#FFFFFF 

WORKSHOP*ipeProgramIOShell*dtTerm.background: 

Background color of Program Input/Output window 

#FFFFFF 

WORKSHOP*XmDrawingArea.background: 

Background color of Stack pane, Data Display, and so forth 

#FFFFFF 

WORKSHOP*background: 

Background color of Sun WorkShop windows 

#DEDEDE 

WORKSHOP*XmPushButton*background: 

Background color of buttons 

#DEDEDE 

WORKSHOP*XmMenuShell*background: 

Background color of menus 

#DEDEDE 

WORKSHOP*XmList*background: 

Background color of lists such as Match list in Browsing window 

#DEDEDE 

WORKSHOP*topShadowColor: 

Color of shadows at top and left edges of buttons, text boxes, and so forth  

#FFFFFF 

Scrollbar Background and Toggle Button Colors

Table A-17 lists the resources for the colors of the scrollbar background (trough), and the colors in toggle buttons to indicate toggle on or off.

Table A-17 Colors for Trough and Toggle Buttons Used in Sun WorkShop

Resource Name 

Description 

Default Value 

WORKSHOP*HTML*troughColor:  

Background color for scrollbars 

#DEDEDE 

WORKSHOP*XmToggleButton.selectColor:  

Color for checkboxes when selected 

#FF9696 

WORKSHOP*XmToggleButton.fillOnSelect:  

Fill checkbox when selected 

true 

WORKSHOP*XmToggleButtonGadget.selectColor:  

Color for radio buttons when selected 

#FF9696 

WORKSHOP*XmToggleButtonGadget.fillOnSelect:  

Fill radio button when selected 

true 

ESERVE Resources

The following tables lists the ESERVE resources that you can change.

Emacs Editor Default Path Names

The resources listed in Table A-18 are used by the edit server to invoke the GNU Emacs and XEmacs text editors. If a fully qualified path is specified, it is executed.

Table A-18 Default Paths for Emacs Editors

Resource Name 

Default Value 

ESERVE*defaultGnuEmacsPath: 

emacs 

ESERVE*defaultXEmacsPath: 

xemacs 

The values for these resources can either be fully qualified paths or the base name of the command (for instance, myfavoriteemacs).

If a basename is used then it is invoked from the PATH environment variable.

Blinking Pointer

Table A-19 lists the resource to change the pointer in text editor windows to a non-blinking pointer. Default setting is for a blinking pointer. Set to 0 for a non-blinkng pointer.

Table A-19 Blinking Pointer Resource

Resource Name 

Default Value 

ESERVE*DtTerm.blinkRate: 

250 

Fonts for Motif Environments

Table A-20 lists font resources for the text editor windows that are specific to Motif environments only and are not used by CDE.

Table A-20 Fonts for Motif (non-CDE) windowing systems

Resource Name 

Default Value 

ESERVE.labelFontList: 

-*-lucida-medium-r-normal-*-12-*-*-*-*-*-*-* 

ESERVE.buttonFontList: 

-*-lucida-medium-r-normal-*-12-*-*-*-*-*-*-* 

ESERVE.textFontList: 

-*-lucidatypewriter-medium-r-normal-*-12-*-*-*-*-*-*-* 

ESERVE*dtTerm*userFont: 

-*-lucidatypewriter-medium-r-normal-*-12-*-*-*-*-*-*-* 

Text Editor Window Colors

Table A-21 lists the resource for foreground and background colors in the text editor windows.

Table A-21 Colors for Sun WorkShop Windows, Dialog Boxes, Menus, and Buttons

Resource Name 

Description 

Default Value 

ESERVE*foreground 

Foregroundcolor of windows (text such as labels) 

black 

ESERVE*background: 

Background color of windows 

#dededededede 

ESERVE*XmPushButton*background: 

Background color of buttons 

#dededededede 

ESERVE*XmMenuShell*background: 

Background color of manus 

#dededededede 

Scrolling List Background Color

Table A-22 lists the resource for the background color for scrolling lists available from a text editor.

Table A-22 Read-only Text Areas (lists)

Resource Name 

Description 

Default Value 

ESERVE*XmList*background: 

Background color of scrolling lists 

#dededededede 

Writable Text Area Background Color

Table A-23 lists colors for areas in the text editor windows containing text, other than menus and buttons (not applicable to Emacs and XEmacs).

Table A-23 Writable Text Areas

Resource Name 

Default Value 

ESERVE*XmTextField*background: 

white 

ESERVE*XmText*background: 

white 

ESERVE*dtTerm*background: 

white 

ESERVE*readwriteBackground: 

white 

Audible Warnings

The resource listed in Table A-24 enables you to turn off audible warning beeps. The possible values are -XmBell and -XmNONE.

Table A-24 Resource for Audible Warnings
 Resource Name Description Default Value
 ESERVE*audibleWarning: Turns audible beeps on and off XmBell

Browser Used to Display Web Updates

The resource listed in Table A-25 enables you to change the default path for the browser used to display the Sun WorkShop Web Updates page (see "Web Updates").

Table A-25 WebUpdates Browser
 Resource Description Default Value
 ESERVE.browser Path to browser used to display Web Updates sdtwebclient