home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / tcl / tk3.3b1 / doc / GetJustify.3 < prev    next >
Encoding:
Text File  |  1993-04-01  |  3.3 KB  |  88 lines

  1. '\"
  2. '\" Copyright (c) 1990 The Regents of the University of California.
  3. '\" All rights reserved.
  4. '\"
  5. '\" Permission is hereby granted, without written agreement and without
  6. '\" license or royalty fees, to use, copy, modify, and distribute this
  7. '\" documentation for any purpose, provided that the above copyright
  8. '\" notice and the following two paragraphs appear in all copies.
  9. '\"
  10. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  11. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  12. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  13. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. '\"
  15. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  16. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  18. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  19. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. '\" 
  21. '\" $Header: /user6/ouster/wish/man/RCS/GetJustify.3,v 1.4 93/04/01 09:41:30 ouster Exp $ SPRITE (Berkeley)
  22. '\" 
  23. .so man.macros
  24. .HS Tk_GetJustify tkc
  25. .BS
  26. .SH NAME
  27. Tk_GetJustify, Tk_NameOfJustify \- translate between strings and justification styles
  28. .SH SYNOPSIS
  29. .nf
  30. \fB#include <tk.h>\fR
  31. .sp
  32. Tk_Justify
  33. \fBTk_GetJustify(\fIinterp, string, justifyPtr\fB)\fR
  34. .sp
  35. char *
  36. \fBTk_NameOfJustify(\fIjustify\fB)\fR
  37. .SH ARGUMENTS
  38. .AS "Tk_Justify" *justifyPtr
  39. .AP Tcl_Interp *interp in
  40. Interpreter to use for error reporting.
  41. .AP char *string in
  42. String containing name of justification style (``left'', ``right'',
  43. ``center'', or ``fill'').
  44. .AP int *justifyPtr out
  45. Pointer to location in which to store justify value corresponding to
  46. \fIstring\fR.
  47. .AP Tk_Justify justify in
  48. Justification style (one of the values listed below).
  49. .BE
  50.  
  51. .SH DESCRIPTION
  52. .PP
  53. \fBTk_GetJustify\fR places in \fI*justifyPtr\fR the justify value
  54. corresponding to \fIstring\fR.  This value will be one of the following:
  55. .TP
  56. \fBTK_JUSTIFY_LEFT\fR
  57. Means that the text on each line should start at the left edge of
  58. the line;  as a result, the right edges of lines may be ragged.
  59. .TP
  60. \fBTK_JUSTIFY_RIGHT\fR
  61. Means that the text on each line should end at the right edge of
  62. the line;  as a result, the left edges of lines may be ragged.
  63. .TP
  64. \fBTK_JUSTIFY_CENTER\fR
  65. Means that the text on each line should be centered;  as a result,
  66. both the left and right edges of lines may be ragged.
  67. .TP
  68. \fBTK_JUSTIFY_FILL\fR
  69. Means that the text on each line should start at the left edge of
  70. the line and end at the right edge, with the sizes of the spaces
  71. in the line adjusted to make this work.
  72. .PP
  73. Under normal circumstances the return value is \fBTCL_OK\fR and
  74. \fIinterp\fR is unused.
  75. If \fIstring\fR doesn't contain a valid justification style
  76. or an abbreviation of one of these names, then an error message is
  77. stored in \fIinterp->result\fR, \fBTCL_ERROR\fR is returned, and
  78. \fI*justifyPtr\fR is unmodified.
  79. .PP
  80. \fBTk_NameOfJustify\fR is the logical inverse of \fBTk_GetJustify\fR.
  81. Given a justify value it returns a statically-allocated string
  82. corresponding to \fIjustify\fR.
  83. If \fIjustify\fR isn't a legal justify value, then
  84. ``unknown justification style'' is returned.
  85.  
  86. .SH KEYWORDS
  87. center, fill, justification, string
  88.