summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2024-02-29 20:19:25 -0500
committerThomas E. Dickey <dickey@his.com>2024-03-02 16:40:07 +0000
commitcc1e73a85d437ebd0d5c8efbe14a7f398c1b9fcc (patch)
tree6826f5bc3d9bb6a3148e39ca9ac1d730ac4c8617
parent080e6e49825c2e03adb0c5dd8dad53767ec41ce6 (diff)
manpage: improve formatting consistency of bold/italics
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
-rw-r--r--man/Xaw.man243
1 files changed, 150 insertions, 93 deletions
diff --git a/man/Xaw.man b/man/Xaw.man
index f6b77a8..b938107 100644
--- a/man/Xaw.man
+++ b/man/Xaw.man
@@ -31,6 +31,10 @@
.ns
.TP
..
+.de bP
+.ie n .IP \(bu 4
+.el .IP \(bu 2
+..
.SH NAME
Xaw \-
X Athena Widgets
@@ -48,23 +52,53 @@ which may be installed in __docdir__, or found on the X.Org website.
.SH ACTIONS
All of the \fIXaw\fR widgets now have the additional translations
.B call-proc, declare, get-values
-and \fBset-values\fP. The syntax for these actions is:
+and \fBset-values\fP.
+The syntax for these actions is:
.PP
.I action-name \fP(\fIboolean-expression\fP, \fIarguments\fP)
.PP
-\fBAction-name\fP is one of \fIcall-proc\fP, \fIdeclare\fP,
-\fIget-values\fP or \fIset-values\fP.
+\fIaction-name\fP is one of \fBcall-proc\fP, \fBdeclare\fP,
+\fBget-values\fP or \fBset-values\fP.
.PP
-\fBBoolean-expression\fP is composed with the operators \fI|\fR (or), \fI&\fR
-(and), \fI^\fR (xor), and \fI~\fR (not).
-The operands can be a variable name,
-which starts with a \fI$\fR; a resource name without the bindings \fI.\fP
-or \fI*\fP; or a constant name, including \fImine\fP (event->xany.window
-== XtWindow(widget)), \fIfaked\fP (event->xany.send_event != 0), \fItrue\fP (1)
-and \fIfalse\fP (0).
+\fIboolean-expression\fP is composed with the operators
+.RS
+.TP
+\fB|\fR (or),
+.TP
+\fB&\fR (and),
+.TP
+\fB^\fR (xor), and
+.TP
+\fB~\fR (not).
+.RE
+.IP
+Its operands can be
+.RS
+.bP
+a variable name, which starts with a \fI$\fR,
+.bP
+a resource name without the bindings \fI.\fP or \fI*\fP, or
+.bP
+a constant name, including
+.RS
+.bP
+\fImine\fP (event->xany.window == XtWindow(widget)),
+.bP
+\fIfaked\fP (event->xany.send_event != 0),
+.bP
+\fItrue\fP (1) and
+.bP
+\fIfalse\fP (0).
+.RE
+.RE
.PP
-\fBArguments\fP are self-explanatory; when starting with a \fI$\fP they name
-a variable, otherwise, they indicate a resource name.
+\fIarguments\fP are self-explanatory:
+.RS
+.bP
+when starting with a \fI$\fP they name a variable,
+.bP
+otherwise they indicate a resource name.
+.RE
.TP 8
.B call-proc \fP(\fIboolean-expression\fP, \fIprocedure-name\fP)
This action allows the evaluation of a boolean expression in the first
@@ -72,7 +106,7 @@ parameter before calling a action procedure.
The procedure is only called if the expression evaluates as true.
Example:
.EX
-call-proc("$inside & $pressed", notify)
+\fBcall-proc\fP("$inside & $pressed", notify)
.EE
.TP 8
.B declare \fP(\fIboolean-expression\fP, \fIvariable\fP, \fIvalue\fP, ...)
@@ -80,7 +114,7 @@ This action is used to create new variables or change their values.
Any number of variable-value tuples may be specified.
Example:
.EX
-declare(1, $pressed, 1)
+\fBdeclare\fP(1, $pressed, 1)
.EE
.TP 8
.B get-values \fP(\fIboolean-expression\fP, \fIvariable\fP, \fIvalue\fP, ...)
@@ -88,7 +122,7 @@ This action reads a widget resource value into a variable.
Any number of variable-value tuples may be specified.
Example:
.EX
-get-values(1, $fg, foreground, $bg, background)
+\fBget-values\fP(1, $fg, foreground, $bg, background)
.EE
.TP 8
.B set-values \fP(\fIboolean-expression\fP, \fIvariable\fP, \fIvalue\fP, ...)
@@ -97,16 +131,17 @@ variable.
Any number of variable-value tuples may be specified.
Example:
.EX
-set-values(1, foreground, $bg, background, $fg)
+\fBset-values\fP(1, foreground, $bg, background, $fg)
.EE
+.ne 5
.PP
Here is a sample translation to make a label widget behave like a button:
.PP
-.nf
+.EX
<Map>: get-values(1, $fg, foreground, $bg, background)\en\e
<Btn1Down>: set-values(1, foreground, yellow, background, gray30)\en\e
<Btn1Up>: set-values(1, foreground, $fg, background, $bg)
-.fi
+.EE
.SH DISPLAY LISTS
All of the \fBXaw\fP widgets have now the additional resource
\fIdisplayList\fP.
@@ -116,68 +151,77 @@ The displayList resource has the syntax:
.PP
\fI[class-name:]function-name arguments[[{;\en}]...]\fP
.PP
-\fBClass-name\fP is any registered set of functions to draw in the widget.
-Currently the only existing class is \fIxlib\fP, which provides access to
+\fIclass-name\fP is any registered set of functions to draw in the widget.
+Currently the only existing class is \fBxlib\fP, which provides access to
the Xlib drawing primitives.
.PP
-\fBFunction-name\fP is the drawing or configuration function to be called,
+\fIfunction-name\fP is the drawing or configuration function to be called,
described below.
.PP
-\fBArguments\fP may be anything suitable to the displayList function being
+\fIarguments\fP may be anything suitable to the displayList function being
called.
When the function requires a coordinate, the syntax is
-\fI{+-}<integer>\fP or \fI<integer>/<integer>\fP. Examples:
-.nf
- +0,+0 top, left
- -0,-0 bottom, right
- -+10,-+10 bottom+10, right+10
- +0,1/2 left, vertical-center
-.fi
-.TP 8
-.B arc-mode \fPmode
+.IP
+.EX
+\fI{+-}<integer>\fP or
+\fI<integer>/<integer>\fP.
+.EE
+.ne 6
+.IP
+Examples:
+.RS
+.EX
++0,+0 top, left
+-0,-0 bottom, right
+-+10,-+10 bottom+10, right+10
++0,1/2 left, vertical-center
+.EE
+.RE
+.TP 8
+.B arc-mode \fImode
Sets the arc mode.
Accepted \fImode\fPs are "pieslice" and "chord", which
set the arc to ArcPieSlice or ArcChord, respectively.
Example:
.EX
-arc-mode chord
+\fBarc-mode\fP chord
.EE
.TP 8
-.B bg \fPcolor-spec
+.B bg \fIcolor-spec
.TQ
-.B background \fPcolor-spec
-Sets the background color.
+.B background \fIcolor-spec
+Sets the background color.
\fIcolor-spec\fP must a valid color
specification.
Example:
.EX
-background red
+\fBbackground\fP red
.EE
.TP 8
-.B cap-style \fPstyle
+.B cap-style \fIstyle
Sets the cap style.
Accepted \fIstyle\fPs are "notlast", "butt", "round",
and "projecting", which set the cap style to CapNotLast, CapBut, CapRound
or CapProjecting, respectively.
Example:
.EX
-cap-style round
+\fBcap-style\fP round
.EE
.TP 8
-.B clip-mask \fPpixmap-spec
+.B clip-mask \fIpixmap-spec
Sets the pixmap for the clip mask.
Requires a pixmap parameter, as described in the \fBPIXMAPS\fP section below.
Example:
.EX
-clip-mask xlogo11
+\fBclip-mask\fP xlogo11
.EE
.TP 8
-.B clip-origin \fPx,y
+.B clip-origin \fIx,y
Sets the clip x and y origin.
Requires two arguments, the x and y coordinates.
Example:
.EX
-clip-origin 10,10
+\fBclip-origin\fP 10,10
.EE
.TP 8
.B clip-rects \fPx1,y1,x2,y2 [...,xn,yn]
@@ -189,17 +233,17 @@ The arguments are coordinates.
The parser calculates the width and height of the rectangles.
Example:
.EX
-clip-rects 0,0,10,20, 20,10,30,30
+\fBclip-rects\fP 0,0,10,20, 20,10,30,30
.EE
.TP 8
.B coord-mode \fPmode
-Changes the coord mode for \fIfill-polygon\fP, \fIdraw-lines\fP, and
+Changes the coordinate mode for \fIfill-polygon\fP, \fIdraw-lines\fP, and
\fIdraw-points\fP.
Accepted parameters are "modeorigin" and "previous",
that sets the coord mode to CoordModeOrigin or CoordModePrevious, respectively.
Example:
.EX
-coord-mode previous
+\fBcoord-mode\fP previous
.EE
.TP 8
.B copy-area \fP{pixmap-spec|.},dstx,dsty[,x2,y2,srcx,srcy]
@@ -212,7 +256,7 @@ if not defined, the parser calculates them.
\fIsrc_x\fP and \fIsrc_y\fP default to zero.
Example:
.EX
-copy-area Term,10,10
+\fBcopy-area\fP Term,10,10
.EE
.TP 8
.B copy-plane \fP{pixmap-spec|.},dstx,dsty[,x2,y2,srcx,srcy,plane]
@@ -226,7 +270,7 @@ if not defined, the parser calculates them.
\fIPlane\fP defaults to one.
Example:
.EX
-copy-plane star,10,10
+\fBcopy-plane\fP star,10,10
.EE
.TP 8
.B dashes \fPi1[...,in]
@@ -234,7 +278,7 @@ Sets the dashes for line drawing.
Accepts up to 127 arguments.
Example:
.EX
-dashes 3,7 9,10
+\fBdashes\fP 3,7 9,10
.EE
.TP 8
.B draw-arc \fPx1,y1,x2,y2[,start-angle,end-angle]
@@ -244,7 +288,7 @@ The two remaining arguments, if specified,
are the start and end angle, in degrees.
Example:
.EX
-draw-arc +0,+0,-1,-1,0,90
+\fBdraw-arc\fP +0,+0,-1,-1,0,90
.EE
.TP 8
.B draw-rect \fPx1,y1,x2,y2
@@ -254,7 +298,7 @@ Draws a rectangle.
Requires four arguments, which are the start and end coordinate pairs.
Example:
.EX
-draw-rect +1,+1,-5,-5
+\fBdraw-rect\fP +1,+1,-5,-5
.EE
.TP 8
.B draw-string \fPx,y,"string"
@@ -265,7 +309,7 @@ the \fI"\fP character; the backslash character \fI\e\fP can also be used,
but it will be necessary escape it twice.
Example:
.EX
- draw-string 10,10, "Hello world!"\fP
+\fBdraw-string\fP 10,10, "Hello world!"\fP
.EE
.TP 8
.B exposures \fPboolean
@@ -274,7 +318,7 @@ Allowed parameters are a integer
or the strings "true", "false", "on" and "off".
Example:
.EX
-exposures true
+\fBexposures\fP true
.EE
.TP 8
.B fill-arc \fPx1,y1,x2,y2[,start-angle,end-angle]
@@ -282,7 +326,7 @@ Like \fIdraw-arc\fP, but fills the contents of the arc with the currently
selected foreground.
Example:
.EX
-fill-arc +0,+0,-1,-1,0,180
+\fBfill-arc\fP +0,+0,-1,-1,0,180
.EE
.TP 8
.B fill-poly \fPx1,y1 [...,xn,yn]
@@ -292,7 +336,7 @@ Like \fIdraw-lines\fP, but fills the enclosed polygon and joins the first
and last point, if they are not at the same position.
Example:
.EX
-fill-poly +0,+10, +10,+20, +30,+0
+\fBfill-poly\fP +0,+10, +10,+20, +30,+0
.EE
.TP
.B fill-rect \fPx1,y1,x2,y2
@@ -302,7 +346,7 @@ Like \fIdraw-rect\fP, but fills the contents of the rectangle with the
selected foreground color.
Example:
.EX
-fill-rect +10,+10,-20,-20
+\fBfill-rect\fP +10,+10,-20,-20
.EE
.TP 8
.B fill-rule \fPrule
@@ -311,7 +355,7 @@ Accepted parameters are "evenodd" and "winding", which
set the fill rule to EvenOddRule or WindingRule, respectively.
Example:
.EX
-fill-rule winding
+\fBfill-rule\fP winding
.EE
.TP 8
.B fill-style \fPstyle
@@ -321,14 +365,14 @@ Allowed parameters are "solid", "tiled", "stippled" and
FillStippled or FillOpaqueStippled, respectively.
Example:
.EX
-fill-style tiled
+\fBfill-style\fP tiled
.EE
.TP 8
.B font \fPfont-spec
Sets the font for text functions.
Example:
.EX
-font -*-*-*-R-*-*-*-120-*-*-*-*-ISO8859-1
+\fBfont\fP -*-*-*-R-*-*-*-120-*-*-*-*-ISO8859-1
.EE
.TP 8
.B fg \fPcolor-spec
@@ -337,13 +381,13 @@ font -*-*-*-R-*-*-*-120-*-*-*-*-ISO8859-1
Like \fIbackground\fP, but sets the current foreground color.
Example:
.EX
-foreground blue
+\fBforeground\fP blue
.EE
.TP 8
.B mask
This command is useful when you want to draw only in the region that really
needs to be repainted.
-Requires no arguments.
+It requires no arguments.
.TP 8
.B function \fPfunction-spec
Sets the specific GC function.
@@ -355,7 +399,7 @@ GXor, GXnor, GXequiv, GXinvert, GXorReverse, GXcopyInverted or GXnand,
respectively.
Example:
.EX
-function xor
+\fBfunction\fP xor
.EE
.TP 8
.B join-style \fPstyle
@@ -365,7 +409,7 @@ which set the join style to JoinMiter, JoinRound and JoinBevel,
respectively.
Example:
.EX
-join-style round
+\fBjoin-style\fP round
.EE
.TP 8
.B image \fP{pixmap-spec},xs,ys,[xe,ye]
@@ -379,7 +423,7 @@ where to start copying the pixmap; \fIxe\fP and \fIye\fP are optional
If the pixmap has a mask, the copy is masked accordingly.
Example:
.EX
-image pixmap.xpm,0,0,20,20
+\fBimage\fP pixmap.xpm,0,0,20,20
.EE
.TP 8
.B line \fPx1,y1,x2,y2
@@ -389,14 +433,14 @@ Draws a line with the current foreground color.
Requires four arguments, the starting and ending coordinate pairs.
Example:
.EX
-line +0,+0, -1,-1
+\fBline\fP +0,+0, -1,-1
.EE
.TP 8
.B line-width \fPinteger
Selects a line width for drawing.
Example:
.EX
-line-width 2
+\fBline-width\fP 2
.EE
.TP 8
.B line-style \fPstyle
@@ -406,7 +450,7 @@ Accepted parameters are "solid", "onoffdash" and
LineDoubleDash, respectively.
Example:
.EX
-line-style onoffdash
+\fBline-style\fP onoffdash
.EE
.TP 8
.B lines \fPx1,y1,x2,y2 [...,xn,yn]
@@ -416,14 +460,14 @@ Draws a list of lines.
Any number of argument pairs may be supplied.
Example:
.EX
-lines +0,-1, -1,-1, -1,+0
+\fBlines\fP +0,-1, -1,-1, -1,+0
.EE
.TP 8
.B paint-string \fPx,y,"string"
Identical to draw-string, but also uses the background color.
Example:
.EX
- paint-string 10,20, "Sample text"\fP
+\fBpaint-string\fP 10,20, "Sample text"\fP
.EE
.TP 8
.B point \fPx,y
@@ -433,7 +477,7 @@ Draws a point.
Requires two arguments, a coordinate pair.
Example:
.EX
-point +10,+10
+\fBpoint\fP +10,+10
.EE
.TP 8
.B plane-mask \fPinteger
@@ -441,7 +485,7 @@ Sets the plane mask.
Requires an integer parameter.
Example:
.EX
-plane-mask -1
+\fBplane-mask\fP -1
.EE
.TP 8
.B points \fPx1,y1 [...,xn,yn]
@@ -450,7 +494,7 @@ plane-mask -1
Draws a list of points at the specified coordinates.
Example:
.EX
-points +1,+2, +1,+4, +1,+6
+\fBpoints\fP +1,+2, +1,+4, +1,+6
.EE
.TP 8
.B segments \fPx1,y1,x2,y2 [...,xn,yn]
@@ -460,7 +504,7 @@ Draws a list of segment lines.
The number of parameters must be multiple of 4.
Example:
.EX
-segments +1,+2,+1,-3, +2,-2,-3,-2
+\fBsegments\fP +1,+2,+1,-3, +2,-2,-3,-2
.EE
.TP 8
.B shape-mode \fPmode
@@ -470,7 +514,7 @@ Accepted parameters are
Convex or Nonconvex, accordingly.
Example:
.EX
-shape-mode convex
+\fBshape-mode\fP convex
.EE
.TP 8
.B stipple \fPpixmap-spec
@@ -478,7 +522,7 @@ Sets the pixmap for a stipple.
Requires a pixmap parameter, as described in the \fBPIXMAPS\fP section below.
Example:
.EX
-stipple plaid
+\fBstipple\fP plaid
.EE
.TP 8
.B subwindow-mode \fPmode
@@ -489,7 +533,7 @@ which set the subwindow mode to
IncludeInferiors or ClipByChildren, respectively.
Example:
.EX
-subwindow-mode includeinferiors
+\fBsubwindow-mode\fP includeinferiors
.EE
.TP 8
.B tile \fPpixmap-spec
@@ -498,7 +542,7 @@ Requires a pixmap parameter, as described
in the \fBPIXMAPS\fP section below.
Example:
.EX
-tile xlogo11?foreground=red&background=gray80
+\fBtile\fP xlogo11?foreground=red&background=gray80
.EE
.TP 8
.B ts-origin \fPx,y
@@ -506,41 +550,50 @@ Sets the tile stipple x and y origin.
Requires two arguments, a x and y coordinate.
Example:
.EX
-ts-origin 10,10
+\fBts-origin\fP 10,10
.EE
.TP 8
.B umask
Disables the GC mask, if it has been set with the command \fImask\fP.
Requires no arguments.
+.ne 7
.PP
Example for drawing a shadow effect in a widget:
+.PP
.EX
-foreground gray30;\e
-draw-lines +1,-1,-1,-1,-1,+1;\e
-foreground gray85;\e
-draw-lines -1,+0,+0,+0,+0,-1
+\fBforeground\fP gray30;\e
+\fBdraw-lines\fP +1,-1,-1,-1,-1,+1;\e
+\fBforeground\fP gray85;\e
+\fBdraw-lines\fP -1,+0,+0,+0,+0,-1
.EE
.SH PIXMAPS
-A String to Pixmap converter has been added to \fBXaw\fP.
+A String to Pixmap converter has been added to \fBXaw\fP.
This converter is meant to be extended,
and has enough abstraction to allow loading several image formats.
It uses a format that resembles a \fIURL\fP, with the syntax:
.PP
.I [type:]name[?arg=val[{&}...]]
-.PP
-\fBType\fP can be one of \fIbitmap\fP, \fIgradient\fP or \fIxpm\fP.
-.PP
-\fBName\fP may be a file name, or, in the case of type \fIgradient\fP, may be
+.TP
+\fItype\fP
+can be one of \fIbitmap\fP, \fIgradient\fP or \fIxpm\fP.
+.TP
+\fIname\fP
+may be a file name, or, in the case of type \fIgradient\fP, may be
either \fIvertical\fP or \fIhorizontal\fP.
-.PP
-\fBArg=val\fP is a list of arguments to the converter.
+.TP
+\fIarg=val\fP
+is a list of arguments to the converter.
+.IP
An argument list is preceded by a question mark,
and multiple arguments are separated by ampersands.
+.IP
The most common arguments are \fIforeground\fP and \fIbackground\fP.
+.IP
Gradients also support the arguments \fIstart\fP and \fIend\fP
-(colors with which to start and end the gradient);
-the \fPsteps\fP argument, to allow using less colors;
-and the \fIdimension\fP argument to specify the size of the gradient.
+(colors with which to start and end the gradient),
+the \fPsteps\fP argument (to allow using fewer colors),
+and the \fIdimension\fP argument (to specify the size of the gradient).
+.IP
The \fIxpm\fP converter
understands the \fIcloseness\fP argument, which aids in using fewer colors
(useful if you have a limited colormap).
@@ -626,7 +679,9 @@ Allows installation of a callback to be called every time the cursor is
moved, and/or the file changes its size.
The callback is called with a
pointer to a structure containing the following data:
-.nf
+.RS
+.PP
+.EX
typedef struct {
int line_number;
int column_number;
@@ -634,7 +689,9 @@ typedef struct {
XawTextPosition last_position;
Boolean overwrite_mode;
} XawTextPositionInfo;
-.fi
+.EE
+.RE
+.IP
This callback is intended to help programmers write text editors based
on the Xaw widget set.
.TP 8