Tk Source Code

Check-in [118c0b44]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Hopefully final unification and cleanup of the SVG data used for drawing indicators
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk | main
Files: files | file ages | folders
SHA3-256: 118c0b44f69c49054e3afe544718bcbb2b11d4ca22ca3c4906f14d0ae8d7757d
User & Date: csaba 2023-02-24 11:50:45.869
Context
2023-02-27
20:43
Fix [6cd4762798]: Crash using tk busy hold check-in: b73c04cd user: fvogel tags: trunk, main
2023-02-24
14:39
merge trunk check-in: 3b74e887 user: dgp tags: core-8-7-b1-rc
11:50
Hopefully final unification and cleanup of the SVG data used for drawing indicators check-in: 118c0b44 user: csaba tags: trunk, main
2023-02-20
13:49
Further work on scalability of the Tk widget demo GUI check-in: ae5acb5a user: csaba tags: trunk, main
Changes
Unified Diff Ignore Whitespace Patch
Changes to generic/ttk/ttkClamTheme.c.
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
    FieldElementOptions,
    FieldElementSize,
    ComboboxFieldElementDraw
};

/*------------------------------------------------------------------------
 * +++ Indicator elements for check and radio buttons.
 *
 * The SVG images used here are partly based on some icons provided by
 * the official open source SVG icon library for the Bootstrap project,
 * licensed under the MIT license (https://opensource.org/licenses/MIT).
 *
 * See https://github.com/twbs/icons.
 */

/*
 * Indicator image descriptor:
 */
typedef struct {
    int width;				/* unscaled width */







<
<
<
<
<
<







277
278
279
280
281
282
283






284
285
286
287
288
289
290
    FieldElementOptions,
    FieldElementSize,
    ComboboxFieldElementDraw
};

/*------------------------------------------------------------------------
 * +++ Indicator elements for check and radio buttons.






 */

/*
 * Indicator image descriptor:
 */
typedef struct {
    int width;				/* unscaled width */
307
308
309
310
311
312
313
314



315
316
317
318
319
320
321
    </svg>";

static const char checkbtnOnData[] = "\
    <svg width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n\
     <path d='m0 0v16h1v-15h15v-1z' fill='#9e9a91'/>\n\
     <path d='m15 1v14h-14v1h15v-15z' fill='#cfcdc8'/>\n\
     <rect x='1' y='1' width='14' height='14' fill='#ffffff'/>\n\
     <path d='m4.6263 4.6262a0.50294 0.50294 0 0 1 0.71217 0l2.6617 2.6627 2.6617-2.6627a0.50358 0.50358 0 0 1 0.71217 0.71217l-2.6627 2.6617 2.6627 2.6617a0.50358 0.50358 0 0 1-0.71217 0.71217l-2.6617-2.6627-2.6617 2.6627a0.50358 0.50358 0 0 1-0.71217-0.71217l2.6627-2.6617-2.6627-2.6617a0.50294 0.50294 0 0 1 0-0.71217z' fill='#000000' stroke='#000000' stroke-width='.942'/>\n\



    </svg>";

static const IndicatorSpec checkbutton_spec = {
    16, 16,
    checkbtnOffData,
    checkbtnOnData
};







|
>
>
>







301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
    </svg>";

static const char checkbtnOnData[] = "\
    <svg width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n\
     <path d='m0 0v16h1v-15h15v-1z' fill='#9e9a91'/>\n\
     <path d='m15 1v14h-14v1h15v-15z' fill='#cfcdc8'/>\n\
     <rect x='1' y='1' width='14' height='14' fill='#ffffff'/>\n\
     <g fill='none' stroke='#000000' stroke-linecap='round' stroke-width='2'>\n\
      <path d='m5 5 6 6'/>\n\
      <path d='m5 11 6-6'/>\n\
     </g>\n\
    </svg>";

static const IndicatorSpec checkbutton_spec = {
    16, 16,
    checkbtnOffData,
    checkbtnOnData
};
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
	assert(upperBdColorPtr);
	assert(lowerBdColorPtr);
	assert(bgColorPtr);

	memcpy(upperBdColorPtr, upperBdColorStr, 6);
	memcpy(lowerBdColorPtr, lowerBdColorStr, 6);
	memcpy(bgColorPtr, bgColorStr, 6);
	while (fgColorPtr != NULL) {
	    memcpy(fgColorPtr, fgColorStr, 6);
	    fgColorPtr = strstr(fgColorPtr + 6, "000000");
	}

	/*
	 * Create an SVG photo image from svgDataCopy
	 */
	cmdFmt = "image create photo %s -format $::tk::svgFmt -data {%s}";
	scriptSize = strlen(cmdFmt) + strlen(imgName) + svgDataLen;







|

<







508
509
510
511
512
513
514
515
516

517
518
519
520
521
522
523
	assert(upperBdColorPtr);
	assert(lowerBdColorPtr);
	assert(bgColorPtr);

	memcpy(upperBdColorPtr, upperBdColorStr, 6);
	memcpy(lowerBdColorPtr, lowerBdColorStr, 6);
	memcpy(bgColorPtr, bgColorStr, 6);
	if (fgColorPtr != NULL) {
	    memcpy(fgColorPtr, fgColorStr, 6);

	}

	/*
	 * Create an SVG photo image from svgDataCopy
	 */
	cmdFmt = "image create photo %s -format $::tk::svgFmt -data {%s}";
	scriptSize = strlen(cmdFmt) + strlen(imgName) + svgDataLen;
Changes to generic/ttk/ttkDefaultTheme.c.
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
    FieldElementOptions,
    FieldElementSize,
    FieldElementDraw
};

/*------------------------------------------------------------------------
 * Indicators --
 *
 * The SVG images used here are partly based on some icons provided by
 * the official open source SVG icon library for the Bootstrap project,
 * licensed under the MIT license (https://opensource.org/licenses/MIT).
 *
 * See https://github.com/twbs/icons.
 */

/*
 * Indicator image descriptor:
 */
typedef struct {
    int width;				/* unscaled width */







<
<
<
<
<
<







370
371
372
373
374
375
376






377
378
379
380
381
382
383
    FieldElementOptions,
    FieldElementSize,
    FieldElementDraw
};

/*------------------------------------------------------------------------
 * Indicators --






 */

/*
 * Indicator image descriptor:
 */
typedef struct {
    int width;				/* unscaled width */
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
static const char checkbtnOnData[] = "\
    <svg width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n\
     <path d='m0 0v15h1v-14h14v-1z' fill='#888888'/>\n\
     <path d='m1 1v13h1v-12h12v-1z' fill='#414141'/>\n\
     <path d='m14 1v13h-13v1h14v-14z' fill='#d9d9d9'/>\n\
     <path d='m15 0v15h-15v1h16v-16z' fill='#eeeeee'/>\n\
     <rect x='2' y='2' width='12' height='12' fill='#ffffff'/>\n\
     <path d='m10.857 5.2815a0.49452 0.49452 0 0 1 0.70636 0c0.19295 0.19497 0.19565 0.51003 0.0068 0.70838l-3.9892 4.7158a0.49452 0.49452 0 0 1-0.7185 0.01349l-2.4274-2.4598a0.51071 0.51071 0 0 1 0-0.71513 0.49452 0.49452 0 0 1 0.70636 0l2.059 2.0867 3.6431-4.3346a0.16664 0.16664 0 0 1 0.01349-0.014842z' fill='#000000' stroke='#000000' stroke-width='.7'/>\n\
    </svg>";

static const IndicatorSpec checkbutton_spec = {
    16, 16,
    checkbtnOffData,
    checkbtnOnData
};







|







398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
static const char checkbtnOnData[] = "\
    <svg width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n\
     <path d='m0 0v15h1v-14h14v-1z' fill='#888888'/>\n\
     <path d='m1 1v13h1v-12h12v-1z' fill='#414141'/>\n\
     <path d='m14 1v13h-13v1h14v-14z' fill='#d9d9d9'/>\n\
     <path d='m15 0v15h-15v1h16v-16z' fill='#eeeeee'/>\n\
     <rect x='2' y='2' width='12' height='12' fill='#ffffff'/>\n\
     <path d='m4.5 8 3 3 4-6' fill='none' stroke='#000000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/>\n\
    </svg>";

static const IndicatorSpec checkbutton_spec = {
    16, 16,
    checkbtnOffData,
    checkbtnOnData
};
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
	assert(indicatorColorPtr);

	memcpy(shadeColorPtr, shadeColorStr, 6);
	memcpy(highlightColorPtr, indicatorColorStr, 6);
	memcpy(borderColorPtr, borderColorStr, 6);
	memcpy(bgColorPtr, bgColorStr, 6);
	memcpy(indicatorColorPtr, indicatorColorStr, 6);
	while (fgColorPtr != NULL) {
	    memcpy(fgColorPtr, fgColorStr, 6);
	    fgColorPtr = strstr(fgColorPtr + 6, "000000");
	}

	/*
	 * Create an SVG photo image from svgDataCopy
	 */
	cmdFmt = "image create photo %s -format $::tk::svgFmt -data {%s}";
	scriptSize = strlen(cmdFmt) + strlen(imgName) + svgDataLen;







|

<







628
629
630
631
632
633
634
635
636

637
638
639
640
641
642
643
	assert(indicatorColorPtr);

	memcpy(shadeColorPtr, shadeColorStr, 6);
	memcpy(highlightColorPtr, indicatorColorStr, 6);
	memcpy(borderColorPtr, borderColorStr, 6);
	memcpy(bgColorPtr, bgColorStr, 6);
	memcpy(indicatorColorPtr, indicatorColorStr, 6);
	if (fgColorPtr != NULL) {
	    memcpy(fgColorPtr, fgColorStr, 6);

	}

	/*
	 * Create an SVG photo image from svgDataCopy
	 */
	cmdFmt = "image create photo %s -format $::tk::svgFmt -data {%s}";
	scriptSize = strlen(cmdFmt) + strlen(imgName) + svgDataLen;
Changes to unix/tkUnixButton.c.
80
81
82
83
84
85
86

87
88
89
90
91
92
93
94
95
96
97
98
99
    "   <stop stop-color='#ffffff' offset='1'/>\n"
    "  </linearGradient>\n"
    "  <linearGradient id='linearGradientTop' x1='7.5' x2='7.5' y1='2' y2='2' gradientUnits='userSpaceOnUse'>\n"
    "   <stop stop-color='#DARKKK' offset='1'/>\n"
    "   <stop stop-color='#000000' offset='0'/>\n"
    "  </linearGradient>\n"
    " </defs>\n"

    " <rect id='rectbackdrop' x='2' y='2' width='12' height='12' fill='#INTROR' stroke-width='11' style='paint-order:stroke markers fill'/>\n"
    " <g stroke-width='10.16'>\n"
    "  <path id='recttopside' d='m0 0h16.002l-1.0025 1h-13.999l-1-1' fill='url(#linearGradientTop)' style='paint-order:stroke markers fill'/>\n"
    "  <path id='rectleftside' d='m0 0 1 1v14.002l-1 1.0024' fill='url(#linearGradientLeft)' style='paint-order:stroke markers fill'/>\n"
    "  <path id='rectrightside' d='m16 0-1 1v14.023l1 0.97186v-15.995' fill='url(#linearGradientRight)' style='paint-order:stroke markers fill'/>\n"
    "  <path id='rectbottomside' d='m0 16 1-1h14l1.0041 1h-16.004' fill='url(#linearGradientBottom)' style='paint-order:stroke markers fill'/>\n"
    " </g>\n"
    "</svg>";

static const char checkbtnOnData[] =
    "<svg id='checkbutton' width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n"
    " <defs>\n"
    "  <linearGradient id='linearGradientLeft' x1='2' x2='2' y1='7.5' y2='7.5' gradientUnits='userSpaceOnUse'>\n"







>
|
<
|
|
|
|







80
81
82
83
84
85
86
87
88

89
90
91
92
93
94
95
96
97
98
99
    "   <stop stop-color='#ffffff' offset='1'/>\n"
    "  </linearGradient>\n"
    "  <linearGradient id='linearGradientTop' x1='7.5' x2='7.5' y1='2' y2='2' gradientUnits='userSpaceOnUse'>\n"
    "   <stop stop-color='#DARKKK' offset='1'/>\n"
    "   <stop stop-color='#000000' offset='0'/>\n"
    "  </linearGradient>\n"
    " </defs>\n"
    " <g style='paint-order:stroke markers fill'>\n"
    "  <rect id='rectbackdrop' x='2' y='2' width='12' height='12' fill='#INTROR'/>\n"

    "  <path id='recttopside' d='m0 0h16l-1 1h-14l-1-1' fill='url(#linearGradientTop)'/>\n"
    "  <path id='rectleftside' d='m0 0 1 1v14l-1 1' fill='url(#linearGradientLeft)'/>\n"
    "  <path id='rectrightside' d='m16 0-1 1v14l1 1v-16' fill='url(#linearGradientRight)'/>\n"
    "  <path id='rectbottomside' d='m0 16 1-1h14l1 1h-16' fill='url(#linearGradientBottom)'/>\n"
    " </g>\n"
    "</svg>";

static const char checkbtnOnData[] =
    "<svg id='checkbutton' width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n"
    " <defs>\n"
    "  <linearGradient id='linearGradientLeft' x1='2' x2='2' y1='7.5' y2='7.5' gradientUnits='userSpaceOnUse'>\n"
109
110
111
112
113
114
115

116
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
161
162
163
164
165
166
167
168
169
    "   <stop stop-color='#ffffff' offset='1'/>\n"
    "  </linearGradient>\n"
    "  <linearGradient id='linearGradientTop' x1='7.5' x2='7.5' y1='2' y2='2' gradientUnits='userSpaceOnUse'>\n"
    "   <stop stop-color='#DARKKK' offset='1'/>\n"
    "   <stop stop-color='#000000' offset='0'/>\n"
    "  </linearGradient>\n"
    " </defs>\n"

    " <rect id='rectbackdrop' x='2' y='2' width='12' height='12' fill='#INTROR' stroke-width='11' style='paint-order:stroke markers fill'/>\n"
    " <g stroke-width='10.16'>\n"
    "  <path id='recttopside' d='m0 0h16.002l-1.0025 1h-13.999l-1-1' fill='url(#linearGradientTop)' style='paint-order:stroke markers fill'/>\n"
    "  <path id='rectleftside' d='m0 0 1 1v14.002l-1 1.0024' fill='url(#linearGradientLeft)' style='paint-order:stroke markers fill'/>\n"
    "  <path id='rectrightside' d='m16 0-1 1v14.023l1 0.97186v-15.995' fill='url(#linearGradientRight)' style='paint-order:stroke markers fill'/>\n"
    "  <path id='rectbottomside' d='m0 16 1-1h14l1.0041 1h-16.004' fill='url(#linearGradientBottom)' style='paint-order:stroke markers fill'/>\n"

    " </g>\n"
    " <path id='indicator' d='m4.4194 7.9316 3 3 4-7' fill='none' stroke='#INDCTR' stroke-width='2px' style='paint-order:stroke markers fill'/>\n"
    "</svg>";

static const char radiobtnOffData[] =
    "<svg id='radiobutton' width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n"
    " <defs>\n"
    "  <linearGradient id='gradient1' x1='2' x2='11' y1='2' y2='11' gradientUnits='userSpaceOnUse'>\n"
    "   <stop stop-color='#DARKKK' offset='0'/>\n"
    "   <stop stop-color='#LIGHTT' stop-opacity='0' offset='1'/>\n"
    "  </linearGradient>\n"
    " </defs>\n"

    " <circle cx='8' cy='8' r='8' fill='url(#gradient1)' fill-rule='evenodd'/>\n"
    " <circle cx='8' cy='8' r='6.5' fill='#INTROR' fill-rule='evenodd'/>\n"

    "</svg>";

static const char radiobtnOnData[] =
    "<svg id='radiobutton' width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n"
    " <defs>\n"
    "  <linearGradient id='gradient1' x1='2' x2='11' y1='2' y2='11' gradientUnits='userSpaceOnUse'>\n"
    "   <stop stop-color='#DARKKK' offset='0'/>\n"
    "   <stop stop-color='#LIGHTT' stop-opacity='0' offset='1'/>\n"
    "  </linearGradient>\n"
    " </defs>\n"
    " <g fill-rule='evenodd'>\n"
    "  <circle cx='8' cy='8' r='8' fill='url(#gradient1)'/>\n"
    "  <circle cx='8' cy='8' r='7' fill='#INTROR'/>\n"
    "  <circle cx='8' cy='8' r='4' fill='#INDCTR'/>\n"
    " </g>\n"
    "</svg>";

static const char menuOffData[] =
    "<svg width='8' height='8' version='1.1' viewBox='0 0 8 8' xmlns='http://www.w3.org/2000/svg'></svg>";

static const char checkmenuOnData[] =
    "<svg width='8' height='8' version='1.1' viewBox='0 0 8 8' xmlns='http://www.w3.org/2000/svg'>\n"
    " <path id='indicator' d='m0.59082 3.0963 3.3419 3.3419 3.3419-5.8483' fill='none' stroke='#INDCTR' stroke-width='1.6709px' style='paint-order:stroke markers fill'/>\n"
    "</svg>";

static const char radiomenuOnData[] =
    "<svg width='8' height='8' version='1.1' viewBox='0 0 8 8' xmlns='http://www.w3.org/2000/svg'>\n"
    " <circle cx='4' cy='4' r='3' fill='#INDCTR' fill-rule='evenodd'/>\n"
    "</svg>";


/*
 *----------------------------------------------------------------------
 *







>
|
<
|
|
|
|
>

<










>
|
|
>


















|


|
|



|







109
110
111
112
113
114
115
116
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
161
162
163
164
165
166
167
168
169
170
171
    "   <stop stop-color='#ffffff' offset='1'/>\n"
    "  </linearGradient>\n"
    "  <linearGradient id='linearGradientTop' x1='7.5' x2='7.5' y1='2' y2='2' gradientUnits='userSpaceOnUse'>\n"
    "   <stop stop-color='#DARKKK' offset='1'/>\n"
    "   <stop stop-color='#000000' offset='0'/>\n"
    "  </linearGradient>\n"
    " </defs>\n"
    " <g style='paint-order:stroke markers fill'>\n"
    "  <rect id='rectbackdrop' x='2' y='2' width='12' height='12' fill='#INTROR'/>\n"

    "  <path id='recttopside' d='m0 0h16l-1 1h-14l-1-1' fill='url(#linearGradientTop)'/>\n"
    "  <path id='rectleftside' d='m0 0 1 1v14l-1 1' fill='url(#linearGradientLeft)'/>\n"
    "  <path id='rectrightside' d='m16 0-1 1v14l1 1v-16' fill='url(#linearGradientRight)'/>\n"
    "  <path id='rectbottomside' d='m0 16 1-1h14l1 1h-16' fill='url(#linearGradientBottom)'/>\n"
    "  <path id='indicator' d='m4.5 8 3 3 4-6' fill='none' stroke='#INDCTR' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/>\n"
    " </g>\n"

    "</svg>";

static const char radiobtnOffData[] =
    "<svg id='radiobutton' width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n"
    " <defs>\n"
    "  <linearGradient id='gradient1' x1='2' x2='11' y1='2' y2='11' gradientUnits='userSpaceOnUse'>\n"
    "   <stop stop-color='#DARKKK' offset='0'/>\n"
    "   <stop stop-color='#LIGHTT' stop-opacity='0' offset='1'/>\n"
    "  </linearGradient>\n"
    " </defs>\n"
    " <g fill-rule='evenodd'>\n"
    "  <circle cx='8' cy='8' r='8' fill='url(#gradient1)'/>\n"
    "  <circle cx='8' cy='8' r='6.5' fill='#INTROR'/>\n"
    " </g>\n"
    "</svg>";

static const char radiobtnOnData[] =
    "<svg id='radiobutton' width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n"
    " <defs>\n"
    "  <linearGradient id='gradient1' x1='2' x2='11' y1='2' y2='11' gradientUnits='userSpaceOnUse'>\n"
    "   <stop stop-color='#DARKKK' offset='0'/>\n"
    "   <stop stop-color='#LIGHTT' stop-opacity='0' offset='1'/>\n"
    "  </linearGradient>\n"
    " </defs>\n"
    " <g fill-rule='evenodd'>\n"
    "  <circle cx='8' cy='8' r='8' fill='url(#gradient1)'/>\n"
    "  <circle cx='8' cy='8' r='7' fill='#INTROR'/>\n"
    "  <circle cx='8' cy='8' r='4' fill='#INDCTR'/>\n"
    " </g>\n"
    "</svg>";

static const char menuOffData[] =
    "<svg width='8' height='8' version='1.1' xmlns='http://www.w3.org/2000/svg'></svg>";

static const char checkmenuOnData[] =
    "<svg width='8' height='8' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n"
    " <path id='indicator' d='m1 3.5 2.5 3 3.5-5' fill='none' stroke='#INDCTR' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.975' style='paint-order:stroke markers fill'/>\n"
    "</svg>";

static const char radiomenuOnData[] =
    "<svg width='8' height='8' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n"
    " <circle cx='4' cy='4' r='3' fill='#INDCTR' fill-rule='evenodd'/>\n"
    "</svg>";


/*
 *----------------------------------------------------------------------
 *
Changes to win/tkWinButton.c.
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
    BOOLEAN initialized;
    DWORD boxSize;		/* Width & height of the box. */
} ThreadSpecificData;
static Tcl_ThreadDataKey dataKey;

/*
 * Data of the SVG images used for drawing the indicators
 *
 * The SVG images used here are partly based on some icons provided by
 * the official open source SVG icon library for the Bootstrap project,
 * licensed under the MIT license (https://opensource.org/licenses/MIT).
 *
 * See https://github.com/twbs/icons.
 */

static const char checkbtnOffData[] = "\
    <svg width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n\
     <path d='m0 0v15h1v-14h14v-1z' fill='#a0a0a0'/>\n\
     <path d='m1 1v13h1v-12h12v-1z' fill='#696969'/>\n\
     <path d='m14 1v13h-13v1h14v-14z' fill='#e3e3e3'/>\n\
     <path d='m15 0v15h-15v1h16v-16z' fill='#eeeeee'/>\n\
     <rect x='2' y='2' width='12' height='12' fill='#ffffff'/>\n\
    </svg>";

static const char checkbtnOnData[] = "\
    <svg width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n\
     <path d='m0 0v15h1v-14h14v-1z' fill='#a0a0a0'/>\n\
     <path d='m1 1v13h1v-12h12v-1z' fill='#696969'/>\n\
     <path d='m14 1v13h-13v1h14v-14z' fill='#e3e3e3'/>\n\
     <path d='m15 0v15h-15v1h16v-16z' fill='#eeeeee'/>\n\
     <rect x='2' y='2' width='12' height='12' fill='#ffffff'/>\n\
     <path d='m10.857 5.2815a0.49452 0.49452 0 0 1 0.70636 0c0.19295 0.19497 0.19565 0.51003 0.0068 0.70838l-3.9892 4.7158a0.49452 0.49452 0 0 1-0.7185 0.01349l-2.4274-2.4598a0.51071 0.51071 0 0 1 0-0.71513 0.49452 0.49452 0 0 1 0.70636 0l2.059 2.0867 3.6431-4.3346a0.16664 0.16664 0 0 1 0.01349-0.014842z' fill='#000000' stroke='#000000' stroke-width='.7'/>\n\
    </svg>";

static const char radiobtnOffData[] = "\
    <svg width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n\
     <defs>\n\
      <linearGradient id='linearGradientOuter' x1='7' x2='9' y1='8' y2='8' gradientTransform='rotate(45,8,8)' gradientUnits='userSpaceOnUse'>\n\
       <stop stop-color='#a0a0a0' offset='0'/>\n\







<
<
<
<
<
<


















|







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
    BOOLEAN initialized;
    DWORD boxSize;		/* Width & height of the box. */
} ThreadSpecificData;
static Tcl_ThreadDataKey dataKey;

/*
 * Data of the SVG images used for drawing the indicators






 */

static const char checkbtnOffData[] = "\
    <svg width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n\
     <path d='m0 0v15h1v-14h14v-1z' fill='#a0a0a0'/>\n\
     <path d='m1 1v13h1v-12h12v-1z' fill='#696969'/>\n\
     <path d='m14 1v13h-13v1h14v-14z' fill='#e3e3e3'/>\n\
     <path d='m15 0v15h-15v1h16v-16z' fill='#eeeeee'/>\n\
     <rect x='2' y='2' width='12' height='12' fill='#ffffff'/>\n\
    </svg>";

static const char checkbtnOnData[] = "\
    <svg width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n\
     <path d='m0 0v15h1v-14h14v-1z' fill='#a0a0a0'/>\n\
     <path d='m1 1v13h1v-12h12v-1z' fill='#696969'/>\n\
     <path d='m14 1v13h-13v1h14v-14z' fill='#e3e3e3'/>\n\
     <path d='m15 0v15h-15v1h16v-16z' fill='#eeeeee'/>\n\
     <rect x='2' y='2' width='12' height='12' fill='#ffffff'/>\n\
     <path d='m4.5 8 3 3 4-6' fill='none' stroke='#000000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/>\n\
    </svg>";

static const char radiobtnOffData[] = "\
    <svg width='16' height='16' version='1.1' xmlns='http://www.w3.org/2000/svg'>\n\
     <defs>\n\
      <linearGradient id='linearGradientOuter' x1='7' x2='9' y1='8' y2='8' gradientTransform='rotate(45,8,8)' gradientUnits='userSpaceOnUse'>\n\
       <stop stop-color='#a0a0a0' offset='0'/>\n\
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
	assert(interiorColorPtr);

	memcpy(topOuterColorPtr, topOuterColorStr, 6);
	memcpy(btmOuterColorPtr, btmOuterColorStr, 6);
	memcpy(topInnerColorPtr, topInnerColorStr, 6);
	memcpy(btmInnerColorPtr, btmInnerColorStr, 6);
	memcpy(interiorColorPtr, interiorColorStr, 6);
	while (checkColorPtr != NULL) {
	    memcpy(checkColorPtr, checkColorStr, 6);
	    checkColorPtr = strstr(checkColorPtr + 6, "000000");
	}

	/*
	 * Create an SVG photo image from svgDataCopy
	 */

	cmdFmt = "image create photo %s -format $::tk::svgFmt -data {%s}";







|

<







484
485
486
487
488
489
490
491
492

493
494
495
496
497
498
499
	assert(interiorColorPtr);

	memcpy(topOuterColorPtr, topOuterColorStr, 6);
	memcpy(btmOuterColorPtr, btmOuterColorStr, 6);
	memcpy(topInnerColorPtr, topInnerColorStr, 6);
	memcpy(btmInnerColorPtr, btmInnerColorStr, 6);
	memcpy(interiorColorPtr, interiorColorStr, 6);
	if (checkColorPtr != NULL) {
	    memcpy(checkColorPtr, checkColorStr, 6);

	}

	/*
	 * Create an SVG photo image from svgDataCopy
	 */

	cmdFmt = "image create photo %s -format $::tk::svgFmt -data {%s}";