summaryrefslogtreecommitdiffstats
path: root/doc/SetOptions.3
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-19 10:29:25 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-06-19 10:29:25 (GMT)
commit9389cc709a38a39f1dbd50e744342ee2590269f8 (patch)
tree71968a06df024ea74a2bc06c881ffd4d50c04891 /doc/SetOptions.3
parent8a539b981722705710128c18bb03787afa71847f (diff)
parente8469505b13e2af380977e581f42402073a2136f (diff)
downloadtk-9389cc709a38a39f1dbd50e744342ee2590269f8.zip
tk-9389cc709a38a39f1dbd50e744342ee2590269f8.tar.gz
tk-9389cc709a38a39f1dbd50e744342ee2590269f8.tar.bz2
SetOptions.3: minor doc fix
make various other tables const (all backported from Tk 8.6)
Diffstat (limited to 'doc/SetOptions.3')
-rw-r--r--doc/SetOptions.341
1 files changed, 17 insertions, 24 deletions
diff --git a/doc/SetOptions.3 b/doc/SetOptions.3
index 6ce3db0..bd1d8ab 100644
--- a/doc/SetOptions.3
+++ b/doc/SetOptions.3
@@ -243,7 +243,6 @@ The \fBTk_Offset\fR macro is provided as a safe way of generating the
Tk_OptionSpec 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 "TEMPLATES"
.PP
The array of Tk_OptionSpec structures passed to \fBTk_CreateOptionTable\fR
@@ -262,7 +261,7 @@ typedef struct {
int \fIflags\fR;
ClientData \fIclientData\fR;
int \fItypeMask\fR;
-} Tk_OptionSpec;
+} \fBTk_OptionSpec\fR;
.CE
The \fItype\fR field indicates what kind of configuration option this is
(e.g. \fBTK_OPTION_COLOR\fR for a color value, or \fBTK_OPTION_INT\fR for
@@ -434,15 +433,14 @@ suitable for passing to \fBTcl_GetIndexFromObj\fR. The value must
be one of the strings in the table, or a unique abbreviation of
one of the strings. The internal form is an integer giving the index
into the table of the matching string, like the return value
-from \fBTcl_GetStringFromObj\fR.
+from \fBTcl_GetStringFromObj\fR.
.TP
\fBTK_OPTION_SYNONYM\fR
This type is used to provide alternative names for an option (for
example, \fB\-bg\fR is often used as a synonym for \fB\-background\fR).
-The \fBclientData\fR field is a (char *) pointer that gives
-the name of another option in the same table. Whenever the
-synonym option is used, the information from the other option
-will be used instead.
+The \fBclientData\fR field is a string that gives the name of another
+option in the same table. Whenever the synonym option is used, the
+information from the other option will be used instead.
.TP
\fBTK_OPTION_WINDOW\fR
The value must be a window path name. The internal form is a
@@ -450,7 +448,6 @@ The value must be a window path name. The internal form is a
This option type requires \fItkwin\fR to be supplied to procedures
such as \fBTk_SetOptions\fR (in order to identify the application),
and it supports the \fBTK_OPTION_NULL_OK\fR flag.
-
.SH "STORAGE MANAGEMENT ISSUES"
.PP
If a field of a widget record has its offset stored in the \fIobjOffset\fR
@@ -474,7 +471,6 @@ However, the widget code is responsible for storing NULL or \fBNone\fR in
all pointer and token fields before invoking \fBTk_InitOptions\fR.
This is needed to allow proper cleanup in the rare case where
an error occurs in \fBTk_InitOptions\fR.
-
.SH "OBJOFFSET VS. INTERNALOFFSET"
.PP
In most cases it is simplest to use the \fIinternalOffset\fR field of
@@ -505,7 +501,6 @@ To implement a new type of option, you can use \fBTK_OPTION_STRING\fR as
the type in the Tk_OptionSpec structure and set the \fIobjOffset\fR field
but not the \fIinternalOffset\fR field. Then, after calling
\fBTk_SetOptions\fR, convert the object to internal form yourself.
-
.SH "CUSTOM OPTION TYPES"
.PP
Applications can extend the built-in configuration types with
@@ -520,33 +515,33 @@ typedef struct Tk_ObjCustomOption {
Tk_CustomOptionRestoreProc *\fIrestoreProc\fR;
Tk_CustomOptionFreeProc *\fIfreeProc\fR;
ClientData \fIclientData\fR;
-} Tk_ObjCustomOption;
+} \fBTk_ObjCustomOption\fR;
-typedef int Tk_CustomOptionSetProc(
+typedef int \fBTk_CustomOptionSetProc\fR(
ClientData \fIclientData\fR,
- Tcl_Interp *\fIinterp\fR,
- Tk_Window \fItkwin\fR,
+ Tcl_Interp *\fIinterp\fR,
+ Tk_Window \fItkwin\fR,
Tcl_Obj **\fIvaluePtr\fR,
char *\fIrecordPtr\fR,
int \fIinternalOffset\fR,
- char *\fIsaveInternalPtr\fR,
+ char *\fIsaveInternalPtr\fR,
int \fIflags\fR);
-typedef Tcl_Obj *Tk_CustomOptionGetProc(
+typedef Tcl_Obj *\fBTk_CustomOptionGetProc\fR(
ClientData \fIclientData\fR,
- Tk_Window \fItkwin\fR,
+ Tk_Window \fItkwin\fR,
char *\fIrecordPtr\fR,
int \fIinternalOffset\fR);
-typedef void Tk_CustomOptionRestoreProc(
+typedef void \fBTk_CustomOptionRestoreProc\fR(
ClientData \fIclientData\fR,
- Tk_Window \fItkwin\fR,
- char *\fIinternalPtr\fR,
+ Tk_Window \fItkwin\fR,
+ char *\fIinternalPtr\fR,
char *\fIsaveInternalPtr\fR);
-typedef void Tk_CustomOptionFreeProc(
+typedef void \fBTk_CustomOptionFreeProc\fR(
ClientData \fIclientData\fR,
- Tk_Window \fItkwin\fR,
+ Tk_Window \fItkwin\fR,
char *\fIinternalPtr\fR);
.CE
.PP
@@ -645,8 +640,6 @@ structure. \fITkwin\fR is a copy of the \fItkwin\fR argument to
is a pointer to the location where the internal representation of the
option value is stored. The \fIfreeProc\fR must free any storage
associated with the option. \fIFreeProc\fR has no return value.
-
-
.SH KEYWORDS
anchor, bitmap, boolean, border, color, configuration option,
cursor, double, font, integer, justify,