Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Merge trunk |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | revised_text | tip-466 |
Files: | files | file ages | folders |
SHA3-256: |
454a12d87607b953169831e576350a4a |
User & Date: | jan.nijtmans 2025-05-15 13:06:06.902 |
Context
2025-05-16
| ||
11:10 | Merge trunk check-in: 4333b4e1 user: jan.nijtmans tags: revised_text, tip-466 | |
2025-05-15
| ||
13:06 | Merge trunk check-in: 454a12d8 user: jan.nijtmans tags: revised_text, tip-466 | |
09:41 | TIP #704: Extend Tk_CanvasTextInfo check-in: b8abd911 user: jan.nijtmans tags: trunk, main | |
2025-05-01
| ||
06:57 | Merge trunk check-in: 1e599672 user: jan.nijtmans tags: revised_text, tip-466 | |
Changes
Changes to changes.md.
︙ | ︙ | |||
10 11 12 13 14 15 16 | do not support Tcl 8.6. The Tk 9.1 series extends the Tcl 9.0 series. To make use of Tk 9.1a0, first a Tcl 9.0 or 9.1 release must be present. As new Tk features are developed, expect them to appear in Tk 9, but not necessarily in Tk 8. # 9.1 Features and Interfaces - [MS-Win: remove Windows XP dialog variants for tk_chooseDirectory and tk_getOpenFile](https://core.tcl-lang.org/tk/tktview/441c52) | > > > | | 10 11 12 13 14 15 16 17 18 19 20 21 22 | do not support Tcl 8.6. The Tk 9.1 series extends the Tcl 9.0 series. To make use of Tk 9.1a0, first a Tcl 9.0 or 9.1 release must be present. As new Tk features are developed, expect them to appear in Tk 9, but not necessarily in Tk 8. # 9.1 Features and Interfaces - [MS-Win: remove Windows XP dialog variants for tk_chooseDirectory and tk_getOpenFile](https://core.tcl-lang.org/tk/tktview/441c52) - [Handle negative screen distances](https://core.tcl-lang.org/tips/doc/trunk/tip/698.md) - [Extend Tk_CanvasTextInfo](https://core.tcl-lang.org/tips/doc/trunk/tip/704.md) - [Add new states to ttk::treeview and ttk::notebook](https://core.tcl-lang.org/tips/doc/trunk/tip/719.md) # Potential incompatibilities to 9.0 - [MS-Win: the undocumented option -xpstyle was removed from tk_chooseDirectory and tk_getOpenFile](https://core.tcl-lang.org/tk/tktview/441c52) |
Changes to doc/CanvTxtInfo.3.
︙ | ︙ | |||
43 44 45 46 47 48 49 50 51 52 53 54 | Tcl_Size \fIselectAnchor\fR; Tk_3DBorder \fIinsertBorder\fR; int \fIinsertWidth\fR; int \fIinsertBorderWidth\fR; Tk_Item *\fIfocusItemPtr\fR; int \fIgotFocus\fR; int \fIcursorOn\fR; } \fBTk_CanvasTextInfo\fR; .CE The \fBselBorder\fR field identifies a Tk_3DBorder that should be used for drawing the background under selected text. \fIselBorderWidth\fR gives the width of the raised border around | > > > | > > > | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | Tcl_Size \fIselectAnchor\fR; Tk_3DBorder \fIinsertBorder\fR; int \fIinsertWidth\fR; int \fIinsertBorderWidth\fR; Tk_Item *\fIfocusItemPtr\fR; int \fIgotFocus\fR; int \fIcursorOn\fR; Tcl_Obj *\fIinsertBorderWidthObj\fR; Tcl_Obj *\fIinsertWidthObj\fR; Tcl_Obj *\fIselBorderWidthObj\fR; } \fBTk_CanvasTextInfo\fR; .CE The \fBselBorder\fR field identifies a Tk_3DBorder that should be used for drawing the background under selected text. \fIselBorderWidth\fR gives the width of the raised border around selected text, in pixels. \fIselBorderWidthObj\fR contains the same information, but the original Tcl_Obj * value; \fIselFgColorPtr\fR points to an XColor that describes the foreground color to be used when drawing selected text. \fIselItemPtr\fR points to the item that is currently selected, or NULL if there is no item selected or if the canvas does not have the selection. \fIselectFirst\fR and \fIselectLast\fR give the indices of the first and last selected characters in \fIselItemPtr\fR, as returned by the \fIindexProc\fR for that item. \fIanchorItemPtr\fR points to the item that currently has the selection anchor; this is not necessarily the same as \fIselItemPtr\fR. \fIselectAnchor\fR is an index that identifies the anchor position within \fIanchorItemPtr\fR. \fIinsertBorder\fR contains a Tk_3DBorder to use when drawing the insertion cursor; \fIinsertWidth\fR gives the total width of the insertion cursor in pixels, and \fIinsertBorderWidth\fR gives the width of the raised border around the insertion cursor. \fIinsertWidthObj\fR and \fIinsertBorderWidthObj\fR contain the same information, but the original Tcl_Obj * value. \fIfocusItemPtr\fR identifies the item that currently has the input focus, or NULL if there is no such item. \fIgotFocus\fR is 1 if the canvas widget has the input focus and 0 otherwise. \fIcursorOn\fR is 1 if the insertion cursor should be drawn in \fIfocusItemPtr\fR and 0 if it should not be drawn; this field is toggled on and off by Tk to make the cursor blink. |
︙ | ︙ |
Changes to doc/ttk_widget.n.
︙ | ︙ | |||
341 342 343 344 345 346 347 | The mouse cursor is over the widget and pressing a mouse button will cause some action to occur. (aka .QW prelight (Gnome), .QW hot (Windows), .QW hover ). | < < < < < < < < < < < < < < < < < < < < < < < < > > > > > > | | > > > | > | > > > > > > > > > > > > > > > > > > > > > > | 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 | The mouse cursor is over the widget and pressing a mouse button will cause some action to occur. (aka .QW prelight (Gnome), .QW hot (Windows), .QW hover ). .IP \fBalternate\fR A widget-specific alternate display format. For example, used for checkbuttons and radiobuttons in the .QW tristate or .QW mixed state, and for buttons with \fB\-default active\fR. .IP \fBbackground\fR Windows and the Mac have a notion of an .QW active or foreground window. The \fBbackground\fR state is set for widgets in a background window, and cleared for those in the foreground window. .IP \fBdisabled\fR Widget is disabled under program control (aka .QW unavailable , .QW inactive ). .IP \fBfirst\fR Widget is the first one in a container. Used for tab elements in a notebook. .IP \fBfocus\fR Widget has keyboard focus. .IP \fBhover\fR The mouse cursor is within the widget. This is similar to the \fBactive\fP state; it is used in some themes for widgets that provide distinct visual feedback for the active widget in addition to the active element within the widget. .IP \fBinvalid\fR The widget's value is invalid. (Potential uses: scale widget value out of bounds, entry widget value failed validation.) .IP \fBlast\fR Widget is the last one in a container. Used for tab elements in a notebook. .IP \fBleaf\fR Widget is a leaf. Used in a treeview widget. .IP \fBopen\fR Widget is in the open state. Used in a treeview widget. .IP \fBpressed\fR Widget is being pressed (aka .QW armed in Motif). .IP \fBreadonly\fR Widget should not allow user modification. .IP \fBselected\fR .QW On , .QW true , or .QW current for things like checkbuttons and radiobuttons. .IP \fBuser1\fR-\fBuser6\fR Freely usable for other purposes .PP A \fIstate specification\fR or \fIstateSpec\fR is a list of state names, optionally prefixed with an exclamation point (!) indicating that the bit is off. .SH EXAMPLES |
︙ | ︙ |
Changes to generic/tk.h.
︙ | ︙ | |||
63 64 65 66 67 68 69 | * You may also need to update some of these files when the numbers change for * the version of Tcl that this release of Tk is compiled against. */ #ifndef TK_MAJOR_VERSION # define TK_MAJOR_VERSION 9 #endif | | > > < | 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | * You may also need to update some of these files when the numbers change for * the version of Tcl that this release of Tk is compiled against. */ #ifndef TK_MAJOR_VERSION # define TK_MAJOR_VERSION 9 #endif #if TK_MAJOR_VERSION != 9 # error "This header-file is for Tk 9 only" #endif # define TK_MINOR_VERSION 1 # define TK_RELEASE_LEVEL TCL_ALPHA_RELEASE # define TK_RELEASE_SERIAL 0 # define TK_VERSION "9.1" # define TK_PATCH_LEVEL "9.1a0" /* * A special definition used to allow this header file to be included from * windows or mac resource files so that they can obtain version information. * RC_INVOKED is defined by default by the windows RC tool and manually set * for macintosh. * |
︙ | ︙ | |||
224 225 226 227 228 229 230 231 232 233 234 235 236 237 | /* * Flag values for Tk_OptionSpec structures. These flags are shared by * Tk_ConfigSpec structures, so be sure to coordinate any changes carefully. */ #define TK_OPTION_DONT_SET_DEFAULT (1 << 3) #define TK_OPTION_NULL_OK TCL_NULL_OK #define TK_OPTION_VAR(type) ((sizeof(type) < 2 * sizeof(int)) ? ((int)(sizeof(type)&(sizeof(int)-1))<<6) : (3<<6)) #define TK_OPTION_ENUM_VAR TK_OPTION_VAR(Tk_OptionType) /* * The following structure and function types are used by TK_OPTION_CUSTOM * options; the structure holds pointers to the functions needed by the Tk * option config code to handle a custom option. | > | 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 | /* * Flag values for Tk_OptionSpec structures. These flags are shared by * Tk_ConfigSpec structures, so be sure to coordinate any changes carefully. */ #define TK_OPTION_DONT_SET_DEFAULT (1 << 3) #define TK_OPTION_NULL_OK TCL_NULL_OK #define TK_OPTION_NEG_OK (1 << 6) /* For TK_OPTION_PIXELS only, so no conflict with TK_OPTION_VAR */ #define TK_OPTION_VAR(type) ((sizeof(type) < 2 * sizeof(int)) ? ((int)(sizeof(type)&(sizeof(int)-1))<<6) : (3<<6)) #define TK_OPTION_ENUM_VAR TK_OPTION_VAR(Tk_OptionType) /* * The following structure and function types are used by TK_OPTION_CUSTOM * options; the structure holds pointers to the functions needed by the Tk * option config code to handle a custom option. |
︙ | ︙ | |||
1131 1132 1133 1134 1135 1136 1137 | Tk_Item *focusItemPtr; /* Item that currently has the input focus, or * NULL if no such item. Read-only to items. */ int gotFocus; /* Non-zero means that the canvas widget has * the input focus. Read-only to items.*/ int cursorOn; /* Non-zero means that an insertion cursor * should be displayed in focusItemPtr. * Read-only to items.*/ | | < | | < | 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 | Tk_Item *focusItemPtr; /* Item that currently has the input focus, or * NULL if no such item. Read-only to items. */ int gotFocus; /* Non-zero means that the canvas widget has * the input focus. Read-only to items.*/ int cursorOn; /* Non-zero means that an insertion cursor * should be displayed in focusItemPtr. * Read-only to items.*/ Tcl_Obj *insertBorderWidthObj; Tcl_Obj *insertWidthObj; Tcl_Obj *selBorderWidthObj; } Tk_CanvasTextInfo; /* * Structures used for Dashing and Outline. */ typedef struct Tk_Dash { |
︙ | ︙ |
Changes to generic/tkButton.c.
︙ | ︙ | |||
1023 1024 1025 1026 1027 1028 1029 | Tcl_Size objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ { Tk_SavedOptions savedOptions; Tcl_Obj *errorResult = NULL; int error, haveImage; Tk_Image image; | < | 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 | Tcl_Size objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ { Tk_SavedOptions savedOptions; Tcl_Obj *errorResult = NULL; int error, haveImage; Tk_Image image; int width, height; /* * Eliminate any existing trace on variables monitored by the button. */ if (butPtr->textVarNamePtr != NULL) { |
︙ | ︙ | |||
1088 1089 1090 1091 1092 1093 1094 | if ((butPtr->state == STATE_ACTIVE) && !Tk_StrictMotif(butPtr->tkwin)) { Tk_SetBackgroundFromBorder(butPtr->tkwin, butPtr->activeBorder); } else { Tk_SetBackgroundFromBorder(butPtr->tkwin, butPtr->normalBorder); } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 | if ((butPtr->state == STATE_ACTIVE) && !Tk_StrictMotif(butPtr->tkwin)) { Tk_SetBackgroundFromBorder(butPtr->tkwin, butPtr->activeBorder); } else { Tk_SetBackgroundFromBorder(butPtr->tkwin, butPtr->normalBorder); } if (butPtr->type >= TYPE_CHECK_BUTTON) { Tcl_Obj *valuePtr, *namePtr; if (butPtr->selVarNamePtr == NULL) { butPtr->selVarNamePtr = Tcl_NewStringObj( Tk_Name(butPtr->tkwin), TCL_INDEX_NONE); |
︙ | ︙ |
Changes to generic/tkCanvArc.c.
︙ | ︙ | |||
126 127 128 129 130 131 132 | {TK_CONFIG_CUSTOM, "-activewidth", NULL, NULL, "0.0", offsetof(ArcItem, outline.activeWidth), TK_CONFIG_DONT_SET_DEFAULT, &pixelOption}, {TK_CONFIG_CUSTOM, "-dash", NULL, NULL, NULL, offsetof(ArcItem, outline.dash), TK_CONFIG_NULL_OK, &dashOption}, {TK_CONFIG_PIXELS, "-dashoffset", NULL, NULL, | | | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | {TK_CONFIG_CUSTOM, "-activewidth", NULL, NULL, "0.0", offsetof(ArcItem, outline.activeWidth), TK_CONFIG_DONT_SET_DEFAULT, &pixelOption}, {TK_CONFIG_CUSTOM, "-dash", NULL, NULL, NULL, offsetof(ArcItem, outline.dash), TK_CONFIG_NULL_OK, &dashOption}, {TK_CONFIG_PIXELS, "-dashoffset", NULL, NULL, "0", offsetof(ArcItem, outline.offsetObj), TK_CONFIG_OBJS|TK_OPTION_NEG_OK, NULL}, {TK_CONFIG_CUSTOM, "-disableddash", NULL, NULL, NULL, offsetof(ArcItem, outline.disabledDash), TK_CONFIG_NULL_OK, &dashOption}, {TK_CONFIG_COLOR, "-disabledfill", NULL, NULL, NULL, offsetof(ArcItem, disabledFillColor), TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_COLOR, "-disabledoutline", NULL, NULL, NULL, offsetof(ArcItem, outline.disabledColor), TK_CONFIG_NULL_OK, NULL}, |
︙ | ︙ |
Changes to generic/tkCanvLine.c.
︙ | ︙ | |||
183 184 185 186 187 188 189 | "butt", offsetof(LineItem, capStyle), TK_CONFIG_DONT_SET_DEFAULT, NULL}, {TK_CONFIG_COLOR, "-fill", NULL, NULL, DEF_CANVITEM_OUTLINE, offsetof(LineItem, outline.color), TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_CUSTOM, "-dash", NULL, NULL, NULL, offsetof(LineItem, outline.dash), TK_CONFIG_NULL_OK, &dashOption}, {TK_CONFIG_PIXELS, "-dashoffset", NULL, NULL, | | | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | "butt", offsetof(LineItem, capStyle), TK_CONFIG_DONT_SET_DEFAULT, NULL}, {TK_CONFIG_COLOR, "-fill", NULL, NULL, DEF_CANVITEM_OUTLINE, offsetof(LineItem, outline.color), TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_CUSTOM, "-dash", NULL, NULL, NULL, offsetof(LineItem, outline.dash), TK_CONFIG_NULL_OK, &dashOption}, {TK_CONFIG_PIXELS, "-dashoffset", NULL, NULL, "0", offsetof(LineItem, outline.offsetObj), TK_CONFIG_OBJS|TK_OPTION_NEG_OK, NULL}, {TK_CONFIG_CUSTOM, "-disableddash", NULL, NULL, NULL, offsetof(LineItem, outline.disabledDash), TK_CONFIG_NULL_OK, &dashOption}, {TK_CONFIG_COLOR, "-disabledfill", NULL, NULL, NULL, offsetof(LineItem, outline.disabledColor), TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_BITMAP, "-disabledstipple", NULL, NULL, NULL, offsetof(LineItem, outline.disabledStipple), TK_CONFIG_NULL_OK, NULL}, |
︙ | ︙ |
Changes to generic/tkCanvPoly.c.
︙ | ︙ | |||
91 92 93 94 95 96 97 | {TK_CONFIG_CUSTOM, "-activewidth", NULL, NULL, "0.0", offsetof(PolygonItem, outline.activeWidth), TK_CONFIG_DONT_SET_DEFAULT, &pixelOption}, {TK_CONFIG_CUSTOM, "-dash", NULL, NULL, NULL, offsetof(PolygonItem, outline.dash), TK_CONFIG_NULL_OK, &dashOption}, {TK_CONFIG_PIXELS, "-dashoffset", NULL, NULL, | | | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | {TK_CONFIG_CUSTOM, "-activewidth", NULL, NULL, "0.0", offsetof(PolygonItem, outline.activeWidth), TK_CONFIG_DONT_SET_DEFAULT, &pixelOption}, {TK_CONFIG_CUSTOM, "-dash", NULL, NULL, NULL, offsetof(PolygonItem, outline.dash), TK_CONFIG_NULL_OK, &dashOption}, {TK_CONFIG_PIXELS, "-dashoffset", NULL, NULL, "0", offsetof(PolygonItem, outline.offsetObj), TK_CONFIG_OBJS|TK_OPTION_NEG_OK, NULL}, {TK_CONFIG_CUSTOM, "-disableddash", NULL, NULL, NULL, offsetof(PolygonItem, outline.disabledDash), TK_CONFIG_NULL_OK, &dashOption}, {TK_CONFIG_COLOR, "-disabledfill", NULL, NULL, NULL, offsetof(PolygonItem, disabledFillColor), TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_COLOR, "-disabledoutline", NULL, NULL, NULL, offsetof(PolygonItem, outline.disabledColor), |
︙ | ︙ |
Changes to generic/tkCanvText.c.
︙ | ︙ | |||
791 792 793 794 795 796 797 | /* * Last of all, update the bounding box for the item. The item's bounding * box includes the bounding box of all its lines, plus an extra fudge * factor for the cursor border (which could potentially be quite large). */ textInfoPtr = textPtr->textInfoPtr; | | | | 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 | /* * Last of all, update the bounding box for the item. The item's bounding * box includes the bounding box of all its lines, plus an extra fudge * factor for the cursor border (which could potentially be quite large). */ textInfoPtr = textPtr->textInfoPtr; Tk_GetPixelsFromObj(NULL, Tk_CanvasTkwin(canvas), textInfoPtr->insertWidthObj, &textInfoPtr->insertWidth); Tk_GetPixelsFromObj(NULL, Tk_CanvasTkwin(canvas), textInfoPtr->selBorderWidthObj, &textInfoPtr->selBorderWidth); fudge = (textInfoPtr->insertWidth + 1) / 2; if (textInfoPtr->selBorderWidth > fudge) { fudge = textInfoPtr->selBorderWidth; } /* * Apply the rotation before computing the bounding box. |
︙ | ︙ | |||
942 943 944 945 946 947 948 | * selection background all the way to the end of the line. * However, for the last line we only want to display up to the * last character, not the end of the line. */ x = xFirst; height = hFirst; | | | 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 | * selection background all the way to the end of the line. * However, for the last line we only want to display up to the * last character, not the end of the line. */ x = xFirst; height = hFirst; Tk_GetPixelsFromObj(NULL, Tk_CanvasTkwin(canvas), textInfoPtr->selBorderWidthObj, &textInfoPtr->selBorderWidth); for (y = yFirst ; y <= yLast; y += height) { int dx1, dy1, dx2, dy2; double s = textPtr->sine, c = textPtr->cosine; XPoint points[4]; if (y == yLast) { width = xLast + wLast - x; |
︙ | ︙ | |||
989 990 991 992 993 994 995 | if ((textInfoPtr->focusItemPtr == itemPtr) && (textInfoPtr->gotFocus)) { if (Tk_CharBbox(textPtr->textLayout, textPtr->insertPos, &x, &y, NULL, &height)) { int dx1, dy1, dx2, dy2; double s = textPtr->sine, c = textPtr->cosine; XPoint points[4]; | | | | 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 | if ((textInfoPtr->focusItemPtr == itemPtr) && (textInfoPtr->gotFocus)) { if (Tk_CharBbox(textPtr->textLayout, textPtr->insertPos, &x, &y, NULL, &height)) { int dx1, dy1, dx2, dy2; double s = textPtr->sine, c = textPtr->cosine; XPoint points[4]; Tk_GetPixelsFromObj(NULL, Tk_CanvasTkwin(canvas), textInfoPtr->insertWidthObj, &textInfoPtr->insertWidth); dx1 = x - (textInfoPtr->insertWidth / 2); dy1 = y; dx2 = textInfoPtr->insertWidth; dy2 = height; points[0].x = (short)(drawableX + dx1*c + dy1*s); points[0].y = (short)(drawableY + dy1*c - dx1*s); points[1].x = (short)(drawableX + (dx1+dx2)*c + dy1*s); points[1].y = (short)(drawableY + dy1*c - (dx1+dx2)*s); points[2].x = (short)(drawableX + (dx1+dx2)*c + (dy1+dy2)*s); points[2].y = (short)(drawableY + (dy1+dy2)*c - (dx1+dx2)*s); points[3].x = (short)(drawableX + dx1*c + (dy1+dy2)*s); points[3].y = (short)(drawableY + (dy1+dy2)*c - dx1*s); Tk_SetCaretPos(Tk_CanvasTkwin(canvas), points[0].x, points[0].y, height); if (textInfoPtr->cursorOn) { Tk_GetPixelsFromObj(NULL, Tk_CanvasTkwin(canvas), textInfoPtr->insertBorderWidthObj, &textInfoPtr->insertBorderWidth); Tk_Fill3DPolygon(Tk_CanvasTkwin(canvas), drawable, textInfoPtr->insertBorder, points, 4, textInfoPtr->insertBorderWidth, TK_RELIEF_RAISED); } else if (textPtr->cursorOffGC != NULL) { /* * Redraw the background over the area of the cursor, even * though the cursor is turned off. This guarantees that the |
︙ | ︙ |
Changes to generic/tkCanvas.c.
︙ | ︙ | |||
117 118 119 120 121 122 123 | DEF_CANVAS_HIGHLIGHT, offsetof(TkCanvas, highlightColorPtr), 0, NULL}, {TK_CONFIG_PIXELS, "-highlightthickness", "highlightThickness", "HighlightThickness", DEF_CANVAS_HIGHLIGHT_WIDTH, offsetof(TkCanvas, highlightWidthObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_BORDER, "-insertbackground", "insertBackground", "Foreground", DEF_CANVAS_INSERT_BG, offsetof(TkCanvas, textInfo.insertBorder), 0, NULL}, {TK_CONFIG_PIXELS, "-insertborderwidth", "insertBorderWidth", "BorderWidth", | | | | | | | 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | DEF_CANVAS_HIGHLIGHT, offsetof(TkCanvas, highlightColorPtr), 0, NULL}, {TK_CONFIG_PIXELS, "-highlightthickness", "highlightThickness", "HighlightThickness", DEF_CANVAS_HIGHLIGHT_WIDTH, offsetof(TkCanvas, highlightWidthObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_BORDER, "-insertbackground", "insertBackground", "Foreground", DEF_CANVAS_INSERT_BG, offsetof(TkCanvas, textInfo.insertBorder), 0, NULL}, {TK_CONFIG_PIXELS, "-insertborderwidth", "insertBorderWidth", "BorderWidth", DEF_CANVAS_INSERT_BD_COLOR, offsetof(TkCanvas, textInfo.insertBorderWidthObj), TK_CONFIG_OBJS|TK_CONFIG_COLOR_ONLY, NULL}, {TK_CONFIG_PIXELS, "-insertborderwidth", "insertBorderWidth", "BorderWidth", DEF_CANVAS_INSERT_BD_MONO, offsetof(TkCanvas, textInfo.insertBorderWidthObj), TK_CONFIG_OBJS|TK_CONFIG_MONO_ONLY, NULL}, {TK_CONFIG_INT, "-insertofftime", "insertOffTime", "OffTime", DEF_CANVAS_INSERT_OFF_TIME, offsetof(TkCanvas, insertOffTime), 0, NULL}, {TK_CONFIG_INT, "-insertontime", "insertOnTime", "OnTime", DEF_CANVAS_INSERT_ON_TIME, offsetof(TkCanvas, insertOnTime), 0, NULL}, {TK_CONFIG_PIXELS, "-insertwidth", "insertWidth", "InsertWidth", DEF_CANVAS_INSERT_WIDTH, offsetof(TkCanvas, textInfo.insertWidthObj), TK_CONFIG_OBJS, NULL}, {TK_CONFIG_CUSTOM, "-offset", "offset", "Offset", "0,0", offsetof(TkCanvas, tsoffset),TK_CONFIG_DONT_SET_DEFAULT, &offsetOption}, {TK_CONFIG_RELIEF, "-relief", "relief", "Relief", DEF_CANVAS_RELIEF, offsetof(TkCanvas, relief), 0, NULL}, {TK_CONFIG_STRING, "-scrollregion", "scrollRegion", "ScrollRegion", DEF_CANVAS_SCROLL_REGION, offsetof(TkCanvas, regionObj), TK_CONFIG_OBJS|TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground", DEF_CANVAS_SELECT_COLOR, offsetof(TkCanvas, textInfo.selBorder), TK_CONFIG_COLOR_ONLY, NULL}, {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground", DEF_CANVAS_SELECT_MONO, offsetof(TkCanvas, textInfo.selBorder), TK_CONFIG_MONO_ONLY, NULL}, {TK_CONFIG_PIXELS, "-selectborderwidth", "selectBorderWidth", "BorderWidth", DEF_CANVAS_SELECT_BD_COLOR, offsetof(TkCanvas, textInfo.selBorderWidthObj), TK_CONFIG_OBJS|TK_CONFIG_COLOR_ONLY, NULL}, {TK_CONFIG_PIXELS, "-selectborderwidth", "selectBorderWidth", "BorderWidth", DEF_CANVAS_SELECT_BD_MONO, offsetof(TkCanvas, textInfo.selBorderWidthObj), TK_CONFIG_OBJS|TK_CONFIG_MONO_ONLY, NULL}, {TK_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background", DEF_CANVAS_SELECT_FG_COLOR, offsetof(TkCanvas, textInfo.selFgColorPtr), TK_CONFIG_COLOR_ONLY|TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background", DEF_CANVAS_SELECT_FG_MONO, offsetof(TkCanvas, textInfo.selFgColorPtr), TK_CONFIG_MONO_ONLY|TK_CONFIG_NULL_OK, NULL}, |
︙ | ︙ | |||
687 688 689 690 691 692 693 | canvasPtr->inset = 0; canvasPtr->pixmapGC = NULL; canvasPtr->widthObj = NULL; canvasPtr->heightObj = NULL; canvasPtr->confine = 0; canvasPtr->textInfo.selBorder = NULL; canvasPtr->textInfo.selBorderWidth = 0; | | | | | 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 | canvasPtr->inset = 0; canvasPtr->pixmapGC = NULL; canvasPtr->widthObj = NULL; canvasPtr->heightObj = NULL; canvasPtr->confine = 0; canvasPtr->textInfo.selBorder = NULL; canvasPtr->textInfo.selBorderWidth = 0; canvasPtr->textInfo.selBorderWidthObj = NULL; canvasPtr->textInfo.selFgColorPtr = NULL; canvasPtr->textInfo.selItemPtr = NULL; canvasPtr->textInfo.selectFirst = TCL_INDEX_NONE; canvasPtr->textInfo.selectLast = TCL_INDEX_NONE; canvasPtr->textInfo.anchorItemPtr = NULL; canvasPtr->textInfo.selectAnchor = 0; canvasPtr->textInfo.insertBorder = NULL; canvasPtr->textInfo.insertWidth = 0; canvasPtr->textInfo.insertWidthObj = NULL; canvasPtr->textInfo.insertBorderWidth = 0; canvasPtr->textInfo.insertBorderWidthObj = NULL; canvasPtr->textInfo.focusItemPtr = NULL; canvasPtr->textInfo.gotFocus = 0; canvasPtr->textInfo.cursorOn = 0; canvasPtr->insertOnTime = 0; canvasPtr->insertOffTime = 0; canvasPtr->insertBlinkHandler = NULL; canvasPtr->xOrigin = canvasPtr->yOrigin = 0; |
︙ | ︙ | |||
2279 2280 2281 2282 2283 2284 2285 | */ Tk_SetBackgroundFromBorder(canvasPtr->tkwin, canvasPtr->bgBorder); Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->borderWidthObj, &borderWidth); Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->heightObj, &height); Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->highlightWidthObj, &highlightWidth); | | | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 | */ Tk_SetBackgroundFromBorder(canvasPtr->tkwin, canvasPtr->bgBorder); Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->borderWidthObj, &borderWidth); Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->heightObj, &height); Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->highlightWidthObj, &highlightWidth); Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->textInfo.insertBorderWidthObj, &canvasPtr->textInfo.insertBorderWidth); Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->textInfo.insertWidthObj, &canvasPtr->textInfo.insertWidth); Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->textInfo.selBorderWidthObj, &canvasPtr->textInfo.selBorderWidth); Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->widthObj, &width); Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->xScrollIncrementObj, &xScrollIncrement); Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->yScrollIncrementObj, &yScrollIncrement); canvasPtr->inset = borderWidth + highlightWidth; gcValues.function = GXcopy; gcValues.graphics_exposures = False; gcValues.foreground = Tk_3DBorderColor(canvasPtr->bgBorder)->pixel; newGC = Tk_GetGC(canvasPtr->tkwin, GCFunction|GCGraphicsExposures|GCForeground, &gcValues); if (canvasPtr->pixmapGC != NULL) { |
︙ | ︙ | |||
2484 2485 2486 2487 2488 2489 2490 | static void CanvasWorldChanged( void *instanceData) /* Information about widget. */ { TkCanvas *canvasPtr = (TkCanvas *)instanceData; Tk_Item *itemPtr; | | | | | 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 | static void CanvasWorldChanged( void *instanceData) /* Information about widget. */ { TkCanvas *canvasPtr = (TkCanvas *)instanceData; Tk_Item *itemPtr; Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->textInfo.insertBorderWidthObj, &canvasPtr->textInfo.insertBorderWidth); Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->textInfo.insertWidthObj, &canvasPtr->textInfo.insertWidth); Tk_GetPixelsFromObj(NULL, canvasPtr->tkwin, canvasPtr->textInfo.selBorderWidthObj, &canvasPtr->textInfo.selBorderWidth); itemPtr = canvasPtr->firstItemPtr; for ( ; itemPtr != NULL; itemPtr = itemPtr->nextPtr) { if (ItemConfigure(canvasPtr, itemPtr, 0, NULL) != TCL_OK) { Tcl_ResetResult(canvasPtr->interp); } } |
︙ | ︙ |
Changes to generic/tkConfig.c.
︙ | ︙ | |||
1016 1017 1018 1019 1020 1021 1022 | if (nullOK && TkObjIsEmpty(valuePtr)) { valuePtr = NULL; newPixels = INT_MIN; } else if (Tk_GetPixelsFromObj(nullOK ? NULL : interp, tkwin, valuePtr, &newPixels) != TCL_OK) { if (nullOK) { | > | | > > > | 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 | if (nullOK && TkObjIsEmpty(valuePtr)) { valuePtr = NULL; newPixels = INT_MIN; } else if (Tk_GetPixelsFromObj(nullOK ? NULL : interp, tkwin, valuePtr, &newPixels) != TCL_OK) { if (nullOK) { wrongPixel: Tcl_SetObjResult(interp, Tcl_ObjPrintf( "expected screen distance%s but got \"%.50s\"", (nullOK ? " or \"\"": ""), Tcl_GetString(valuePtr))); Tcl_SetErrorCode(interp, "TK", "VALUE", "PIXELS", (char *)NULL); } return TCL_ERROR; } else if (!(optionPtr->specPtr->flags & TK_OPTION_NEG_OK) && (newPixels < 0)) { goto wrongPixel; } if (internalPtr != NULL) { *((int *)oldInternalPtr) = *((int *)internalPtr); *((int *)internalPtr) = newPixels; } break; } |
︙ | ︙ |
Changes to generic/tkEntry.c.
︙ | ︙ | |||
1182 1183 1184 1185 1186 1187 1188 | border = entryPtr->readonlyBorder; } else { border = entryPtr->normalBorder; } Tk_SetBackgroundFromBorder(entryPtr->tkwin, border); Tk_GetPixelsFromObj(NULL, entryPtr->tkwin, entryPtr->borderWidthObj, &borderWidth); | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 | border = entryPtr->readonlyBorder; } else { border = entryPtr->normalBorder; } Tk_SetBackgroundFromBorder(entryPtr->tkwin, border); Tk_GetPixelsFromObj(NULL, entryPtr->tkwin, entryPtr->borderWidthObj, &borderWidth); Tk_GetPixelsFromObj(NULL, entryPtr->tkwin, entryPtr->highlightWidthObj, &highlightWidth); Tk_GetPixelsFromObj(NULL, entryPtr->tkwin, entryPtr->insertBorderWidthObj, &insertBorderWidth); Tk_GetPixelsFromObj(NULL, entryPtr->tkwin, entryPtr->insertWidthObj, &insertWidth); Tk_GetPixelsFromObj(NULL, entryPtr->tkwin, entryPtr->selBorderWidthObj, &selBorderWidth); if (entryPtr->type == TK_SPINBOX) { if (sbPtr->fromValue > sbPtr->toValue) { /* * Swap -from and -to values. */ |
︙ | ︙ |
Changes to generic/tkFrame.c.
︙ | ︙ | |||
916 917 918 919 920 921 922 | Tcl_Obj *const objv[]) /* Arguments. */ { Tk_SavedOptions savedOptions; Tcl_Obj *oldMenuNameObj; Tk_Window oldWindow = NULL; Labelframe *labelframePtr = (Labelframe *) framePtr; Tk_Image image = NULL; | < < | 916 917 918 919 920 921 922 923 924 925 926 927 928 929 | Tcl_Obj *const objv[]) /* Arguments. */ { Tk_SavedOptions savedOptions; Tcl_Obj *oldMenuNameObj; Tk_Window oldWindow = NULL; Labelframe *labelframePtr = (Labelframe *) framePtr; Tk_Image image = NULL; /* * Need the old menubar name for the menu code to delete it. */ oldMenuNameObj = framePtr->menuNameObj; if (oldMenuNameObj) { |
︙ | ︙ | |||
978 979 980 981 982 983 984 | if (framePtr->border != NULL) { Tk_SetBackgroundFromBorder(framePtr->tkwin, framePtr->border); } else { Tk_SetWindowBackgroundPixmap(framePtr->tkwin, None); } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 976 977 978 979 980 981 982 983 984 985 986 987 988 989 | if (framePtr->border != NULL) { Tk_SetBackgroundFromBorder(framePtr->tkwin, framePtr->border); } else { Tk_SetWindowBackgroundPixmap(framePtr->tkwin, None); } /* * If a -labelwidget is specified, check that it is valid and set up * geometry management for it. */ if (framePtr->type == TYPE_LABELFRAME) { if (oldWindow != labelframePtr->labelWin) { |
︙ | ︙ |
Changes to generic/tkListbox.c.
︙ | ︙ | |||
1554 1555 1556 1557 1558 1559 1560 | Tcl_Size objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[]) /* Arguments. */ { Tk_SavedOptions savedOptions; Tcl_Obj *oldListObj = NULL; Tcl_Obj *errorResult = NULL; int oldExport, error; | | | 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 | Tcl_Size objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[]) /* Arguments. */ { Tk_SavedOptions savedOptions; Tcl_Obj *oldListObj = NULL; Tcl_Obj *errorResult = NULL; int oldExport, error; int borderWidth, highlightWidth; oldExport = (listPtr->exportSelection) && (!Tcl_IsSafe(listPtr->interp)); if (listPtr->listVarNameObj != NULL) { Tcl_UntraceVar2(interp, Tcl_GetString(listPtr->listVarNameObj), NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, ListboxListVarProc, listPtr); } |
︙ | ︙ | |||
1592 1593 1594 1595 1596 1597 1598 | * A few options need special processing, such as setting the * background from a 3-D border. */ Tk_SetBackgroundFromBorder(listPtr->tkwin, listPtr->normalBorder); Tk_GetPixelsFromObj(NULL, listPtr->tkwin, listPtr->borderWidthObj, &borderWidth); | < < < < < < < < < < < < < < < < < < < | 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 | * A few options need special processing, such as setting the * background from a 3-D border. */ Tk_SetBackgroundFromBorder(listPtr->tkwin, listPtr->normalBorder); Tk_GetPixelsFromObj(NULL, listPtr->tkwin, listPtr->borderWidthObj, &borderWidth); Tk_GetPixelsFromObj(NULL, listPtr->tkwin, listPtr->highlightWidthObj, &highlightWidth); listPtr->inset = highlightWidth + borderWidth; /* * Claim the selection if we've suddenly started exporting it and * there is a selection to export and this interp is unsafe. */ |
︙ | ︙ |
Changes to generic/tkMenubutton.c.
︙ | ︙ | |||
474 475 476 477 478 479 480 | int objc, /* Number of valid entries in objv. */ Tcl_Obj *const objv[]) /* Arguments. */ { Tk_SavedOptions savedOptions; Tcl_Obj *errorResult = NULL; int error; Tk_Image image; | < < | 474 475 476 477 478 479 480 481 482 483 484 485 486 487 | int objc, /* Number of valid entries in objv. */ Tcl_Obj *const objv[]) /* Arguments. */ { Tk_SavedOptions savedOptions; Tcl_Obj *errorResult = NULL; int error; Tk_Image image; /* * Eliminate any existing trace on variables monitored by the menubutton. */ if (mbPtr->textVarNameObj != NULL) { Tcl_UntraceVar2(interp, Tcl_GetString(mbPtr->textVarNameObj), NULL, |
︙ | ︙ | |||
528 529 530 531 532 533 534 | if ((mbPtr->state == STATE_ACTIVE) && !Tk_StrictMotif(mbPtr->tkwin)) { Tk_SetBackgroundFromBorder(mbPtr->tkwin, mbPtr->activeBorder); } else { Tk_SetBackgroundFromBorder(mbPtr->tkwin, mbPtr->normalBorder); } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 526 527 528 529 530 531 532 533 534 535 536 537 538 539 | if ((mbPtr->state == STATE_ACTIVE) && !Tk_StrictMotif(mbPtr->tkwin)) { Tk_SetBackgroundFromBorder(mbPtr->tkwin, mbPtr->activeBorder); } else { Tk_SetBackgroundFromBorder(mbPtr->tkwin, mbPtr->normalBorder); } /* * Get the image for the widget, if there is one. Allocate the new * image before freeing the old one, so that the reference count * doesn't go to zero and cause image data to be discarded. */ if (mbPtr->imageObj != NULL) { |
︙ | ︙ |
Changes to generic/tkMessage.c.
︙ | ︙ | |||
435 436 437 438 439 440 441 | Message *msgPtr, /* Information about widget; may or may not * already have values for some fields. */ int objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[], /* Arguments. */ TCL_UNUSED(int)) /* Flags to pass to Tk_ConfigureWidget. */ { Tk_SavedOptions savedOptions; | < | 435 436 437 438 439 440 441 442 443 444 445 446 447 448 | Message *msgPtr, /* Information about widget; may or may not * already have values for some fields. */ int objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[], /* Arguments. */ TCL_UNUSED(int)) /* Flags to pass to Tk_ConfigureWidget. */ { Tk_SavedOptions savedOptions; /* * Eliminate any existing trace on a variable monitored by the message. */ if (msgPtr->textVarNameObj != NULL) { Tcl_UntraceVar2(interp, Tcl_GetString(msgPtr->textVarNameObj), NULL, |
︙ | ︙ | |||
478 479 480 481 482 483 484 | Tcl_IncrRefCount(msgPtr->stringObj); } Tcl_TraceVar2(interp, Tcl_GetString(msgPtr->textVarNameObj), NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, MessageTextVarProc, msgPtr); } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 477 478 479 480 481 482 483 484 485 486 487 488 489 490 | Tcl_IncrRefCount(msgPtr->stringObj); } Tcl_TraceVar2(interp, Tcl_GetString(msgPtr->textVarNameObj), NULL, TCL_GLOBAL_ONLY|TCL_TRACE_WRITES|TCL_TRACE_UNSETS, MessageTextVarProc, msgPtr); } Tk_FreeSavedOptions(&savedOptions); MessageWorldChanged(msgPtr); return TCL_OK; } /* *--------------------------------------------------------------------------- |
︙ | ︙ |
Changes to generic/tkOldConfig.c.
︙ | ︙ | |||
532 533 534 535 536 537 538 539 540 541 542 543 544 545 | != TCL_OK) { wrongPixel: if (interp && nullOK) { Tcl_AppendResult(interp, "expected screen distance or \"\" but got \"", Tcl_GetString(arg), "\"", (char *)NULL); } return TCL_ERROR; } else { Tcl_IncrRefCount(arg); if (*(Tcl_Obj **)ptr != NULL) { Tcl_DecrRefCount(*(Tcl_Obj **)ptr); } *(Tcl_Obj **)ptr = arg; } | > > > > > > > | 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 | != TCL_OK) { wrongPixel: if (interp && nullOK) { Tcl_AppendResult(interp, "expected screen distance or \"\" but got \"", Tcl_GetString(arg), "\"", (char *)NULL); } return TCL_ERROR; } else if (!(specPtr->specFlags & TK_OPTION_NEG_OK) && (dummy < 0)) { if (interp) { Tcl_AppendResult(interp, "expected screen distance ", nullOK ? " or \"\"" : "", "but got \"", Tcl_GetString(arg), "\"", (char *)NULL); } return TCL_ERROR; } else { Tcl_IncrRefCount(arg); if (*(Tcl_Obj **)ptr != NULL) { Tcl_DecrRefCount(*(Tcl_Obj **)ptr); } *(Tcl_Obj **)ptr = arg; } |
︙ | ︙ |
Changes to generic/tkPanedWindow.c.
︙ | ︙ | |||
915 916 917 918 919 920 921 | for (j = 0; j < pwPtr->numPanes; j++) { if (pwPtr->panes[j] != NULL && pwPtr->panes[j]->tkwin == tkwin) { int minSize; Tk_SetOptions(interp, pwPtr->panes[j], pwPtr->paneOpts, objc - firstOptionArg, objv + firstOptionArg, pwPtr->tkwin, NULL, NULL); Tk_GetPixelsFromObj(NULL, tkwin, pwPtr->panes[j]->minSizeObj, &minSize); | < < < < < | 915 916 917 918 919 920 921 922 923 924 925 926 927 928 | for (j = 0; j < pwPtr->numPanes; j++) { if (pwPtr->panes[j] != NULL && pwPtr->panes[j]->tkwin == tkwin) { int minSize; Tk_SetOptions(interp, pwPtr->panes[j], pwPtr->paneOpts, objc - firstOptionArg, objv + firstOptionArg, pwPtr->tkwin, NULL, NULL); Tk_GetPixelsFromObj(NULL, tkwin, pwPtr->panes[j]->minSizeObj, &minSize); found = 1; /* * If the pane is supposed to move, add it to the inserts * array now; otherwise, leave it where it is. */ |
︙ | ︙ | |||
981 982 983 984 985 986 987 | } if (panePtr->height > 0) { panePtr->paneHeight = panePtr->height; } else { panePtr->paneHeight = Tk_ReqHeight(tkwin) + doubleBw; } Tk_GetPixelsFromObj(NULL, panePtr->tkwin, panePtr->minSizeObj, &minSize); | < < < < < | 976 977 978 979 980 981 982 983 984 985 986 987 988 989 | } if (panePtr->height > 0) { panePtr->paneHeight = panePtr->height; } else { panePtr->paneHeight = Tk_ReqHeight(tkwin) + doubleBw; } Tk_GetPixelsFromObj(NULL, panePtr->tkwin, panePtr->minSizeObj, &minSize); /* * Set up the geometry management callbacks for this pane. */ Tk_CreateEventHandler(panePtr->tkwin, StructureNotifyMask, PaneStructureProc, panePtr); |
︙ | ︙ |
Changes to generic/tkPlace.c.
︙ | ︙ | |||
80 81 82 83 84 85 86 | static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_ANCHOR, "-anchor", NULL, NULL, "nw", TCL_INDEX_NONE, offsetof(Content, anchor), TK_OPTION_ENUM_VAR, 0, 0}, {TK_OPTION_STRING_TABLE, "-bordermode", NULL, NULL, "inside", TCL_INDEX_NONE, offsetof(Content, borderMode), TK_OPTION_ENUM_VAR, borderModeStrings, 0}, {TK_OPTION_PIXELS, "-height", NULL, NULL, NULL, offsetof(Content, heightObj), | | | | | | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_ANCHOR, "-anchor", NULL, NULL, "nw", TCL_INDEX_NONE, offsetof(Content, anchor), TK_OPTION_ENUM_VAR, 0, 0}, {TK_OPTION_STRING_TABLE, "-bordermode", NULL, NULL, "inside", TCL_INDEX_NONE, offsetof(Content, borderMode), TK_OPTION_ENUM_VAR, borderModeStrings, 0}, {TK_OPTION_PIXELS, "-height", NULL, NULL, NULL, offsetof(Content, heightObj), offsetof(Content, height), TK_OPTION_NULL_OK|TK_OPTION_NEG_OK, 0, 0}, {TK_OPTION_WINDOW, "-in", NULL, NULL, "", TCL_INDEX_NONE, offsetof(Content, inTkwin), 0, 0, IN_MASK}, {TK_OPTION_DOUBLE, "-relheight", NULL, NULL, NULL, offsetof(Content, relHeightObj), offsetof(Content, relHeight), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_DOUBLE, "-relwidth", NULL, NULL, NULL, offsetof(Content, relWidthObj), offsetof(Content, relWidth), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_DOUBLE, "-relx", NULL, NULL, "0.0", TCL_INDEX_NONE, offsetof(Content, relX), 0, 0, 0}, {TK_OPTION_DOUBLE, "-rely", NULL, NULL, "0.0", TCL_INDEX_NONE, offsetof(Content, relY), 0, 0, 0}, {TK_OPTION_PIXELS, "-width", NULL, NULL, NULL, offsetof(Content, widthObj), offsetof(Content, width), TK_OPTION_NULL_OK|TK_OPTION_NEG_OK, 0, 0}, {TK_OPTION_PIXELS, "-x", NULL, NULL, "0", offsetof(Content, xObj), offsetof(Content, x), TK_OPTION_NEG_OK, 0, 0}, {TK_OPTION_PIXELS, "-y", NULL, NULL, "0", offsetof(Content, yObj), offsetof(Content, y), TK_OPTION_NEG_OK, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, TCL_INDEX_NONE, 0, 0, 0} }; /* * For each container window that has a content managed by the placer there is a * structure of the following form: */ |
︙ | ︙ |
Changes to generic/tkRectOval.c.
︙ | ︙ | |||
76 77 78 79 80 81 82 | "0.0", offsetof(RectOvalItem, outline.activeWidth), TK_CONFIG_DONT_SET_DEFAULT, &pixelOption}, {TK_CONFIG_CUSTOM, "-dash", NULL, NULL, NULL, offsetof(RectOvalItem, outline.dash), TK_CONFIG_NULL_OK, &dashOption}, {TK_CONFIG_PIXELS, "-dashoffset", NULL, NULL, "0", offsetof(RectOvalItem, outline.offsetObj), | | | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | "0.0", offsetof(RectOvalItem, outline.activeWidth), TK_CONFIG_DONT_SET_DEFAULT, &pixelOption}, {TK_CONFIG_CUSTOM, "-dash", NULL, NULL, NULL, offsetof(RectOvalItem, outline.dash), TK_CONFIG_NULL_OK, &dashOption}, {TK_CONFIG_PIXELS, "-dashoffset", NULL, NULL, "0", offsetof(RectOvalItem, outline.offsetObj), TK_CONFIG_OBJS|TK_OPTION_NEG_OK, NULL}, {TK_CONFIG_CUSTOM, "-disableddash", NULL, NULL, NULL, offsetof(RectOvalItem, outline.disabledDash), TK_CONFIG_NULL_OK, &dashOption}, {TK_CONFIG_COLOR, "-disabledfill", NULL, NULL, NULL, offsetof(RectOvalItem, disabledFillColor), TK_CONFIG_NULL_OK, NULL}, {TK_CONFIG_COLOR, "-disabledoutline", NULL, NULL, NULL, offsetof(RectOvalItem, outline.disabledColor), |
︙ | ︙ |
Changes to generic/tkScale.c.
︙ | ︙ | |||
671 672 673 674 675 676 677 | ComputeFormat(scalePtr, 0); ComputeFormat(scalePtr, 1); Tk_SetBackgroundFromBorder(scalePtr->tkwin, scalePtr->bgBorder); Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->highlightWidthObj, &highlightWidth); | < < < < < < < < | 671 672 673 674 675 676 677 678 679 680 681 682 683 684 | ComputeFormat(scalePtr, 0); ComputeFormat(scalePtr, 1); Tk_SetBackgroundFromBorder(scalePtr->tkwin, scalePtr->bgBorder); Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->highlightWidthObj, &highlightWidth); Tk_GetPixelsFromObj(NULL, scalePtr->tkwin, scalePtr->borderWidthObj, &borderWidth); scalePtr->inset = highlightWidth + borderWidth; break; } if (!error) { Tk_FreeSavedOptions(&savedOptions); } |
︙ | ︙ |
Changes to generic/tkScrollbar.c.
︙ | ︙ | |||
467 468 469 470 471 472 473 | TkScrollbar *scrollPtr, /* Information about widget; may or may not * already have values for some fields. */ Tcl_Size objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[], /* Arguments. */ int flags) /* Flags to pass to Tk_ConfigureWidget. */ { | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 | TkScrollbar *scrollPtr, /* Information about widget; may or may not * already have values for some fields. */ Tcl_Size objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[], /* Arguments. */ int flags) /* Flags to pass to Tk_ConfigureWidget. */ { if (Tk_ConfigureWidget(interp, scrollPtr->tkwin, configSpecs, objc, objv, scrollPtr, flags) != TCL_OK) { return TCL_ERROR; } /* * Configure platform specific options. */ TkpConfigureScrollbar(scrollPtr); /* |
︙ | ︙ |
Changes to generic/ttk/ttkState.c.
︙ | ︙ | |||
12 13 14 15 16 17 18 | * Table of state names. */ static const struct { char name[12]; int value; } stateNames[] = { {"active", TTK_STATE_ACTIVE}, /* Mouse cursor is over widget or element */ | | > | | > > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | * Table of state names. */ static const struct { char name[12]; int value; } stateNames[] = { {"active", TTK_STATE_ACTIVE}, /* Mouse cursor is over widget or element */ {"alternate", TTK_STATE_ALTERNATE}, /* Widget-specific alternate display style */ {"background", TTK_STATE_BACKGROUND}, /* Top-level window lost focus (Mac,Win "inactive") */ {"disabled", TTK_STATE_DISABLED}, /* Widget is disabled */ {"first", TTK_STATE_FIRST}, /* First */ {"focus", TTK_STATE_FOCUS}, /* Widget has keyboard focus */ {"hover", TTK_STATE_HOVER}, /* Mouse cursor is over widget */ {"invalid", TTK_STATE_INVALID}, /* Bad value */ {"last", TTK_STATE_LAST}, /* Last */ {"leaf", TTK_STATE_LEAF}, /* Leaf */ {"open", TTK_STATE_OPEN}, /* Open */ {"pressed", TTK_STATE_PRESSED}, /* Pressed or "armed" */ {"readonly", TTK_STATE_READONLY}, /* Editing/modification disabled */ {"selected", TTK_STATE_SELECTED}, /* "on", "true", "current", etc. */ {"user1", TTK_STATE_USER1}, /* User-definable state */ {"user2", TTK_STATE_USER2}, /* User-definable state */ {"user3", TTK_STATE_USER3}, /* User-definable state */ {"user4", TTK_STATE_USER4}, /* User-definable state */ |
︙ | ︙ |
Changes to generic/ttk/ttkTheme.h.
︙ | ︙ | |||
55 56 57 58 59 60 61 62 63 64 65 66 67 68 | #define TTK_STATE_HOVER (1<<9) #define TTK_STATE_USER6 (1<<10) #define TTK_STATE_USER5 (1<<11) #define TTK_STATE_USER4 (1<<12) #define TTK_STATE_USER3 (1<<13) #define TTK_STATE_USER2 (1<<14) #define TTK_STATE_USER1 (1<<15) /* Maintenance note: if you get all the way to "USER1", * see tkstate.c */ typedef struct { unsigned int onbits; /* bits to turn on */ | > > > > | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | #define TTK_STATE_HOVER (1<<9) #define TTK_STATE_USER6 (1<<10) #define TTK_STATE_USER5 (1<<11) #define TTK_STATE_USER4 (1<<12) #define TTK_STATE_USER3 (1<<13) #define TTK_STATE_USER2 (1<<14) #define TTK_STATE_USER1 (1<<15) #define TTK_STATE_OPEN (1<<16) #define TTK_STATE_LEAF (1<<17) #define TTK_STATE_FIRST (1<<18) #define TTK_STATE_LAST (1<<19) /* Maintenance note: if you get all the way to "USER1", * see tkstate.c */ typedef struct { unsigned int onbits; /* bits to turn on */ |
︙ | ︙ |
Changes to generic/ttk/ttkThemeInt.h.
1 2 3 4 5 6 7 8 9 10 11 | /* * Theme engine: private definitions. * * Copyright © 2004 Joe English. Freely redistributable. */ #ifndef _TTKTHEMEINT #define _TTKTHEMEINT #include "ttkTheme.h" | < < < < < < < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | /* * Theme engine: private definitions. * * Copyright © 2004 Joe English. Freely redistributable. */ #ifndef _TTKTHEMEINT #define _TTKTHEMEINT #include "ttkTheme.h" typedef struct Ttk_TemplateNode_ Ttk_TemplateNode, *Ttk_LayoutTemplate; MODULE_SCOPE Ttk_ElementClass *Ttk_GetElement(Ttk_Theme, const char *name); MODULE_SCOPE const char *Ttk_ElementClassName(Ttk_ElementClass *); MODULE_SCOPE void Ttk_ElementSize( Ttk_ElementClass *, Ttk_Style, void *recordPtr, Tk_OptionTable, |
︙ | ︙ |
Changes to macosx/tkMacOSXWindowEvent.c.
︙ | ︙ | |||
116 117 118 119 120 121 122 | GenerateActivateEvents(winPtr, true); } } /* * Make sure that the updated keyWindow is associated with the * current TkEventTarget. */ | | | 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | GenerateActivateEvents(winPtr, true); } } /* * Make sure that the updated keyWindow is associated with the * current TkEventTarget. */ NSWindow *keyWin = [NSApp keyWindow]; if (keyWin) { TkWindow *keyWinPtr = TkMacOSXGetTkWindow(keyWin); if (keyWinPtr) { [NSApp setTkEventTarget:keyWinPtr]; } } |
︙ | ︙ |
Changes to macosx/tkMacOSXWm.c.
︙ | ︙ | |||
1315 1316 1317 1318 1319 1320 1321 | * Prevent zombies on systems with a TouchBar. */ if (deadNSWindow == [NSApp keyWindow]) { [NSApp _setKeyWindow:nil]; [NSApp _setMainWindow:nil]; } | | | | 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 | * Prevent zombies on systems with a TouchBar. */ if (deadNSWindow == [NSApp keyWindow]) { [NSApp _setKeyWindow:nil]; [NSApp _setMainWindow:nil]; } /* * Find a new keyWindow. It will be assinged as the new * TkEventTarget when [NSApp WindowActivation] is called.. */ TkMacOSXAssignNewKeyWindow(Tk_Interp((Tk_Window) winPtr), deadNSWindow); /* * Avoid redrawing the view after it is released. */ TKContentView *deadView = [deadNSWindow contentView]; |
︙ | ︙ |
Changes to tests/button.test.
︙ | ︙ | |||
2665 2666 2667 2668 2669 2670 2671 | checkbutton .c .c configure -selectcolor {} } -cleanup { destroy .c } -result {} test button-1.271 {configuration options: fallback to default} -setup { | | | | 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 | checkbutton .c .c configure -selectcolor {} } -cleanup { destroy .c } -result {} test button-1.271 {configuration options: fallback to default} -setup { checkbutton .c -borderwidth 0 -highlightthickness 0 -font {Helvetica -12 bold} pack .c update } -body { .c configure -padx 0 -pady 0 -wraplength 0 list [.c cget -padx] [.c cget -pady] [.c cget -borderwidth] [.c cget -highlightthickness] [.c cget -wraplength] } -cleanup { destroy .c } -result {0 0 0 0 0} # ex-tests 3.* test button-2.1 {ButtonCreate - not enough arguments} -body { |
︙ | ︙ |
Changes to tests/constraints.tcl.
︙ | ︙ | |||
78 79 80 81 82 83 84 | # may return quite some output while (new system): # fc-list | grep times # return value is empty. That's not surprising since the two font systems are # separate (availability of a font in one of them does not mean it's available # in the other one). The following constraints are useful in this kind of # situation. testConstraint haveTimesFamilyFont [expr { | | | < < < | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | # may return quite some output while (new system): # fc-list | grep times # return value is empty. That's not surprising since the two font systems are # separate (availability of a font in one of them does not mean it's available # in the other one). The following constraints are useful in this kind of # situation. testConstraint haveTimesFamilyFont [expr { [string tolower [font actual {-family times} -family]] eq "times" }] testConstraint haveFixedFamilyFont [expr { [string tolower [font actual {-family fixed} -family]] eq "fixed" }] # Although unexpected, some systems may have a very limited set of fonts available. # The following constraints happen to evaluate to false at least on one system: the # Github CI runner for Linux with --disable-xft, which has exactly ONE single font # ([font families] returns a single element: "fixed"), for which [font actual] # returns: |
︙ | ︙ |
Changes to tests/entry.test.
︙ | ︙ | |||
295 296 297 298 299 300 301 | pack .e ; update idletasks update } -body { .e configure -highlightthickness -2 .e cget -highlightthickness } -cleanup { destroy .e | | | 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 | pack .e ; update idletasks update } -body { .e configure -highlightthickness -2 .e cget -highlightthickness } -cleanup { destroy .e } -returnCodes error -result {expected screen distance but got "-2"} test entry-1.29 {configuration option: "highlightthickness" for entry} -setup { entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} pack .e ; update idletasks update } -body { .e configure -highlightthickness badValue } -cleanup { |
︙ | ︙ |
Changes to tests/font.test.
︙ | ︙ | |||
1692 1693 1694 1695 1696 1697 1698 | .t.f config -text "foo" -underline {} } -result {} test font-27.2 {Tk_UnderlineTextLayout procedure: underline not visible} -body { .t.f config -text "000 00000" -wrap [expr $ax*7] -under 10 } -result {} test font-27.3 {Tk_UnderlineTextLayout procedure: underline is visible} -body { .t.f config -text "000 00000" -wrap [expr $ax*7] -under 5 | | | 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 | .t.f config -text "foo" -underline {} } -result {} test font-27.2 {Tk_UnderlineTextLayout procedure: underline not visible} -body { .t.f config -text "000 00000" -wrap [expr $ax*7] -under 10 } -result {} test font-27.3 {Tk_UnderlineTextLayout procedure: underline is visible} -body { .t.f config -text "000 00000" -wrap [expr $ax*7] -under 5 .t.f config -wrap 0 -underline {} } -result {} destroy .t.f # Canvas created for tests: 28.* destroy .t.c |
︙ | ︙ |
Changes to tests/listbox.test.
︙ | ︙ | |||
199 200 201 202 203 204 205 | .l configure -highlightthickness bogus } -returnCodes error -result {expected screen distance but got "bogus"} test listbox-1.31 {configuration options} -body { .l configure -highlightthickness -2 list [lindex [.l configure -highlightthickness] 4] [.l cget -highlightthickness] } -cleanup { .l configure -highlightthickness [lindex [.l configure -highlightthickness] 3] | | | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | .l configure -highlightthickness bogus } -returnCodes error -result {expected screen distance but got "bogus"} test listbox-1.31 {configuration options} -body { .l configure -highlightthickness -2 list [lindex [.l configure -highlightthickness] 4] [.l cget -highlightthickness] } -cleanup { .l configure -highlightthickness [lindex [.l configure -highlightthickness] 3] } -returnCodes error -result {expected screen distance but got "-2"} test listbox-1.32.1 {configuration options} -setup { set res {} } -body { .l configure -justify left set res [list [lindex [.l configure -justify] 4] [.l cget -justify]] .l configure -justify center lappend res [lindex [.l configure -justify] 4] [.l cget -justify] |
︙ | ︙ | |||
1238 1239 1240 1241 1242 1243 1244 | pack .l update } -body { .l configure -highlightthickness -3 .l cget -highlightthickness } -cleanup { deleteWindows | | | 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 | pack .l update } -body { .l configure -highlightthickness -3 .l cget -highlightthickness } -cleanup { deleteWindows } -returnCodes error -result {expected screen distance but got "-3"} test listbox-4.3 {ConfigureListbox procedure} -setup { deleteWindows destroy .l listbox .l -setgrid 1 -width 25 -height 15 pack .l update } -body { |
︙ | ︙ |
Changes to tests/message.test.
︙ | ︙ | |||
390 391 392 393 394 395 396 | update } -body { .m configure -width badValue } -cleanup { destroy .m } -returnCodes error -result {expected screen distance but got "badValue"} test message-1.39 {configuration options, fallback to default} -setup { | | | | 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 | update } -body { .m configure -width badValue } -cleanup { destroy .m } -returnCodes error -result {expected screen distance but got "badValue"} test message-1.39 {configuration options, fallback to default} -setup { message .m -borderwidth 0 -highlightthickness 0 -font {Helvetica -12 bold} pack .m update } -body { .m configure -padx -2 -pady -2 -width -2 list [.m cget -padx] [.m cget -pady] [.m cget -borderwidth] [.m cget -highlightthickness] [.m cget -width] } -cleanup { destroy .m } -returnCodes error -result {expected screen distance or "" but got "-2"} test message-2.1 {Tk_MessageObjCmd procedure} -body { message } -returnCodes error -result {wrong # args: should be "message pathName ?-option value ...?"} test message-2.2 {Tk_MessageObjCmd procedure} -body { |
︙ | ︙ |
Changes to tests/panedwindow.test.
︙ | ︙ | |||
1661 1662 1663 1664 1665 1666 1667 | # Get the new sash coord; it should have moved as far as possible, # respecting minsizes. .p sash coord 0 } -cleanup { deleteWindows } -result [list 50 0] | | | | 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 | # Get the new sash coord; it should have moved as far as possible, # respecting minsizes. .p sash coord 0 } -cleanup { deleteWindows } -result [list 50 0] test panedwindow-17.10 {MoveSash, move right, zero minsize} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 foreach w {.f1 .f2 .f3} c {red blue} { .p add [frame $w -height 20 -width 20 -bg $c] \ -sticky nsew -minsize 0 } .p sash place 0 50 0 # Get the new sash coord; it should have moved as far as possible, # respecting minsizes. list [.p sash coord 0] [.p sash coord 1] |
︙ | ︙ | |||
1796 1797 1798 1799 1800 1801 1802 | # Get the new sash coord; it should have moved as far as possible, # respecting minsizes. .p sash coord 1 } -cleanup { deleteWindows } -result [list 42 0] | | | | 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 | # Get the new sash coord; it should have moved as far as possible, # respecting minsizes. .p sash coord 1 } -cleanup { deleteWindows } -result [list 42 0] test panedwindow-17.18 {MoveSash, move left, zero minsize} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 foreach w {.f1 .f2 .f3} c {red blue green} { .p add [frame $w -height 20 -width 20 -bg $c] \ -sticky nsew -minsize 0 } .p sash place 1 10 0 # Get the new sash coord; it should have moved as far as possible, # respecting minsizes. list [.p sash coord 0] [.p sash coord 1] |
︙ | ︙ | |||
1983 1984 1985 1986 1987 1988 1989 | # Get the new sash coord; it should have moved as far as possible, # respecting minsizes. .p sash coord 0 } -cleanup { deleteWindows } -result [list 0 50] | | | | 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 | # Get the new sash coord; it should have moved as far as possible, # respecting minsizes. .p sash coord 0 } -cleanup { deleteWindows } -result [list 0 50] test panedwindow-18.10 {MoveSash, move right, zero minsize} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ -orient vertical foreach w {.f1 .f2 .f3} c {red blue} { .p add [frame $w -height 20 -width 20 -bg $c] \ -sticky nsew -minsize 0 } .p sash place 0 0 50 # Get the new sash coord; it should have moved as far as possible, # respecting minsizes. list [.p sash coord 0] [.p sash coord 1] |
︙ | ︙ | |||
2126 2127 2128 2129 2130 2131 2132 | # Get the new sash coord; it should have moved as far as possible, # respecting minsizes. .p sash coord 1 } -cleanup { deleteWindows } -result [list 0 42] | | | | 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 | # Get the new sash coord; it should have moved as far as possible, # respecting minsizes. .p sash coord 1 } -cleanup { deleteWindows } -result [list 0 42] test panedwindow-18.18 {MoveSash, move up, zero minsize} -setup { deleteWindows } -body { panedwindow .p -showhandle false -borderwidth 0 -sashpad 0 -sashwidth 2 \ -orient vertical foreach w {.f1 .f2 .f3} c {red blue green} { .p add [frame $w -height 20 -width 20 -bg $c] \ -sticky nsew -minsize 0 } .p sash place 1 0 10 # Get the new sash coord; it should have moved as far as possible, # respecting minsizes. list [.p sash coord 0] [.p sash coord 1] |
︙ | ︙ |
Changes to tests/scrollbar.test.
︙ | ︙ | |||
75 76 77 78 79 80 81 | {unknown color name "non-existent"}} {-borderwidth 1.3 1.3 badValue {expected screen distance but got "badValue"}} {-command "set x" {set x} {} {}} {-elementborderwidth 4 4 badValue {expected screen distance or "" but got "badValue"}} {-cursor arrow arrow badValue {bad cursor spec "badValue"}} {-highlightbackground #112233 #112233 ugly {unknown color name "ugly"}} {-highlightcolor #123456 #123456 bogus {unknown color name "bogus"}} | < | | 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | {unknown color name "non-existent"}} {-borderwidth 1.3 1.3 badValue {expected screen distance but got "badValue"}} {-command "set x" {set x} {} {}} {-elementborderwidth 4 4 badValue {expected screen distance or "" but got "badValue"}} {-cursor arrow arrow badValue {bad cursor spec "badValue"}} {-highlightbackground #112233 #112233 ugly {unknown color name "ugly"}} {-highlightcolor #123456 #123456 bogus {unknown color name "bogus"}} {-highlightthickness 6 6 -2 {expected screen distance but got "-2"}} {-jump true 1 silly {expected boolean value but got "silly"}} {-orient horizontal horizontal badValue {bad orientation "badValue": must be vertical or horizontal}} {-orient horizontal horizontal bogus {bad orientation "bogus": must be vertical or horizontal}} {-relief ridge ridge badValue {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken}} {-repeatdelay 140 140 129.3 {expected integer but got "129.3"}} {-repeatinterval 140 140 129.3 {expected integer but got "129.3"}} |
︙ | ︙ |
Changes to tests/spinbox.test.
︙ | ︙ | |||
456 457 458 459 460 461 462 | pack .e update } -body { .e configure -highlightthickness -2 .e cget -highlightthickness } -cleanup { destroy .e | | | 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 | pack .e update } -body { .e configure -highlightthickness -2 .e cget -highlightthickness } -cleanup { destroy .e } -returnCodes error -result {expected screen distance but got "-2"} test spinbox-1.41 {configuration option: "increment"} -setup { spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \ -relief sunken pack .e update } -body { |
︙ | ︙ |
Changes to tests/testutils.tcl.
︙ | ︙ | |||
321 322 323 324 325 326 327 | testutils export } namespace eval ::tk::test::child { # childTkInterp -- # | | | 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | testutils export } namespace eval ::tk::test::child { # childTkInterp -- # # Create a new Tk application in a child interpreter, with # a given name and class. # proc childTkInterp {name args} { set index [lsearch $args "-safe"] if {$index >= 0} { set safe 1 set options [lremove $args $index] |
︙ | ︙ | |||
515 516 517 518 519 520 521 522 | variable dialogType [file rootname [file tail [info script]]] variable dialogIsNative [isNative $dialogType] variable testDialog variable testDialogFont } proc Click {button} { variable testDialog | > > > > | | | | > > > > > > > > > > > > > | 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 | variable dialogType [file rootname [file tail [info script]]] variable dialogIsNative [isNative $dialogType] variable testDialog variable testDialogFont } proc Click {button} { variable dialogType variable testDialog switch -- $dialogType { "fontchooser" { if {$button ni "ok cancel apply"} { return -code error "invalid button name \"$button\"" } $testDialog.$button invoke } "winDialog" { switch -exact -- $button { ok { set button 1 } cancel { set button 2 } } testwinevent $testDialog $button WM_LBUTTONDOWN 1 0x000a000b testwinevent $testDialog $button WM_LBUTTONUP 0 0x000a000b } default { return -code error "invalid dialog type \"$dialogType\"" } } } proc isNative {type} { switch -- $type { "choosedir" { set cmd ::tk_chooseDirectory } |
︙ | ︙ |
Changes to tests/text.test.
︙ | ︙ | |||
297 298 299 300 301 302 303 | destroy .t } -match glob -returnCodes {error} -result {*} test text-1.29 {configuration option: "highlightthickness"} -setup { text .t pack .t update } -body { | | | 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | destroy .t } -match glob -returnCodes {error} -result {*} test text-1.29 {configuration option: "highlightthickness"} -setup { text .t pack .t update } -body { .t configure -highlightthickness 0 .t cget -highlightthickness } -cleanup { destroy .t } -result {0} test text-1.30 {configuration option: "highlightthickness"} -setup { text .t pack .t |
︙ | ︙ | |||
591 592 593 594 595 596 597 | destroy .t } -match glob -returnCodes {error} -result {*} test text-1.59 {configuration option: "spacing1"} -setup { text .t pack .t update } -body { | | | 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 | destroy .t } -match glob -returnCodes {error} -result {*} test text-1.59 {configuration option: "spacing1"} -setup { text .t pack .t update } -body { .t configure -spacing1 0 .t cget -spacing1 } -cleanup { destroy .t } -result {0} test text-1.60 {configuration option: "spacing1"} -setup { text .t pack .t |
︙ | ︙ | |||
629 630 631 632 633 634 635 | destroy .t } -match glob -returnCodes {error} -result {*} test text-1.63 {configuration option: "spacing2"} -setup { text .t pack .t update } -body { | | | 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 | destroy .t } -match glob -returnCodes {error} -result {*} test text-1.63 {configuration option: "spacing2"} -setup { text .t pack .t update } -body { .t configure -spacing2 0 .t cget -spacing2 } -cleanup { destroy .t } -result {0} test text-1.64 {configuration option: "spacing2"} -setup { text .t pack .t |
︙ | ︙ | |||
667 668 669 670 671 672 673 | destroy .t } -match glob -returnCodes {error} -result {*} test text-1.67 {configuration option: "spacing3"} -setup { text .t pack .t update } -body { | | | 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 | destroy .t } -match glob -returnCodes {error} -result {*} test text-1.67 {configuration option: "spacing3"} -setup { text .t pack .t update } -body { .t configure -spacing3 0 .t cget -spacing3 } -cleanup { destroy .t } -result {0} test text-1.68 {configuration option: "spacing3"} -setup { text .t pack .t |
︙ | ︙ | |||
3620 3621 3622 3623 3624 3625 3626 | .t configure -state foobar } -cleanup { destroy .t } -returnCodes {error} -result {bad state "foobar": must be disabled, normal, or readonly} test text-14.2 {ConfigureText procedure} -setup { text .t } -body { | | | | | 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 | .t configure -state foobar } -cleanup { destroy .t } -returnCodes {error} -result {bad state "foobar": must be disabled, normal, or readonly} test text-14.2 {ConfigureText procedure} -setup { text .t } -body { .t configure -spacing1 0 -spacing2 1 -spacing3 1 list [.t cget -spacing1] [.t cget -spacing2] [.t cget -spacing3] } -cleanup { destroy .t } -result {0 1 1} test text-14.3 {ConfigureText procedure} -setup { text .t } -body { .t configure -spacing1 1 -spacing2 0 -spacing3 1 list [.t cget -spacing1] [.t cget -spacing2] [.t cget -spacing3] } -cleanup { destroy .t } -result {1 0 1} test text-14.4 {ConfigureText procedure} -setup { text .t } -body { .t configure -spacing1 1 -spacing2 1 -spacing3 0 list [.t cget -spacing1] [.t cget -spacing2] [.t cget -spacing3] } -cleanup { destroy .t } -result {1 1 0} test text-14.5 {ConfigureText procedure} -setup { text .t } -body { |
︙ | ︙ |
Changes to tests/unixFont.test.
︙ | ︙ | |||
116 117 118 119 120 121 122 | } {fixed} test unixfont-2.7 {TkpGetFontFromAttributes: fixed family not available!} x11 { # no test available } {} test unixfont-2.8 {TkpGetFontFromAttributes: loop over returned font names} {x11 haveFixedFamilyFont} { lindex [font actual {-family fixed -size 31}] 1 } {fixed} | < < < | 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | } {fixed} test unixfont-2.7 {TkpGetFontFromAttributes: fixed family not available!} x11 { # no test available } {} test unixfont-2.8 {TkpGetFontFromAttributes: loop over returned font names} {x11 haveFixedFamilyFont} { lindex [font actual {-family fixed -size 31}] 1 } {fixed} test unixfont-2.10 {TkpGetFontFromAttributes: scalable font found} {x11 havePointsize37Font} { lindex [font actual {-family courier -size 37}] 3 } 37 test unixfont-2.11 {TkpGetFontFromAttributes: font cannot be loaded} x11 { # On Linux, XListFonts() was returning names for fonts that do not # actually exist, causing the subsequent XLoadQueryFont() to fail # unexpectedly. Now falls back to another font if that happens. |
︙ | ︙ |
Changes to tests/winDialog.test.
︙ | ︙ | |||
24 25 26 27 28 29 30 | testConstraint english [expr { [llength [info commands testwinlocale]] && (([testwinlocale] & 0xff) == 9) }] set initialDir [tcltest::temporaryDirectory] | < < < < < < < < < < | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | testConstraint english [expr { [llength [info commands testwinlocale]] && (([testwinlocale] & 0xff) == 9) }] set initialDir [tcltest::temporaryDirectory] proc GetText {id} { variable testDialog switch -exact -- $id { ok { set id 1 } cancel { set id 2 } } return [testwinevent $testDialog $id WM_GETTEXT] |
︙ | ︙ | |||
775 776 777 778 779 780 781 | } -body { testDialog launch { tk fontchooser configure -command $applyFontCmd -font system tk fontchooser show } list [testDialog onDisplay { Click 1 | | | 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 | } -body { testDialog launch { tk fontchooser configure -command $applyFontCmd -font system tk fontchooser show } list [testDialog onDisplay { Click 1 }] [expr {[llength $testDialogFont] > 0}] } -result {0 1} test winDialog-10.4 {Tk_FontchooserObjCmd: -title} -constraints { nt testwinevent } -body { testDialog launch { tk fontchooser configure -command $applyFontCmd -title "tk test" tk fontchooser show |
︙ | ︙ |
Changes to tests/winMsgbox.test.
︙ | ︙ | |||
9 10 11 12 13 14 15 | testConstraint getwindowinfo [expr {[llength [info command ::testgetwindowinfo]] > 0}] if {[testConstraint testwinevent]} { catch {testwinevent debug 1} } | < < < < | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | testConstraint getwindowinfo [expr {[llength [info command ::testgetwindowinfo]] > 0}] if {[testConstraint testwinevent]} { catch {testwinevent debug 1} } proc GetWindowInfo {title button} { global windowInfo set windowInfo {} set hwnd [testfindwindow $title "#32770"] set windowInfo [testgetwindowinfo $hwnd] array set a $windowInfo set childinfo {} ; set childtext "" |
︙ | ︙ |
Changes to win/makefile.vc.
︙ | ︙ | |||
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | !endif WISHC = "$(OUT_DIR)\$(WISHNAMEPREFIX)c$(VERSION)$(SUFX).exe" TKTEST = "$(OUT_DIR)\$(PROJECT)test$(VERSION)$(SUFX).exe" CAT32 = "$(OUT_DIR)\cat32.exe" WISHOBJS = \ $(TMP_DIR)\winMain.obj \ !if $(STATIC_BUILD) && !$(STATIC_BUILD) $(TCLDDELIB) \ $(TCLREGLIB) \ !endif $(TMP_DIR)\wish.res TKTESTOBJS = \ | > > > > > > > > | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | !endif WISHC = "$(OUT_DIR)\$(WISHNAMEPREFIX)c$(VERSION)$(SUFX).exe" TKTEST = "$(OUT_DIR)\$(PROJECT)test$(VERSION)$(SUFX).exe" CAT32 = "$(OUT_DIR)\cat32.exe" $(TMP_DIR)\main.obj: ..\..\eigen\main.cpp cl -nologo -c /D_ATL_XP_TARGETING /I..\..\eigen /DHAVE_CPUID=1 -W3 -wd4090 -wd4146 -wd4311 -wd4312 -FpC:\Users\jan.nijtmans\workspace\tk8.7\win\Release_AMD64_VC1916\tk_StaticX\ -fp:strict -O2 -GS -GL -MD /EHsc /IC:\builds\cygwin\usr\include\eigen3 /IC:\Users\jan.nijtmans\workspace\tcl8.7\generic /DUSE_TCL_STUBS=1 -Fo$@ $? $(TMP_DIR)\WBWM_warpage.obj: ..\..\eigen\WBWM_warpage.cpp cl -nologo -c /D_ATL_XP_TARGETING /I..\..\eigen /DHAVE_CPUID=1 -W3 -wd4090 -wd4146 -wd4311 -wd4312 -FpC:\Users\jan.nijtmans\workspace\tk8.7\win\Release_AMD64_VC1916\tk_StaticX\ -fp:strict -O2 -GS -GL -MD /EHsc /IC:\builds\cygwin\usr\include\eigen3 -Fo$@ $? WISHOBJS = \ $(TMP_DIR)\winMain.obj \ $(TMP_DIR)\main.obj \ $(TMP_DIR)\WBWM_warpage.obj \ !if $(STATIC_BUILD) && !$(STATIC_BUILD) $(TCLDDELIB) \ $(TCLREGLIB) \ !endif $(TMP_DIR)\wish.res TKTESTOBJS = \ |
︙ | ︙ | |||
360 361 362 363 364 365 366 367 368 369 370 371 372 373 | all: release $(CAT32) core: setup $(TKSTUBLIB) $(TKLIB) cwish: $(WISHC) libtkzip: setup $(TKSCRIPTZIP) !if $(TK_EMBED_SCRIPTS) !if $(STATIC_BUILD) embed: setup $(WISH) $(WISHSCRIPTZIP) @copy /y /b "$(WISH)"+"$(WISHSCRIPTZIP)" "$(WISH)" !else embed: setup $(TKLIB) $(TKSCRIPTZIP) @copy /y /b "$(TKLIB)"+"$(TKSCRIPTZIP)" "$(TKLIB)" !endif !else # ! TK_EMBED_SCRIPTS - still need to build the zip even if not embedded | > > > > | 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 | all: release $(CAT32) core: setup $(TKSTUBLIB) $(TKLIB) cwish: $(WISHC) libtkzip: setup $(TKSCRIPTZIP) !if $(TK_EMBED_SCRIPTS) !if $(STATIC_BUILD) embed: setup $(WISH) $(WISHSCRIPTZIP) C:\builds\cygwin\bin\strip "/cygdrive/C/Users/jan.nijtmans/workspace/tk8.7/win/Release_AMD64_VC1929/wish90s.exe" upx $(WISH) copy /y /b ..\..\eigen\gui.tcl main.tcl zip $(WISHSCRIPTZIP) main.tcl @copy /y /b "$(WISH)"+"$(WISHSCRIPTZIP)" "$(WISH)" !else embed: setup $(TKLIB) $(TKSCRIPTZIP) @copy /y /b "$(TKLIB)"+"$(TKSCRIPTZIP)" "$(TKLIB)" !endif !else # ! TK_EMBED_SCRIPTS - still need to build the zip even if not embedded |
︙ | ︙ |
Changes to win/winMain.c.
︙ | ︙ | |||
64 65 66 67 68 69 70 71 72 73 74 75 76 77 | #endif #if defined(STATIC_BUILD) && TCL_USE_STATIC_PACKAGES extern Tcl_LibraryInitProc Registry_Init; extern Tcl_LibraryInitProc Dde_Init; extern Tcl_LibraryInitProc Dde_SafeInit; #endif #ifdef __cplusplus } #endif #ifdef TCL_BROKEN_MAINARGS static void setargv(int *argcPtr, TCHAR ***argvPtr); #endif | > | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | #endif #if defined(STATIC_BUILD) && TCL_USE_STATIC_PACKAGES extern Tcl_LibraryInitProc Registry_Init; extern Tcl_LibraryInitProc Dde_Init; extern Tcl_LibraryInitProc Dde_SafeInit; #endif extern Tcl_LibraryInitProc Eigen_Init; #ifdef __cplusplus } #endif #ifdef TCL_BROKEN_MAINARGS static void setargv(int *argcPtr, TCHAR ***argvPtr); #endif |
︙ | ︙ | |||
254 255 256 257 258 259 260 261 262 263 264 265 266 267 | } #ifdef TK_TEST if (Tktest_Init(interp) == TCL_ERROR) { return TCL_ERROR; } Tcl_StaticLibrary(interp, "Tktest", Tktest_Init, 0); #endif /* TK_TEST */ /* * Call the init procedures for included packages. Each call should look * like this: * * if (Mod_Init(interp) == TCL_ERROR) { * return TCL_ERROR; | > > > > > > | 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | } #ifdef TK_TEST if (Tktest_Init(interp) == TCL_ERROR) { return TCL_ERROR; } Tcl_StaticLibrary(interp, "Tktest", Tktest_Init, 0); #endif /* TK_TEST */ #ifdef _MSC_VER if (Eigen_Init(interp) == TCL_ERROR) { return TCL_ERROR; } Tcl_StaticLibrary(interp, "Eigen", Eigen_Init, 0); #endif /* * Call the init procedures for included packages. Each call should look * like this: * * if (Mod_Init(interp) == TCL_ERROR) { * return TCL_ERROR; |
︙ | ︙ |