Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16


NAME
bitmap, bmtoa, atobm - bitmap editor and converter utilities for the X Window System
 
SYNOPSIS
bitmap [ - options . . . ] [ filename ] [ basename ]

bmtoa [ - chars . . . ] [filename ]

atobm [ - chars cc ] [ - name variable ] [ - xhot number ] [ - yhot number ] [ filename ]

DESCRIPTION
The bitmap program is a rudimentary tool for creating or editing rectangular images made up of 1's and 0's. Bitmaps are used in X for defining clipping regions, cursor shapes, icon shapes, and tile and stipple patterns.
The bmtoa and atobm filters convert bitmap files (FILE FORMAT) to and from ASCII strings. They are most commonly used to quickly print out bitmaps and to generate versions for including in text.
 
COMMAND LINE OPTIONS
Bitmap supports the standard X Toolkit command line arguments (see X(1)). The following additional arguments are supported as well.
 
- size WIDTHHEIGHT
Specifies size of the grid in squares.
- sw dimension
Specifies the width of squares in pixels.
- sh dimension
Specifies the height of squares in pixels.
- gt dimension
Grid tolerance. If the square dimensions fall below the specified value, grid will be automatically turned off.
- grid, + grid
Turns on or off the grid lines.
- axes, + axes
Turns on or off the major axes.
- dashed, + dashed
Turns on or off dashing for the frame and grid lines.
- stippled, + stippled
Turns on or off stippling of highlighted squares.
- proportional, + proportional
Turns proportional mode on or off. If proportional mode is on, square width is equal to square height. If proportional mode is off, bitmap will use the smaller square dimension, if they were initially different.
- dashes filename
Specifies the bitmap to be used as a stipple for dashing.
- stipple filename
Specifies the bitmap to be used as a stipple for highlighting.
- hl color
Specifies the color used for highlighting.
- fr color
Specifies the color used for the frame and grid lines.
filename
Specifies the bitmap to be initially loaded into the program. If the file does not exist, bitmap will assume it is a new file.
basename
Specifies the basename to be used in the C code output file. If it is different than the basename in the working file, bitmap will change it when saving the file.
Bmtoa accepts the following option:
- chars cc
This option specifies the pair of characters to use in the string version of the bitmap. The first character is used for 0 bits and the second character is used for 1 bits. The default is to use dashes (- ) for 0's and sharp signs (# ) for 1's.
Atobm accepts the following options:
- chars cc
This option specifies the pair of characters to use when converting string bitmaps into arrays of numbers. The first character represents a 0 bit and the second character represents a 1 bit. The default is to use dashes (- ) for 0's and sharp signs (# ) for 1's.
- name variable
This option specifies the variable name to be used when writing out the bitmap file. The default is to use the basename of the filename command line argument or leave it blank if the standard input is read.
- xhot number
This option specifies the X coordinate of the hotspot. Only positive values are allowed. By default, no hotspot information is included.
- yhot number
This option specifies the Y coordinate of the hotspot. Only positive values are allowed. By default, no hotspot information is included.

USAGE
Bitmap displays grid in which each square represents a single bit in the picture being edited. Actual size of the bitmap image, as it would appear normally and inverted, can be obtained by pressing Meta-I key. You are free to move the image popup out of the way to continue editing. Pressing the left mouse button in the popup window or Meta-I again will remove the real size bitmap image.
If the bitmap is to be used for defining a cursor, one of the squares in the images may be designated as the hot spot. This determines where the cursor is actually pointing. For cursors with sharp tips (such as arrows or fingers), this is usually at the end of the tip; for symmetric cursors (such as crosses or bullseyes), this is usually at the center.
Bitmaps are stored as small C code fragments suitable for including in applications. They provide an array of bits as well as symbolic constants giving the width, height, and hot spot (if specified) that may be used in creating cursors, icons, and tiles.

EDITING
To edit a bitmap image simply click on one of the buttons with drawing commands (Point, Curve, Line, Rectangle, etc.) and move the pointer into the bitmap grid window. Press one of the buttons on your mouse and the appropriate action will take place. You can either set, clear or invert the gird squares. Setting a grid square corresponds to setting a bit in the bitmap image to 1. Clearing a grid square corresponds to setting a bit in the bitmap image to 0. Inverting a grid square corresponds to changing a bit in the bitmap image from 0 to 1 or 1 to 0, depending what its previous state was. The default behavior of mouse buttons is as specified below.
MouseButton1 Set
MouseButton2 Invert
MouseButton3 Clear
MouseButton4 Clear
MouseButton5 Clear
This default behavior can be changed by setting the button function resources. An example is provided below.
bitmap*button1Function: Set
bitmap*button2Function: Clear
bitmap*button3Function: Invert
etc.  
The button function applies to all drawing commands, including copying, moving and pasting, flood filling and setting the hot spot.
 

Home

DRAWING COMMANDS
Here is the list of drawing commands accessible through the buttons at the left side of the application's window. Some commands can be aborted by pressing A inside the bitmap window, allowing the user to select different guiding points where applicable.
 
Clear
This command clears all bits in the bitmap image. The grid squares will be set to the background color. Pressing C inside the bitmap window has the same effect.
Set
This command sets all bits in the bitmap image. The grid squares will be set to the foreground color. Pressing S inside the bitmap window has the same effect.
Invert
This command inverts all bits in the bitmap image. The grid squares will be inverted appropriately. Pressing I inside the bitmap window has the same effect.
Mark
This command is used to mark an area of the grid by dragging out a rectangular shape in the highlighting color. Once the area is marked, it can be operated on by a number of commands (see Up, Down, Left, Right, Rotate, Flip, Cut, etc.) Only one marked area can be present at any time. If you attempt to mark another area, the old mark will vanish. The same effect can be achieved by pressing Shift-MouseButton1 and dragging out a rectangular in the grid window. Pressing Shift-MouseButton2 will mark the entire grid area.
Unmark
This command will cause the marked area to vanish. The same effect can be achieved by pressing Shift-MouseButton3.
Copy
This command is used to copy an area of the grid from one location to another. If there is no marked grid area displayed, Copy behaves just like Mark described above. Once there is a marked grid area displayed in the highlighting color, this command has two alternative behaviors. If you click a mouse button inside the marked area, you will be able to drag the rectangle that represents the marked area to the desired location. After you release the mouse button, the area will be copied. If you click outside the marked area, Copy will assume that you wish to mark a different region of the bitmap image, thus it will behave like Mark again.
Move
This command is used to move an area of the grid from one location to another. Its behavior resembles the behavior of Copy command, except that the marked area will be moved instead of copied.
Flip Horizontally
This command will flip the bitmap image with respect to the horizontal axes. If a marked area of the grid is highlighted, it will operate only inside the marked area. Pressing H inside the bitmap window has the same effect.
Up
This command moves the bitmap image one pixel up. If a marked area of the grid is highlighted, it will operate only inside the marked area. Pressing UpArrow inside the bitmap window has the same effect.
Flip Vertically
This command will flip the bitmap image with respect to the vertical axes. If a marked area of the grid is highlighted, it will operate only inside the marked area. Pressing V inside the bitmap window has the same effect.
Left
This command moves the bitmap image one pixel to the left. If a marked area of the grid is highlighted, it will operate only inside the marked area. Pressing LeftArrow inside the bitmap window has the same effect.
Fold
This command will fold the bitmap image so that the opposite corners become adjacent. This is useful when creating bitmap images for tiling. Pressing F inside the bitmap window has the same effect.
Right
This command moves the bitmap image one pixel to the right. If a marked area of the grid is highlighted, it will operate only inside the marked area. Pressing RightArrow inside the bitmap window has the same effect.
Rotate Left
This command rotates the bitmap image 90 degrees to the left (counter clockwise.) If a marked area of the grid is highlighted, it will operate only inside the marked area. Pressing L inside the bitmap window has the same effect.
Down
This command moves the bitmap image one pixel down. If a marked area of the grid is highlighted, it will operate only inside the marked area. Pressing DownArrow inside the bitmap window has the same effect.
Rotate Right
This command rotates the bitmap image 90 degrees to the right (clockwise.) If a marked area of the grid is highlighted, it will operate only inside the marked area. Pressing R inside the bitmap window has the same effect.
Point
This command will change the grid squares underneath the mouse pointer if a mouse button is being pressed down. If you drag the mouse button continuously, the line may not be continuous, depending on the speed of your system and frequency of mouse motion events.
Curve
This command will change the grid squares underneath the mouse pointer if a mouse button is being pressed down. If you drag the mouse button continuously, it will make sure that the line is continuous. If your system is slow or bitmap receives very few mouse motion events, it might behave quite strangely.
Line
This command will change the gird squares in a line between two squares. Once you press a mouse button in the grid window, bitmap will highlight the line from the square where the mouse button was initially pressed to the square where the mouse pointer is located. By releasing the mouse button you will cause the change to take effect, and the highlighted line will disappear.
Rectangle
This command will change the gird squares in a rectangle between two squares. Once you press a mouse button in the grid window, bitmap will highlight the rectangle from the square where the mouse button was initially pressed to the square where the mouse pointer is located. By releasing the mouse button you will cause the change to take effect, and the highlighted rectangle will disappear.
Filled Rectangle
This command is identical to Rectangle, except at the end the rectangle will be filled rather than outlined .
Circle
This command will change the gird squares in a circle between two squares. Once you press a mouse button in the grid window, bitmap will highlight the circle from the square where the mouse button was initially pressed to the square where the mouse pointer is located. By releasing the mouse button you will cause the change to take effect, and the highlighted circle will disappear.
Filled Circle
This command is identical to Circle, except at the end the circle will be filled rather than outlined.
Flood Fill
This command will flood fill the connected area underneath the mouse pointer when you click on the desired square. Diagonally adjacent squares are not considered to be connected.
Set Hot Spot
This command designates one square in the grid as the hot spot if this bitmap image is to be used for defining a cursor. Pressing a mouse button in the desired square will cause a diamond shape to be displayed.
Clear Hot Spot
This command removes any designated hot spot from the bitmap image.
Undo
This command will undo the last executed command. It has depth one, that is, pressing Undo after Undo will undo itself.
 
FILE MENU
The File menu commands can be accessed by pressing the File button and selecting the appropriate menu entry, or by pressing Ctrl key with another key. These commands deal with files and global bitmap parameters, such as size, basename, filename etc.
 
New
This command will clear the editing area and prompt for the name of the new file to be edited. It will not load in the new file.
Load
This command is used to load a new bitmap file into the bitmap editor. If the current image has not been saved, user will be asked whether to save or ignore the changes. The editor can edit only one file at a time. If you need interactive editing, run a number of editors and use cut and paste mechanism as described below.
Insert
This command is used to insert a bitmap file into the image being currently edited. After being prompted for the filename, click inside the grid window and drag the outlined rectangle to the location where you want to insert the new file.
Save
This command will save the bitmap image. It will not prompt for the filename unless it is said to be < none> . If you leave the filename undesignated or -, the output will be piped to stdout.
Save As
This command will save the bitmap image after prompting for a new filename. It should be used if you want to change the filename.
Resize
This command is used to resize the editing area to the new number of pixels. The size should be entered in the WIDTHHEIGHT format. The information in the image being edited will not be lost unless the new size is smaller that the current image size. The editor was not designed to edit huge files.
Rescale
This command is used to rescale the editing area to the new width and height. The size should be entered in the WIDTHHEIGHT format. It will not do antialiasing and information will be lost if you rescale to the smaller sizes. Feel free to add you own algorithms for better rescaling.
Filename
This command is used to change the filename without changing the basename nor saving the file. If you specify - for a filename, the output will be piped to stdout.
Basename
This command is used to change the basename, if a different one from the specified filename is desired.
Quit
This command will terminate the bitmap application. If the file was not saved, user will be prompted and asked whether to save the image or not. This command is preferred over killing the process.
 

Home

EDIT MENU
The Edit menu commands can be accessed by pressing the Edit button and selecting the appropriate menu entry, or by pressing Meta key with another key. These commands deal with editing facilities such as grid, axes, zooming, cut and paste, etc.
 
Image
This command will display the image being edited and its inverse in its actual size in a separate window. The window can be moved away to continue with editing. Pressing the left mouse button in the image window will cause it to disappear from the screen.
Grid
This command controls the grid in the editing area. If the grid spacing is below the value specified by gridTolerance resource (8 by default), the grid will be automatically turned off. It can be enforced by explicitly activating this command.
Dashed
This command controls the stipple for drawing the grid lines. The stipple specified by dashes resource can be turned on or off by activating this command.
Axes
This command controls the highlighting of the main axes of the image being edited. The actual lines are not part of the image. They are provided to aid user when constructing symmetrical images, or whenever having the main axes highlighted helps your editing.
Stippled
This command controls the stippling of the highlighted areas of the bitmap image. The stipple specified by stipple resource can be turned on or off by activating this command.
Proportional
This command controls the proportional mode. If the proportional mode is on, width and height of all image squares are forced to be equal, regardless of the proportions of the bitmap window.
Zoom
This command controls the zoom mode. If there is a marked area of the image already displayed, bitmap will automatically zoom into it. Otherwise, user will have to highlight an area to be edited in the zoom mode and bitmap will automatically switch into it. One can use all the editing commands and other utilities in the zoom mode. When you zoom out, undo command will undo the whole zoom session.
Cut
This commands cuts the contents of the highlighted image area into the internal cut and paste buffer.
Copy
This command copies the contents of the highlighted image area into the internal cut and paste buffer.
Paste
This command will check if there are any other bitmap applications with a highlighted image area, or if there is something in the internal cut and paste buffer and copy it to the image. To place the copied image, click in the editing window and drag the outlined image to the position where you want to place i, and then release the button.
 
CUT AND PASTE
Bitmap supports two cut and paste mechanisms: the internal cut and paste and the global X selection cut and paste.
 
The internal cut and paste is used when executing copy and move drawing commands and also cut and copy commands from the edit menu. The global X selection cut and paste is used whenever there is a highlighted area of a bitmap image displayed anywhere on the screen.
 
To copy a part of image from another bitmap editor simply highlight the desired area by using the Mark command or pressing the shift key and dragging the area with the left mouse button. When the selected area becomes highlighted, any other applications (such as xterm, etc.) that use primary selection will discard their selection values and unhighlight the appropriate information. Now, use the Paste command for the Edit menu or control mouse button to copy the selected part of image into another (or the same) bitmap application. If you attempt to do this without a visible highlighted image area, the bitmap will fall back to the internal cut and paste buffer and paste whatever was there stored at the moment.

Home

WIDGETS
Below is the widget structure of the bitmap application. Indentation indicates hierarchical structure. The widget class name is given first, followed by the widget instance name. All widgets except the bitmap widget are from the standard Athena widget set.
Bitmap bitmap
TransientShell image
Box box
Label normalImage
Label invertedImage
TransientShell input
Dialog dialog
Command okay
Command cancel
TransientShell error
Dialog dialog
Command abort
Command retry
TransientShell qsave
Dialog dialog
Command yes
Command no
Command cancel
Paned parent
Form formy
MenuButton fileButton
SimpleMenu fileMenu
SmeBSB new
SmeBSB load
SmeBSB insert
SmeBSB save
SmeBSB saveAs
SmeBSB resize
SmeBSB rescale
SmeBSB filename
SmeBSB basename
SmeLine line
SmeBSB quit
MenuButton editButton
SimpleMenu editMenu
SmeBSB image
SmeBSB grid
SmeBSB dashed
SmeBSB axes
SmeBSB stippled
SmeBSB proportional
SmeBSB zoom
SmeLine line
SmeBSB cut
SmeBSB copy
SmeBSB paste
Label status
Pane pane
Bitmap bitmap
Form form
Command clear
Command set
Command invert
Toggle mark
Command unmark
Toggle copy
Toggle move
Command flipHoriz
Command up
Command flipVert
Command left
Command fold
Command right
Command rotateLeft
Command down
Command rotateRight
Toggle point
Toggle curve
Toggle line
Toggle rectangle
Toggle filledRectangle
Toggle circle
Toggle filledCircle
Toggle floodFill
Toggle setHotSpot
Command clearHotSpot
Command undo
 
COLORS
If you would like bitmap to be viewable in color, include the following in the # ifdef COLOR section of the file you read with xrdb:
*customization:- color
This will cause bitmap to pick up the colors in the app-defaults color customization file:
/usr/lib/X11/app-defaults/Bitmap-color
 

Home

BITMAP WIDGET
Bitmap widget is a stand-alone widget for editing raster images. It is not designed to edit large images, although it may be used in that purpose as well. It can be freely incorporated with other applications and used as a standard editing tool. The following are the resources provided by the bitmap widget.
Bitmap Widget
Header file Bitmap.h
Class bitmapWidgetClass
Class Name Bitmap
Superclass Bitmap
 

All the Simple Widget resources plus . . .

Name Class Type Default Value
Foreground Foreground Pixel XtDefaultForeground
Highlight Highlight  
PixelXtDefaultForeground framingFraming PixelXtDefaultForeground gridToleranceGridTolerance Dimension8 sizeSize String3232 dashedDashed BooleanTrue gridGrid BooleanTrue stippledStippled BooleanTrue proportionalProportional BooleanTrue axesAxes BooleanFalse squareWidthSquareWidth Dimension16 squareHeightSquareHeight Dimension16 marginMargin Dimension16 xHotXHot PositionNotSet (- 1) yHotYHot Position

NotSet (- 1) button1FunctionButton1Function DrawingFunctionSet button2FunctionButton2Function DrawingFunctionInvert button3FunctionButton3Function DrawingFunction

Clear button4FunctionButton4Function DrawingFunctionInvert button5FunctionButton5Function DrawingFunctionInvert filenameFilename StringNone ("") basenameBasename StringNone ("")
 
AUTHOR
Davor Matic, MIT X Consortium


Home

NAME
editres - a dynamic resource editor for X Toolkit applications
 
SYNTAX
editres [ - toolkitoption ... ]
 
OPTIONS
Editres accepts all of the standard X Toolkit command line options (see X(1)). The order of the command line options is not important.

DESCRIPTION
Editres is a tool that allows users and application developers to view the full widget hierarchy of any X Toolkit application that speaks the Editres protocol. In addition, editres will help the user construct resource specifications, allow the user to apply the resource to the application and view the results dynamically. Once the user is happy with a resource specification editres will append the resource string to the user's X Resources file.

USING EDITRES
Editres provides a window consisting of the following four areas:

Menu Bar
A set of popup menus that allow you full access to editres's features.
Panner
The panner allows a more intuitive way to scroll the application tree display.
Message Area
Displays information to the user about the action that editres expects of her.
Application Widget Tree
This area will be used to display the selected application's widget tree.

To begin an editres session select the Get Widget Tree menu item from the command menu. This will change the pointer cursor to cross hair. You should now select the application you wish look at by clicking on any of its windows. If this application understands the editres protocol then editres will display the application's widget tree in its tree window. If the application does not understand the editres protocol editres will inform you of this fact in the message area after a few seconds delay.

 
Once you have a widget tree you may now select any of the other menu options. The effect of each of these is described below.

COMMANDS
Get Widget Tree
Allows the user to click on any application that speaks the editres protocol and receive its widget tree.

Refresh Current Widget Tree
Editres only knows about the widgets that exist at the present time. Many applications create and destroy widgets on the fly. Selecting this menu item will cause editres to ask the application to resend its widget tree, thus updating its information to the new state of the application.

For example, xman only creates the widgets for its topbox when it starts up. None of the widgets for the manual page window are created until the user actually clicks on the Manual Page button. If you retrieved xman's widget tree before the manual page is active, you may wish to refresh the widget tree after the manual page has been displayed. This will allow you to also edit the manual page's resources.

Dump Widget Tree to a File
For documenting applications it is often useful to be able to dump the entire application widget tree to an ASCII file. This file can then be included in the manual page. When this menu item is selected a popup dialog is activated. Type the name of the file in this dialog, and either select okay, or type a carriage-return. Editres will now dump the widget tree to this file. To cancel the file dialog, select the cancel button.

Show Resource Box
This command will popup a resource box for the current application. This resource box (described in detail below) will allow the user to see exactly which resources can be set for the widget that is currently selected in the widget tree display. Only one widget may be currently selected; if greater or fewer are selected editres will refuse to pop up the resource box and put an error message in the Message Area.

Set Resource
This command will popup a simple dialog box for setting an arbitrary resource on all selected widgets. You must type in the resource name, as well as the value. You can use the Tab key to switch between the resource name field the resource value field.

Quit
Exits editres.
 

Home

TREE COMMANDS
The Tree menu contains several commands that allow operations to be performed on the widget tree.

Select Widget in Client
This menu item allows you to select any widget in the application; editres will then highlight the corresponding element the widget tree display. Once this menu item is selected the pointer cursor will again turn to a crosshair, and you must click any pointer button in the widget you wish to have displayed. Since some widgets are fully obscured by their children, it is not possible to get to every widget this way, but this mechanism does give very useful feedback between the elements in the widget tree and those in the actual application.

Select All
 
Unselect All
 
Invert All
These functions allow the user to select, unselect, or invert all widgets in the widget tree.

Select Children
 
Select Parents
These functions select the immediate parent or children of each of the currently selected widgets.
 
Select Descendants
 
Select Ancestors
These functions select all parents or children of each of the currently selected widgets. This is a recursive search.
 
Show Widget Names
 
Show Class Names
 
Show Widget Windows
When the tree widget is initially displayed the labels of each widget in the tree correspond to the widget names. These functions will cause the label of all widgets in the tree to be changed to show the class name, IDs, or window associated with each widget in the application. The widget IDs, and windows are shown as hex numbers.

In addition there are keyboard accelerators for each of the Tree operations. If the input focus is over an individual widget in the tree, then that operation will only effect that widget. If the input focus is in the Tree background it will have exactly the same effect as the corresponding menu item.

The translation entries shown may be applied to any widget in the application. If that widget is a child of the Tree widget, then it will only affect that widget, otherwise it will have the same effect as the commands in the tree menu.

Flash Active Widgets
This command is the inverse of the Select Widget in Client command, it will show the user each widget that is currently selected in the widget tree, by flashing the corresponding widget in the application numFlashes (three by default) times in the flashColor.
Key Option Translation Entry
space Unselect Select(nothing)
w Select Select(widget)
s Select Select(all)
i Invert Select(invert)
c Select Children Select(children)
d Select Descendants Select(descendants)
p Select Parent Select(parent)
a Select Ancestors Select(ancestors)
N Show Widget Names Relabel(name)
C Show Class Names Relabel(class)
I Show Widget IDs Relabel(id)
W Show Widget Windows Relabel(window)
T Toggle Widget/Class Name Relabel(toggle)
 
Clicking button 1 on a widget adds it to the set of selected widgets. Clicking button 2 on a widget deselects all other widgets and then selects just that widget. Clicking button 3 on a widget toggles its label between the widget's instance name the widget's class name.

Home

USING THE RESOURCE BOX
The resource box contains five different areas. Each of the areas, as they appear on the screen, from top to bottom will be discussed.

The Resource Line
This area at the top of the resource box shows the current resource name exactly as it would appear if you were to save it to a file or apply it.

The Widget Names and Classes
This area allows you to select exactly which widgets this resource will apply to.
 
The area contains four lines. The first contains the name of the selected widget and all its ancestors, and the more restrictive dot (.) separator. The second line contains less specific the Class names of each widget, and well as the less restrictive star (*) separator. The third line contains a set of special buttons called Any Widget which will generalize this level to match any widget. The last line contains a set of special buttons called Any Widget Chain which will turn the single level into something that matches zero or more levels.

The initial state of this area is the most restrictive, using the resource names and the dot separator. By selecting the other buttons in this area you can ease the restrictions to allow more and more widgets to match the specification. The extreme case is to select all the Any Widget Chain buttons, which will match every widget in the application. As you select different buttons the tree display will update to show you exactly which widgets will be effected by the current resource specification.

Normal and Constraint Resources
The next area allows you to select the name of the normal or constraint resources you wish to set. Some widgets may not have constraint resources, so that area will not appear.

Resource Value
This next area allows you to enter the resource value. This value should be entered exactly as you would type a line into your resource file. Thus it should contain no unescaped new-lines. There are a few special character sequences for this file:
 
n - This will be replaced with a newline.
 
# # # - Where # is any octal digit. This will be replaced with a single byte that contains this sequence interpreted as an octal number. For example, a value containing a NULL byte can be stored by specifying 000.
 
< new-line > - This will compress to nothing.
 
- This will compress to a single backslash.

Command Area
This area contains several command buttons, described in this section.

Set Save File
This button allows the user to modify file that the resources will be saved to. This button will bring up a dialog box that will ask you for a filename; once the filename has been entered, either hit carriage-return or click on the okay button. To pop down the dialog box without changing the save file, click the cancel button.

Save
This button will append the resource line described above to the end of the current save file. If no save file has been set the Set Save File dialog box will be popped up to prompt the user for a filename.

Apply
This button attempts to perform a XtSetValues call on all widgets that match the resource line described above. The value specified is applied directly to all matching widgets. This behavior is an attempt to give a dynamic feel to the resource editor. Since this feature allows users to put an application in states it may not be willing to handle, a hook has been provided to allow specific applications to block these SetValues requests (see Blocking Editres Requests below).

Unfortunately due to design constraints imposed on the widgets by the X Toolkit and the Resource Manager, trying to coerce an inherently static system into dynamic behavior can cause strange results. There is no guarantee that the results of an apply will be the same as what will happen when you save the value and restart the application. This functionality is provided to try to give you a rough feel for what your changes will accomplish, and the results obtained should be considered suspect at best. Having said that, this is one of the ncatest features of editres, and I strongly suggest that you play with it, and see what it can do.

Save and Apply
This button combines the Save and Apply actions described above into one button.

Popdown Resource Box
This button will remove the resource box from the display.
 
BLOCKING EDITRES REQUESTS
The editres protocol has been built into the Athena Widget set. This allows all applications that are linked against Xaw to be able to speak to the resource editor. While this provides great flexibility, and is a useful tool, it can quite easily be abused. It is therefore possible for any Xaw application to specify a value for the editresBlock resource described below, to keep editres from divulging information about its internals, or to disable the SetValues part of the protocol.

editresBlock (Class EditresBlock)
Specifies which type of blocking this application wishes to impose on the editres protocol.

The accepted values are:
all Block all requests.
setValues Block all SetValues requests. As this is the only editres request that actually modifies the application, this is in effect stating that the application is read-only.
none Allow all editres requests.
 
Remember that these resources are set on any Xaw application, not editres. They allow individual applications to keep all or some of the requests editres makes from ever succeeding. Of course, editres is also an Xaw application, so it may also be viewed and modified by editres (rather recursive, I know), these commands can be blocked by setting the editresBlock resource on editres itself.

Home

RESOURCES
For editres the available application resources are:

numFlashes (Class NumFlashes)
Specifies the number of times the widgets in the application will be flashed when the Show Active Widgets command in invoked.

flashTime (Class FlashTime)
Amount of time between the flashes described above.

flashColor (Class flashColor)
Specifies the color used to flash application widgets. A bright color should be used that will immediately draw your attention to the area being flashed, such as red or yellow.

saveResourcesFile (Class SaveResourcesFile)
This is the file the resource line will be append to when the Save button activated in the resource box.

WIDGETS
In order to specify resources, it is useful to know the hierarchy of the widgets which compose editres. In the notation below, indentation indicates hierarchical structure. The widget class name is given first, followed by the widget instance name.

Editres editres
Paned paned
Box box
MenuButton commands
SimpleMenu menu
SmeBSB sendTree
SmeBSB refreshTree
SmeBSB dumpTreeToFile
SmeLine line
SmeBSB getResourceList
SmeLine line
SmeBSB quit
MenuButton treeCommands
SimpleMenu menu
SmeBSB showClientWidget
SmeBSB selectAll
SmeBSB unselectAll
SmeBSB invertAll
SmeLine line
SmeBSB selectChildren
SmeBSB selectParent
SmeBSB selectDescendants
SmeBSB selectAncestors
SmeLine line
SmeBSB showWidgetNames
SmeBSB showClassNames
SmeBSB showWidgetIDs
SmeBSB showWidgetWindows
SmeLine line
SmeBSB flashActiveWidgets
Paned hPane
Panner panner
Label uscrMessage
Crip grip
Porthole porthole
Tree tree
Toggle < name of widget in application>
.
.
.
TransientShell resourceBox
Paned pane
Label resourceLabel
Form namesAndClasses
Toggle dot
Toggle star
Toggle any
Toggle name
Toggle class
.
.
.
Label namesLabel
List namesList
Label constraintLabel
List constraintList
Form valueForm
Label valueLabel
Text valueText
Box commandBox
Command setFile
Command save
Command apply
Command saveAndApply
Command cancel
Grip grip
Grip grip
 

Home

ENVIRONMENT
DISPLAY
to get the default host and display number.

XENVIRONMENT
to get the name of a resource file that overrides the global resources stored in the RESOURCE_MANAGER property.

FILES
/usr/lib/X11/app-defaults/Editres - specifies required resources

SEE ALSO
X(1), xrdb(1), Athena Widget Set - C Language Interface in SUPER-UX X Toolkit Programming Manual

RESTRICTIONS
This is a prototype, there are lots of nifty features I would love to add, but I hope this will give you some ideas about what a resource editor can do.

AUTHOR
Chris D. Peterson, formerly MIT X Consortium
Home

NAME
listres - list resources in widgets

SYNOPSIS
listres [-option...]

DESCRIPTION
The listres program generates a list of a widget's resource database. The class in which each resource is first defined, the instance and class name, and the type of each resource is listed. If no specific widgets or the -all switch are given, a two-column list of widget names and their class hierarchies is printed.

OPTIONS
Listres accepts all of the standard toolkit command line options along with those listed below:
- all
This option indicates that listres should print information for all known widgets and objects.
- nosuper
This option indicates that resources that are inherited from a superclass should not be listed.
This is useful for determining which resources are new to a subclass.
- variable
This option indicates that widgets should be identified by the names of the class record variables rather than the class name given in the variable. This is useful for distinguishing subclasses that have the same class name as their superclasses.
- top name
This option specifies the name of the widget to be treated as the top of the hierarchy. Case is not significant, and the name may match either the class variable name or the class name. The default is "core".
- format printf- string
This option specifies the printf-style format string to be used to print out the name, instance, class, and type of each resource.
 
X DEFAULTS
To be written.

SEE ALSO
X(1), xrdb(1), appropriate widget documents

BUGS
On operating systems that do not support dynamic linking of run-time routines, this program must have all of its known widgets compiled in. The sources provide several tools for automating this process for various widget sets.

COPYRIGHT
Copyright 1989 X Consortium
See X(1) for a full statement of rights and permissions.

AUTHOR
Jim Fulton, MIT X Consortium
Home

NAME
mkfontdir, fonts.dir, fonts.scale, fonts.alias - create an index of X font files in a directory

SYNOPSIS
mkfontdir [directory-name ... ]

DESCRIPTION
For each directory argument, mkfontdir reads all of the font files in the directory searching for properties named "FONT", or (failing that) the name of the file stripped of its suffix. These are converted to lower case and used as font names, and, along with the name of the font file, are written out to the file "fonts.dir" in the directory. The X server and font server use "fonts.dir" to find font files.

The kinds of font files read by mkfontdir depend on configuration parameters, but typically include PCF (suffix ".pcf"), SNF (suffix ".snf") and BDF (suffix ".bdf"). If a font exists in multiple formats, mkfontdir will first choose PCF, then SNF and finally BDF.

The first line of fonts.dir gives the number of fonts in the file. The remaining lines list the fonts themselves, one per line, in two fields. First is the name of the font file, followed by a space and the name of the font.

SCALABLE FONTS
Because scalable font files do not usually include the X font name, the file "fonts.scale" can be used to name the scalable fonts in the directory. The fonts listed in it are copied to fonts.dir by mkfontdir. "fonts.scale" has the same format as the "fonts.dir" file.

FONT NAME ALIASES
The file "fonts.alias", which can be put in any directory of the font-path, is used to map new names to existing fonts, and should be edited by hand. The format is two white-space separated columns, the first containing aliases and the second containing font-name patterns. Lines beginning with "!" are comment lines and are ignored.

If neither the alias nor the value specifies the size fields of the font name, this is a scalable alias. A font name of any size that matches this alias will be mapped to the same size of the font that the alias resolves to.

When a font alias is used, the name it references is searched for in the normal manner, looking through each font directory in turn. This means that the aliases need not mention fonts in the same directory as the alias file.

To embed white space in either name, simply enclose it in double-quote marks; to embed double-quote marks (or any other character), precede them with back-slash:

"magic-alias with spaces" "" "fontname" with quotes"

regular-alias fixed

If the string "FILE_NAMES_ALIASES" stands alone on a line, each file-name in the directory (stripped of its suffix) will be used as an alias for that font.

FlLES
fonts.dir
List of fonts in the directory and the files they are stored in. Created by mkfontdir. Read by the X server and font server each time the font path is set (see xset(1)).
fonts.scale
List of scalable fonts in the directory. Contents are copied to fonts.dir by mkfontdir.
fonts.alias
List of font name aliases. Read by the X server and font server each time the font path is set (see xset(1)).
 
SEE ALSO
X(1), Xserver(1), xfs(1), xset(1)
Home

NAME
oclock - round X clock

SYNOPSIS
oclock [- option ... ]

DESCRIPTION
Oclock simply displays the current time on an analog display.

OPTIONS
- fg color
choose a different color for the both hands and the jewel of the clock

- bg color
choose a different color for the background.

- jewel color
choose a different color for the jewel on the clock.

- minute color
choose a different color for the minute hand of the clock.
- hour color
choose a different color for the hour hand of the clock.
- backing { WhenMapped Always NotUseful }
selects an appropriate level of backing store.
- geometry geometry
define the initial window geometry; see X(1).
- display display
specify the display to use; see X(1).
- bd color
choose a different color for the window border.
- bw width
choose a different width for the window border. As the Clock widget changes its border around quite a bit, this is most usefully set to zero.
- shape
causes the clock to use the Shape extension to create an oval window. This is the default unless the shapeWindow resource is set to false.

- noshape
causes the clock to not reshape itself and ancestors to exactly fit the outline of the clock.
- transparent
causes the clock to consist only of the jewel, the hands, and the border.

COLORS
If you would like your clock to be viewable in color, include the following in the # ifdef COLOR section you read with xrdb:
 
*customization: -color
 

This will cause oclock to pick up the colors in the app-defaults color customization file: < XRoot> /lib/X 11/app-defaults/Clock-color. Below are the default colors:

Clock*Background: grey
Clock*BorderColor: light blue
Clock*hour: yellow
Clock*jewel: yellow
Clock*minute: yellow

SEE ALSO
X(1), X Toolkit documentation


AUTHOR
Keith Packard, MIT X Consortium
Home

NAME
resize - set TERMCAP and terminal settings to current xterm window size

SYNOPSIS
resize [ -u | -c ] [ -s [ row col ] ]

DESCRIPTION
Resize prints a shell command for setting the TERM and TERMCAP environment variables to indicate the current size of xterm window from which the command is run. For this output to take effect, resize must either be evaluated as part of the command line (usually done with a shell alias or function) or else redirected to a file which can then be read in. From the C shell (usually known as /bin/csh), the following alias could be defined in the user's .cshrc:

 

% alias rs 'set noglob; eval 'resize"
After resizing the window, the user would type:
% rs
Users of versions of the Bourne shell (usually known as /bin/sh) that don't have command functions will need to send the output to a temporary file and the read it back in with the ¬." command:
$ resize > /tmp/out
$ . /tmp/out

OPTIONS
The following options may be used with resize:
-u This option indicates that Bourne shell commands should be generated even if the user's current shell isn't /bin/sh.
-c This option indicates that C shell commands should be generated even if the user's current shell isn't /bin/csh.
-s [rows columns] This option indicates that Sun console escape sequences will be used instead of the special xterm escape code. If rows and columns are given, resize will ask the xterm to resize itself. However, the window manager may choose to disallow the change.
 
FlLES
/etc/termcap for the base termcap entry to modify.
~/.cshrc user's alias for the command.
 
SEE ALSO
csh(1), tset(1), xterm(1)

AUTHORS
Mark Vandevoorde (MIT-Athena), Edward Moy (Berkeley)
Copyright (c) 1984, 1985 by X Consortium
See X(1) for a complete copyright notice.

BUGS
The - u or - c must appear to the left of - s if both are specified.

Home


NAME
sessreg - manage utmp/wtmp entries for non-init clients

SYNOPSIS
sessreg [-w wtmp-file] [-u utmp-file] [-l line-name] [-h host-name] [-s slot-number] [-x Xservers-file] [-t ttysfile] [-a] [-d] user-name

DESCRIPTION
Sessreg is a simple program for managing utmp/wtmp entries for xdm sessions.

System V has a better interface to /etc/utmp than BSD; it dynamically allocates entries in the file, instead of writing them at fixed positions indexed by position in /etc/ttys.

To manage BSD-style utmp files, sessreg has two strategies. In conjunction with xdm, the -x option counts the number of lines in /etc/ttys and then adds to that the number of the line in the Xservers file which specifies the display. The display name must be specified as the "line-name" using the -l option. This sum is used as the "slot-number" in /etc/utmp that this entry will be written at. In the more general case, the -s option specifies the slot-number directly. If for some strange reason your system uses a file other that /etc/ttys to manage init, the -t option can direct sessreg to look elsewhere for a count of terminal sessions.

Conversely, System V managers will not ever need to use these options (-x, -s and -t). To make the program easier to document and explain, sessreg accepts the BSD-specific flags in the System V environment and ignores them.

BSD also has a host-name field in the utmp file which doesn't exist in System V. This option is also ignored by the System V version of sessreg.


USAGE
In Xstartup, place a call like:
sessreg -a -l $DISPLAY -x /usr/X11R6/lib/xdm/Xservers $USER
and in Xreset:
sessreg -d -l $DISPLAY -x /usr/X11R6/lib/xdm/Xservers $USER
 

OPTIONS
-w wtmp-file

This specifies an alternate wtmp file, instead of /usr/adm/wtmp for BSD or /etc/wtmp for sysV. The special name "none" disables writing records to /usr/adm/wtmp.
-u utmp-file
This specifies an alternate utmp file, instead of "/etc/utmp". The special name "none" disables writing records to /etc/utmp.
-l line-name
This describes the "line" name of the entry. For terminal sessions, this is the final pathname segment of the terminal device filename (e.g. ttyd0). For X sessions, it should probably be the local display name given to the users session (e.g. :0). If none is specified, the terminal name will be determined with ttyname(3) and stripped of leading components.
-h host-name
This is set for BSD hosts to indicate that the session was initiated from a remote host. In typical xdm usage, this options is not used.
-s slot-number
Each potential session has a unique slot number in BSD systems, most are identified by the position of the line-name in the /etc/ttys file. This option overrides the default position determined with ttyslot(3). This option is inappropriate for use with xdm, the -x option is more useful.
-x Xservers-file
As X sessions are one-per-display, and each display is entered in this file, this options sets the slot-number to be the number of lines in the ttys-file plus the index into this file that the linename is found.
-t ttys-file
This specifies an alternate file which the -x option will use to count the number of terminal sessions on a host.
-a
This session should be added to utmp/wtmp.
-d
This session should be deleted from utmp/wtmp. One of -a/-d must be specified.
 
SEE ALSO
xdm(1)

AUTHOR
Keith Packard, MIT X Consortium

Home

NAME
showsnf - print contents of an SNF file

SYNOPSIS
showsnf [-v][-g][-m][-M][-l][-L][-p# ][-u# ]

DESCRIPTION
The showsnf utility displays the contents of font files in the Server Natural Format produced by bsdtosnf. It is usually only to verify that a font file hasn't been corrupted or to convert the individual glyphs into arrays of characters for proofreading or for conversion to some other format.

OPTIONS
-v
This option indicates that character bearings and sizes should be printed.
-g
This option indicates that character glyph bitmaps should be printed.
-m
This option indicates that the bit order of the font is MSBFirst (most significant bit first).
-l
This option indicates that the bit order of the font is LSBFirst (least significant bit first).
-M
This option indicates that the byte order of the font is MSBFirst (most significant byte first).
-L
This option indicates that the byte order of the font is LSBFirst (least significant byte first).
-p#
This option specifies the glyph padding of the font (# is a number).
-u#
This option specifies the scanline unit of the font (# is a number).
 
SEE ALSO
X(1), Xserver(1), bdftosnf(1)

BUGS
There is no way to just print out a single glyph.

Home

Contents Previous Chapter Chapter 1 Cont. Next Chapter