diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-10-25 21:06:25 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-10-25 21:06:25 (GMT) |
| commit | 0d5336db012f45753abace489f18f0ca299c6961 (patch) | |
| tree | b1bf3280a9046df99226158978502eeb26f5b0a3 /doc/SetOptions.3 | |
| parent | e97381a6d921de403516d5b761539a450f4af83c (diff) | |
| parent | 1320b8a2a9c1269a345d44d673a7a35707fbbe9c (diff) | |
| download | tk-core-tip-626.zip tk-core-tip-626.tar.gz tk-core-tip-626.tar.bz2 | |
Merge 9.0core-tip-626
Diffstat (limited to 'doc/SetOptions.3')
| -rw-r--r-- | doc/SetOptions.3 | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/doc/SetOptions.3 b/doc/SetOptions.3 index cc206d4..2dc9450 100644 --- a/doc/SetOptions.3 +++ b/doc/SetOptions.3 @@ -505,11 +505,13 @@ integer pixel value corresponding to \fB2m\fR. Unfortunately, this loses the original screen-independent value. Thus for \fBTK_OPTION_PIXELS\fR options it is better to use the \fIobjOffset\fR field. In this case the original value of the option is retained in the object and can be returned when -the option is retrieved. In most cases it is convenient to use the +the option is retrieved. It might seem convenient to use the \fIinternalOffset\fR field as well, so that the integer value is -immediately available for use in the widget code (alternatively, -\fBTk_GetPixelsFromObj\fR can be used to extract the integer value from -the object whenever it is needed). Note that the problem of losing +immediately available for use in the widget code. But if scaling is +involved, \fIinternalOffset\fR won't change value when the scaling +changes. Therefore it is better always to use +\fBTk_GetPixelsFromObj\fR to extract the integer value from +the object whenever it is needed. Note: the problem of losing information on retrievals exists only for \fBTK_OPTION_PIXELS\fR options. .PP The second reason to use the \fIobjOffset\fR field is in order to @@ -530,7 +532,7 @@ free, and restore saved copies of the type and creating a structure pointing to those procedures: .CS typedef struct { - char *name; + const char *\fIname\fR; Tk_CustomOptionSetProc *\fIsetProc\fR; Tk_CustomOptionGetProc *\fIgetProc\fR; Tk_CustomOptionRestoreProc *\fIrestoreProc\fR; |
