head	1.13;
access;
symbols
	core-8-5-9:1.10
	core-8-5-8:1.10
	macosx-cocoa-merge:1.13
	macosx-cocoa-premerge:1.13
	macosx-carbon-freeze:1.13
	core-8-5-7:1.10
	core-8-5-6:1.10
	core-8-6-b1:1.11
	core-8-6-a3:1.11
	core-8-5-5:1.10
	core-8-6-a2:1.11
	core-8-5-4:1.10
	core-8-5-3:1.10
	core-8-6-a1:1.10
	core-8-4-19:1.5
	core-8-5-branch:1.10.0.2
	core-8-5-2:1.10
	core-8-4-18:1.5
	core-8-5-1:1.10
	core-8-4-17:1.5
	core-8-5-0:1.10
	core-8-5-b3:1.8
	core-8-5-b2:1.7
	core-8-4-16:1.5
	core-8-5-b1:1.7
	core-stablilizer-merge:1.7
	core-stabilizer-branch:1.7.0.2
	core-stabilizer-merge:1.10
	core-8-4-15:1.5
	core-8-5-a6:1.7
	core-8-5-a5:1.7
	core-8-4-14:1.5
	core-8-5-a4:1.7
	core-8-4-13:1.5
	core-8-4-12:1.5
	core-8-4-11:1.5
	core-8-5-a3:1.7
	core-8-4-10:1.5
	core-8-4-9-branch:1.5.0.24
	core-8-5-a2:1.6
	core-8-4-9:1.5
	core-8-4-8:1.5
	core-8-4-7:1.5
	core-8-5-a1:1.5
	core-8-4-6:1.5
	core-8-4-5:1.5
	mistachkin-dev-branch:1.5.0.22
	core-8-4-4:1.5
	core-8-4-3:1.5
	core-8-4-branch:1.5.0.20
	core-8-4-2:1.5
	core-8-4-1:1.5
	core-8-3-5:1.5
	core-8-4-0:1.5
	macosx-8-4-merge-2002-08-31-trunk:1.5
	macosx-8-4-premerge-2002-08-31-branch:1.5
	macosx-8-4-premerge-2002-08-31-trunk:1.5
	macosx-8-4-merge-2002-08-30-branch:1.5
	macosx-8-4-merge-2002-08-30-trunk:1.5
	macosx-8-4-merge-2002-08-20-branch:1.5
	macosx-8-4-merge-2002-08-20-trunk:1.5
	core-8-4-b2:1.5
	core-8-4-b1:1.5
	macosx-premerge-6-9-02:1.5
	core-8-4-a4:1.5
	core-8-3-4:1.5
	macosx-8-4-branch:1.5.0.18
	macosx-8-4-branchpoint:1.5
	core-8-4-a3:1.5
	core-8-3-3:1.5
	dgp-privates-into-namespace:1.5.0.16
	tclpro-1-5-0:1.5
	core-8-4-win-speedup:1.5.0.14
	core-8-4-a2:1.5
	tclpro-1-4-1:1.5
	tclpro-1-4-0:1.5
	core-8-3-2:1.5
	ajuba-ajuba2-2-1-base:1.5
	ajuba-ajuba2-2-0:1.5
	core-8-4-a1:1.5
	core-8-3-1-branch:1.5.0.12
	core-8-3-1:1.5
	scriptics-sc-2-0-b5:1.5
	scriptics-sc-2-0-fixed:1.5
	scriptics-sc-2-0-b2:1.5
	scriptics-sc-2-0-b1:1.5
	core-8-3-0:1.5
	core-8-3-b2:1.5
	core-8-3-b1:1.5
	scriptics-sc-1-1:1.5
	scriptics-sc-1-1-b1:1.5
	core-8-2-3:1.5
	scriptics-sc-1-1-branch:1.5.0.10
	scriptics-sc-1-1-base:1.5
	scriptics-sc-1-0:1.5
	scriptics-sc-1-0-branch:1.5.0.8
	scriptics-sc-1-0-base:1.5
	core-8-2-2:1.5
	core-8-2-1:1.5
	scriptics-bc-1-0-b1:1.5
	core-8-2-1-branch:1.5.0.6
	scriptics-tclpro-1-3-0:1.5
	core-8-2-0:1.5
	core-8-2-b3-branch:1.5.0.2
	core-8-2-b3-base:1.5
	scriptics-tclpro-1-3-b4:1.5
	core-8-2-b2:1.5
	scriptics-tclpro-1-3-b3:1.5
	core-8-2-b1:1.5
	scriptics-tclpro-1-3-b2:1.5
	merge-to-mainline-5/21/99:1.5
	scriptics-tclpro-1-3-b2-branch:1.5.0.4
	core-8-1-1:1.5
	scriptics-tclpro-1-3-b1:1.5
	core-8-1-1-base:1.5
	core-8-1-0:1.5
	merge-to-mainline-4-29-99:1.5
	merge-to-mainline-4-23-99:1.5
	core-8-1-branch-old:1.1.0.4
	core-8-0-6-branch:1.2.0.6
	core-8-0-6-base:1.2
	core-8-0-5:1.2
	core-8-1-b3:1.1.4.2
	core-8-1-b2:1.1.4.1
	dev-8-1-stubs-branch:1.1.4.1.0.2
	dev-stubs-branch:1.2.0.4
	scriptics-tclpro-1-2:1.2
	scriptics-tclpro-1-2-b2:1.2
	core-8-1-merge-2/10/99:1.2
	core-8-0-5-branch:1.2.0.2
	core-8-0-5-base:1.2
	scriptics-tclpro-1-2-b1:1.2
	scriptics-tclpro-1-2-a1:1.2
	core-8-1-b1:1.1.4.1
	core-8-0-4:1.2
	core-8-1-a2:1.1
	core-8-0-2:1.1
	core-8-0-3:1.2;
locks; strict;
comment	@# @;


1.13
date	2009.05.04.09.12.33;	author dkf;	state Exp;
branches;
next	1.12;

1.12
date	2009.04.03.09.41.35;	author dkf;	state Exp;
branches;
next	1.11;

1.11
date	2008.06.30.22.57.02;	author dkf;	state Exp;
branches;
next	1.10;

1.10
date	2007.12.13.15.23.43;	author dgp;	state Exp;
branches;
next	1.9;

1.9
date	2007.12.10.16.21.48;	author jenglish;	state Exp;
branches;
next	1.8;

1.8
date	2007.10.29.16.04.13;	author dkf;	state Exp;
branches;
next	1.7;

1.7
date	2005.04.06.21.11.54;	author dkf;	state Exp;
branches
	1.7.2.1;
next	1.6;

1.6
date	2004.09.19.16.05.36;	author dkf;	state Exp;
branches;
next	1.5;

1.5
date	99.04.21.21.53.22;	author rjohnson;	state Exp;
branches;
next	1.4;

1.4
date	99.04.16.18.26.12;	author surles;	state Exp;
branches;
next	1.3;

1.3
date	99.04.16.01.51.09;	author stanton;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	98.09.14.18.22.54;	author stanton;	state Exp;
branches;
next	1.1;

1.1
date	98.04.01.09.40.12;	author rjohnson;	state Exp;
branches
	1.1.4.1;
next	;

1.1.4.1
date	98.09.30.02.16.09;	author stanton;	state Exp;
branches;
next	1.1.4.2;

1.1.4.2
date	99.03.30.04.12.54;	author stanton;	state Exp;
branches;
next	;

1.3.2.1
date	99.04.21.02.32.56;	author rjohnson;	state Exp;
branches;
next	;

1.7.2.1
date	2007.11.01.16.37.13;	author dgp;	state Exp;
branches;
next	1.7.2.2;

1.7.2.2
date	2007.12.10.18.39.28;	author dgp;	state Exp;
branches;
next	;


desc
@@


1.13
log
@Purge mention of interp->result. [Bug 2431507]
@
text
@'\"
'\" Copyright (c) 1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" 
'\" RCS: @@(#) $Id: TextLayout.3,v 1.12 2009/04/03 09:41:35 dkf Exp $
'\" 
.so man.macros
.TH Tk_ComputeTextLayout 3 8.1 Tk "Tk Library Procedures"
.BS
.SH NAME
Tk_ComputeTextLayout, Tk_FreeTextLayout, Tk_DrawTextLayout, Tk_UnderlineTextLayout, Tk_PointToChar, Tk_CharBbox, Tk_DistanceToTextLayout, Tk_IntersectTextLayout, Tk_TextLayoutToPostscript \- routines to measure and display single-font, multi-line, justified text.
.SH SYNOPSIS
.nf
\fB#include <tk.h>\fR
.sp
Tk_TextLayout
\fBTk_ComputeTextLayout(\fItkfont, string, numChars, wrapLength, justify, flags, widthPtr, heightPtr\fB)\fR
.sp
void
\fBTk_FreeTextLayout(\fIlayout\fB)\fR
.sp
void
\fBTk_DrawTextLayout(\fIdisplay, drawable, gc, layout, x, y, firstChar, lastChar\fB)\fR
.sp
void
\fBTk_UnderlineTextLayout(\fIdisplay, drawable, gc, layout, x, y, underline\fB)\fR
.sp
int
\fBTk_PointToChar(\fIlayout, x, y\fB)\fR
.sp
int
\fBTk_CharBbox(\fIlayout, index, xPtr, yPtr, widthPtr, heightPtr\fB)\fR
.sp
int
\fBTk_DistanceToTextLayout(\fIlayout, x, y\fB)\fR
.sp
int
\fBTk_IntersectTextLayout(\fIlayout, x, y, width, height\fB)\fR
.sp
void
\fBTk_TextLayoutToPostscript(\fIinterp, layout\fB)\fR
.SH ARGUMENTS
.AS Tk_TextLayout "*xPtr, *yPtr"
.AP Tk_Font tkfont in
Font to use when constructing and displaying a text layout.  The
\fItkfont\fR must remain valid for the lifetime of the text layout.  Must
have been returned by a previous call to \fBTk_GetFont\fR.
.AP "const char" *string in
Potentially multi-line string whose dimensions are to be computed and
stored in the text layout.  The \fIstring\fR must remain valid for the
lifetime of the text layout.  
.AP int numChars in
The number of characters to consider from \fIstring\fR.  If
\fInumChars\fR is less than 0, then assumes \fIstring\fR is null
terminated and uses \fBTcl_NumUtfChars\fR to determine the length of
\fIstring\fR.
.AP int wrapLength in
Longest permissible line length, in pixels.  Lines in \fIstring\fR will
automatically be broken at word boundaries and wrapped when they reach
this length.  If \fIwrapLength\fR is too small for even a single
character to fit on a line, it will be expanded to allow one character to
fit on each line.  If \fIwrapLength\fR is <= 0, there is no automatic
wrapping; lines will get as long as they need to be and only wrap if a
newline/return character is encountered.
.AP Tk_Justify justify in
How to justify the lines in a multi-line text layout.  Possible values
are \fBTK_JUSTIFY_LEFT\fR, \fBTK_JUSTIFY_CENTER\fR, or
\fBTK_JUSTIFY_RIGHT\fR. If the text layout only occupies a single
line, then \fIjustify\fR is irrelevant.
.AP int flags in
Various flag bits OR-ed together. \fBTK_IGNORE_TABS\fR means that tab
characters should not be expanded to the next tab stop.
\fBTK_IGNORE_NEWLINES\fR means that newline/return characters should
not cause a line break.  If either tabs or newlines/returns are
ignored, then they will be treated as regular characters, being
measured and displayed in a platform-dependent manner as described in
\fBTk_MeasureChars\fR, and will not have any special behaviors.
.AP int *widthPtr out
If non-NULL, filled with either the width, in pixels, of the widest
line in the text layout, or the width, in pixels, of the bounding box for the 
character specified by \fIindex\fR.
.AP int *heightPtr out
If non-NULL, filled with either the total height, in pixels, of all
the lines in the text layout, or the height, in pixels, of the bounding
box for the character specified by \fIindex\fR.
.AP Tk_TextLayout layout in
A token that represents the cached layout information about the single-font,
multi-line, justified piece of text.  This token is returned by
\fBTk_ComputeTextLayout\fR.
.AP Display *display in
Display on which to draw.
.AP Drawable drawable in
Window or pixmap in which to draw.
.AP GC gc in
Graphics context to use for drawing text layout.  The font selected in
this GC must correspond to the \fItkfont\fR used when constructing the
text layout.
.AP int "x, y" in
Point, in pixels, at which to place the upper-left hand corner of the
text layout when it is being drawn, or the coordinates of a point (with
respect to the upper-left hand corner of the text layout) to check
against the text layout.
.AP int firstChar in
The index of the first character to draw from the given text layout.  
The number 0 means to draw from the beginning.
.AP int lastChar in
The index of the last character up to which to draw.  The character
specified by \fIlastChar\fR itself will not be drawn.  A number less
than 0 means to draw all characters in the text layout.
.AP int underline in
Index of the single character to underline in the text layout, or a number
less than 0 for no underline.
.AP int index in
The index of the character whose bounding box is desired.  The bounding
box is computed with respect to the upper-left hand corner of the text layout.
.AP int "*xPtr, *yPtr" out
Filled with the upper-left hand corner, in pixels, of the bounding box
for the character specified by \fIindex\fR.  Either or both \fIxPtr\fR
and \fIyPtr\fR may be NULL, in which case the corresponding value
is not calculated.
.AP int "width, height" in
Specifies the width and height, in pixels, of the rectangular area to 
compare for intersection against the text layout.
.AP Tcl_Interp *interp out
Postscript code that will print the text layout is appended to
the result of interpreter \fIinterp\fR.
.BE
.SH DESCRIPTION
.PP
These routines are for measuring and displaying single-font, multi-line,
justified text.  To measure and display simple single-font, single-line
strings, refer to the documentation for \fBTk_MeasureChars\fR.  There is
no programming interface in the core of Tk that supports multi-font,
multi-line text; support for that behavior must be built on top of
simpler layers.  
Note that unlike the lower level text display routines, the functions
described here all operate on character-oriented lengths and indices
rather than byte-oriented values.  See the description of
\fBTcl_UtfAtIndex\fR for more details on converting between character
and byte offsets.
.PP
The routines described here are built on top of the programming interface
described in the \fBTk_MeasureChars\fR documentation.  Tab characters and
newline/return characters may be treated specially by these procedures,
but all other characters are passed through to the lower level.
.PP
\fBTk_ComputeTextLayout\fR computes the layout information needed to
display a single-font, multi-line, justified \fIstring\fR of text and
returns a Tk_TextLayout token that holds this information.  This token is
used in subsequent calls to procedures such as \fBTk_DrawTextLayout\fR,
\fBTk_DistanceToTextLayout\fR, and \fBTk_FreeTextLayout\fR.  The
\fIstring\fR and \fItkfont\fR used when computing the layout must remain
valid for the lifetime of this token.  
.PP
\fBTk_FreeTextLayout\fR is called to release the storage associated with
\fIlayout\fR when it is no longer needed.  A \fIlayout\fR should not be used
in any other text layout procedures once it has been released. 
.PP
\fBTk_DrawTextLayout\fR uses the information in \fIlayout\fR to display a
single-font, multi-line, justified string of text at the specified location.
.PP
\fBTk_UnderlineTextLayout\fR uses the information in \fIlayout\fR to
display an underline below an individual character.  This procedure does
not draw the text, just the underline.  To produce natively underlined
text, an underlined font should be constructed and used.  All characters,
including tabs, newline/return characters, and spaces at the ends of
lines, can be underlined using this method.  However, the underline will
never be drawn outside of the computed width of \fIlayout\fR; the
underline will stop at the edge for any character that would extend
partially outside of \fIlayout\fR, and the underline will not be visible
at all for any character that would be located completely outside of the
layout.
.PP
\fBTk_PointToChar\fR uses the information in \fIlayout\fR to determine the
character closest to the given point.  The point is specified with respect
to the upper-left hand corner of the \fIlayout\fR, which is considered to be
located at (0, 0).  Any point whose \fIy\fR-value is less that 0 will be
considered closest to the first character in the text layout; any point
whose \fIy\fR-value is greater than the height of the text layout will be
considered closest to the last character in the text layout.  Any point
whose \fIx\fR-value is less than 0 will be considered closest to the first
character on that line; any point whose \fIx\fR-value is greater than the
width of the text layout will be considered closest to the last character on
that line.  The return value is the index of the character that was closest
to the point, or one more than the index of any character (to indicate that
the point was after the end of the string and that the corresponding caret
would be at the end of the string).  Given a \fIlayout\fR with no characters,
the value 0 will always be returned, referring to a hypothetical zero-width
placeholder character.
.PP
\fBTk_CharBbox\fR uses the information in \fIlayout\fR to return the
bounding box for the character specified by \fIindex\fR.  The width of the
bounding box is the advance width of the character, and does not include any
left or right bearing.  Any character that extends partially outside of 
\fIlayout\fR is considered to be truncated at the edge.  Any character
that would be located completely outside of \fIlayout\fR is considered to
be zero-width and pegged against the edge.  The height of the bounding
box is the line height for this font, extending from the top of the
ascent to the bottom of the descent; information about the actual height
of individual letters is not available.  For measurement purposes, a
\fIlayout\fR that contains no characters is considered to contain a
single zero-width placeholder character at index 0.  If \fIindex\fR was
not a valid character index, the return value is 0 and \fI*xPtr\fR,
\fI*yPtr\fR, \fI*widthPtr\fR, and \fI*heightPtr\fR are unmodified.
Otherwise, if \fIindex\fR did specify a valid, the return value is
non-zero, and \fI*xPtr\fR, \fI*yPtr\fR, \fI*widthPtr\fR, and
\fI*heightPtr\fR are filled with the bounding box information for the
character.  If any of \fIxPtr\fR, \fIyPtr\fR, \fIwidthPtr\fR, or
\fIheightPtr\fR are NULL, the corresponding value is not calculated or
stored.
.PP
\fBTk_DistanceToTextLayout\fR computes the shortest distance in pixels from
the given point (\fIx, y\fR) to the characters in \fIlayout\fR.
Newline/return characters and non-displaying space characters that occur at
the end of individual lines in the text layout are ignored for hit detection
purposes, but tab characters are not.  The return value is 0 if the point
actually hits the \fIlayout\fR.  If the point did not hit the \fIlayout\fR
then the return value is the distance in pixels from the point to the
\fIlayout\fR.
.PP
\fBTk_IntersectTextLayout\fR determines whether a \fIlayout\fR lies
entirely inside, entirely outside, or overlaps a given rectangle.
Newline/return characters and non-displaying space characters that occur
at the end of individual lines in the \fIlayout\fR are ignored for
intersection calculations.  The return value is \-1 if the \fIlayout\fR is
entirely outside of the rectangle, 0 if it overlaps, and 1 if it is
entirely inside of the rectangle.
.PP
\fBTk_TextLayoutToPostscript\fR outputs code consisting of a Postscript
array of strings that represent the individual lines in \fIlayout\fR.  It
is the responsibility of the caller to take the Postscript array of
strings and add some Postscript function operate on the array to render
each of the lines.  The code that represents the Postscript array of
strings is appended to interpreter \fIinterp\fR's result.
.SH "DISPLAY MODEL"
.PP
When measuring a text layout, space characters that occur at the end of a
line are ignored.  The space characters still exist and the insertion point
can be positioned amongst them, but their additional width is ignored when
justifying lines or returning the total width of a text layout.  All
end-of-line space characters are considered to be attached to the right edge
of the line; this behavior is logical for left-justified text and reasonable
for center-justified text, but not very useful when editing right-justified
text.  Spaces are considered variable width characters; the first space that
extends past the edge of the text layout is clipped to the edge, and any
subsequent spaces on the line are considered zero width and pegged against
the edge.  Space characters that occur in the middle of a line of text are
not suppressed and occupy their normal space width.
.PP
Tab characters are not ignored for measurement calculations.  If wrapping
is turned on and there are enough tabs on a line, the next tab will wrap
to the beginning of the next line.  There are some possible strange
interactions between tabs and justification; tab positions are calculated
and the line length computed in a left-justified world, and then the
whole resulting line is shifted so it is centered or right-justified,
causing the tab columns not to align any more.
.PP
When wrapping is turned on, lines may wrap at word breaks (space or tab
characters) or newline/returns.  A dash or hyphen character in the middle
of a word is not considered a word break.  \fBTk_ComputeTextLayout\fR
always attempts to place at least one word on each line.  If it cannot
because the \fIwrapLength\fR is too small, the word will be broken and as
much as fits placed on the line and the rest on subsequent line(s).  If
\fIwrapLength\fR is so small that not even one character can fit on a
given line, the \fIwrapLength\fR is ignored for that line and one
character will be placed on the line anyhow.  When wrapping is turned
off, only newline/return characters may cause a line break.  
.PP
When a text layout has been created using an underlined \fItkfont\fR,
then any space characters that occur at the end of individual lines,
newlines/returns, and tabs will not be displayed underlined when 
\fBTk_DrawTextLayout\fR is called, because those characters are never
actually drawn \- they are merely placeholders maintained in the
\fIlayout\fR.  
.SH KEYWORDS
font
@


1.12
log
@Fix [Bug 974421]
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: TextLayout.3,v 1.11 2008/06/30 22:57:02 dkf Exp $
d128 1
a128 1
\fIinterp->result\fR.
d236 1
a236 1
strings is appended to \fIinterp->result\fR.
@


1.11
log
@Minor doc updates (removing out of date changebars, improving typedef formatting,
 etc.)
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: TextLayout.3,v 1.10 2007/12/13 15:23:43 dgp Exp $
d187 5
a191 3
to the point.  Given a \fIlayout\fR with no characters, the value 0 will
always be returned, referring to a hypothetical zero-width placeholder
character.  
@


1.10
log
@merge stable branch onto HEAD
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: TextLayout.3,v 1.7.2.2 2007/12/10 18:39:28 dgp Exp $
a43 1

a129 1

d236 1
@


1.9
log
@Various markup fixes
(mostly: missing quotes on .SH arguments, extraneous .PPs)
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: TextLayout.3,v 1.8 2007/10/29 16:04:13 dkf Exp $
@


1.8
log
@Lots more GOOBE stuff. Now works with 'make html'!
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: TextLayout.3,v 1.7 2005/04/06 21:11:54 dkf Exp $
d237 1
a237 2
.PP
.SH DISPLAY MODEL
@


1.7
log
@Purge old and inaccurate .VS/.VE macros.
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: TextLayout.3,v 1.6 2004/09/19 16:05:36 dkf Exp $
d219 1
a219 1
actually hits the \fIlayout\fR.  If the point didn't hit the \fIlayout\fR
@


1.7.2.1
log
@merge updates from HEAD
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: TextLayout.3,v 1.7 2005/04/06 21:11:54 dkf Exp $
d219 1
a219 1
actually hits the \fIlayout\fR.  If the point did not hit the \fIlayout\fR
@


1.7.2.2
log
@merge updates from HEAD
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: TextLayout.3,v 1.7.2.1 2007/11/01 16:37:13 dgp Exp $
d237 2
a238 1
.SH "DISPLAY MODEL"
@


1.6
log
@Standardize style of section refs & public symbols. Remove displayed tabs
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: TextLayout.3,v 1.5 1999/04/21 21:53:22 rjohnson Exp $
a57 1
.VS 8.1
a59 1
.VE
a139 1
.VS 8.1
a144 1
.VE 8.1
@


1.5
log
@
Merged 8-1-0 into mainline.
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: TextLayout.3,v 1.4 1999/04/16 18:26:12 surles Exp $
d72 3
a74 2
are TK_JUSTIFY_LEFT, TK_JUSTIFY_CENTER, or TK_JUSTIFY_RIGHT.  If the text
layout only occupies a single line, then \fIjustify\fR is irrelevant.  
d76 7
a82 6
Various flag bits OR-ed together.  TK_IGNORE_TABS means that tab characters
should not be expanded to the next tab stop.  TK_IGNORE_NEWLINES means that
newline/return characters should not cause a line break.  If either tabs or
newlines/returns are ignored, then they will be treated as regular
characters, being measured and displayed in a platform-dependent manner as
described in \fBTk_MeasureChars\fR, and will not have any special behaviors.
@


1.4
log
@fixed Tk doc bugs
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: TextLayout.3,v 1.3 1999/04/16 01:51:09 stanton Exp $
@


1.3
log
@* Merged 8.1 branch into the main trunk
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id$
d195 1
a195 1
\fBTk_CharBBox\fR uses the information in \fIlayout\fR to return the
@


1.3.2.1
log
@
Merged with mainline.
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: TextLayout.3,v 1.4 1999/04/16 18:26:12 surles Exp $
d195 1
a195 1
\fBTk_CharBbox\fR uses the information in \fIlayout\fR to return the
@


1.2
log
@Replaced SCCS strings, fixed binary files
@
text
@d10 1
a10 1
.TH Tk_ComputeTextLayout 3 "" Tk "Tk Library Procedures"
d58 4
a61 1
terminated and uses \fBstrlen(\fIstring\fB)\fR.
d139 8
a146 1
simpler layers.
@


1.1
log
@Initial revision
@
text
@d7 1
a7 1
'\" SCCS: @@(#) TextLayout.3 1.6 96/12/16 16:48:12
@


1.1.4.1
log
@Merged 8.0.3 changes into 8.1
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: TextLayout.3,v 1.2 1998/09/14 18:22:54 stanton Exp $
@


1.1.4.2
log
@* doc/MeasureChar.3:
* doc/TextLayout.3:
* generic/tk.decls:
* generic/tkCanvText.c:
* generic/tkEntry.c:
* generic/tkFont.c:
* generic/tkListbox.c:
* generic/tkMessage.c:
* mac/tkMacFont.c:
* unix/tkUnixButton.c:
* unix/tkUnixFont.c:
* unix/tkUnixMenu.c:
* win/tkWinFont.c:
* win/tkWinMenu.c: Standardized text layout and font interfaces
so they are consistent with respect to byte versus character
oriented indices.  The layout functions all manipulate character
oriented values while the lower level measurement functions all
operate on byte oriented values.  This distinction was not clear
and so the functions were being used improperly in a number of
places.  [Bug: 1053, 747, 749, 1646]

* generic/tk.decls: Eliminated uses of C++ STL types string and
list from declarations.

* generic/tkFont.c: Changes to named fonts were not being
propagated in some cases. [Bug: 1144]
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id$
d10 1
a10 1
.TH Tk_ComputeTextLayout 3 8.1 Tk "Tk Library Procedures"
d58 1
a58 4
.VS 8.1
terminated and uses \fBTcl_NumUtfChars\fR to determine the length of
\fIstring\fR.
.VE
d136 1
a136 8
simpler layers.  
.VS 8.1
Note that unlike the lower level text display routines, the functions
described here all operate on character-oriented lengths and indices
rather than byte-oriented values.  See the description of
\fBTcl_UtfAtIndex\fR for more details on converting between character
and byte offsets.
.VE 8.1
@


