-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgenerated.go
8850 lines (8398 loc) · 255 KB
/
generated.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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
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
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
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
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
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
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
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
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by generator.go, DO NOT EDIT.
package tk9_0 // import "modernc.org/tk9.0"
import "fmt"
// Button — Create and manipulate 'button' action widgets
//
// # Description
//
// The button command creates a new window (given by the
// pathName argument) and makes it into a button widget.
// Additional
// options, described above, may be specified on the command line
// or in the option database
// to configure aspects of the button such as its colors, font,
// text, and initial relief. The button command returns its
// pathName argument. At the time this command is invoked,
// there must not exist a window named pathName, but
// pathName's parent must exist.
//
// A button is a widget that displays a textual string, bitmap or image.
// If text is displayed, it must all be in a single font, but it
// can occupy multiple lines on the screen (if it contains newlines
// or if wrapping occurs because of the -wraplength option) and
// one of the characters may optionally be underlined using the
// It can display itself in either of three different ways, according
// to
// the -state option;
// it can be made to appear raised, sunken, or flat;
// and it can be made to flash. When a user invokes the
// button (by pressing mouse button 1 with the cursor over the
// button), then the Tcl command specified in the -command
// option is invoked.
//
// Use [Window.Button] to create a Button with a particular parent.
//
// More information might be available at the [Tcl/Tk button] page.
//
// # Standard options
//
// - [Activebackground]
// - [Activeforeground]
// - [Anchor]
// - [Background]
// - [Bitmap]
// - [Borderwidth]
// - [Compound]
// - [Cursor]
// - [Disabledforeground]
// - [Foreground]
// - [Highlightbackground]
// - [Highlightcolor]
// - [Highlightthickness]
// - [Image]
// - [Justify]
// - [Padx]
// - [Pady]
// - [Relief]
// - [Repeatdelay]
// - [Repeatinterval]
// - [Takefocus]
// - [Textvariable]
// - [Txt]
// - [Underline]
// - [Wraplength]
//
// # Widget specific options
//
// [Command]
//
// Specifies a Tcl command to associate with the button. This command
// is typically invoked when mouse button 1 is released over the button
// window.
//
// [Default]
//
// Specifies one of three states for the default ring: normal,
// active, or disabled. In active state, the button is drawn
// with the platform specific appearance for a default button. In normal
// state, the button is drawn with the platform specific appearance for a
// non-default button, leaving enough space to draw the default button
// appearance. The normal and active states will result in buttons of
// the same size. In disabled state, the button is drawn with the
// non-default button appearance without leaving space for the default
// appearance. The disabled state may result in a smaller button than
// the active state.
//
// [Height]
//
// Specifies a desired height for the button.
// If an image or bitmap is being displayed in the button then the value is in
// screen units (i.e. any of the forms acceptable to Tk_GetPixels);
// for text it is in lines of text.
// If this option is not specified, the button's desired height is computed
// from the size of the image or bitmap or text being displayed in it.
//
// [Overrelief]
//
// Specifies an alternative relief for the button, to be used when the
// mouse cursor is over the widget. This option can be used to make
// toolbar buttons, by configuring -relief flat -overrelief
// raised. If the value of this option is the empty string, then no
// alternative relief is used when the mouse cursor is over the button.
// The empty string is the default value.
//
// [State]
//
// Specifies one of three states for the button: normal, active,
// or disabled. In normal state the button is displayed using the
// -foreground and -background options. The active state is
// typically used when the pointer is over the button. In active state
// the button is displayed using the -activeforeground and
// -activebackground options. Disabled state means that the button
// should be insensitive: the default bindings will refuse to activate
// the widget and will ignore mouse button presses.
// In this state the -disabledforeground and
// -background options determine how the button is displayed.
//
// [Width]
//
// Specifies a desired width for the button.
// If an image or bitmap is being displayed in the button then the value is in
// screen units (i.e. any of the forms acceptable to Tk_GetPixels).
// For a text button (no image or with -compound none) then the width
// specifies how much space in characters to allocate for the text label.
// If the width is negative then this specifies a minimum width.
// If this option is not specified, the button's desired width is computed
// from the size of the image or bitmap or text being displayed in it.
//
// [Tcl/Tk button]: https://www.tcl.tk/man/tcl9.0/TkCmd/button.html
func Button(options ...Opt) *ButtonWidget {
return App.Button(options...)
}
// Button — Create and manipulate 'button' action widgets
//
// The resulting [Window] is a child of 'w'
//
// For details please see [Button]
func (w *Window) Button(options ...Opt) *ButtonWidget {
return &ButtonWidget{w.newChild("button", options...)}
}
// ButtonWidget represents the Tcl/Tk button widget/window
type ButtonWidget struct {
*Window
}
// Canvas — Create and manipulate 'canvas' hypergraphics drawing surface widgets
//
// Use [Window.Canvas] to create a Canvas with a particular parent.
//
// More information might be available at the [Tcl/Tk canvas] page.
//
// # Standard options
//
// - [Background]
// - [Borderwidth]
// - [Cursor]
// - [Highlightbackground]
// - [Highlightcolor]
// - [Highlightthickness]
// - [Insertbackground]
// - [Insertborderwidth]
// - [Insertofftime]
// - [Insertontime]
// - [Insertwidth]
// - [Relief]
// - [Selectbackground]
// - [Selectborderwidth]
// - [Selectforeground]
// - [Takefocus]
// - [Xscrollcommand]
// - [Yscrollcommand]
//
// # Widget specific options
//
// [Closeenough]
//
// Specifies a floating-point value indicating how close the mouse cursor
// must be to an item before it is considered to be
// the item. Defaults to 1.0.
//
// [Confine]
//
// Specifies a boolean value that indicates whether or not it should be
// allowable to set the canvas's view outside the region defined by the
// scrollRegion argument.
// Defaults to true, which means that the view will
// be constrained within the scroll region.
//
// [Height]
//
// Specifies a desired window height that the canvas widget should request from
// its geometry manager. The value may be specified in any
// of the forms described in the COORDINATES section below.
//
// [Scrollregion]
//
// Specifies a list with four coordinates describing the left, top, right, and
// bottom coordinates of a rectangular region.
// This region is used for scrolling purposes and is considered to be
// the boundary of the information in the canvas.
// Each of the coordinates may be specified
// in any of the forms given in the COORDINATES section below.
//
// [State]
//
// Modifies the default state of the canvas where state may be set to
// one of: normal, disabled, or hidden. Individual canvas
// objects all have their own state option which may override the default
// state. Many options can take separate specifications such that the
// appearance of the item can be different in different situations. The
// options that start with active control the appearance when the mouse
// pointer is over it, while the option starting with disabled controls
// the appearance when the state is disabled. Canvas items which are
// disabled will not react to canvas bindings.
//
// [Width]
//
// Specifies a desired window width that the canvas widget should request from
// its geometry manager. The value may be specified in any
// of the forms described in the COORDINATES section below.
//
// [Xscrollincrement]
//
// Specifies an increment for horizontal scrolling, in any of the usual forms
// permitted for screen distances. If the value of this option is greater
// than zero, the horizontal view in the window will be constrained so that
// the canvas x coordinate at the left edge of the window is always an even
// multiple of xScrollIncrement; furthermore, the units for scrolling
// (e.g., the change in view when the left and right arrows of a scrollbar
// are selected) will also be xScrollIncrement. If the value of
// this option is negative or zero, then horizontal scrolling
// is unconstrained.
//
// [Yscrollincrement]
//
// Specifies an increment for vertical scrolling, in any of the usual forms
// permitted for screen distances. If the value of this option is greater
// than zero, the vertical view in the window will be constrained so that
// the canvas y coordinate at the top edge of the window is always an even
// multiple of yScrollIncrement; furthermore, the units for scrolling
// (e.g., the change in view when the top and bottom arrows of a scrollbar
// are selected) will also be yScrollIncrement. If the value of
// this option is negative or zero, then vertical scrolling
// is unconstrained.
//
// [Tcl/Tk canvas]: https://www.tcl.tk/man/tcl9.0/TkCmd/canvas.html
func Canvas(options ...Opt) *CanvasWidget {
return App.Canvas(options...)
}
// Canvas — Create and manipulate 'canvas' hypergraphics drawing surface widgets
//
// The resulting [Window] is a child of 'w'
//
// For details please see [Canvas]
func (w *Window) Canvas(options ...Opt) *CanvasWidget {
return &CanvasWidget{w.newChild("canvas", options...)}
}
// CanvasWidget represents the Tcl/Tk canvas widget/window
type CanvasWidget struct {
*Window
}
// Checkbutton — Create and manipulate 'checkbutton' boolean selection widgets
//
// # Description
//
// The checkbutton command creates a new window (given by the
// pathName argument) and makes it into a checkbutton widget.
// Additional
// options, described above, may be specified on the command line
// or in the option database
// to configure aspects of the checkbutton such as its colors, font,
// text, and initial relief. The checkbutton command returns its
// pathName argument. At the time this command is invoked,
// there must not exist a window named pathName, but
// pathName's parent must exist.
//
// A checkbutton is a widget
// that displays a textual string, bitmap or image
// and a square called an indicator.
// If text is displayed, it must all be in a single font, but it
// can occupy multiple lines on the screen (if it contains newlines
// or if wrapping occurs because of the -wraplength option) and
// one of the characters may optionally be underlined using the
// A checkbutton has
// all of the behavior of a simple button, including the
// following: it can display itself in either of three different
// ways, according to the -state option;
// it can be made to appear
// raised, sunken, or flat; it can be made to flash; and it invokes
// a Tcl command whenever mouse button 1 is clicked over the
// checkbutton.
//
// In addition, checkbuttons can be selected.
// If a checkbutton is selected then the indicator is normally
// drawn with a selected appearance, and
// a Tcl variable associated with the checkbutton is set to a particular
// value (normally 1).
// The indicator is drawn with a check mark inside.
// If the checkbutton is not selected, then the indicator is drawn with a
// deselected appearance, and the associated variable is
// set to a different value (typically 0).
// The indicator is drawn without a check mark inside. In the special case
// where the variable (if specified) has a value that matches the tristatevalue,
// the indicator is drawn with a tri-state appearance and is in the tri-state
// mode indicating mixed or multiple values. (This is used when the check
// box represents the state of multiple items.)
// The indicator is drawn in a platform dependent manner. Under Unix and
// Windows, the background interior of the box is
// grayed .
// Under Mac, the indicator is drawn with a dash mark inside.
// By default, the name of the variable associated with a checkbutton is the
// same as the name used to create the checkbutton.
// The variable name, and the
// on ,
// off
// and
// tristate
// values stored in it, may be modified with options on the command line
// or in the option database.
// Configuration options may also be used to modify the way the
// indicator is displayed (or whether it is displayed at all).
// By default a checkbutton is configured to select and deselect
// itself on alternate button clicks.
// In addition, each checkbutton monitors its associated variable and
// automatically selects and deselects itself when the variables value
// changes to and from the button's
// on ,
// off
// and
// tristate
// values.
//
// Use [Window.Checkbutton] to create a Checkbutton with a particular parent.
//
// More information might be available at the [Tcl/Tk checkbutton] page.
//
// # Standard options
//
// - [Activebackground]
// - [Activeforeground]
// - [Anchor]
// - [Background]
// - [Bitmap]
// - [Borderwidth]
// - [Compound]
// - [Cursor]
// - [Disabledforeground]
// - [Foreground]
// - [Highlightbackground]
// - [Highlightcolor]
// - [Highlightthickness]
// - [Image]
// - [Justify]
// - [Padx]
// - [Pady]
// - [Relief]
// - [Takefocus]
// - [Textvariable]
// - [Txt]
// - [Underline]
// - [Wraplength]
//
// # Widget specific options
//
// [Command]
//
// Specifies a Tcl command to associate with the button. This command
// is typically invoked when mouse button 1 is released over the button
// window. The button's global variable (-variable option) will
// be updated before the command is invoked.
//
// [Height]
//
// Specifies a desired height for the button.
// If an image or bitmap is being displayed in the button then the value is in
// screen units (i.e. any of the forms acceptable to Tk_GetPixels);
// for text it is in lines of text.
// If this option is not specified, the button's desired height is computed
// from the size of the image or bitmap or text being displayed in it.
//
// [Indicatoron]
//
// Specifies whether or not the indicator should be drawn. Must be a
// proper boolean value. If false, the -relief option is
// ignored and the widget's relief is always sunken if the widget is
// selected and raised otherwise.
//
// [Offrelief]
//
// Specifies the relief for the checkbutton when the indicator is not drawn and
// the checkbutton is off. The default value is
// By setting this option to
// and setting -indicatoron to false and -overrelief to
// the effect is achieved
// of having a flat button that raises on mouse-over and which is
// depressed when activated. This is the behavior typically exhibited by
// the Bold, Italic, and Underline checkbuttons on the toolbar of a
// word-processor, for example.
//
// [Offvalue]
//
// Specifies value to store in the button's associated variable whenever
// this button is deselected. Defaults to
//
// [Onvalue]
//
// Specifies value to store in the button's associated variable whenever
// this button is selected. Defaults to
//
// [Overrelief]
//
// Specifies an alternative relief for the checkbutton, to be used when the
// mouse cursor is over the widget. This option can be used to make
// toolbar buttons, by configuring -relief flat -overrelief
// raised. If the value of this option is the empty string, then no
// alternative relief is used when the mouse cursor is over the checkbutton.
// The empty string is the default value.
//
// [Selectcolor]
//
// Specifies a background color to use when the button is selected.
// If indicatorOn is true then the color is used as the background for
// the indicator regardless of the select state.
// If indicatorOn is false, this color is used as the background
// for the entire widget, in place of background or activeBackground,
// whenever the widget is selected.
// If specified as an empty string then no special color is used for
// displaying when the widget is selected.
//
// [Selectimage]
//
// Specifies an image to display (in place of the -image option)
// when the checkbutton is selected.
// This option is ignored unless the -image option has been
// specified.
//
// [State]
//
// Specifies one of three states for the checkbutton: normal, active,
// or disabled. In normal state the checkbutton is displayed using the
// -foreground and -background options. The active state is
// typically used when the pointer is over the checkbutton. In active state
// the checkbutton is displayed using the -activeforeground and
// -activebackground options. Disabled state means that the checkbutton
// should be insensitive: the default bindings will refuse to activate
// the widget and will ignore mouse button presses.
// In this state the -disabledforeground and
// -background options determine how the checkbutton is displayed.
//
// [Tristateimage]
//
// Specifies an image to display (in place of the -image option)
// when the checkbutton is in tri-state mode.
// This option is ignored unless the -image option has been
// specified.
//
// [Tristatevalue]
//
// Specifies the value that causes the checkbutton to display the multi-value
// selection, also known as the tri-state mode. Defaults to
//
// [Variable]
//
// Specifies the name of a global variable to set to indicate whether
// or not this button is selected. Defaults to the name of the
// button within its parent (i.e. the last element of the button
// window's path name).
//
// [Width]
//
// Specifies a desired width for the button.
// If an image or bitmap is being displayed in the button then the value is in
// screen units (i.e. any of the forms acceptable to Tk_GetPixels);
// for text it is in characters.
// If this option is not specified, the button's desired width is computed
// from the size of the image or bitmap or text being displayed in it.
//
// [Tcl/Tk checkbutton]: https://www.tcl.tk/man/tcl9.0/TkCmd/checkbutton.html
func Checkbutton(options ...Opt) *CheckbuttonWidget {
return App.Checkbutton(options...)
}
// Checkbutton — Create and manipulate 'checkbutton' boolean selection widgets
//
// The resulting [Window] is a child of 'w'
//
// For details please see [Checkbutton]
func (w *Window) Checkbutton(options ...Opt) *CheckbuttonWidget {
return &CheckbuttonWidget{w.newChild("checkbutton", options...)}
}
// CheckbuttonWidget represents the Tcl/Tk checkbutton widget/window
type CheckbuttonWidget struct {
*Window
}
// Entry — Create and manipulate 'entry' one-line text entry widgets
//
// # Description
//
// The entry command creates a new window (given by the
// pathName argument) and makes it into an entry widget.
// Additional options, described above, may be specified on the
// command line or in the option database
// to configure aspects of the entry such as its colors, font,
// and relief. The entry command returns its
// pathName argument. At the time this command is invoked,
// there must not exist a window named pathName, but
// pathName's parent must exist.
//
// An entry is a widget that displays a one-line text string and
// allows that string to be edited using widget commands described below, which
// are typically bound to keystrokes and mouse actions.
// When first created, an entry's string is empty.
// A portion of the entry may be selected as described below.
// If an entry is exporting its selection (see the -exportselection
// option), then it will observe the standard X11 protocols for handling the
// selection; entry selections are available as type STRING.
// Entries also observe the standard Tk rules for dealing with the
// input focus. When an entry has the input focus it displays an
// insertion cursor to indicate where new characters will be
// inserted.
//
// Entries are capable of displaying strings that are too long to
// fit entirely within the widget's window. In this case, only a
// portion of the string will be displayed; commands described below
// may be used to change the view in the window. Entries use
// the standard -xscrollcommand mechanism for interacting with
// scrollbars (see the description of the -xscrollcommand option
// for details). They also support scanning, as described below.
//
// Use [Window.Entry] to create a Entry with a particular parent.
//
// More information might be available at the [Tcl/Tk entry] page.
//
// # Standard options
//
// - [Background]
// - [Borderwidth]
// - [Cursor]
// - [Exportselection]
// - [Foreground]
// - [Highlightbackground]
// - [Highlightcolor]
// - [Highlightthickness]
// - [Insertbackground]
// - [Insertborderwidth]
// - [Insertofftime]
// - [Insertontime]
// - [Insertwidth]
// - [Justify]
// - [Placeholder]
// - [Placeholderforeground]
// - [Relief]
// - [Selectbackground]
// - [Selectborderwidth]
// - [Selectforeground]
// - [Takefocus]
// - [Textvariable]
// - [Xscrollcommand]
//
// # Widget specific options
//
// [Disabledbackground]
//
// Specifies the background color to use when the entry is disabled. If
// this option is the empty string, the normal background color is used.
//
// [Disabledforeground]
//
// Specifies the foreground color to use when the entry is disabled. If
// this option is the empty string, the normal foreground color is used.
//
// [Invalidcommand]
//
// Specifies a script to eval when -validatecommand returns 0.
// Setting it to {} disables this feature (the default). The best use
// of this option is to set it to bell. See VALIDATION
// below for more information.
//
// [Readonlybackground]
//
// Specifies the background color to use when the entry is readonly. If
// this option is the empty string, the normal background color is used.
//
// [Show]
//
// If this option is specified, then the true contents of the entry
// are not displayed in the window.
// Instead, each character in the entry's value will be displayed as
// the first character in the value of this option, such as
// This is useful, for example, if the entry is to be used to enter
// a password.
// If characters in the entry are selected and copied elsewhere, the
// information copied will be what is displayed, not the true contents
// of the entry.
//
// [State]
//
// Specifies one of three states for the entry: normal,
// disabled, or readonly. If the entry is readonly, then the
// value may not be changed using widget commands and no insertion cursor
// will be displayed, even if the input focus is in the widget; the
// contents of the widget may still be selected. If the entry is
// disabled, the value may not be changed, no insertion cursor will be
// displayed, the contents will not be selectable, and the entry may
// be displayed in a different color, depending on the values of the
// -disabledforeground and -disabledbackground options.
//
// [Validate]
//
// Specifies the mode in which validation should operate: none,
// focus, focusin, focusout, key, or all.
// It defaults to none. When you want validation, you must explicitly
// state which mode you wish to use. See VALIDATION below for more.
//
// [Validatecommand]
//
// Specifies a script to eval when you want to validate the input into
// the entry widget. Setting it to {} disables this feature (the default).
// This command must return a valid Tcl boolean value. If it returns 0 (or
// the valid Tcl boolean equivalent) then it means you reject the new edition
// and it will not occur and the -invalidcommand will be evaluated if it
// is set. If it returns 1, then the new edition occurs.
// See VALIDATION below for more information.
//
// [Width]
//
// Specifies an integer value indicating the desired width of the entry window,
// in average-size characters of the widget's font.
// If the value is negative or zero, the widget picks a
// size just large enough to hold its current text.
//
// [Tcl/Tk entry]: https://www.tcl.tk/man/tcl9.0/TkCmd/entry.html
func Entry(options ...Opt) *EntryWidget {
return App.Entry(options...)
}
// Entry — Create and manipulate 'entry' one-line text entry widgets
//
// The resulting [Window] is a child of 'w'
//
// For details please see [Entry]
func (w *Window) Entry(options ...Opt) *EntryWidget {
return &EntryWidget{w.newChild("entry", options...)}
}
// EntryWidget represents the Tcl/Tk entry widget/window
type EntryWidget struct {
*Window
}
// Frame — Create and manipulate 'frame' simple container widgets
//
// # Description
//
// The frame command creates a new window (given by the
// pathName argument) and makes it into a frame widget.
// Additional
// options, described above, may be specified on the command line
// or in the option database
// to configure aspects of the frame such as its background color
// and relief. The frame command returns the
// path name of the new window.
//
// A frame is a simple widget. Its primary purpose is to act as a
// spacer or container for complex window layouts. The only features
// of a frame are its background and an optional 3-D border to make the
// frame appear raised or sunken.
//
// Use [Window.Frame] to create a Frame with a particular parent.
//
// More information might be available at the [Tcl/Tk frame] page.
//
// # Standard options
//
// - [Borderwidth]
// - [Cursor]
// - [Highlightbackground]
// - [Highlightcolor]
// - [Highlightthickness]
// - [Padx]
// - [Pady]
// - [Relief]
// - [Takefocus]
//
// # Widget specific options
//
// [Background]
//
// This option is the same as the standard -background option
// except that its value may also be specified as an empty string.
// In this case, the widget will display no background or border, and
// no colors will be consumed from its colormap for its background
// and border.
// An empty background will disable drawing the background image.
//
// [Backgroundimage]
//
// This specifies an image to display on the frame's background within
// the border of the frame (i.e., the image will be clipped by the
// frame's highlight ring and border, if either are present); subwidgets
// of the frame will be drawn on top. The image must have been created
// with the image create command. If specified as the empty string,
// no image will be displayed.
//
// [Class]
//
// Specifies a class for the window.
// This class will be used when querying the option database for
// the window's other options, and it will also be used later for
// other purposes such as bindings.
// The -class option may not be changed with the configure
// widget command.
//
// [Colormap]
//
// Specifies a colormap to use for the window.
// The value may be either new, in which case a new colormap is
// created for the window and its children, or the name of another
// window (which must be on the same screen and have the same visual
// as pathName), in which case the new window will use the colormap
// from the specified window.
// If the -colormap option is not specified, the new window
// uses the same colormap as its parent.
// This option may not be changed with the configure
// widget command.
//
// [Container]
//
// The value must be a boolean. If true, it means that this window will
// be used as a container in which some other application will be embedded
// (for example, a Tk toplevel can be embedded using the -use option).
// The window will support the appropriate window manager protocols for
// things like geometry requests. The window should not have any
// children of its own in this application.
// This option may not be changed with the configure
// widget command.
// Note that -borderwidth, -padx and -pady are ignored when
// configured as a container since a container has no border.
//
// [Height]
//
// Specifies the desired height for the window in any of the forms
// acceptable to Tk_GetPixels. If this option is negative or
// zero then the window will not request any size at all. Note that this
// sets the total height of the frame, any -borderwidth or similar is
// not added. Normally -height should not be used if a propagating
// geometry manager, such as grid or pack, is used within the
// frame since the geometry manager will override the height of the frame.
//
// [Tile]
//
// This specifies how to draw the background image (see
// -backgroundimage) on the frame.
// If true (according to Tcl_GetBoolean), the image will be tiled
// to fill the whole frame, with the origin of the first copy of the
// image being the top left of the interior of the frame.
// If false (the default), the image will be centered within the frame.
//
// [Visual]
//
// Specifies visual information for the new window in any of the
// forms accepted by Tk_GetVisual.
// If this option is not specified, the new window will use the same
// visual as its parent.
// The -visual option may not be modified with the configure
// widget command.
//
// [Width]
//
// Specifies the desired width for the window in any of the forms
// acceptable to Tk_GetPixels. If this option is negative or
// zero then the window will not request any size at all. Note that this
// sets the total width of the frame, any -borderwidth or similar is
// not added. Normally -width should not be used if a propagating
// geometry manager, such as grid or pack, is used within the
// frame since the geometry manager will override the width of the frame.
//
// [Tcl/Tk frame]: https://www.tcl.tk/man/tcl9.0/TkCmd/frame.html
func Frame(options ...Opt) *FrameWidget {
return App.Frame(options...)
}
// Frame — Create and manipulate 'frame' simple container widgets
//
// The resulting [Window] is a child of 'w'
//
// For details please see [Frame]
func (w *Window) Frame(options ...Opt) *FrameWidget {
return &FrameWidget{w.newChild("frame", options...)}
}
// FrameWidget represents the Tcl/Tk frame widget/window
type FrameWidget struct {
*Window
}
// Label — Create and manipulate 'label' non-interactive text or image widgets
//
// # Description
//
// The label command creates a new window (given by the
// pathName argument) and makes it into a label widget.
// Additional
// options, described above, may be specified on the command line
// or in the option database
// to configure aspects of the label such as its colors, font,
// text, and initial relief. The label command returns its
// pathName argument. At the time this command is invoked,
// there must not exist a window named pathName, but
// pathName's parent must exist.
//
// A label is a widget that displays a textual string, bitmap or image.
// If text is displayed, it must all be in a single font, but it
// can occupy multiple lines on the screen (if it contains newlines
// or if wrapping occurs because of the -wraplength option) and
// one of the characters may optionally be underlined using the
// The label can be manipulated in a few simple ways, such as
// changing its relief or text, using the commands described below.
//
// Use [Window.Label] to create a Label with a particular parent.
//
// More information might be available at the [Tcl/Tk label] page.
//
// # Standard options
//
// - [Activebackground]
// - [Activeforeground]
// - [Anchor]
// - [Background]
// - [Bitmap]
// - [Borderwidth]
// - [Compound]
// - [Cursor]
// - [Disabledforeground]
// - [Foreground]
// - [Highlightbackground]
// - [Highlightcolor]
// - [Highlightthickness]
// - [Image]
// - [Justify]
// - [Padx]
// - [Pady]
// - [Relief]
// - [Takefocus]
// - [Textvariable]
// - [Txt]
// - [Underline]
// - [Wraplength]
//
// # Widget specific options
//
// [Height]
//
// Specifies a desired height for the label.
// If an image or bitmap is being displayed in the label then the value is in
// screen units (i.e. any of the forms acceptable to Tk_GetPixels);
// for text it is in lines of text.
// If this option is not specified, the label's desired height is computed
// from the size of the image or bitmap or text being displayed in it.
//
// [State]
//
// Specifies one of three states for the label: normal, active,
// or disabled. In normal state the button is displayed using the
// -foreground and -background options. In active state
// the label is displayed using the -activeforeground and
// -activebackground options. In the disabled state the
// -disabledforeground and -background options determine how
// the button is displayed.
//
// [Width]
//
// Specifies a desired width for the label.
// If an image or bitmap is being displayed in the label then the value is in
// screen units (i.e. any of the forms acceptable to Tk_GetPixels);
// for text it is in characters.
// If this option is not specified, the label's desired width is computed
// from the size of the image or bitmap or text being displayed in it.
//
// [Tcl/Tk label]: https://www.tcl.tk/man/tcl9.0/TkCmd/label.html
func Label(options ...Opt) *LabelWidget {
return App.Label(options...)
}
// Label — Create and manipulate 'label' non-interactive text or image widgets
//
// The resulting [Window] is a child of 'w'
//
// For details please see [Label]
func (w *Window) Label(options ...Opt) *LabelWidget {
return &LabelWidget{w.newChild("label", options...)}
}
// LabelWidget represents the Tcl/Tk label widget/window
type LabelWidget struct {
*Window
}
// Labelframe — Create and manipulate 'labelframe' labelled container widgets
//
// # Description
//
// The labelframe command creates a new window (given by the
// pathName argument) and makes it into a labelframe widget.
// Additional
// options, described above, may be specified on the command line
// or in the option database
// to configure aspects of the labelframe such as its background color
// and relief. The labelframe command returns the
// path name of the new window.
//
// A labelframe is a simple widget. Its primary purpose is to act as a
// spacer or container for complex window layouts. It has the features
// of a frame plus the ability to display a label.
//
// Use [Window.Labelframe] to create a Labelframe with a particular parent.
//
// More information might be available at the [Tcl/Tk labelframe] page.
//
// # Standard options
//
// - [Borderwidth]
// - [Cursor]
// - [Foreground]
// - [Highlightbackground]
// - [Highlightcolor]
// - [Highlightthickness]
// - [Padx]
// - [Pady]
// - [Relief]
// - [Takefocus]
// - [Txt]
//
// # Widget specific options
//
// [Background]
//
// This option is the same as the standard -background option
// except that its value may also be specified as an empty string.
// In this case, the widget will display no background or border, and
// no colors will be consumed from its colormap for its background
// and border.
//
// [Class]
//
// Specifies a class for the window.
// This class will be used when querying the option database for
// the window's other options, and it will also be used later for
// other purposes such as bindings.
// The -class option may not be changed with the configure
// widget command.
//
// [Colormap]
//
// Specifies a colormap to use for the window.
// The value may be either new, in which case a new colormap is
// created for the window and its children, or the name of another
// window (which must be on the same screen and have the same visual
// as pathName), in which case the new window will use the colormap
// from the specified window.
// If the -colormap option is not specified, the new window
// uses the same colormap as its parent.
// This option may not be changed with the configure
// widget command.
//
// [Height]
//
// Specifies the desired height for the window in any of the forms
// acceptable to Tk_GetPixels.
// If this option is negative or zero then the window will
// not request any size at all.
//
// [Labelanchor]
//
// Specifies where to place the label. A label is only displayed if the
// -text option is not the empty string.
// Valid values for this option are (listing them clockwise)
// nw, n, ne, en, e, es,
// se, s,sw, ws, w and wn.
// The default value is nw.
//
// [Labelwidget]
//
// Specifies a widget to use as label. This overrides any -text
// option. The widget must exist before being used as -labelwidget
// and if it is not a descendant of this window, it will be raised
// above it in the stacking order.
//
// [Visual]
//
// Specifies visual information for the new window in any of the