diff options
author | dkf <dkf@noemail.net> | 2008-06-30 22:56:59 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2008-06-30 22:56:59 (GMT) |
commit | 8d46f1ba64cc754a2853c5253744215ef1f2b3c0 (patch) | |
tree | d6714c53bb2368a4c8befd4c7dc0085d88b31a15 /doc/ConfigWidg.3 | |
parent | 18641c7826bca127501bd5fc410313ca66544e86 (diff) | |
download | tk-8d46f1ba64cc754a2853c5253744215ef1f2b3c0.zip tk-8d46f1ba64cc754a2853c5253744215ef1f2b3c0.tar.gz tk-8d46f1ba64cc754a2853c5253744215ef1f2b3c0.tar.bz2 |
Minor doc updates (removing out of date changebars, improving typedef formatting,
etc.)
FossilOrigin-Name: 3354fd63452f0b436d3a487f1e1f0fecf750cee1
Diffstat (limited to 'doc/ConfigWidg.3')
-rw-r--r-- | doc/ConfigWidg.3 | 46 |
1 files changed, 17 insertions, 29 deletions
diff --git a/doc/ConfigWidg.3 b/doc/ConfigWidg.3 index 1fd230e..d26878a 100644 --- a/doc/ConfigWidg.3 +++ b/doc/ConfigWidg.3 @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ConfigWidg.3,v 1.20 2007/12/13 15:23:42 dgp Exp $ +'\" RCS: @(#) $Id: ConfigWidg.3,v 1.21 2008/06/30 22:57:00 dkf Exp $ '\" .so man.macros .TH Tk_ConfigureWidget 3 4.1 Tk "Tk Library Procedures" @@ -63,7 +63,7 @@ Display containing widget whose record is being freed; needed in order to free up resources. .BE .SH DESCRIPTION -.PP +.PP Note: \fBTk_ConfigureWidget\fR should be replaced with the new \fBTcl_Obj\fR based API \fBTk_SetOptions\fR. The old interface is retained for backward compatibility. @@ -112,7 +112,7 @@ typedef struct { int \fIoffset\fR; int \fIspecFlags\fR; Tk_CustomOption *\fIcustomPtr\fR; -} Tk_ConfigSpec; +} \fBTk_ConfigSpec\fR; .CE The \fItype\fR field indicates what type of configuration option this is (e.g. \fBTK_CONFIG_COLOR\fR for a color value, or \fBTK_CONFIG_INT\fR for @@ -358,7 +358,6 @@ is an empty string then the target will be set to NULL. \fBTK_CONFIG_WINDOW\fR The value must be a window path name. It is translated to a \fBTk_Window\fR token and the token is stored in the target. - .SH "GROUPED ENTRIES" .PP In some cases it is useful to generate multiple resources from @@ -376,7 +375,6 @@ Each of the entries after the first must have a NULL value in its \fIargvName\fR field; this indicates that the entry is to be grouped with the entry that precedes it. Only the \fItype\fR and \fIoffset\fR fields are used from these follow-on entries. - .SH "FLAGS" .PP The \fIflags\fR argument passed to \fBTk_ConfigureWidget\fR is used @@ -436,13 +434,11 @@ once, save the value, and provide it before calling .TP \fBTK_CONFIG_OPTION_SPECIFIED\fR This bit is -.VS 8.5 deprecated. It used to be set and cleared by \fBTk_ConfigureWidget\fR so that callers could detect what entries were specified in \fIargv\fR, but it was removed because it was inherently thread-unsafe. Code that wishes to detect what options were specified should use \fBTk_SetOptions\fR instead. -.VE 8.5 .PP The \fBTK_CONFIG_MONO_ONLY\fR and \fBTK_CONFIG_COLOR_ONLY\fR flags are typically used to specify different default values for @@ -475,7 +471,6 @@ for which this entry is valid. When calling \fBTk_ConfigureWidget\fR, \fIflags\fR will have a single one of these bits set to select the entries for the desired widget type. For a working example of this feature, see the code in tkButton.c. - .SH TK_OFFSET .PP The \fBTk_Offset\fR macro is provided as a safe way of generating @@ -483,7 +478,6 @@ the \fIoffset\fR values for entries in Tk_ConfigSpec structures. It takes two arguments: the name of a type of record, and the name of a field in that record. It returns the byte offset of the named field in records of the given type. - .SH TK_CONFIGUREINFO .PP The \fBTk_ConfigureInfo\fR procedure may be used to obtain @@ -519,7 +513,6 @@ if \fIargvName\fR had been NULL. .PP The \fIflags\fR argument to \fBTk_ConfigureInfo\fR is used to restrict the \fIspecs\fR entries to consider, just as for \fBTk_ConfigureWidget\fR. - .SH TK_CONFIGUREVALUE .PP \fBTk_ConfigureValue\fR takes arguments similar to \fBTk_ConfigureInfo\fR; @@ -532,7 +525,6 @@ not a valid option name), \fBTCL_ERROR\fR is returned and an error message is left in \fIinterp->result\fR. This procedure is typically called to implement \fBcget\fR widget commands. - .SH TK_FREEOPTIONS .PP The \fBTk_FreeOptions\fR procedure may be invoked during widget cleanup @@ -545,7 +537,6 @@ it contains a null pointer) then no resource is freed for that entry. After freeing a resource, \fBTk_FreeOptions\fR sets the corresponding field of the widget record to null. - .SH "CUSTOM OPTION TYPES" .PP Applications can extend the built-in configuration types with additional @@ -556,22 +547,22 @@ typedef struct Tk_CustomOption { Tk_OptionParseProc *\fIparseProc\fR; Tk_OptionPrintProc *\fIprintProc\fR; ClientData \fIclientData\fR; -} Tk_CustomOption; +} \fBTk_CustomOption\fR; -typedef int Tk_OptionParseProc( - ClientData \fIclientData\fR, - Tcl_Interp *\fIinterp\fR, - Tk_Window \fItkwin\fR, - char *\fIvalue\fR, - char *\fIwidgRec\fR, - int \fIoffset\fR); +typedef int \fBTk_OptionParseProc\fR( + ClientData \fIclientData\fR, + Tcl_Interp *\fIinterp\fR, + Tk_Window \fItkwin\fR, + char *\fIvalue\fR, + char *\fIwidgRec\fR, + int \fIoffset\fR); -typedef char *Tk_OptionPrintProc( - ClientData \fIclientData\fR, - Tk_Window \fItkwin\fR, - char *\fIwidgRec\fR, - int \fIoffset\fR, - Tcl_FreeProc **\fIfreeProcPtr\fR); +typedef char *\fBTk_OptionPrintProc\fR( + ClientData \fIclientData\fR, + Tk_Window \fItkwin\fR, + char *\fIwidgRec\fR, + int \fIoffset\fR, + Tcl_FreeProc **\fIfreeProcPtr\fR); .CE The Tk_CustomOption structure contains three fields, which are pointers to the two procedures and a \fIclientData\fR value to be passed to those @@ -624,7 +615,6 @@ Tk_CustomOption structure has been created for them, options of this new type may be manipulated with Tk_ConfigSpec entries whose \fItype\fR fields are \fBTK_CONFIG_CUSTOM\fR and whose \fIcustomPtr\fR fields point to the Tk_CustomOption structure. - .SH EXAMPLES .PP Although the explanation of \fBTk_ConfigureWidget\fR is fairly @@ -635,10 +625,8 @@ The library implementation of frames (tkFrame.c) has a simple configuration table, and the library implementation of buttons (tkButton.c) has a much more complex table that uses many of the fancy \fIspecFlags\fR mechanisms. - .SH "SEE ALSO" Tk_SetOptions(3) - .SH KEYWORDS anchor, bitmap, boolean, border, cap style, color, configuration options, cursor, custom, double, font, integer, join style, justify, millimeters, |