summaryrefslogtreecommitdiffstats
path: root/doc/3DBorder.3
diff options
context:
space:
mode:
Diffstat (limited to 'doc/3DBorder.3')
-rw-r--r--doc/3DBorder.356
1 files changed, 24 insertions, 32 deletions
diff --git a/doc/3DBorder.3 b/doc/3DBorder.3
index 35bf666..01b359b 100644
--- a/doc/3DBorder.3
+++ b/doc/3DBorder.3
@@ -14,7 +14,6 @@ Tk_Alloc3DBorderFromObj, Tk_Get3DBorder, Tk_Get3DBorderFromObj, Tk_Draw3DRectang
.nf
\fB#include <tk.h>\fR
.sp
-.VS 8.1
Tk_3DBorder
\fBTk_Alloc3DBorderFromObj(\fIinterp, tkwin, objPtr\fB)\fR
.sp
@@ -23,7 +22,6 @@ Tk_3DBorder
.sp
Tk_3DBorder
\fBTk_Get3DBorderFromObj(\fItkwin, objPtr\fB)\fR
-.VE
.sp
void
\fBTk_Draw3DRectangle(\fItkwin, drawable, border, x, y, width, height, borderWidth, relief\fB)\fR
@@ -46,7 +44,7 @@ void
void
\fBTk_SetBackgroundFromBorder(\fItkwin, border\fB)\fR
.sp
-CONST char *
+const char *
\fBTk_NameOf3DBorder(\fIborder\fB)\fR
.sp
XColor *
@@ -55,9 +53,7 @@ XColor *
GC *
\fBTk_3DBorderGC(\fItkwin, border, which\fB)\fR
.sp
-.VS 8.1
\fBTk_Free3DBorderFromObj(\fItkwin, objPtr\fB)\fR
-.VE
.sp
\fBTk_Free3DBorder(\fIborder\fB)\fR
.SH ARGUMENTS
@@ -68,14 +64,12 @@ Interpreter to use for error reporting.
Token for window (for all procedures except \fBTk_Get3DBorder\fR,
must be the window for which the border was allocated).
.AP Tcl_Obj *objPtr in
-.VS 8.1
Pointer to object whose value describes color corresponding to
background (flat areas). Illuminated edges will be brighter than
this and shadowed edges will be darker than this.
.AP char *colorName in
Same as \fIobjPtr\fR except value is supplied as a string rather
than an object.
-.VE
.AP Drawable drawable in
X token for window or pixmap; indicates where graphics are to be drawn.
Must either be the X window for \fItkwin\fR or a pixmap with the
@@ -98,26 +92,26 @@ given by \fIx\fR, \fIy\fR, \fIwidth\fR, \fIheight\fR, negative means
border is outside rectangle.
.AP int relief in
Indicates 3-D position of interior of object relative to exterior;
-should be TK_RELIEF_RAISED, TK_RELIEF_SUNKEN, TK_RELIEF_GROOVE,
-TK_RELIEF_SOLID, or TK_RELIEF_RIDGE (may also be TK_RELIEF_FLAT
+should be \fBTK_RELIEF_RAISED\fR, \fBTK_RELIEF_SUNKEN\fR, \fBTK_RELIEF_GROOVE\fR,
+\fBTK_RELIEF_SOLID\fR, or \fBTK_RELIEF_RIDGE\fR (may also be \fBTK_RELIEF_FLAT\fR
for \fBTk_Fill3DRectangle\fR).
.AP XPoint *pointPtr in
Pointer to array of points describing the set of vertices in a polygon.
The polygon need not be closed (it will be closed automatically if it
-isn't).
+is not).
.AP int numPoints in
Number of points at \fI*pointPtr\fR.
.AP int polyBorderWidth in
Width of border in pixels. If positive, border is drawn to left of
trajectory given by \fIpointPtr\fR; if negative, border is drawn to
-right of trajectory. If \fIleftRelief\fR is TK_RELIEF_GROOVE or
-TK_RELIEF_RIDGE then the border is centered on the trajectory.
+right of trajectory. If \fIleftRelief\fR is \fBTK_RELIEF_GROOVE\fR or
+\fBTK_RELIEF_RIDGE\fR then the border is centered on the trajectory.
.AP int leftRelief in
-Height of left side of polygon's path relative to right. TK_RELIEF_RAISED
-means left side should appear higher and TK_RELIEF_SUNKEN means right side
+Height of left side of polygon's path relative to right. \fBTK_RELIEF_RAISED\fR
+means left side should appear higher and \fBTK_RELIEF_SUNKEN\fR means right side
should appear higher;
-TK_RELIEF_GROOVE and TK_RELIEF_RIDGE mean the obvious things.
-For \fBTk_Fill3DPolygon\fR, TK_RELIEF_FLAT may also be specified to
+\fBTK_RELIEF_GROOVE\fR and \fBTK_RELIEF_RIDGE\fR mean the obvious things.
+For \fBTk_Fill3DPolygon\fR, \fBTK_RELIEF_FLAT\fR may also be specified to
indicate no difference in height.
.AP int leftBevel in
Non-zero means this bevel forms the left side of the object; zero means
@@ -138,14 +132,13 @@ Non-zero means this bevel forms the top side of the object; zero means
it forms the bottom side.
.AP int which in
Specifies which of the border's graphics contexts is desired.
-Must be TK_3D_FLAT_GC, TK_3D_LIGHT_GC, or TK_3D_DARK_GC.
+Must be \fBTK_3D_FLAT_GC\fR, \fBTK_3D_LIGHT_GC\fR, or \fBTK_3D_DARK_GC\fR.
.BE
.SH DESCRIPTION
.PP
These procedures provide facilities for drawing window borders in a
way that produces a three-dimensional appearance.
-.VS 8.1
\fBTk_Alloc3DBorderFromObj\fR
allocates colors and Pixmaps needed to draw a border in the window
given by the \fItkwin\fR argument. The value of \fIobjPtr\fR
@@ -173,13 +166,12 @@ prevents \fBTk_Get3DBorder\fR from caching the return value, so
.PP
\fBTk_Get3DBorderFromObj\fR returns the token for an existing border, given
the window and color name used to create the border.
-\fBTk_Get3DBorderFromObj\fR doesn't actually create the border; it must
+\fBTk_Get3DBorderFromObj\fR does not actually create the border; it must
already have been created with a previous call to
\fBTk_Alloc3DBorderFromObj\fR or \fBTk_Get3DBorder\fR. The return
value is cached in \fIobjPtr\fR, which speeds up
future calls to \fBTk_Get3DBorderFromObj\fR with the same \fIobjPtr\fR
and \fItkwin\fR.
-.VE
.PP
Once a border structure has been created, \fBTk_Draw3DRectangle\fR may be
invoked to draw the border.
@@ -197,10 +189,10 @@ within \fIdrawable\fR (usually \fIx\fR and \fIy\fR are zero and
\fIborderWidth\fR specifies the number of pixels actually
occupied by the border. The \fIrelief\fR argument indicates
which of several three-dimensional effects is desired:
-TK_RELIEF_RAISED means that the interior of the rectangle should appear raised
-relative to the exterior of the rectangle, and
-TK_RELIEF_SUNKEN means that the interior should appear depressed.
-TK_RELIEF_GROOVE and TK_RELIEF_RIDGE mean that there should appear to be
+\fBTK_RELIEF_RAISED\fR means that the interior of the rectangle should
+appear raised relative to the exterior of the rectangle, and
+\fBTK_RELIEF_SUNKEN\fR means that the interior should appear depressed.
+\fBTK_RELIEF_GROOVE\fR and \fBTK_RELIEF_RIDGE\fR mean that there should appear to be
a groove or ridge around the exterior of the rectangle.
.PP
\fBTk_Fill3DRectangle\fR is somewhat like \fBTk_Draw3DRectangle\fR except
@@ -209,7 +201,7 @@ that it first fills the rectangular area with the background color
to the color used to create \fIborder\fR). Then it calls
\fBTk_Draw3DRectangle\fR to draw a border just inside the outer edge of
the rectangular area. The argument \fIrelief\fR indicates the desired
-effect (TK_RELIEF_FLAT means no border should be drawn; all that
+effect (\fBTK_RELIEF_FLAT\fR means no border should be drawn; all that
happens is to fill the rectangle with the background color).
.PP
The procedure \fBTk_Draw3DPolygon\fR may be used to draw more complex
@@ -228,7 +220,7 @@ it's not clear how useful this is.
\fBTk_Fill3DRectangle\fR is to \fBTk_Draw3DRectangle\fR: it fills
the polygonal area with the background color from \fIborder\fR,
then calls \fBTk_Draw3DPolygon\fR to draw a border around the
-area (unless \fIleftRelief\fR is TK_RELIEF_FLAT; in this case no
+area (unless \fIleftRelief\fR is \fBTK_RELIEF_FLAT\fR; in this case no
border is drawn).
.PP
The procedures \fBTk_3DVerticalBevel\fR and \fBTk_3DHorizontalBevel\fR
@@ -244,7 +236,9 @@ Each procedure takes \fIx\fR, \fIy\fR, \fIwidth\fR, and \fIheight\fR
arguments that describe the rectangular area of the beveled edge
(e.g., \fIwidth\fR is the border width for \fBTk_3DVerticalBevel\fR).
The \fIleftBorder\fR and \fItopBorder\fR arguments indicate the
-position of the border relative to the ``inside'' of the object, and
+position of the border relative to the
+.QW inside
+of the object, and
\fIrelief\fR indicates the relief of the inside of the object relative
to the outside.
\fBTk_3DVerticalBevel\fR just draws a rectangular region.
@@ -282,11 +276,10 @@ as long as \fIborder\fR exists.
The procedure \fBTk_3DBorderGC\fR returns one of the X graphics contexts
that are used to draw the border.
The argument \fIwhich\fR selects which one of the three possible GC's:
-TK_3D_FLAT_GC returns the context used for flat surfaces,
-TK_3D_LIGHT_GC returns the context for light shadows,
-and TK_3D_DARK_GC returns the context for dark shadows.
+\fBTK_3D_FLAT_GC\fR returns the context used for flat surfaces,
+\fBTK_3D_LIGHT_GC\fR returns the context for light shadows,
+and \fBTK_3D_DARK_GC\fR returns the context for dark shadows.
.PP
-.VS 8.1
When a border is no longer needed, \fBTk_Free3DBorderFromObj\fR
or \fBTk_Free3DBorder\fR should
be called to release the resources associated with it.
@@ -297,7 +290,6 @@ with the Tk_3DBorder token for the border.
There should be exactly one call to \fBTk_Free3DBorderFromObj\fR or
\fBTk_Free3DBorder\fR for each call to \fBTk_Alloc3DBorderFromObj\fR
or \fBTk_Get3DBorder\fR.
-.VE
.SH KEYWORDS
3D, background, border, color, depressed, illumination, object, polygon, raised, shadow, three-dimensional effect