Skip to content

Commit

Permalink
Fix [475692230a]: Wrong advice regarding TK_OPTION_PIXELS
Browse files Browse the repository at this point in the history
  • Loading branch information
jan.nijtmans committed Aug 9, 2024
2 parents 38b5bba + dfb521c commit a4494d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
10 changes: 6 additions & 4 deletions doc/SetOptions.3
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions generic/tkInt.decls
Original file line number Diff line number Diff line change
Expand Up @@ -436,14 +436,14 @@ declare 124 aqua {
}
declare 135 {deprecated {renamed to Tk_DrawHighlightBorder}} {
void TkpDrawHighlightBorder(Tk_Window tkwin, GC fgGC, GC bgGC,
int highlightWidth, Drawable drawable)
int highlightWidth, Drawable drawable)
}
declare 136 {
void TkSetFocusWin(TkWindow *winPtr, int force)
}
declare 137 {
void TkpSetKeycodeAndState(Tk_Window tkwin, KeySym keySym,
XEvent *eventPtr)
XEvent *eventPtr)
}
declare 138 {
KeySym TkpGetKeySym(TkDisplay *dispPtr, XEvent *eventPtr)
Expand Down Expand Up @@ -646,7 +646,7 @@ declare 186 {
# Debugging / testing functions for photo images
declare 187 {
int TkDebugPhotoStringMatchDef(Tcl_Interp *inter, Tcl_Obj *data,
Tcl_Obj *formatString, int *widthPtr, int *heightPtr)
Tcl_Obj *formatString, int *widthPtr, int *heightPtr)
}


Expand Down Expand Up @@ -1345,7 +1345,7 @@ declare 81 win {
}
declare 82 win {
Status XParseColor(Display *display, Colormap map,
_Xconst char *spec, XColor *colorPtr)
_Xconst char *spec, XColor *colorPtr)
}
declare 83 win {
GC XCreateGC(Display *display, Drawable d,
Expand Down Expand Up @@ -1771,7 +1771,7 @@ declare 57 macosx {
}
declare 58 macosx {
Status XParseColor(Display *display, Colormap map,
_Xconst char *spec, XColor *colorPtr)
_Xconst char *spec, XColor *colorPtr)
}
declare 59 macosx {
GC XCreateGC(Display *display, Drawable d,
Expand Down

0 comments on commit a4494d1

Please sign in to comment.