Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
15.  Advanced Front Panel Customization Front Panel Configuration Files How the Front Panel Is Assembled: Precedence Rules  Previous   Contents   Next 
   
 

Dynamically Created Front Panel Files

When the user customizes the Front Panel using the Install Icon control and pop-up menus, files are written to the directory HomeDirectory/.dt/types/fp_dynamic.

The Front Panel creates an additional file, HomeDirectory/.dt/sessions/dtwmfp.session, that is used to save and restore the state of the customized Front Panel for each session.

Administering User Interface Customizations

Users can use the pop-up menus and Install Icon controls of Front Panel controls to extensively customize the Front Panel.

This section describes how to:

  • Prevent certain personal customizations. For example, you may want to make it impossible for a user to delete a control.

  • Undo personal customizations. For example, a user might request that you restore a single control accidentally deleted.

To Prevent Personal Customizations

  1. If the control is a built-in control, copy its definition from /usr/dt/appconfig/types/language/dtwm.fp to /etc/dt/appconfig/types/language/name.fp.

  2. Add the following line to the control definition:

    	LOCKED   True

To Restore a Deleted Control or Subpanel

The Restore Front Panel action in the Desktop_Tools application group removes all Front Panel customizations made with the user interface. Users can use this action to remove all their personal customizations made with the Front Panel's pop-up menus.

Use the following procedure to restore an individual control.

  • In the HomeDirectory/.dt/types/fp_dynamic directory, remove the file that was created when the user deleted the control. The control will have the same name as the original control that was deleted.

For example, if the user deleted the Icon Editor control, a file in the fp_dynamic directory will contain:

	CONTROL IconEditor
{
		...
  	DELETE   True
	}

When the user deletes a subpanel, a separate dynamic file is created for the subpanel and for each control in the subpanel.

Organization of the Front Panel Definition

The Front Panel is built by assembling definitions for its components. Each of these components has required syntax that defines where the component is placed in the Front Panel, what the component looks like, and how it behaves.

Front Panel Components

Figure 15-1 Front Panel components

The Front Panel is assembled from the outside inward:

  • The PANEL is the top-level container, or parent, for the entire Front Panel.

  • The PANEL is a container for one or more BOXes.

  • A BOX is a container for one or more CONTROLs.

    There are two special types of containers:

  • A SUBPANEL is associated with a particular control (the control is the container for the subpanel). Subpanels "slide up" from the control with which they are associated.

  • The SWITCH contains the buttons for changing workspaces plus additional controls.

General Syntax of the Front Panel Definition

Each component in the Front Panel is defined separately using the syntax:

COMPONENT name
 {
   KEYWORD       value
   KEYWORD       value
   ...
 }

Some keywords are required, others are optional. For more information, see the dtfpfile(4X) man page.

PANEL Definition

The PANEL is the top-level component. Its definition includes:

  • The Front Panel name

  • Fields describing the general appearance and behavior of the entire Front Panel

     PANEL front_panel_name
     {
     	KEYWORD				value
     	KEYWORD				value
         ...
     }

    The front_panel_name is a unique name for the Front Panel. The default name is "FrontPanel."

BOX Definitions

A BOX definition describes:

  • The BOX name

  • Which PANEL the box is in (CONTAINER_NAME)

  • The position of the box in the PANEL (POSITION_HINTS)

  • Fields describing appearance and behavior that apply to the entire box

    BOX box_name
     {
     	CONTAINER_NAME					front_panel_name
     	POSITION_HINTS					position
     	KEYWORD						value
     	KEYWORD						value
     	...
     }
 
 
 
  Previous   Contents   Next