// 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-lang.org/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-lang.org/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-lang.org/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-lang.org/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-lang.org/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-lang.org/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 // 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. // // [Tcl/Tk labelframe]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/labelframe.html func Labelframe(options ...Opt) *LabelframeWidget { return App.Labelframe(options...) } // Labelframe — Create and manipulate 'labelframe' labelled container widgets // // The resulting [Window] is a child of 'w' // // For details please see [Labelframe] func (w *Window) Labelframe(options ...Opt) *LabelframeWidget { return &LabelframeWidget{w.newChild("labelframe", options...)} } // LabelframeWidget represents the Tcl/Tk labelframe widget/window type LabelframeWidget struct { *Window } // Listbox — Create and manipulate 'listbox' item list widgets // // # Description // // The listbox command creates a new window (given by the // pathName argument) and makes it into a listbox widget. // Additional // options, described above, may be specified on the command line // or in the option database // to configure aspects of the listbox such as its colors, font, // text, and relief. The listbox 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 listbox is a widget that displays a list of strings, one per line. // When first created, a new listbox has no elements. // Elements may be added or deleted using widget commands described // below. In addition, one or more elements may be selected as described // below. // If a listbox is exporting its selection (see -exportselection // option), then it will observe the standard X11 protocols // for handling the selection. // Listbox selections are available as type STRING; // the value of the selection will be the text of the selected elements, with // newlines separating the elements. // // It is not necessary for all the elements to be // displayed in the listbox window at once; commands described below // may be used to change the view in the window. Listboxes allow // scrolling in both directions using the standard -xscrollcommand // and -yscrollcommand options. // They also support scanning, as described below. // // Use [Window.Listbox] to create a Listbox with a particular parent. // // More information might be available at the [Tcl/Tk listbox] page. // // # Standard options // // - [Background] // - [Borderwidth] // - [Cursor] // - [Disabledforeground] // - [Exportselection] // - [Foreground] // - [Highlightbackground] // - [Highlightcolor] // - [Highlightthickness] // - [Justify] // - [Relief] // - [Selectbackground] // - [Selectborderwidth] // - [Selectforeground] // - [Setgrid] // - [Takefocus] // - [Xscrollcommand] // - [Yscrollcommand] // // # Widget specific options // // [Activestyle] // // Specifies the style in which to draw the active element. This must be // one of dotbox (show a focus ring around the active element), // none (no special indication of active element) or // underline (underline the active element). // The default is underline on Windows, and dotbox elsewhere. // // [Height] // // Specifies the desired height for the window, in lines. // If zero or less, then the desired height for the window is made just // large enough to hold all the elements in the listbox. // // [Listvariable] // // Specifies the name of a global variable. The value of the variable is a list to // be displayed inside the widget; if the variable value changes then the // widget will automatically update itself to reflect the new value. Attempts // to assign a variable with an invalid list value to -listvariable // will cause an error. Attempts to unset a variable in use as a // -listvariable will fail but will not generate an error. // // [Selectmode] // // Specifies one of several styles for manipulating the selection. // The value of the option may be arbitrary, but the default bindings // expect it to be either single, browse, multiple, // or extended; the default value is browse. // // [State] // // Specifies one of two states for the listbox: normal or disabled. // If the listbox is disabled then items may not be inserted or deleted, // items are drawn in the -disabledforeground color, and selection // cannot be modified and is not shown (though selection information is retained). // // [Width] // // Specifies the desired width for the window in characters. // If the font does not have a uniform width then the width of the character // is used in translating from character units to screen units. // If zero or less, then the desired width for the window is made just // large enough to hold all the elements in the listbox. // // [Tcl/Tk listbox]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/listbox.html func Listbox(options ...Opt) *ListboxWidget { return App.Listbox(options...) } // Listbox — Create and manipulate 'listbox' item list widgets // // The resulting [Window] is a child of 'w' // // For details please see [Listbox] func (w *Window) Listbox(options ...Opt) *ListboxWidget { return &ListboxWidget{w.newChild("listbox", options...)} } // ListboxWidget represents the Tcl/Tk listbox widget/window type ListboxWidget struct { *Window } // Menu — Create and manipulate 'menu' widgets and menubars // // Use [Window.Menu] to create a Menu with a particular parent. // // More information might be available at the [Tcl/Tk menu] page. // // # Standard options // // - [Activebackground] // - [Activeborderwidth] // - [Activeforeground] // - [Activerelief] // - [Background] // - [Borderwidth] // - [Cursor] // - [Disabledforeground] // - [Foreground] // - [Relief] // - [Takefocus] // // # Widget specific options // // [Postcommand] // // If this option is specified then it provides a Tcl command to execute // each time the menu is posted. The command is invoked by the post // widget command before posting the menu. Note that in Tk 8.0 on Macintosh // and Windows, all post-commands in a system of menus are executed before any // of those menus are posted. // This is due to the limitations in the individual platforms' menu managers. // // [Selectcolor] // // For menu entries that are check buttons or radio buttons, this option // specifies the color to display in the indicator when the check button // or radio button is selected. // // [Tearoff] // // This option must have a proper boolean value (default is false), // which specifies whether or not the menu should include a tear-off // entry at the top. If so, it will exist as entry 0 of the menu and // the other entries will number starting at 1. The default menu // bindings arrange for the menu to be torn off when the tear-off entry // is invoked. // This option is ignored under Aqua/macOS, where menus cannot // be torn off. // // [Tearoffcommand] // // If this option has a non-empty value, then it specifies a Tcl command // to invoke whenever the menu is torn off. The actual command will // consist of the value of this option, followed by a space, followed // by the name of the menu window, followed by a space, followed by // the name of the name of the torn off menu window. For example, if // the option's value is // and menu .x.y is torn off to // create a new menu .x.tearoff1, then the command // will be invoked. // This option is ignored under Aqua/macOS, where menus cannot // be torn off. // // [Title] // // The string will be used to title the window created when this menu is // torn off. If the title is NULL, then the window will have the title // of the menubutton or the text of the cascade item from which this menu // was invoked. // // [Type] // // This option can be one of menubar, tearoff, or // normal, and is set when the menu is created. While the string // returned by the configuration database will change if this option is // changed, this does not affect the menu widget's behavior. This is used // by the cloning mechanism and is not normally set outside of the Tk // library. // // [Tcl/Tk menu]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/menu.html func Menu(options ...Opt) *MenuWidget { return App.Menu(options...) } // Menu — Create and manipulate 'menu' widgets and menubars // // The resulting [Window] is a child of 'w' // // For details please see [Menu] func (w *Window) Menu(options ...Opt) *MenuWidget { return &MenuWidget{w.newChild("menu", options...)} } // MenuWidget represents the Tcl/Tk menu widget/window type MenuWidget struct { *Window } // Menubutton — Create and manipulate 'menubutton' pop-up menu indicator widgets // // Use [Window.Menubutton] to create a Menubutton with a particular parent. // // More information might be available at the [Tcl/Tk menubutton] 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 // // [Direction] // // Specifies where the menu is going to be popup up. above tries to // pop the menu above the menubutton. below tries to pop the menu // below the menubutton. left tries to pop the menu to the left of // the menubutton. right tries to pop the menu to the right of the // menu button. flush pops the menu directly over the menubutton. // In the case of above or below, the direction will be // reversed if the menu would show offscreen. // // [Height] // // Specifies a desired height for the menubutton. // If an image or bitmap is being displayed in the menubutton 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 menubutton's desired height is computed // from the size of the image or bitmap or text being displayed in it. // // [Indicatoron] // // The value must be a proper boolean value. If it is true then // a small indicator rectangle will be displayed on the right side // of the menubutton and the default menu bindings will treat this // as an option menubutton. If false then no indicator will be // displayed. // // [Mnu] // // Specifies the path name of the menu associated with this menubutton. // The menu must be a child of the menubutton. // // [State] // // Specifies one of three states for the menubutton: normal, active, // or disabled. In normal state the menubutton is displayed using the // foreground and background options. The active state is // typically used when the pointer is over the menubutton. In active state // the menubutton is displayed using the -activeforeground and // -activebackground options. Disabled state means that the menubutton // 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 menubutton. // If an image or bitmap is being displayed in the menubutton 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 menubutton's desired width is computed // from the size of the image or bitmap or text being displayed in it. // // [Tcl/Tk menubutton]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/menubutton.html func Menubutton(options ...Opt) *MenubuttonWidget { return App.Menubutton(options...) } // Menubutton — Create and manipulate 'menubutton' pop-up menu indicator widgets // // The resulting [Window] is a child of 'w' // // For details please see [Menubutton] func (w *Window) Menubutton(options ...Opt) *MenubuttonWidget { return &MenubuttonWidget{w.newChild("menubutton", options...)} } // MenubuttonWidget represents the Tcl/Tk menubutton widget/window type MenubuttonWidget struct { *Window } // Message — Create and manipulate 'message' non-interactive text widgets // // # Description // // The message command creates a new window (given by the // pathName argument) and makes it into a message widget. // Additional // options, described above, may be specified on the command line // or in the option database // to configure aspects of the message such as its colors, font, // text, and initial relief. The message 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 message is a widget that displays a textual string. A message // widget has three special features that differentiate it from a // label widget. First, it breaks up // its string into lines in order to produce a given aspect ratio // for the window. The line breaks are chosen at word boundaries // wherever possible (if not even a single word would fit on a // line, then the word will be split across lines). Newline characters // in the string will force line breaks; they can be used, for example, // to leave blank lines in the display. // // The second feature of a message widget is justification. The text // may be displayed left-justified (each line starts at the left side of // the window), centered on a line-by-line basis, or right-justified // (each line ends at the right side of the window). // // The third feature of a message widget is that it handles control // characters and non-printing characters specially. Tab characters // are replaced with enough blank space to line up on the next // 8-character boundary. Newlines cause line breaks. Other control // characters (ASCII code less than 0x20) and characters not defined // in the font are displayed as a four-character sequence \exhh where // hh is the two-digit hexadecimal number corresponding to // the character. In the unusual case where the font does not contain // all of the characters in // 0123456789abcdef\ex // then control characters and undefined characters are not displayed at all. // // Use [Window.Message] to create a Message with a particular parent. // // More information might be available at the [Tcl/Tk message] page. // // # Standard options // // - [Anchor] // - [Background] // - [Borderwidth] // - [Cursor] // - [Foreground] // - [Highlightbackground] // - [Highlightcolor] // - [Highlightthickness] // - [Padx] // - [Pady] // - [Relief] // - [Takefocus] // - [Textvariable] // - [Txt] // // # Widget specific options // // [Aspect] // // Specifies a non-negative integer value indicating desired // aspect ratio for the text. The aspect ratio is specified as // 100*width/height. 100 means the text should // be as wide as it is tall, 200 means the text should // be twice as wide as it is tall, 50 means the text should // be twice as tall as it is wide, and so on. // Used to choose line length for text if -width option // is not specified. // Defaults to 150. // // [Justify] // // Specifies how to justify lines of text. // Must be one of left, center, or right. Defaults // to left. // This option works together with the -anchor, -aspect, // -padx, -pady, and -width options to provide a variety // of arrangements of the text within the window. // The -aspect and -width options determine the amount of // screen space needed to display the text. // The -anchor, -padx, and -pady options determine where this // rectangular area is displayed within the widget's window, and the // -justify option determines how each line is displayed within that // rectangular region. // For example, suppose -anchor is e and -justify is // left, and that the message window is much larger than needed // for the text. // The text will be displayed so that the left edges of all the lines // line up and the right edge of the longest line is -padx from // the right side of the window; the entire text block will be centered // in the vertical span of the window. // // [Width] // // Specifies the length of lines in the window. // The value may have any of the forms acceptable to Tk_GetPixels. // If this option has a value greater than zero then the -aspect // option is ignored and the -width option determines the line // length. // If this option value is negative or zero, then // the -aspect option determines the line length. // // [Tcl/Tk message]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/message.html func Message(options ...Opt) *MessageWidget { return App.Message(options...) } // Message — Create and manipulate 'message' non-interactive text widgets // // The resulting [Window] is a child of 'w' // // For details please see [Message] func (w *Window) Message(options ...Opt) *MessageWidget { return &MessageWidget{w.newChild("message", options...)} } // MessageWidget represents the Tcl/Tk message widget/window type MessageWidget struct { *Window } // Panedwindow — Create and manipulate 'panedwindow' split container widgets // // # Description // // The panedwindow command creates a new window (given by the // pathName argument) and makes it into a panedwindow widget. // Additional options, described above, may be specified on the command // line or in the option database to configure aspects of the panedwindow // such as its default background color and relief. The // panedwindow command returns the path name of the new window. // // A panedwindow widget contains any number of panes, arranged // horizontally or vertically, according to the value of the // panes is separated by a moveable (via mouse movements) sash. Moving a // sash causes the widgets on either side of the sash to be resized. // // Use [Window.Panedwindow] to create a Panedwindow with a particular parent. // // More information might be available at the [Tcl/Tk panedwindow] page. // // # Standard options // // - [Background] // - [Borderwidth] // - [Cursor] // - [Orient] // - [Relief] // // # Widget specific options // // [Handlepad] // // When sash handles are drawn, specifies the distance from the top or // left end of the sash (depending on the orientation of the widget) at // which to draw the handle. May be any value accepted by Tk_GetPixels. // // [Handlesize] // // Specifies the side length of a sash handle. Handles are always // drawn as squares. May be any value accepted by Tk_GetPixels. // // [Height] // // Specifies a desired height for the overall panedwindow widget. May be any // value accepted by Tk_GetPixels. If an empty string, the widget will be // made high enough to allow all contained widgets to have their natural height. // // [Opaqueresize] // // Specifies whether panes should be resized as a sash is moved (true), // or if resizing should be deferred until the sash is placed (false). // In the latter case, a // version of the sash is displayed during the resizing to show where the // panes will be resized to when releasing the mouse button. This // version of the sash is the proxy. It's rendering can be configured // using the -proxybackground, -proxyborderwidth and // -proxyrelief options. // // [Proxybackground] // // Background color to use when drawing the proxy. If an empty string, the // value of the -background option will be used. // // [Proxyborderwidth] // // Specifies the borderwidth of the proxy. May be any value accepted by // Tk_GetPixels. // // [Proxyrelief] // // Relief to use when drawing the proxy. May be any of the standard Tk // relief values. If an empty string, the value of the -sashrelief // option will be used. // // [Sashcursor] // // Mouse cursor to use when over a sash. If null, // sb_h_double_arrow will be used for horizontal panedwindows, and // sb_v_double_arrow will be used for vertical panedwindows. // // [Sashpad] // // Specifies the amount of padding to leave of each side of a sash. May // be any value accepted by Tk_GetPixels. // // [Sashrelief] // // Relief to use when drawing a sash. May be any of the standard Tk // relief values. // // [Sashwidth] // // Specifies the width of each sash. May be any value accepted by // Tk_GetPixels. // // [Showhandle] // // Specifies whether sash handles should be shown. May be any valid Tcl // boolean value. // // [Width] // // Specifies a desired width for the overall panedwindow widget. May be any // value accepted by Tk_GetPixels. If an empty string, the widget will be // made wide enough to allow all contained widgets to have their natural width. // // [Tcl/Tk panedwindow]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/panedwindow.html func Panedwindow(options ...Opt) *PanedwindowWidget { return App.Panedwindow(options...) } // Panedwindow — Create and manipulate 'panedwindow' split container widgets // // The resulting [Window] is a child of 'w' // // For details please see [Panedwindow] func (w *Window) Panedwindow(options ...Opt) *PanedwindowWidget { return &PanedwindowWidget{w.newChild("panedwindow", options...)} } // PanedwindowWidget represents the Tcl/Tk panedwindow widget/window type PanedwindowWidget struct { *Window } // Radiobutton — Create and manipulate 'radiobutton' pick-one widgets // // # Description // // The radiobutton command creates a new window (given by the // pathName argument) and makes it into a radiobutton widget. // Additional // options, described above, may be specified on the command line // or in the option database // to configure aspects of the radiobutton such as its colors, font, // text, and initial relief. The radiobutton 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 radiobutton is a widget that displays a textual string, bitmap or image // and a diamond or circle 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 // all of the behavior of a simple button: 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 // check button. // // In addition, radiobuttons can be selected. // If a radiobutton is selected, the indicator is normally // drawn with a selected appearance, and // a Tcl variable associated with the radiobutton is set to a particular // value (normally 1). // Under Unix, the indicator is drawn with a sunken relief and a special // color. Under Windows, the indicator is drawn with a round mark inside. // If the radiobutton 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 round mark inside. // Typically, several radiobuttons share a single variable and the // value of the variable indicates which radiobutton is to be selected. // When a radiobutton is selected it sets the value of the variable to // indicate that fact; each radiobutton also monitors the value of // the variable and automatically selects and deselects itself when the // variable's value changes. // If the variable's value matches the -tristatevalue, then the radiobutton // is drawn using the tri-state mode. This mode is used to indicate mixed or // multiple values. (This is used when the radiobutton represents the state // of multiple items.) // By default the variable selectedButton // is used; its contents give the name of the button that is // selected, or the empty string if no button associated with that // variable is selected. // The name of the variable for a radiobutton, // plus the variable to be stored into 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 radiobutton is configured to select itself on button clicks. // // Use [Window.Radiobutton] to create a Radiobutton with a particular parent. // // More information might be available at the [Tcl/Tk radiobutton] 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 Align-Left, Align-Right, and Center radiobuttons on the toolbar of a // word-processor, for example. // // [Overrelief] // // Specifies an alternative relief for the radiobutton, 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 radiobutton. // 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 radiobutton is selected. // This option is ignored unless the -image option has been // specified. // // [State] // // Specifies one of three states for the radiobutton: normal, active, // or disabled. In normal state the radiobutton is displayed using the // -foreground and -background options. The active state is // typically used when the pointer is over the radiobutton. In active state // the radiobutton is displayed using the -activeforeground and // -activebackground options. Disabled state means that the radiobutton // 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 radiobutton is displayed. // // [Tristateimage] // // Specifies an image to display (in place of the -image option) // when the radiobutton is selected. // This option is ignored unless the -image option has been // specified. // // [Tristatevalue] // // Specifies the value that causes the radiobutton to display the multi-value // selection, also known as the tri-state mode. Defaults to // // [Value] // // Specifies value to store in the button's associated variable whenever // this button is selected. // // [Variable] // // Specifies the name of a global variable to set whenever this button is // selected. Changes in this variable also cause the button to select // or deselect itself. // Defaults to the value selectedButton. // // [Width] // // Specifies a desired width for the button. // If an image or bitmap is being displayed in the button, 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 radiobutton]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/radiobutton.html func Radiobutton(options ...Opt) *RadiobuttonWidget { return App.Radiobutton(options...) } // Radiobutton — Create and manipulate 'radiobutton' pick-one widgets // // The resulting [Window] is a child of 'w' // // For details please see [Radiobutton] func (w *Window) Radiobutton(options ...Opt) *RadiobuttonWidget { return &RadiobuttonWidget{w.newChild("radiobutton", options...)} } // RadiobuttonWidget represents the Tcl/Tk radiobutton widget/window type RadiobuttonWidget struct { *Window } // Scale — Create and manipulate 'scale' value-controlled slider widgets // // # Description // // The scale command creates a new window (given by the // pathName argument) and makes it into a scale widget. // Additional // options, described above, may be specified on the command line // or in the option database // to configure aspects of the scale such as its colors, orientation, // and relief. The scale 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 scale is a widget that displays a rectangular trough and a // small slider. The trough corresponds to a range // of real values (determined by the -from, -to, and // and the position of the slider selects a particular real value. // The slider's position (and hence the scale's value) may be adjusted // with the mouse or keyboard as described in the BINDINGS // section below. Whenever the scale's value is changed, a Tcl // command is invoked (using the -command option) to notify // other interested widgets of the change. // In addition, the value // of the scale can be linked to a Tcl variable (using the -variable // option), so that changes in either are reflected in the other. // // Three annotations may be displayed in a scale widget: a label // appearing at the top right of the widget (top left for horizontal // scales), a number displayed just to the left of the slider // (just above the slider for horizontal scales), and a collection // of numerical tick marks just to the left of the current value // (just below the trough for horizontal scales). Each of these three // annotations may be enabled or disabled using the // configuration options. // // Use [Window.Scale] to create a Scale with a particular parent. // // More information might be available at the [Tcl/Tk scale] page. // // # Standard options // // - [Activebackground] // - [Background] // - [Borderwidth] // - [Cursor] // - [Foreground] // - [Highlightbackground] // - [Highlightcolor] // - [Highlightthickness] // - [Orient] // - [Relief] // - [Repeatdelay] // - [Repeatinterval] // - [Takefocus] // - [Troughcolor] // // # Widget specific options // // [Bigincrement] // // Some interactions with the scale cause its value to change by // increments; this option specifies the size of the // large increments. If specified as 0, the large increments default // to 1/10 the range of the scale. // // [Command] // // Specifies the prefix of a Tcl command to invoke whenever the scale's // value is changed via a widget command. // The actual command consists // of this option followed by a space and a real number indicating the // new value of the scale. // // [Digits] // // An integer specifying how many significant digits should be retained // when converting the value of the scale to a string. // If the number is negative or zero, then the scale picks // the smallest value that guarantees that every possible slider // position prints as a different string. // // [From] // // A real value corresponding to the left or top end of the scale. // // [Lbl] // // A string to display as a label for the scale. For // vertical scales the label is displayed just to the right of the // top end of the scale. For horizontal scales the label is displayed // just above the left end of the scale. If the option is specified // as an empty string, no label is displayed. // // [Length] // // Specifies the desired long dimension of the scale in screen units // (i.e. any of the forms acceptable to Tk_GetPixels). // For vertical scales this is the scale's height; for horizontal scales // it is the scale's width. // // [Resolution] // // A real value specifying the resolution for the scale. // If this value is greater than zero then the scale's value will always be // rounded to an even multiple of this value, as will // the endpoints of the scale. If the value is negative then no // rounding occurs. Defaults to 1 (i.e., the value will be integral). // // [Showvalue] // // Specifies a boolean value indicating whether or not the current // value of the scale is to be displayed. // // [Sliderlength] // // Specifies the size of the slider, measured in screen units along the slider's // long dimension. The value may be specified in any of the forms acceptable // to Tk_GetPixels. // // [Sliderrelief] // // Specifies the relief to use when drawing the slider, such as raised // or sunken. // // [State] // // Specifies one of three states for the scale: normal, // active, or disabled. // If the scale is disabled then the value may not be changed and the scale // will not activate. // If the scale is active, the slider is displayed using the color // specified by the -activebackground option. // // [Tickinterval] // // Must be a real value. // Determines the spacing between numerical // tick marks displayed below or to the left of the slider. The values will all // be displayed with the same number of decimal places, which will be enough to // ensure they are all accurate to within 20% of a tick interval. // If 0, no tick marks will be displayed. // // [To] // // Specifies a real value corresponding // to the right or bottom end of the scale. // This value may be either less than or greater than the -from option. // // [Variable] // // Specifies the name of a global variable to link to the scale. Whenever the // value of the variable changes, the scale will update to reflect this // value. // Whenever the scale is manipulated interactively, the variable // will be modified to reflect the scale's new value. // // [Width] // // Specifies the desired narrow dimension of the scale in screen units // (i.e. any of the forms acceptable to Tk_GetPixels). // For vertical scales this is the scale's width; for horizontal scales // this is the scale's height. // // [Tcl/Tk scale]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/scale.html func Scale(options ...Opt) *ScaleWidget { return App.Scale(options...) } // Scale — Create and manipulate 'scale' value-controlled slider widgets // // The resulting [Window] is a child of 'w' // // For details please see [Scale] func (w *Window) Scale(options ...Opt) *ScaleWidget { return &ScaleWidget{w.newChild("scale", options...)} } // ScaleWidget represents the Tcl/Tk scale widget/window type ScaleWidget struct { *Window } // Scrollbar — Create and manipulate 'scrollbar' scrolling control and indicator widgets // // # Description // // The scrollbar command creates a new window (given by the // pathName argument) and makes it into a scrollbar widget. // Additional options, described above, may be specified on the command // line or in the option database to configure aspects of the scrollbar // such as its colors, orientation, and relief. // The scrollbar 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 scrollbar is a widget that displays two arrows, one at each end of // the scrollbar, and a slider in the middle portion of the // scrollbar. // It provides information about what is visible in an associated window // that displays a document of some sort (such as a file being edited or // a drawing). // The position and size of the slider indicate which portion of the // document is visible in the associated window. For example, if the // slider in a vertical scrollbar covers the top third of the area // between the two arrows, it means that the associated window displays // the top third of its document. // // Scrollbars can be used to adjust the view in the associated window // by clicking or dragging with the mouse. See the BINDINGS section // below for details. // // Use [Window.Scrollbar] to create a Scrollbar with a particular parent. // // More information might be available at the [Tcl/Tk scrollbar] page. // // # Standard options // // - [Activebackground] // - [Background] // - [Borderwidth] // - [Cursor] // - [Highlightbackground] // - [Highlightcolor] // - [Highlightthickness] // - [Jump] // - [Orient] // - [Relief] // - [Repeatdelay] // - [Repeatinterval] // - [Takefocus] // - [Troughcolor] // // # Widget specific options // // [Activerelief] // // Specifies the relief to use when displaying the element that is // active, if any. // Elements other than the active element are always displayed with // a raised relief. // // [Command] // // Specifies the prefix of a Tcl command to invoke to change the view // in the widget associated with the scrollbar. When a user requests // a view change by manipulating the scrollbar, a Tcl command is // invoked. The actual command consists of this option followed by // additional information as described later. This option almost always has // a value such as .t xview or .t yview, consisting of the // name of a widget and either xview (if the scrollbar is for // horizontal scrolling) or yview (for vertical scrolling). // All scrollable widgets have xview and yview commands // that take exactly the additional arguments appended by the scrollbar // as described in SCROLLING COMMANDS below. // // [Elementborderwidth] // // Specifies the width of borders drawn around the internal elements // of the scrollbar (the two arrows and the slider). The value may // have any of the forms acceptable to Tk_GetPixels. // If this value is the empty string (the default), the value of // the -borderwidth option is used in its place. // // [Width] // // Specifies the desired narrow dimension of the scrollbar window, // not including 3-D border, if any. For vertical // scrollbars this will be the width and for horizontal scrollbars // this will be the height. // The value may have any of the forms acceptable to Tk_GetPixels. // // [Tcl/Tk scrollbar]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/scrollbar.html func Scrollbar(options ...Opt) *ScrollbarWidget { return App.Scrollbar(options...) } // Scrollbar — Create and manipulate 'scrollbar' scrolling control and indicator widgets // // The resulting [Window] is a child of 'w' // // For details please see [Scrollbar] func (w *Window) Scrollbar(options ...Opt) *ScrollbarWidget { return &ScrollbarWidget{w.newChild("scrollbar", options...)} } // ScrollbarWidget represents the Tcl/Tk scrollbar widget/window type ScrollbarWidget struct { *Window } // Spinbox — Create and manipulate 'spinbox' value spinner widgets // // # Description // // The spinbox command creates a new window (given by the // pathName argument) and makes it into a spinbox widget. // Additional options, described above, may be specified on the // command line or in the option database // to configure aspects of the spinbox such as its colors, font, // and relief. The spinbox 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 spinbox is an extended entry widget that allows he user // to move, or spin, through a fixed set of ascending or descending values // such as times or dates in addition to editing the value as in an // entry. When first created, a spinbox's string is empty. // A portion of the spinbox may be selected as described below. // If a spinbox is exporting its selection (see the -exportselection // option), then it will observe the standard protocols for handling the // selection; spinbox selections are available as type STRING. // Spinboxes also observe the standard Tk rules for dealing with the // input focus. When a spinbox has the input focus it displays an // insertion cursor to indicate where new characters will be // inserted. // // Spinboxes 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. Spinboxes 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.Spinbox] to create a Spinbox with a particular parent. // // More information might be available at the [Tcl/Tk spinbox] page. // // # Standard options // // - [Activebackground] // - [Background] // - [Borderwidth] // - [Cursor] // - [Exportselection] // - [Foreground] // - [Highlightbackground] // - [Highlightcolor] // - [Highlightthickness] // - [Insertbackground] // - [Insertborderwidth] // - [Insertofftime] // - [Insertontime] // - [Insertwidth] // - [Justify] // - [Placeholder] // - [Placeholderforeground] // - [Relief] // - [Repeatdelay] // - [Repeatinterval] // - [Selectbackground] // - [Selectborderwidth] // - [Selectforeground] // - [Takefocus] // - [Textvariable] // - [Xscrollcommand] // // # Widget specific options // // [Buttonbackground] // // The background color to be used for the spin buttons. // // [Buttoncursor] // // The cursor to be used when over the spin buttons. If this is empty // (the default), a default cursor will be used. // // [Buttondownrelief] // // The relief to be used for the upper spin button. // // [Buttonuprelief] // // The relief to be used for the lower spin button. // // [Command] // // Specifies a Tcl command to invoke whenever a spinbutton is invoked. // The command recognizes several percent substitutions: %W for // the widget path, %s for the current value of the widget, and // %d for the direction of the button pressed (up or down). // // [Disabledbackground] // // Specifies the background color to use when the spinbox is disabled. If // this option is the empty string, the normal background color is used. // // [Disabledforeground] // // Specifies the foreground color to use when the spinbox is disabled. If // this option is the empty string, the normal foreground color is used. // // [Format] // // Specifies an alternate format to use when setting the string value // when using the -from and -to range. // This must be a format specifier of the form %.f, // as it will format a floating-point number. // // [From] // // A floating-point value corresponding to the lowest value for a spinbox, to // be used in conjunction with -to and -increment. When all // are specified correctly, the spinbox will use these values to control its // contents. If this value is greater than the -to option, then // -from and -to values are automatically swapped. // If -values is specified, it supersedes this option. // // [Invalidcommand] // // Specifies a script to eval when -validatecommand returns 0. Setting // it to an empty string disables this feature (the default). The best use of // this option is to set it to bell. See VALIDATION below for // more information. // // [Increment] // // A floating-point value specifying the increment. When used with // -from and -to, the value in the widget will be adjusted by // -increment when a spin button is pressed (up adds the value, // down subtracts the value). // // [Readonlybackground] // // Specifies the background color to use when the spinbox is readonly. If // this option is the empty string, the normal background color is used. // // [State] // // Specifies one of three states for the spinbox: normal, // disabled, or readonly. If the spinbox 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 spinbox is // disabled, the value may not be changed, no insertion cursor will be // displayed, the contents will not be selectable, and the spinbox may // be displayed in a different color, depending on the values of the // -disabledforeground and -disabledbackground options. // // [To] // // A floating-point value corresponding to the highest value for the spinbox, // to be used in conjunction with -from and -increment. When // all are specified correctly, the spinbox will use these values to control // its contents. If this value is less than the -from option, then // -from and -to values are automatically swapped. // If -values is specified, it supersedes this option. // // [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 evaluate when you want to validate the input in the // widget. Setting it to an empty string disables this feature (the default). // Validation occurs according to the value of -validate. // This command must return a valid Tcl boolean value. If it returns 0 (or // the valid Tcl boolean equivalent) then the value of the widget will not // change and the -invalidcommand will be evaluated if it is set. If it // returns 1, then value will be changed. // See VALIDATION below for more information. // // [Values] // // Must be a proper list value. If specified, the spinbox will use these // values as to control its contents, starting with the first value. This // option has precedence over the -from and -to range. // // [Width] // // Specifies an integer value indicating the desired width of the spinbox 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. // // [Wrap] // // Must be a proper boolean value. If on, the spinbox will wrap around the // values of data in the widget. // // [Tcl/Tk spinbox]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/spinbox.html func Spinbox(options ...Opt) *SpinboxWidget { return App.Spinbox(options...) } // Spinbox — Create and manipulate 'spinbox' value spinner widgets // // The resulting [Window] is a child of 'w' // // For details please see [Spinbox] func (w *Window) Spinbox(options ...Opt) *SpinboxWidget { return &SpinboxWidget{w.newChild("spinbox", options...)} } // SpinboxWidget represents the Tcl/Tk spinbox widget/window type SpinboxWidget struct { *Window } // Text — Create and manipulate 'text' hypertext editing widgets // // # Description // // The text command creates a new window (given by the pathName // argument) and makes it into a text widget. Additional options, described // above, may be specified on the command line or in the option database to // configure aspects of the text such as its default background color and relief. // The text command returns the path name of the new window. // // A text widget displays one or more lines of text and allows that text to be // edited. Text widgets support four different kinds of annotations on the text, // called tags, marks, embedded windows or embedded images. Tags allow different // portions of the text to be displayed with different fonts and colors. In // addition, Tcl commands can be associated with tags so that scripts are invoked // when particular actions such as keystrokes and mouse button presses occur in // particular ranges of the text. See TAGS below for more details. // // The second form of annotation consists of floating markers in the text called // marks . // Marks are used to keep track of various interesting positions in the text as // it is edited. See MARKS below for more details. // // The third form of annotation allows arbitrary windows to be embedded in a text // widget. See EMBEDDED WINDOWS below for more details. // // The fourth form of annotation allows Tk images to be embedded in a text // widget. See EMBEDDED IMAGES below for more details. // // The text widget also has a built-in undo/redo mechanism. See // THE UNDO MECHANISM below for more details. // // The text widget allows for the creation of peer widgets. These are other text // widgets which share the same underlying data (text, marks, tags, images, etc). // See PEER WIDGETS below for more details. // // Use [Window.Text] to create a Text with a particular parent. // // More information might be available at the [Tcl/Tk text] page. // // # Standard options // // - [Background] // - [Borderwidth] // - [Cursor] // - [Exportselection] // - [Foreground] // - [Highlightbackground] // - [Highlightcolor] // - [Highlightthickness] // - [Insertbackground] // - [Insertborderwidth] // - [Insertofftime] // - [Insertontime] // - [Insertwidth] // - [Padx] // - [Pady] // - [Relief] // - [Selectbackground] // - [Selectborderwidth] // - [Selectforeground] // - [Setgrid] // - [Takefocus] // - [Xscrollcommand] // - [Yscrollcommand] // // # Widget specific options // // [Autoseparators] // // Specifies a boolean that says whether separators are automatically inserted in // the undo stack. Only meaningful when the -undo option is true. // // [Blockcursor] // // Specifies a boolean that says whether the blinking insertion cursor should be // drawn as a character-sized rectangular block. If false (the default) a thin // vertical line is used for the insertion cursor. // // [Endline] // // Specifies an integer line index representing the line of the underlying // textual data store that should be just after the last line contained in // the widget. This allows a text widget to reflect only a portion of a // larger piece of text. Instead of an integer, the empty string can be // provided to this configuration option, which will configure the widget // to end at the very last line in the textual data store. // // [Height] // // Specifies the desired height for the window, in units of characters in the // font given by the -font option. Must be at least one. // // [Inactiveselectbackground] // // Specifies the colour to use for the selection (the sel tag) when the // window does not have the input focus. If empty, {}, then no selection is // shown when the window does not have the focus. // // [Insertunfocussed] // // Specifies how to display the insertion cursor when the widget does not have // the focus. Must be none (the default) which means to not display the // cursor, hollow which means to display a hollow box, or solid which // means to display a solid box. Note that hollow and solid will // appear very similar when the -blockcursor option is false. // // [Maxundo] // // Specifies the maximum number of compound undo actions on the undo stack. A // zero or a negative value imply an unlimited undo stack. // // [Spacing1] // // Requests additional space above each text line in the widget, using any of the // standard forms for screen distances. If a line wraps, this option only applies // to the first line on the display. This option may be overridden with // -spacing1 options in tags. // // [Spacing2] // // For lines that wrap (so that they cover more than one line on the display) // this option specifies additional space to provide between the display lines // that represent a single line of text. The value may have any of the standard // forms for screen distances. This option may be overridden with // -spacing2 options in tags. // // [Spacing3] // // Requests additional space below each text line in the widget, using any of the // standard forms for screen distances. If a line wraps, this option only applies // to the last line on the display. This option may be overridden with // -spacing3 options in tags. // // [Startline] // // Specifies an integer line index representing the first line of the underlying // textual data store that should be contained in the widget. This allows a text // widget to reflect only a portion of a larger piece of text. Instead of an // integer, the empty string can be provided to this configuration option, which // will configure the widget to start at the very first line in the textual data // store. // // [State] // // Specifies one of two states for the text: normal or disabled. If // the text is disabled then characters may not be inserted or deleted and no // insertion cursor will be displayed, even if the input focus is in the widget. // // [Tabs] // // Specifies a set of tab stops for the window. The option's value consists of a // list of screen distances giving the positions of the tab stops, each of which // is a distance relative to the left edge of the widget (excluding borders, // padding, etc). Each position may optionally be followed in the next list // element by one of the keywords left, right, center, or // numeric, which specifies how to justify text relative to the tab stop. // Left is the default; it causes the text following the tab character to // be positioned with its left edge at the tab position. Right means that // the right edge of the text following the tab character is positioned at the // tab position, and center means that the text is centered at the tab // position. Numeric means that the decimal point in the text is positioned // at the tab position; if there is no decimal point then the least significant // digit of the number is positioned just to the left of the tab position; if // there is no number in the text then the text is right-justified at the tab // position. For example, // creates three tab stops at two-centimeter intervals; the first two use left // justification and the third uses center justification. // // [Tabstyle] // // Specifies how to interpret the relationship between tab stops on a line and // tabs in the text of that line. The value must be tabular (the default) // or wordprocessor. Note that tabs are interpreted as they are encountered // in the text. If the tab style is tabular then the n'th tab // character in the line's text will be associated with the n'th tab stop // defined for that line. If the tab character's x coordinate falls to the right // of the n'th tab stop, then a gap of a single space will be inserted as a // fallback. If the tab style is wordprocessor then any tab character being // laid out will use (and be defined by) the first tab stop to the right of the // preceding characters already laid out on that line. The value of the // -tabstyle option may be overridden by -tabstyle options in tags. // // [Undo] // // Specifies a boolean that says whether the undo mechanism is active or not. // // [Width] // // Specifies the desired width for the window in units of characters in the font // given by the -font option. If the font does not have a uniform width // then the width of the character // is used in translating from character units to screen units. // // [Wrap] // // Specifies how to handle lines in the text that are too long to be displayed in // a single line of the text's window. The value must be none or char // or word. A wrap mode of none means that each line of text appears // as exactly one line on the screen; extra characters that do not fit on the // screen are not displayed. In the other modes each line of text will be broken // up into several screen lines if necessary to keep all the characters visible. // In char mode a screen line break may occur after any character; in // word mode a line break will only be made at word boundaries. // // [Tcl/Tk text]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/text.html func Text(options ...Opt) *TextWidget { return App.Text(options...) } // Text — Create and manipulate 'text' hypertext editing widgets // // The resulting [Window] is a child of 'w' // // For details please see [Text] func (w *Window) Text(options ...Opt) *TextWidget { return &TextWidget{w.newChild("text", options...)} } // TextWidget represents the Tcl/Tk text widget/window type TextWidget struct { *Window } // Toplevel — Create and manipulate 'toplevel' main and popup window widgets // // # Description // // The toplevel command creates a new toplevel widget (given // by the pathName argument). Additional // options, described above, may be specified on the command line // or in the option database // to configure aspects of the toplevel such as its background color // and relief. The toplevel command returns the // path name of the new window. // // A toplevel is similar to a frame except that it is created as a // top-level window: its X parent is the root window of a screen // rather than the logical parent from its Tk path name. The primary // purpose of a toplevel is to serve as a container for dialog boxes // and other collections of widgets. The only visible features // of a toplevel are its background and an optional 3-D border // to make the toplevel appear raised or sunken. // // Use [Window.Toplevel] to create a Toplevel with a particular parent. // // More information might be available at the [Tcl/Tk toplevel] 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 toplevel's background within // the border of the toplevel (i.e., the image will be clipped by the // toplevel's highlight ring and border, if either are present) on top of // the background; // subwidgets of the toplevel 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. Some window managers display the // class name for windows in their dock while some others display the // window title. // 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 default colormap of its screen. // 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. // // [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. // // [Mnu] // // Specifies a menu widget to be used as a menubar. On the Macintosh, the // menubar will be displayed across the top of the main monitor. On // Microsoft Windows and all UNIX platforms, the menu will appear across // the toplevel window as part of the window dressing maintained by the // window manager. // // [Screen] // // Specifies the screen on which to place the new window. // Any valid screen name may be used, even one associated with a // different display. // Defaults to the same screen as its parent. // This option is special in that it may not be specified via the option // database, and it may not be modified with the configure // widget command. // // [Tile] // // This specifies how to draw the background image (see // -backgroundimage) on the toplevel. // If true (according to Tcl_GetBoolean), the image will be tiled // to fill the whole toplevel, with the origin of the first copy of the // image being the top left of the interior of the toplevel. // If false (the default), the image will be centered within the toplevel. // // [Use] // // This option is used for embedding. If the value is not an empty string, // it must be the window identifier of a container window, specified as // a hexadecimal string like the ones returned by the winfo id // command. The toplevel widget will be created as a child of the given // container instead of the root window for the screen. If the container // window is in a Tk application, it must be a frame or toplevel widget for // which the -container option was specified. // This option may not be changed with the configure // widget command. // // [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 default // visual for its screen. // 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. // // [Tcl/Tk toplevel]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/toplevel.html func Toplevel(options ...Opt) *ToplevelWidget { return App.Toplevel(options...) } // Toplevel — Create and manipulate 'toplevel' main and popup window widgets // // The resulting [Window] is a child of 'w' // // For details please see [Toplevel] func (w *Window) Toplevel(options ...Opt) *ToplevelWidget { return &ToplevelWidget{w.newChild("toplevel", options...)} } // ToplevelWidget represents the Tcl/Tk toplevel widget/window type ToplevelWidget struct { *Window } // TButton — Widget that issues a command when pressed // // # Description // // A ttk::button widget displays a textual label and/or image, // and evaluates a command when pressed. // // Use [Window.TButton] to create a TButton with a particular parent. // // More information might be available at the [Tcl/Tk ttk_button] page. // // # Standard options // // - [Class] // - [Compound] // - [Cursor] // - [Image] // - [Justify] // - [State] // - [Style] // - [Takefocus] // - [Textvariable] // - [Txt] // - [Underline] // - [Width] // // # Widget specific options // // [Command] // // A script to evaluate when the widget is invoked. // // [Default] // // May be set to one of normal, active, or disabled. // In a dialog box, one button may be designated the // button (meaning, roughly, // active indicates that this is currently the default button; // normal means that it may become the default button, and // disabled means that it is not defaultable. // The default is normal. // // # Standard styles // // Ttk::button widgets support the Toolbutton style in all standard // themes, which is useful for creating widgets for toolbars. // // In the Aqua theme there are several other styles which can be used to // produce replicas of many of the different button types that are // discussed in Apple's Human Interface Guidelines. These include // DisclosureButton, DisclosureTriangle, HelpButton, // ImageButton, InlineButton, GradientButton, // RoundedRectButton, and RecessedButton. // // # Styling options // // The class name for a ttk::button is TButton. // // Dynamic states: active, disabled, pressed, readonly. // // TButton styling options configurable with ttk::style // are: // - [Anchor] anchor // - [Background] color // - [Bordercolor] color // - [Compound] compound // - [Darkcolor] color // - [Foreground] color // - [Font] font // - [Highlightcolor] color // - [Highlightthickness] amount // - [Lightcolor] color // - [Padding] padding // - [Relief] relief // - [Shiftrelief] amount // - [Width] amount // // Some options are only available for specific themes. // // See the ttk::style manual page for information on how to configure // ttk styles. // // [Tcl/Tk ttk_button]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_button.html func TButton(options ...Opt) *TButtonWidget { return App.TButton(options...) } // TButton — Widget that issues a command when pressed // // The resulting [Window] is a child of 'w' // // For details please see [TButton] func (w *Window) TButton(options ...Opt) *TButtonWidget { return &TButtonWidget{w.newChild("ttk::button", options...)} } // TButtonWidget represents the Tcl/Tk ttk_button widget/window type TButtonWidget struct { *Window } // TCheckbutton — On/off widget // // # Description // // A ttk::checkbutton widget is used to show or change a setting. // It has two states, selected and deselected. // The state of the checkbutton may be linked to a Tcl variable. // // Use [Window.TCheckbutton] to create a TCheckbutton with a particular parent. // // More information might be available at the [Tcl/Tk ttk_checkbutton] page. // // # Standard options // // - [Class] // - [Compound] // - [Cursor] // - [Image] // - [State] // - [Style] // - [Takefocus] // - [Textvariable] // - [Txt] // - [Underline] // - [Width] // // # Widget specific options // // [Command] // // A Tcl script to execute whenever the widget is invoked. // // [Offvalue] // // The value to store in the associated -variable // when the widget is deselected. Defaults to 0. // // [Onvalue] // // The value to store in the associated -variable // when the widget is selected. Defaults to 1. // // [Variable] // // The name of a global variable whose value is linked to the widget. // Defaults to the widget pathname if not specified. // // # Standard styles // // Ttk::checkbutton widgets support the Toolbutton style in all // standard themes, which is useful for creating widgets for toolbars. // // # Styling options // // The class name for a ttk::checkbutton is TCheckbutton. // // Dynamic states: active, alternate, disabled, // pressed, selected, readonly. // // TCheckbutton styling options configurable with ttk::style // are: // - [Background] color // - [Compound] compound // - [Foreground] color // - [Indicatorbackground] color // - [Indicatorcolor] color // - [Indicatormargin] padding // - [Indicatorrelief] relief // - [Padding] padding // // Some options are only available for specific themes. // // See the ttk::style manual page for information on how to configure // ttk styles. // // [Tcl/Tk ttk_checkbutton]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_checkbutton.html func TCheckbutton(options ...Opt) *TCheckbuttonWidget { return App.TCheckbutton(options...) } // TCheckbutton — On/off widget // // The resulting [Window] is a child of 'w' // // For details please see [TCheckbutton] func (w *Window) TCheckbutton(options ...Opt) *TCheckbuttonWidget { return &TCheckbuttonWidget{w.newChild("ttk::checkbutton", options...)} } // TCheckbuttonWidget represents the Tcl/Tk ttk_checkbutton widget/window type TCheckbuttonWidget struct { *Window } // TCombobox — Text field with popdown selection list // // # Description // // A ttk::combobox combines a text field with a pop-down list of values; // the user may select the value of the text field from among the // values in the list. // // Use [Window.TCombobox] to create a TCombobox with a particular parent. // // More information might be available at the [Tcl/Tk ttk_combobox] page. // // # Standard options // // - [Class] // - [Cursor] // - [Placeholder] // - [Placeholderforeground] // - [Style] // - [Takefocus] // // # Widget specific options // // [Exportselection] // // Boolean value. // If set, the widget selection is linked to the X selection. // // [Justify] // // Specifies how the text is aligned within the widget. // Must be one of left, center, or right. // // [Height] // // Specifies the height of the pop-down listbox, in rows. // // [Postcommand] // // A Tcl script to evaluate immediately before displaying the listbox. // The -postcommand script may specify the -values to display. // // [State] // // One of normal, readonly, or disabled. // In the readonly state, // the value may not be edited directly, and // the user can only select one of the -values from the // dropdown list. // In the normal state, // the text field is directly editable. // In the disabled state, no interaction is possible. // // [Textvariable] // // Specifies the name of a global variable whose value is linked // to the widget value. // Whenever the variable changes value the widget value is updated, // and vice versa. // // [Values] // // Specifies the list of values to display in the drop-down listbox. // // [Width] // // Specifies an integer value indicating the desired width of the entry window, // in average-size characters of the widget's font. // // # Styling options // // The class name for a ttk::combobox is TCombobox. // The ttk::combobox uses the entry and // listbox widgets internally. // The listbox frame has a class name of ComboboxPopdownFrame. // // Dynamic states: disabled, focus, pressed, readonly. // // TCombobox styling options configurable with ttk::style // are: // - [Arrowcolor] color // - [Arrowsize] amount // - [Background] color // - [Bordercolor] color // - [Darkcolor] color // - [Focusfill] color // - [Foreground] color // - [Fieldbackground] color // - [Insertcolor] color // - [Insertwidth] amount // - [Lightcolor] color // - [Padding] padding // - [Placeholderforeground] color // - [Postoffset] padding // - [Selectbackground] color // - [Selectforeground] color // // The ttk::combobox popdown listbox cannot be configured using // ttk::style nor via the widget configure command. The listbox // can be configured using the option database. // // option add *TCombobox*Listbox.background color // option add *TCombobox*Listbox.font font // option add *TCombobox*Listbox.foreground color // option add *TCombobox*Listbox.selectBackground color // option add *TCombobox*Listbox.selectForeground color // // To configure a specific listbox (subject to future change): // // ComboboxPopdownFrame // styling options configurable with ttk::style // are: // - [Borderwidth] amount // - [Relief] relief // // Some options are only available for specific themes. // // See the ttk::style manual page for information on how to configure // ttk styles. // // [Tcl/Tk ttk_combobox]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_combobox.html func TCombobox(options ...Opt) *TComboboxWidget { return App.TCombobox(options...) } // TCombobox — Text field with popdown selection list // // The resulting [Window] is a child of 'w' // // For details please see [TCombobox] func (w *Window) TCombobox(options ...Opt) *TComboboxWidget { return &TComboboxWidget{w.newChild("ttk::combobox", options...)} } // TComboboxWidget represents the Tcl/Tk ttk_combobox widget/window type TComboboxWidget struct { *Window } // TEntry — Editable text field widget // // # Description // // An ttk::entry widget displays a one-line text string and // allows that string to be edited by the user. // The value of the string may be linked to a Tcl variable // with the -textvariable option. // Entry widgets support horizontal scrolling with the // standard -xscrollcommand option and xview widget command. // // Use [Window.TEntry] to create a TEntry with a particular parent. // // More information might be available at the [Tcl/Tk ttk_entry] page. // // # Standard options // // - [Class] // - [Cursor] // - [Foreground] // - [Placeholder] // - [Placeholderforeground] // - [Style] // - [Takefocus] // - [Xscrollcommand] // // # Widget specific options // // [Exportselection] // // A boolean value specifying whether or not // a selection in the widget should be linked to the X selection. // If the selection is exported, then selecting in the widget deselects // the current X selection, selecting outside the widget deselects any // widget selection, and the widget will respond to selection retrieval // requests when it has a selection. // // [Invalidcommand] // // A script template to evaluate whenever the -validatecommand returns 0. // See VALIDATION below for more information. // // [Justify] // // Specifies how the text is aligned within the entry widget. // One of left, center, or right. // // [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 // or a bullet. // 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] // // Compatibility option; see ttk::widget(n) for details. // Specifies one of three states for the entry, // normal, disabled, or readonly. // See WIDGET STATES, below. // // [Textvariable] // // Specifies the name of a global variable whose value is linked // to the entry widget's contents. // Whenever the variable changes value, the widget's contents are updated, // and vice versa. // // [Validate] // // Specifies the mode in which validation should operate: // none, focus, focusin, focusout, key, or all. // Default is none, meaning that validation is disabled. // See VALIDATION below. // // [Validatecommand] // // A script template to evaluate whenever validation is triggered. // If set to the empty string (the default), validation is disabled. // The script must return a boolean value. // See VALIDATION below. // // [Width] // // Specifies an integer value indicating the desired width of the entry window, // in average-size characters of the widget's font. // // # Styling options // // The class name for a ttk::entry is TEntry. // // Dynamic states: disabled, focus, readonly. // // TEntry styling options configurable with ttk::style // are: // - [Background] color // - [Bordercolor] color // - [Darkcolor] color // - [Fieldbackground] color // - [Foreground] color // - [Insertcolor] color // - [Insertwidth] amount // - [Lightcolor] color // - [Padding] padding // - [Placeholderforeground] color // - [Relief] relief // - [Selectbackground] color // - [Selectborderwidth] amount // - [Selectforeground] color // // See the ttk::style manual page for information on how to configure // ttk styles. // // [Tcl/Tk ttk_entry]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_entry.html func TEntry(options ...Opt) *TEntryWidget { return App.TEntry(options...) } // TEntry — Editable text field widget // // The resulting [Window] is a child of 'w' // // For details please see [TEntry] func (w *Window) TEntry(options ...Opt) *TEntryWidget { return &TEntryWidget{w.newChild("ttk::entry", options...)} } // TEntryWidget represents the Tcl/Tk ttk_entry widget/window type TEntryWidget struct { *Window } // TFrame — Simple container widget // // # Description // // A ttk::frame widget is a container, used to group other widgets // together. // // Use [Window.TFrame] to create a TFrame with a particular parent. // // More information might be available at the [Tcl/Tk ttk_frame] page. // // # Standard options // // - [Class] // - [Cursor] // - [Padding] // - [Style] // - [Takefocus] // // # Widget specific options // // [Borderwidth] // // The desired width of the widget border. Defaults to 0. // May be ignored depending on the theme used. // // [Relief] // // One of the standard Tk border styles: // flat, groove, raised, ridge, // solid, or sunken. // Defaults to flat. // // [Width] // // If specified, the widget's requested width in pixels. // // [Height] // // If specified, the widget's requested height in pixels. // // # Styling options // // The class name for a ttk::frame is TFrame. // // TFrame styling options configurable with ttk::style // are: // - [Background] color // - [Relief] relief // // Some options are only available for specific themes. // // See the ttk::style manual page for information on how to configure // ttk styles. // // [Tcl/Tk ttk_frame]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_frame.html func TFrame(options ...Opt) *TFrameWidget { return App.TFrame(options...) } // TFrame — Simple container widget // // The resulting [Window] is a child of 'w' // // For details please see [TFrame] func (w *Window) TFrame(options ...Opt) *TFrameWidget { return &TFrameWidget{w.newChild("ttk::frame", options...)} } // TFrameWidget represents the Tcl/Tk ttk_frame widget/window type TFrameWidget struct { *Window } // TLabel — Display a text string and/or image // // # Description // // A ttk::label widget displays a textual label and/or image. // The label may be linked to a Tcl variable // to automatically change the displayed text. // // Use [Window.TLabel] to create a TLabel with a particular parent. // // More information might be available at the [Tcl/Tk ttk_label] page. // // # Standard options // // - [Anchor] // - [Class] // - [Compound] // - [Cursor] // - [Foreground] // - [Image] // - [Justify] // - [Padding] // - [State] // - [Style] // - [Takefocus] // - [Textvariable] // - [Txt] // - [Underline] // - [Width] // - [Wraplength] // // # Widget specific options // // [Background] // // The widget's background color. // If unspecified, the theme default is used. // // [Relief] // // Specifies the 3-D effect desired for the widget border. // Valid values are // flat, groove, raised, ridge, solid, // and sunken. // // [Wraplength] // // Specifies the maximum line length (in pixels). // If this option is negative or zero, // then automatic wrapping is not performed; otherwise // the text is split into lines such that no line is longer // than the specified value. // // # Styling options // // The class name for a ttk::label is TLabel. // // Dynamic states: disabled, readonly. // // TLabel styling options configurable with ttk::style // are: // - [Background] color // - [Compound] compound // - [Foreground] color // - [Font] font // // Some options are only available for specific themes. // // See the ttk::style manual page for information on how to configure // ttk styles. // // [Tcl/Tk ttk_label]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_label.html func TLabel(options ...Opt) *TLabelWidget { return App.TLabel(options...) } // TLabel — Display a text string and/or image // // The resulting [Window] is a child of 'w' // // For details please see [TLabel] func (w *Window) TLabel(options ...Opt) *TLabelWidget { return &TLabelWidget{w.newChild("ttk::label", options...)} } // TLabelWidget represents the Tcl/Tk ttk_label widget/window type TLabelWidget struct { *Window } // TLabelframe — Container widget with optional label // // # Description // // A ttk::labelframe widget is a container used to group other widgets // together. It has an optional label, which may be a plain text string or // another widget. // // Use [Window.TLabelframe] to create a TLabelframe with a particular parent. // // More information might be available at the [Tcl/Tk ttk_labelframe] page. // // # Standard options // // - [Class] // - [Cursor] // - [Padding] // - [Style] // - [Takefocus] // // # Widget specific options // // [Height] // // If specified, the widget's requested height in pixels. // (See ttk::frame(n) for further notes on -width and // -height). // // [Labelanchor] // // Specifies where to place the label. // Allowed values are (clockwise from the top upper left corner): // nw, n, ne, en, e, es, // se, s,sw, ws, w and wn. // The default value is theme-dependent. // // [Labelwidget] // // The name of a widget to use for the label. // If set, overrides the -text option. // The -labelwidget must be a child of the labelframe widget // or one of the labelframe's ancestors, and must belong to the // same top-level widget as the labelframe. // // [Txt] // // Specifies the text of the label. // // [Underline] // // If set, specifies the integer index (0-based) of a character to // underline in the text string. // The underlined character is used for mnemonic activation. // Mnemonic activation for a ttk::labelframe // sets the keyboard focus to the first child of the ttk::labelframe widget. // // [Width] // // If specified, the widget's requested width in pixels. // // # Styling options // // The class name for a ttk::labelframe is TLabelframe. // The text label // has a class of TLabelframe.Label. // // Dynamic states: disabled, readonly. // // TLabelframe styling options configurable with ttk::style // are: // - [Background] color // - [Bordercolor] color // - [Borderwidth] amount // - [Darkcolor] color // - [Labelmargins] amount // - [Labeloutside] boolean // - [Lightcolor] color // - [Relief] relief // // TLabelframe.Label styling options configurable with ttk::style // are: // - [Background] color // - [Font] font // - [Foreground] color // // Some options are only available for specific themes. // // See the ttk::style manual page for information on how to configure // ttk styles. // // [Tcl/Tk ttk_labelframe]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_labelframe.html func TLabelframe(options ...Opt) *TLabelframeWidget { return App.TLabelframe(options...) } // TLabelframe — Container widget with optional label // // The resulting [Window] is a child of 'w' // // For details please see [TLabelframe] func (w *Window) TLabelframe(options ...Opt) *TLabelframeWidget { return &TLabelframeWidget{w.newChild("ttk::labelframe", options...)} } // TLabelframeWidget represents the Tcl/Tk ttk_labelframe widget/window type TLabelframeWidget struct { *Window } // TMenubutton — Widget that pops down a menu when pressed // // # Description // // A ttk::menubutton widget displays a textual label and/or image, // and displays a menu when pressed. // // Use [Window.TMenubutton] to create a TMenubutton with a particular parent. // // More information might be available at the [Tcl/Tk ttk_menubutton] page. // // # Standard options // // - [Class] // - [Compound] // - [Cursor] // - [Image] // - [State] // - [Style] // - [Takefocus] // - [Textvariable] // - [Txt] // - [Underline] // - [Width] // // # Widget specific options // // [Direction] // // Specifies where the menu is to be popped up relative // to the menubutton. // One of: above, below, left, right, // or flush. The default is below. // flush pops the menu up directly over the menubutton. // // [Mnu] // // Specifies the path name of the menu associated with the menubutton. // To be on the safe side, the menu ought to be a direct child of the // menubutton. // // # Standard styles // // Ttk::menubutton widgets support the Toolbutton style in all // standard themes, which is useful for creating widgets for toolbars. // // # Styling options // // The class name for a ttk::menubutton is TMenubutton. // // Dynamic states: active, disabled, readonly. // // TMenubutton styling options configurable with ttk::style // are: // - [Arrowsize] amount // - [Background] color // - [Compound] compound // - [Foreground] color // - [Font] font // - [Padding] padding // - [Relief] relief // - [Width] amount // // Some options are only available for specific themes. // // See the ttk::style manual page for information on how to configure // ttk styles. // // [Tcl/Tk ttk_menubutton]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_menubutton.html func TMenubutton(options ...Opt) *TMenubuttonWidget { return App.TMenubutton(options...) } // TMenubutton — Widget that pops down a menu when pressed // // The resulting [Window] is a child of 'w' // // For details please see [TMenubutton] func (w *Window) TMenubutton(options ...Opt) *TMenubuttonWidget { return &TMenubuttonWidget{w.newChild("ttk::menubutton", options...)} } // TMenubuttonWidget represents the Tcl/Tk ttk_menubutton widget/window type TMenubuttonWidget struct { *Window } // TNotebook — Multi-paned container widget // // # Description // // A ttk::notebook widget manages a collection of windows // and displays a single one at a time. // Each content window is associated with a tab, // which the user may select to change the currently-displayed window. // // Use [Window.TNotebook] to create a TNotebook with a particular parent. // // More information might be available at the [Tcl/Tk ttk_notebook] page. // // # Standard options // // - [Class] // - [Cursor] // - [Style] // - [Takefocus] // // # Widget specific options // // [Height] // // If present and greater than zero, // specifies the desired height of the pane area // (not including internal padding or tabs). // Otherwise, the maximum height of all panes is used. // // [Padding] // // Specifies the amount of extra space to add around the outside // of the notebook. // The padding is a list of up to four length specifications // left top right bottom. // If fewer than four elements are specified, // bottom defaults to top, // right defaults to left, and // top defaults to left. // In other words, a list of three numbers specify the left, vertical, and right // padding; a list of two numbers specify the horizontal and the vertical padding; // a single number specifies the same padding all the way around the widget. // // [Width] // // If present and greater than zero, // specifies the desired width of the pane area // (not including internal padding). // Otherwise, the maximum width of all panes is used. // // # Styling options // // The class name for a ttk::notebook is TNotebook. The tab has // a class name of TNotebook.Tab // // Dynamic states: active, disabled, selected. // // TNotebook styling options configurable with ttk::style // are: // - [Background] color // - [Bordercolor] color // - [Darkcolor] color // - [Foreground] color // - [Lightcolor] color // - [Padding] padding // - [Tabmargins] padding // - [Tabposition] position // // TNotebook.Tab styling options configurable with ttk::style // are: // - [Background] color // - [Bordercolor] color // - [Compound] compound // - [Expand] padding // - [Font] font // - [Foreground] color // - [Padding] padding // // Some options are only available for specific themes. // // See the ttk::style manual page for information on how to configure // ttk styles. // // [Tcl/Tk ttk_notebook]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_notebook.html func TNotebook(options ...Opt) *TNotebookWidget { return App.TNotebook(options...) } // TNotebook — Multi-paned container widget // // The resulting [Window] is a child of 'w' // // For details please see [TNotebook] func (w *Window) TNotebook(options ...Opt) *TNotebookWidget { return &TNotebookWidget{w.newChild("ttk::notebook", options...)} } // TNotebookWidget represents the Tcl/Tk ttk_notebook widget/window type TNotebookWidget struct { *Window } // TPanedwindow — Multi-pane container window // // # Description // // A ttk::panedwindow widget displays a number of subwindows, // stacked either vertically or horizontally. // The user may adjust the relative sizes of the subwindows // by dragging the sash between panes. // // Use [Window.TPanedwindow] to create a TPanedwindow with a particular parent. // // More information might be available at the [Tcl/Tk ttk_panedwindow] page. // // # Standard options // // - [Class] // - [Cursor] // - [Style] // - [Takefocus] // // # Widget specific options // // [Orient] // // Specifies the orientation of the window. // If vertical, subpanes are stacked top-to-bottom; // if horizontal, subpanes are stacked left-to-right. // // [Width] // // If present and greater than zero, // specifies the desired width of the widget in pixels. // Otherwise, the requested width is determined by the width // of the managed windows. // // [Height] // // If present and greater than zero, // specifies the desired height of the widget in pixels. // Otherwise, the requested height is determined by the height // of the managed windows. // // # Styling options // // The class name for a ttk::panedwindow is TPanedwindow. The // sash has a class name of Sash. // // TPanedwindow styling options configurable with ttk::style // are: // - [Background] color // // Sash styling options configurable with ttk::style // are: // - [Background] color // - [Bordercolor] color // - [Gripsize] size (number of screen units) // - [Handlepad] amount // - [Handlesize] amount // - [Lightcolor] color // - [Sashpad] amount // - [Sashrelief] relief // - [Sashthickness] amount // // Some options are only available for specific themes. // // See the ttk::style manual page for information on how to configure // ttk styles. // // [Tcl/Tk ttk_panedwindow]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_panedwindow.html func TPanedwindow(options ...Opt) *TPanedwindowWidget { return App.TPanedwindow(options...) } // TPanedwindow — Multi-pane container window // // The resulting [Window] is a child of 'w' // // For details please see [TPanedwindow] func (w *Window) TPanedwindow(options ...Opt) *TPanedwindowWidget { return &TPanedwindowWidget{w.newChild("ttk::panedwindow", options...)} } // TPanedwindowWidget represents the Tcl/Tk ttk_panedwindow widget/window type TPanedwindowWidget struct { *Window } // TProgressbar — Provide progress feedback // // # Description // // A ttk::progressbar widget shows the status of a long-running // operation. They can operate in two modes: determinate mode shows the // amount completed relative to the total amount of work to be done, and // indeterminate mode provides an animated display to let the user know // that something is happening. // // If the value of -orient is horizontal a text string can be // displayed inside the progressbar. This string can be configured using // the -anchor, -font, -foreground, -justify, // is vertical then these options are ignored. // // Use [Window.TProgressbar] to create a TProgressbar with a particular parent. // // More information might be available at the [Tcl/Tk ttk_progressbar] page. // // # Standard options // // - [Anchor] // - [Class] // - [Cursor] // - [Foreground] // - [Justify] // - [Style] // - [Takefocus] // - [Txt] // - [Wraplength] // // # Widget specific options // // [Length] // // Specifies the length of the long axis of the progress bar // (width if horizontal, height if vertical). The value may have any of the forms // acceptable to Tk_GetPixels. // // [Maximum] // // A floating point number specifying the maximum -value. // Defaults to 100. // // [Mode] // // One of determinate or indeterminate. // // [Orient] // // One of horizontal or vertical. // Specifies the orientation of the progress bar. // // [Phase] // // Read-only option. // The widget periodically increments the value of this option // whenever the -value is greater than 0 and, // in determinate mode, less than -maximum. // This option may be used by the current theme // to provide additional animation effects. // // [Value] // // The current value of the progress bar. // In determinate mode, this represents the amount of work completed. // In indeterminate mode, it is interpreted modulo -maximum; // that is, the progress bar completes one // when the -value increases by -maximum. // If -variable is set to an existing variable, specifying -value // has no effect (the variable value takes precedence). // // [Variable] // // The name of a global Tcl variable which is linked to the -value. // If specified to an existing variable, the -value of the progress bar is // automatically set to the value of the variable whenever // the latter is modified. // // # Styling options // // The class name for a ttk::progressbar is TProgressbar. // // TProgressbar styling options configurable with ttk::style // are: // - [Background] color // - [Bordercolor] color // - [Darkcolor] color // - [Lightcolor] color // - [Maxphase] // - [Period] // - [Troughcolor] color // // Some options are only available for specific themes. // // See the ttk::style manual page for information on how to configure // ttk styles. // // [Tcl/Tk ttk_progressbar]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_progressbar.html func TProgressbar(options ...Opt) *TProgressbarWidget { return App.TProgressbar(options...) } // TProgressbar — Provide progress feedback // // The resulting [Window] is a child of 'w' // // For details please see [TProgressbar] func (w *Window) TProgressbar(options ...Opt) *TProgressbarWidget { return &TProgressbarWidget{w.newChild("ttk::progressbar", options...)} } // TProgressbarWidget represents the Tcl/Tk ttk_progressbar widget/window type TProgressbarWidget struct { *Window } // TRadiobutton — Mutually exclusive option widget // // # Description // // ttk::radiobutton widgets are used in groups to show or change // a set of mutually-exclusive options. // Radiobuttons are linked to a Tcl variable, // and have an associated value; when a radiobutton is clicked, // it sets the variable to its associated value. // // Use [Window.TRadiobutton] to create a TRadiobutton with a particular parent. // // More information might be available at the [Tcl/Tk ttk_radiobutton] page. // // # Standard options // // - [Class] // - [Compound] // - [Cursor] // - [Image] // - [State] // - [Style] // - [Takefocus] // - [Textvariable] // - [Txt] // - [Underline] // - [Width] // // # Widget specific options // // [Command] // // A Tcl script to evaluate whenever the widget is invoked. // // [Value] // // The value to store in the associated -variable // when the widget is selected. // // [Variable] // // The name of a global variable whose value is linked to the widget. // Default value is ::selectedButton. // // # Standard styles // // Ttk::radiobutton widgets support the Toolbutton style in all // standard themes, which is useful for creating widgets for toolbars. // // # Styling options // // The class name for a ttk::radiobutton is TRadiobutton. // // Dynamic states: active, alternate, disabled, // pressed, readonly, selected. // // TRadiobutton styling options configurable with ttk::style // are: // - [Background] color // - [Compound] compound // - [Foreground] color // - [Indicatorbackground] color // - [Indicatorcolor] color // - [Indicatormargin] padding // - [Indicatorrelief] relief // - [Padding] padding // // Some options are only available for specific themes. // // See the ttk::style manual page for information on how to configure // ttk styles. // // [Tcl/Tk ttk_radiobutton]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_radiobutton.html func TRadiobutton(options ...Opt) *TRadiobuttonWidget { return App.TRadiobutton(options...) } // TRadiobutton — Mutually exclusive option widget // // The resulting [Window] is a child of 'w' // // For details please see [TRadiobutton] func (w *Window) TRadiobutton(options ...Opt) *TRadiobuttonWidget { return &TRadiobuttonWidget{w.newChild("ttk::radiobutton", options...)} } // TRadiobuttonWidget represents the Tcl/Tk ttk_radiobutton widget/window type TRadiobuttonWidget struct { *Window } // TScale — Create and manipulate a scale widget // // # Description // // A ttk::scale widget is typically used to control the numeric value of a // linked variable that varies uniformly over some range. A scale displays a // slider that can be moved along over a trough, with the relative // position of the slider over the trough indicating the value of the variable. // // Use [Window.TScale] to create a TScale with a particular parent. // // More information might be available at the [Tcl/Tk ttk_scale] page. // // # Standard options // // - [Class] // - [Cursor] // - [Style] // - [Takefocus] // // # Widget specific options // // [Command] // // Specifies the prefix of a Tcl command to invoke whenever the scale's value is // changed via a widget command. The actual command consists of this option // followed by a space and a real number indicating the new value of the scale. // // [From] // // A real value corresponding to the left or top end of the scale. // // [Length] // // Specifies the desired long dimension of the scale in screen units (i.e. any of // the forms acceptable to Tk_GetPixels). For vertical scales this is the // scale's height; for horizontal scales it is the scale's width. // // [Orient] // // Specifies which orientation whether the widget should be laid out horizontally // or vertically. Must be either horizontal or vertical or an // abbreviation of one of these. // // [To] // // Specifies a real value corresponding to the right or bottom end of the scale. // This value may be either less than or greater than the -from option. // // [Value] // // Specifies the current floating-point value of the variable. // If -variable is set to an existing variable, specifying -value // has no effect (the variable value takes precedence). // // [Variable] // // Specifies the name of a global variable to link to the scale. Whenever the // value of the variable changes, the scale will update to reflect this value. // Whenever the scale is manipulated interactively, the variable will be modified // to reflect the scale's new value. // // # Styling options // // The class name for a ttk::scale is TScale. // // Dynamic states: active. // // TScale styling options configurable with ttk::style // are: // - [Background] color // - [Borderwidth] amount // - [Darkcolor] color // - [Groovewidth] amount // - [Lightcolor] color // - [Sliderwidth] amount // - [Troughcolor] color // - [Troughrelief] relief // // Some options are only available for specific themes. // // See the ttk::style manual page for information on how to configure // ttk styles. // // [Tcl/Tk ttk_scale]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_scale.html func TScale(options ...Opt) *TScaleWidget { return App.TScale(options...) } // TScale — Create and manipulate a scale widget // // The resulting [Window] is a child of 'w' // // For details please see [TScale] func (w *Window) TScale(options ...Opt) *TScaleWidget { return &TScaleWidget{w.newChild("ttk::scale", options...)} } // TScaleWidget represents the Tcl/Tk ttk_scale widget/window type TScaleWidget struct { *Window } // TScrollbar — Control the viewport of a scrollable widget // // # Description // // ttk::scrollbar widgets are typically linked to an associated window // that displays a document of some sort, such as a file being edited or a // drawing. // A scrollbar displays a thumb in the middle portion of the scrollbar, // whose position and size provides information about the portion of the // document visible in the associated window. // The thumb may be dragged by the user to control the visible region. // Depending on the theme, two or more arrow buttons may also be present; // these are used to scroll the visible region in discrete units. // // Use [Window.TScrollbar] to create a TScrollbar with a particular parent. // // More information might be available at the [Tcl/Tk ttk_scrollbar] page. // // # Standard options // // - [Class] // - [Cursor] // - [Style] // - [Takefocus] // // # Widget specific options // // [Command] // // A Tcl script prefix to evaluate // to change the view in the widget associated with the scrollbar. // Additional arguments are appended to the value of this option, // as described in SCROLLING COMMANDS below, // whenever the user requests a view change by manipulating the scrollbar. // // [Orient] // // One of horizontal or vertical. // Specifies the orientation of the scrollbar. // // # Styling options // // The class name for a ttk::scrollbar is TScrollbar. // // Dynamic states: active, disabled. // // TScrollbar (or more specifically Vertical.TScrollbar and // Horizontal.TScrollbar) styling options that are configurable with // ttk::style are: // - [Arrowcolor] color // - [Arrowsize] amount // - [Background] color // - [Bordercolor] color // - [Darkcolor] color (color of the dark part of the 3D relief) // - [Foreground] color // - [Gripsize] size (number of screen units) // - [Lightcolor] color (color of the light part of the 3D relief) // - [Troughcolor] color // // Some options are only available for specific themes. // // See the ttk::style manual page for information on how to configure // ttk styles. // // [Tcl/Tk ttk_scrollbar]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_scrollbar.html func TScrollbar(options ...Opt) *TScrollbarWidget { return App.TScrollbar(options...) } // TScrollbar — Control the viewport of a scrollable widget // // The resulting [Window] is a child of 'w' // // For details please see [TScrollbar] func (w *Window) TScrollbar(options ...Opt) *TScrollbarWidget { return &TScrollbarWidget{w.newChild("ttk::scrollbar", options...)} } // TScrollbarWidget represents the Tcl/Tk ttk_scrollbar widget/window type TScrollbarWidget struct { *Window } // TSeparator — Separator bar // // # Description // // A ttk::separator widget displays a horizontal or vertical separator // bar. // // Use [Window.TSeparator] to create a TSeparator with a particular parent. // // More information might be available at the [Tcl/Tk ttk_separator] page. // // # Standard options // // - [Class] // - [Cursor] // - [Style] // - [Takefocus] // // # Widget specific options // // [Orient] // // One of horizontal or vertical. // Specifies the orientation of the separator. // // # Styling options // // The class name for a ttk::separator is TSeparator. // // TSeparator styling options configurable with ttk::style // are: // - [Background] color // // Some options are only available for specific themes. // // See the ttk::style manual page for information on how to configure // ttk styles. // // [Tcl/Tk ttk_separator]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_separator.html func TSeparator(options ...Opt) *TSeparatorWidget { return App.TSeparator(options...) } // TSeparator — Separator bar // // The resulting [Window] is a child of 'w' // // For details please see [TSeparator] func (w *Window) TSeparator(options ...Opt) *TSeparatorWidget { return &TSeparatorWidget{w.newChild("ttk::separator", options...)} } // TSeparatorWidget represents the Tcl/Tk ttk_separator widget/window type TSeparatorWidget struct { *Window } // TSizegrip — Bottom-right corner resize widget // // # Description // // A ttk::sizegrip widget (also known as a grow box) // allows the user to resize the containing toplevel window // by pressing and dragging the grip. // // Use [Window.TSizegrip] to create a TSizegrip with a particular parent. // // More information might be available at the [Tcl/Tk ttk_sizegrip] page. // // # Standard options // // - [Class] // - [Cursor] // - [Style] // - [Takefocus] // // # Styling options // // The class name for a ttk::sizegrip is TSizegrip. // // TSizegrip styling options configurable with ttk::style // are: // - [Background] color // // Some options are only available for specific themes. // // See the ttk::style manual page for information on how to configure // ttk styles. // // [Tcl/Tk ttk_sizegrip]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_sizegrip.html func TSizegrip(options ...Opt) *TSizegripWidget { return App.TSizegrip(options...) } // TSizegrip — Bottom-right corner resize widget // // The resulting [Window] is a child of 'w' // // For details please see [TSizegrip] func (w *Window) TSizegrip(options ...Opt) *TSizegripWidget { return &TSizegripWidget{w.newChild("ttk::sizegrip", options...)} } // TSizegripWidget represents the Tcl/Tk ttk_sizegrip widget/window type TSizegripWidget struct { *Window } // TSpinbox — Selecting text field widget // // # Description // // A ttk::spinbox widget is a ttk::entry widget with built-in // up and down buttons that are used to either modify a numeric value or // to select among a set of values. The widget implements all the features // of the ttk::entry widget including support of the // to a Tcl variable. // // Use [Window.TSpinbox] to create a TSpinbox with a particular parent. // // More information might be available at the [Tcl/Tk ttk_spinbox] page. // // # Standard options // // - [Class] // - [Cursor] // - [Placeholder] // - [Placeholderforeground] // - [State] // - [Style] // - [Takefocus] // - [Validate] // - [Validatecommand] // - [Xscrollcommand] // // # Widget specific options // // [Command] // // Specifies a Tcl command to be invoked whenever a spinbutton is invoked. // // [Format] // // Specifies an alternate format to use when setting the string value // when using the -from and -to range. // This must be a format specifier of the form %.f, // as it will format a floating-point number. // // [From] // // A floating-point value specifying the lowest value for the spinbox. This is // used in conjunction with -to and -increment to set a numerical // range. // // [Increment] // // A floating-point value specifying the change in value to be applied each // time one of the widget spin buttons is pressed. The up button applies a // positive increment, the down button applies a negative increment. // // [To] // // A floating-point value specifying the highest permissible value for the // widget. See also -from and -increment. // range. // // [Values] // // This must be a Tcl list of values. If this option is set then this will // override any range set using the -from, -to and // -increment options. The widget will instead use the values // specified beginning with the first value. // // [Wrap] // // Must be a proper boolean value. If on, the spinbox will wrap around the // values of data in the widget. // // # Styling options // // The class name for a ttk::spinbox is TSpinbox. // // Dynamic states: active, disabled, focus, readonly. // // TSpinbox styling options configurable with ttk::style // are: // - [Arrowcolor] color // - [Arrowsize] amount // - [Background] color // - [Bordercolor] color // - [Darkcolor] color // - [Fieldbackground] color // - [Foreground] color // - [Insertcolor] color // - [Insertwidth] amount // - [Lightcolor] color // - [Padding] padding // - [Placeholderforeground] color // - [Selectbackground] color // - [Selectforeground] color // // Some options are only available for specific themes. // // See the ttk::style manual page for information on how to configure // ttk styles. // // [Tcl/Tk ttk_spinbox]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_spinbox.html func TSpinbox(options ...Opt) *TSpinboxWidget { return App.TSpinbox(options...) } // TSpinbox — Selecting text field widget // // The resulting [Window] is a child of 'w' // // For details please see [TSpinbox] func (w *Window) TSpinbox(options ...Opt) *TSpinboxWidget { return &TSpinboxWidget{w.newChild("ttk::spinbox", options...)} } // TSpinboxWidget represents the Tcl/Tk ttk_spinbox widget/window type TSpinboxWidget struct { *Window } // TTreeview — Hierarchical multicolumn data display widget // // # Description // // The ttk::treeview widget displays a hierarchical collection of items. // Each item has a textual label, an optional image, // and an optional list of data values. // The data values are displayed in successive columns after // the tree label. // // The order in which data values are displayed may be controlled // by setting the -displaycolumns widget option. // The tree widget can also display column headings. // Columns may be accessed by number or by symbolic names // listed in the -columns widget option; // see COLUMN IDENTIFIERS. // // Each item is identified by a unique name. // The widget will generate item IDs if they are not supplied by the caller. // There is a distinguished root item, named {}. // The root item itself is not displayed; // its children appear at the top level of the hierarchy. // // Each item also has a list of tags, // which can be used to associate event bindings with individual items // and control the appearance of the item. // // Treeview widgets support horizontal and vertical scrolling with the // standard -[xy]scrollcommand options // and [xy]view widget commands. // // Use [Window.TTreeview] to create a TTreeview with a particular parent. // // More information might be available at the [Tcl/Tk ttk_treeview] page. // // # Standard options // // - [Class] // - [Cursor] // - [Padding] // - [Style] // - [Takefocus] // - [Xscrollcommand] // - [Yscrollcommand] // // # Widget specific options // // [Columns] // // A list of column identifiers, // specifying the number of columns and their names. // // [Displaycolumns] // // A list of column identifiers // (either symbolic names or integer indices) // specifying which data columns are displayed // and the order in which they appear, // or the string #all. // If set to #all (the default), // all columns are shown in the order given. // // [Height] // // Specifies the number of rows which should be visible. // Note that // the requested width is determined from the sum of the column widths. // // [Selectmode] // // Controls how the built-in class bindings manage the selection. // One of extended, browse, or none. // // [Selecttype] // // Controls how the built-in class bindings manage the selection. // One of item or cell. // // [Show] // // A list containing zero or more of the following values, specifying // which elements of the tree to display. // // [Striped] // // Boolean specifying zebra striped item coloring. // Note that // striped items uses the -stripedbackground option if set by the theme or // a tag. If not supported by the current theme, it will not show. // // [Titlecolumns] // // Number of display columns at the left that should not be scrolled. The tree // column counts, even if -show tree is not specified. Thus for value N of // this option, column #N is the first one that is scrollable. Default is 0. // // [Titleitems] // // Number of items at the top that should not be vertically scrolled. Default is 0. // // # Styling options // // The class name for a ttk::treeview is Treeview. // The treeview header class name is Heading. // The treeview item class name is Item. // The treeview cell class name is Cell. // // Dynamic states: disabled, selected. // // Treeview styling options configurable with ttk::style // are: // - [Background] color // - [Fieldbackground] color // - [Font] font // - [Foreground] color // - [Indent] amount // - [Columnseparatorwidth] amount // - [Rowheight] amount // - [Stripedbackground] color // // Heading styling options configurable with ttk::style // are: // - [Background] color // - [Font] font // - [Relief] relief // // Item styling options configurable with ttk::style // are: // - [Foreground] color // - [Indicatormargins] padding // - [Indicatorsize] amount // - [Padding] padding // // Cell styling options configurable with ttk::style // are: // - [Padding] padding // // Some options are only available for specific themes. // // See the ttk::style manual page for information on how to configure // ttk styles. // // [Tcl/Tk ttk_treeview]: https://www.tcl-lang.org/man/tcl9.0/TkCmd/ttk_treeview.html func TTreeview(options ...Opt) *TTreeviewWidget { return App.TTreeview(options...) } // TTreeview — Hierarchical multicolumn data display widget // // The resulting [Window] is a child of 'w' // // For details please see [TTreeview] func (w *Window) TTreeview(options ...Opt) *TTreeviewWidget { return &TTreeviewWidget{w.newChild("ttk::treeview", options...)} } // TTreeviewWidget represents the Tcl/Tk ttk_treeview widget/window type TTreeviewWidget struct { *Window } // Accelerator option. // // Known uses: // - [MenuWidget.AddCascade] (command specific) // - [MenuWidget.AddCommand] (command specific) // - [MenuWidget.AddSeparator] (command specific) func Accelerator(val any) Opt { return rawOption(fmt.Sprintf(`-accelerator %s`, optionString(val))) } // Activebackground option. // // Specifies background color to use when drawing active elements. // An element (a widget or portion of a widget) is active if the // mouse cursor is positioned over the element and pressing a mouse button // will cause some action to occur. // If strict Motif compliance has been requested by setting the // tk_strictMotif variable, this option will normally be // ignored; the normal background color will be used instead. // For some elements on Windows and Macintosh systems, the active color // will only be used while mouse button 1 is pressed over the element. // // Known uses: // - [Button] // - [Checkbutton] // - [Label] // - [MenuWidget.AddCascade] (command specific) // - [MenuWidget.AddCommand] (command specific) // - [MenuWidget.AddSeparator] (command specific) // - [Menu] // - [Menubutton] // - [Radiobutton] // - [Scale] // - [Scrollbar] // - [Spinbox] func Activebackground(val any) Opt { return rawOption(fmt.Sprintf(`-activebackground %s`, optionString(val))) } // Activebackground — Get the configured option value. // // Known uses: // - [Button] // - [Checkbutton] // - [Label] // - [Menu] // - [Menubutton] // - [Radiobutton] // - [Scale] // - [Scrollbar] // - [Spinbox] func (w *Window) Activebackground() string { return evalErr(fmt.Sprintf(`%s cget -activebackground`, w)) } // Activeborderwidth option. // // Specifies a non-negative value indicating // the width of the 3-D border drawn around active elements. See above for // definition of active elements. // The value may have any of the forms acceptable to Tk_GetPixels. // This option is typically only available in widgets displaying more // than one element at a time (e.g. menus but not buttons). // // Known uses: // - [Menu] func Activeborderwidth(val any) Opt { return rawOption(fmt.Sprintf(`-activeborderwidth %s`, optionString(val))) } // Activeborderwidth — Get the configured option value. // // Known uses: // - [Menu] func (w *Window) Activeborderwidth() string { return evalErr(fmt.Sprintf(`%s cget -activeborderwidth`, w)) } // Activeforeground option. // // Specifies foreground color to use when drawing active elements. // See above for definition of active elements. // // Known uses: // - [Button] // - [Checkbutton] // - [Label] // - [MenuWidget.AddCascade] (command specific) // - [MenuWidget.AddCommand] (command specific) // - [MenuWidget.AddSeparator] (command specific) // - [Menu] // - [Menubutton] // - [Radiobutton] func Activeforeground(val any) Opt { return rawOption(fmt.Sprintf(`-activeforeground %s`, optionString(val))) } // Activeforeground — Get the configured option value. // // Known uses: // - [Button] // - [Checkbutton] // - [Label] // - [Menu] // - [Menubutton] // - [Radiobutton] func (w *Window) Activeforeground() string { return evalErr(fmt.Sprintf(`%s cget -activeforeground`, w)) } // Activerelief option. // // Specifies the 3-D effect desired for the active item of the widget. // See the -relief option for details. // // Known uses: // - [Menu] // - [Scrollbar] (widget specific) func Activerelief(val any) Opt { return rawOption(fmt.Sprintf(`-activerelief %s`, optionString(val))) } // Activerelief — Get the configured option value. // // Known uses: // - [Menu] // - [Scrollbar] (widget specific) func (w *Window) Activerelief() string { return evalErr(fmt.Sprintf(`%s cget -activerelief`, w)) } // Activestyle option. // // Known uses: // - [Listbox] (widget specific) func Activestyle(val any) Opt { return rawOption(fmt.Sprintf(`-activestyle %s`, optionString(val))) } // Activestyle — Get the configured option value. // // Known uses: // - [Listbox] (widget specific) func (w *Window) Activestyle() string { return evalErr(fmt.Sprintf(`%s cget -activestyle`, w)) } // After option. // // Known uses: // - [Pack] (command specific) func After(val any) Opt { return rawOption(fmt.Sprintf(`-after %s`, optionString(val))) } // Anchor option. // // Specifies how the information in a widget (e.g. text or a bitmap) // is to be displayed in the widget. // Must be one of the values n, ne, e, se, // s, sw, w, nw, or center. // For example, nw means display the information such that its // top-left corner is at the top-left corner of the widget. // // Known uses: // - [Button] // - [Checkbutton] // - [Label] // - [Menubutton] // - [Message] // - [Pack] (command specific) // - [Place] (command specific) // - [Radiobutton] // - [TLabel] // - [TProgressbar] func Anchor(val any) Opt { return rawOption(fmt.Sprintf(`-anchor %s`, optionString(val))) } // Anchor — Get the configured option value. // // Known uses: // - [Button] // - [Checkbutton] // - [Label] // - [Menubutton] // - [Message] // - [Radiobutton] // - [TLabel] // - [TProgressbar] func (w *Window) Anchor() string { return evalErr(fmt.Sprintf(`%s cget -anchor`, w)) } // Aspect option. // // Known uses: // - [Message] (widget specific) func Aspect(val any) Opt { return rawOption(fmt.Sprintf(`-aspect %s`, optionString(val))) } // Aspect — Get the configured option value. // // Known uses: // - [Message] (widget specific) func (w *Window) Aspect() string { return evalErr(fmt.Sprintf(`%s cget -aspect`, w)) } // Autoseparators option. // // Known uses: // - [Text] (widget specific) func Autoseparators(val any) Opt { return rawOption(fmt.Sprintf(`-autoseparators %s`, optionString(val))) } // Autoseparators — Get the configured option value. // // Known uses: // - [Text] (widget specific) func (w *Window) Autoseparators() string { return evalErr(fmt.Sprintf(`%s cget -autoseparators`, w)) } // Background option. // // Specifies the normal background color to use when displaying the // widget. // // Known uses: // - [Button] // - [Canvas] // - [Checkbutton] // - [Entry] // - [Frame] (widget specific) // - [Label] // - [Labelframe] (widget specific) // - [Listbox] // - [MenuWidget.AddCascade] (command specific) // - [MenuWidget.AddCommand] (command specific) // - [MenuWidget.AddSeparator] (command specific) // - [Menu] // - [Menubutton] // - [Message] // - [NewBitmap] (command specific) // - [Panedwindow] // - [Radiobutton] // - [Scale] // - [Scrollbar] // - [Spinbox] // - [TLabel] (widget specific) // - [TextWidget.TagConfigure] (command specific) // - [Text] // - [Toplevel] (widget specific) func Background(val any) Opt { return rawOption(fmt.Sprintf(`-background %s`, optionString(val))) } // Background — Get the configured option value. // // Known uses: // - [Button] // - [Canvas] // - [Checkbutton] // - [Entry] // - [Frame] (widget specific) // - [Label] // - [Labelframe] (widget specific) // - [Listbox] // - [Menu] // - [Menubutton] // - [Message] // - [Panedwindow] // - [Radiobutton] // - [Scale] // - [Scrollbar] // - [Spinbox] // - [TLabel] (widget specific) // - [Text] // - [Toplevel] (widget specific) func (w *Window) Background() string { return evalErr(fmt.Sprintf(`%s cget -background`, w)) } // Backgroundimage option. // // Known uses: // - [Frame] (widget specific) // - [Toplevel] (widget specific) func Backgroundimage(val any) Opt { return rawOption(fmt.Sprintf(`-backgroundimage %s`, optionString(val))) } // Backgroundimage — Get the configured option value. // // Known uses: // - [Frame] (widget specific) // - [Toplevel] (widget specific) func (w *Window) Backgroundimage() string { return evalErr(fmt.Sprintf(`%s cget -backgroundimage`, w)) } // Before option. // // Known uses: // - [Pack] (command specific) func Before(val any) Opt { return rawOption(fmt.Sprintf(`-before %s`, optionString(val))) } // Bgstipple option. // // Known uses: // - [TextWidget.TagConfigure] (command specific) func Bgstipple(val any) Opt { return rawOption(fmt.Sprintf(`-bgstipple %s`, optionString(val))) } // Bigincrement option. // // Known uses: // - [Scale] (widget specific) func Bigincrement(val any) Opt { return rawOption(fmt.Sprintf(`-bigincrement %s`, optionString(val))) } // Bigincrement — Get the configured option value. // // Known uses: // - [Scale] (widget specific) func (w *Window) Bigincrement() string { return evalErr(fmt.Sprintf(`%s cget -bigincrement`, w)) } // Bitmap option. // // Specifies a bitmap to display in the widget, in any of the forms // acceptable to Tk_GetBitmap. // The exact way in which the bitmap is displayed may be affected by // other options such as -anchor or -justify. // Typically, if this option is specified then it overrides other // options that specify a textual value to display in the widget // but this is controlled by the -compound option; // the -bitmap option may be reset to an empty string to re-enable // a text display. // In widgets that support both -bitmap and -image options, // -image will usually override -bitmap. // // Known uses: // - [Button] // - [Checkbutton] // - [Label] // - [MenuWidget.AddCascade] (command specific) // - [MenuWidget.AddCommand] (command specific) // - [MenuWidget.AddSeparator] (command specific) // - [Menubutton] // - [Radiobutton] func Bitmap(val any) Opt { return rawOption(fmt.Sprintf(`-bitmap %s`, optionString(val))) } // Bitmap — Get the configured option value. // // Known uses: // - [Button] // - [Checkbutton] // - [Label] // - [Menubutton] // - [Radiobutton] func (w *Window) Bitmap() string { return evalErr(fmt.Sprintf(`%s cget -bitmap`, w)) } // Blockcursor option. // // Known uses: // - [Text] (widget specific) func Blockcursor(val any) Opt { return rawOption(fmt.Sprintf(`-blockcursor %s`, optionString(val))) } // Blockcursor — Get the configured option value. // // Known uses: // - [Text] (widget specific) func (w *Window) Blockcursor() string { return evalErr(fmt.Sprintf(`%s cget -blockcursor`, w)) } // Bordermode option. // // Known uses: // - [Place] (command specific) func Bordermode(val any) Opt { return rawOption(fmt.Sprintf(`-bordermode %s`, optionString(val))) } // Borderwidth option. // // Specifies a non-negative value indicating the width // of the 3-D border to draw around the outside of the widget (if such a // border is being drawn; the -relief option typically determines // this). The value may also be used when drawing 3-D effects in the // interior of the widget. // The value may have any of the forms acceptable to Tk_GetPixels. // // Known uses: // - [Button] // - [Canvas] // - [Checkbutton] // - [Entry] // - [Frame] // - [Label] // - [Labelframe] // - [Listbox] // - [Menu] // - [Menubutton] // - [Message] // - [Panedwindow] // - [Radiobutton] // - [Scale] // - [Scrollbar] // - [Spinbox] // - [TFrame] (widget specific) // - [TextWidget.TagConfigure] (command specific) // - [Text] // - [Toplevel] func Borderwidth(val any) Opt { return rawOption(fmt.Sprintf(`-borderwidth %s`, optionString(val))) } // Borderwidth — Get the configured option value. // // Known uses: // - [Button] // - [Canvas] // - [Checkbutton] // - [Entry] // - [Frame] // - [Label] // - [Labelframe] // - [Listbox] // - [Menu] // - [Menubutton] // - [Message] // - [Panedwindow] // - [Radiobutton] // - [Scale] // - [Scrollbar] // - [Spinbox] // - [TFrame] (widget specific) // - [Text] // - [Toplevel] func (w *Window) Borderwidth() string { return evalErr(fmt.Sprintf(`%s cget -borderwidth`, w)) } // Buttonbackground option. // // Known uses: // - [Spinbox] (widget specific) func Buttonbackground(val any) Opt { return rawOption(fmt.Sprintf(`-buttonbackground %s`, optionString(val))) } // Buttonbackground — Get the configured option value. // // Known uses: // - [Spinbox] (widget specific) func (w *Window) Buttonbackground() string { return evalErr(fmt.Sprintf(`%s cget -buttonbackground`, w)) } // Buttoncursor option. // // Known uses: // - [Spinbox] (widget specific) func Buttoncursor(val any) Opt { return rawOption(fmt.Sprintf(`-buttoncursor %s`, optionString(val))) } // Buttoncursor — Get the configured option value. // // Known uses: // - [Spinbox] (widget specific) func (w *Window) Buttoncursor() string { return evalErr(fmt.Sprintf(`%s cget -buttoncursor`, w)) } // Buttondownrelief option. // // Known uses: // - [Spinbox] (widget specific) func Buttondownrelief(val any) Opt { return rawOption(fmt.Sprintf(`-buttondownrelief %s`, optionString(val))) } // Buttondownrelief — Get the configured option value. // // Known uses: // - [Spinbox] (widget specific) func (w *Window) Buttondownrelief() string { return evalErr(fmt.Sprintf(`%s cget -buttondownrelief`, w)) } // Buttonuprelief option. // // Known uses: // - [Spinbox] (widget specific) func Buttonuprelief(val any) Opt { return rawOption(fmt.Sprintf(`-buttonuprelief %s`, optionString(val))) } // Buttonuprelief — Get the configured option value. // // Known uses: // - [Spinbox] (widget specific) func (w *Window) Buttonuprelief() string { return evalErr(fmt.Sprintf(`%s cget -buttonuprelief`, w)) } // Class option. // // Specifies the window class. // The class is used when querying the option database // for the window's other options, to determine the default // bindtags for the window, and to select the widget's default // layout and style. // This is a read-only option: // it may only be specified when the window is created, // and may not be changed with the configure widget command. // // Known uses: // - [Frame] (widget specific) // - [Labelframe] (widget specific) // - [TButton] // - [TCheckbutton] // - [TCombobox] // - [TEntry] // - [TFrame] // - [TLabel] // - [TLabelframe] // - [TMenubutton] // - [TNotebook] // - [TPanedwindow] // - [TProgressbar] // - [TRadiobutton] // - [TScale] // - [TScrollbar] // - [TSeparator] // - [TSizegrip] // - [TSpinbox] // - [TTreeview] // - [Toplevel] (widget specific) func Class(val any) Opt { return rawOption(fmt.Sprintf(`-class %s`, optionString(val))) } // Class — Get the configured option value. // // Known uses: // - [Frame] (widget specific) // - [Labelframe] (widget specific) // - [TButton] // - [TCheckbutton] // - [TCombobox] // - [TEntry] // - [TFrame] // - [TLabel] // - [TLabelframe] // - [TMenubutton] // - [TNotebook] // - [TPanedwindow] // - [TProgressbar] // - [TRadiobutton] // - [TScale] // - [TScrollbar] // - [TSeparator] // - [TSizegrip] // - [TSpinbox] // - [TTreeview] // - [Toplevel] (widget specific) func (w *Window) Class() string { return evalErr(fmt.Sprintf(`%s cget -class`, w)) } // Closeenough option. // // Known uses: // - [Canvas] (widget specific) func Closeenough(val any) Opt { return rawOption(fmt.Sprintf(`-closeenough %s`, optionString(val))) } // Closeenough — Get the configured option value. // // Known uses: // - [Canvas] (widget specific) func (w *Window) Closeenough() string { return evalErr(fmt.Sprintf(`%s cget -closeenough`, w)) } // Colormap option. // // Known uses: // - [Frame] (widget specific) // - [Labelframe] (widget specific) // - [Toplevel] (widget specific) func Colormap(val any) Opt { return rawOption(fmt.Sprintf(`-colormap %s`, optionString(val))) } // Colormap — Get the configured option value. // // Known uses: // - [Frame] (widget specific) // - [Labelframe] (widget specific) // - [Toplevel] (widget specific) func (w *Window) Colormap() string { return evalErr(fmt.Sprintf(`%s cget -colormap`, w)) } // Column option. // // Known uses: // - [Grid] (command specific) func Column(val any) Opt { return rawOption(fmt.Sprintf(`-column %s`, optionString(val))) } // Columnbreak option. // // Known uses: // - [MenuWidget.AddCascade] (command specific) // - [MenuWidget.AddCommand] (command specific) // - [MenuWidget.AddSeparator] (command specific) func Columnbreak(val any) Opt { return rawOption(fmt.Sprintf(`-columnbreak %s`, optionString(val))) } // Columns option. // // Known uses: // - [TTreeview] (widget specific) func Columns(val any) Opt { return rawOption(fmt.Sprintf(`-columns %s`, optionString(val))) } // Columns — Get the configured option value. // // Known uses: // - [TTreeview] (widget specific) func (w *Window) Columns() string { return evalErr(fmt.Sprintf(`%s cget -columns`, w)) } // Columnspan option. // // Known uses: // - [Grid] (command specific) func Columnspan(val any) Opt { return rawOption(fmt.Sprintf(`-columnspan %s`, optionString(val))) } // Command option. // // See also [Event handlers]. // // Known uses: // - [Button] (widget specific) // - [Checkbutton] (widget specific) // - [Fontchooser] (command specific) // - [MenuWidget.AddCascade] (command specific) // - [MenuWidget.AddCommand] (command specific) // - [MenuWidget.AddSeparator] (command specific) // - [MessageBox] (command specific) // - [Radiobutton] (widget specific) // - [Scale] (widget specific) // - [Scrollbar] (widget specific) // - [Spinbox] (widget specific) // - [TButton] (widget specific) // - [TCheckbutton] (widget specific) // - [TRadiobutton] (widget specific) // - [TScale] (widget specific) // - [TScrollbar] (widget specific) // - [TSpinbox] (widget specific) // // [Event handlers]: https://pkg.go.dev/modernc.org/tk9.0#hdr-Event_handlers func Command(handler any) Opt { return newEventHandler("-command", handler) } // Compound option. // // Specifies if the widget should display text and bitmaps/images at the // same time, and if so, where the bitmap/image should be placed relative // to the text. Must be one of the values none, bottom, // top, left, right, or center. For example, the // (default) value none specifies that the bitmap or image should // (if defined) be displayed instead of the text, the value left // specifies that the bitmap or image should be displayed to the left of // the text, and the value center specifies that the bitmap or // image should be displayed on top of the text. // // Known uses: // - [Button] // - [Checkbutton] // - [Label] // - [MenuWidget.AddCascade] (command specific) // - [MenuWidget.AddCommand] (command specific) // - [MenuWidget.AddSeparator] (command specific) // - [Menubutton] // - [Radiobutton] // - [TButton] // - [TCheckbutton] // - [TLabel] // - [TMenubutton] // - [TRadiobutton] func Compound(val any) Opt { return rawOption(fmt.Sprintf(`-compound %s`, optionString(val))) } // Compound — Get the configured option value. // // Known uses: // - [Button] // - [Checkbutton] // - [Label] // - [Menubutton] // - [Radiobutton] // - [TButton] // - [TCheckbutton] // - [TLabel] // - [TMenubutton] // - [TRadiobutton] func (w *Window) Compound() string { return evalErr(fmt.Sprintf(`%s cget -compound`, w)) } // Confine option. // // Known uses: // - [Canvas] (widget specific) func Confine(val any) Opt { return rawOption(fmt.Sprintf(`-confine %s`, optionString(val))) } // Confine — Get the configured option value. // // Known uses: // - [Canvas] (widget specific) func (w *Window) Confine() string { return evalErr(fmt.Sprintf(`%s cget -confine`, w)) } // Confirmoverwrite option. // // Known uses: // - [GetSaveFile] (command specific) func Confirmoverwrite(val any) Opt { return rawOption(fmt.Sprintf(`-confirmoverwrite %s`, optionString(val))) } // Container option. // // Known uses: // - [Frame] (widget specific) // - [Toplevel] (widget specific) func Container(val any) Opt { return rawOption(fmt.Sprintf(`-container %s`, optionString(val))) } // Container — Get the configured option value. // // Known uses: // - [Frame] (widget specific) // - [Toplevel] (widget specific) func (w *Window) Container() string { return evalErr(fmt.Sprintf(`%s cget -container`, w)) } // Cursor option. // // Specifies the mouse cursor to be used for the widget. // The value may have any of the forms acceptable to Tk_GetCursor. // In addition, if an empty string is specified, it indicates that the // widget should defer to its parent for cursor specification. // // Known uses: // - [Button] // - [Canvas] // - [Checkbutton] // - [Entry] // - [Frame] // - [Label] // - [Labelframe] // - [Listbox] // - [Menu] // - [Menubutton] // - [Message] // - [Panedwindow] // - [Radiobutton] // - [Scale] // - [Scrollbar] // - [Spinbox] // - [TButton] // - [TCheckbutton] // - [TCombobox] // - [TEntry] // - [TFrame] // - [TLabel] // - [TLabelframe] // - [TMenubutton] // - [TNotebook] // - [TPanedwindow] // - [TProgressbar] // - [TRadiobutton] // - [TScale] // - [TScrollbar] // - [TSeparator] // - [TSizegrip] // - [TSpinbox] // - [TTreeview] // - [Text] // - [Toplevel] // - [Window.Busy] (command specific) func Cursor(val any) Opt { return rawOption(fmt.Sprintf(`-cursor %s`, optionString(val))) } // Cursor — Get the configured option value. // // Known uses: // - [Button] // - [Canvas] // - [Checkbutton] // - [Entry] // - [Frame] // - [Label] // - [Labelframe] // - [Listbox] // - [Menu] // - [Menubutton] // - [Message] // - [Panedwindow] // - [Radiobutton] // - [Scale] // - [Scrollbar] // - [Spinbox] // - [TButton] // - [TCheckbutton] // - [TCombobox] // - [TEntry] // - [TFrame] // - [TLabel] // - [TLabelframe] // - [TMenubutton] // - [TNotebook] // - [TPanedwindow] // - [TProgressbar] // - [TRadiobutton] // - [TScale] // - [TScrollbar] // - [TSeparator] // - [TSizegrip] // - [TSpinbox] // - [TTreeview] // - [Text] // - [Toplevel] func (w *Window) Cursor() string { return evalErr(fmt.Sprintf(`%s cget -cursor`, w)) } // Default option. // // Known uses: // - [Button] (widget specific) // - [MessageBox] (command specific) // - [TButton] (widget specific) func Default(val any) Opt { return rawOption(fmt.Sprintf(`-default %s`, optionString(val))) } // Default — Get the configured option value. // // Known uses: // - [Button] (widget specific) // - [TButton] (widget specific) func (w *Window) Default() string { return evalErr(fmt.Sprintf(`%s cget -default`, w)) } // Defaultextension option. // // Known uses: // - [GetOpenFile] (command specific) // - [GetSaveFile] (command specific) func Defaultextension(val any) Opt { return rawOption(fmt.Sprintf(`-defaultextension %s`, optionString(val))) } // Detail option. // // Known uses: // - [MessageBox] (command specific) func Detail(val any) Opt { return rawOption(fmt.Sprintf(`-detail %s`, optionString(val))) } // Digits option. // // Known uses: // - [Scale] (widget specific) func Digits(val any) Opt { return rawOption(fmt.Sprintf(`-digits %s`, optionString(val))) } // Digits — Get the configured option value. // // Known uses: // - [Scale] (widget specific) func (w *Window) Digits() string { return evalErr(fmt.Sprintf(`%s cget -digits`, w)) } // Direction option. // // Known uses: // - [Menubutton] (widget specific) // - [TMenubutton] (widget specific) func Direction(val any) Opt { return rawOption(fmt.Sprintf(`-direction %s`, optionString(val))) } // Direction — Get the configured option value. // // Known uses: // - [Menubutton] (widget specific) // - [TMenubutton] (widget specific) func (w *Window) Direction() string { return evalErr(fmt.Sprintf(`%s cget -direction`, w)) } // Disabledbackground option. // // Known uses: // - [Entry] (widget specific) // - [Spinbox] (widget specific) func Disabledbackground(val any) Opt { return rawOption(fmt.Sprintf(`-disabledbackground %s`, optionString(val))) } // Disabledbackground — Get the configured option value. // // Known uses: // - [Entry] (widget specific) // - [Spinbox] (widget specific) func (w *Window) Disabledbackground() string { return evalErr(fmt.Sprintf(`%s cget -disabledbackground`, w)) } // Disabledforeground option. // // Specifies foreground color to use when drawing a disabled element. // If the option is specified as an empty string (which is typically the // case on monochrome displays), disabled elements are drawn with the // normal foreground color but they are dimmed by drawing them // with a stippled fill pattern. // // Known uses: // - [Button] // - [Checkbutton] // - [Entry] (widget specific) // - [Label] // - [Listbox] // - [Menu] // - [Menubutton] // - [Radiobutton] // - [Spinbox] (widget specific) func Disabledforeground(val any) Opt { return rawOption(fmt.Sprintf(`-disabledforeground %s`, optionString(val))) } // Disabledforeground — Get the configured option value. // // Known uses: // - [Button] // - [Checkbutton] // - [Entry] (widget specific) // - [Label] // - [Listbox] // - [Menu] // - [Menubutton] // - [Radiobutton] // - [Spinbox] (widget specific) func (w *Window) Disabledforeground() string { return evalErr(fmt.Sprintf(`%s cget -disabledforeground`, w)) } // Displaycolumns option. // // Known uses: // - [TTreeview] (widget specific) func Displaycolumns(val any) Opt { return rawOption(fmt.Sprintf(`-displaycolumns %s`, optionString(val))) } // Displaycolumns — Get the configured option value. // // Known uses: // - [TTreeview] (widget specific) func (w *Window) Displaycolumns() string { return evalErr(fmt.Sprintf(`%s cget -displaycolumns`, w)) } // Displayof option. // // Known uses: // - [Bell] (command specific) // - [ClipboardAppend] (command specific) // - [ClipboardClear] (command specific) // - [ClipboardGet] (command specific) // - [Focus] (command specific) // - [FontFamilies] (command specific) func Displayof(val any) Opt { return rawOption(fmt.Sprintf(`-displayof %s`, optionString(val))) } // Elementborderwidth option. // // Known uses: // - [Scrollbar] (widget specific) func Elementborderwidth(val any) Opt { return rawOption(fmt.Sprintf(`-elementborderwidth %s`, optionString(val))) } // Elementborderwidth — Get the configured option value. // // Known uses: // - [Scrollbar] (widget specific) func (w *Window) Elementborderwidth() string { return evalErr(fmt.Sprintf(`%s cget -elementborderwidth`, w)) } // Elide option. // // Known uses: // - [TextWidget.TagConfigure] (command specific) func Elide(val any) Opt { return rawOption(fmt.Sprintf(`-elide %s`, optionString(val))) } // Endline option. // // Known uses: // - [Text] (widget specific) func Endline(val any) Opt { return rawOption(fmt.Sprintf(`-endline %s`, optionString(val))) } // Endline — Get the configured option value. // // Known uses: // - [Text] (widget specific) func (w *Window) Endline() string { return evalErr(fmt.Sprintf(`%s cget -endline`, w)) } // Expand option. // // Known uses: // - [Pack] (command specific) func Expand(val any) Opt { return rawOption(fmt.Sprintf(`-expand %s`, optionString(val))) } // Exportselection option. // // Specifies whether or not a selection in the widget should also be // the X selection. // The value may have any of the forms accepted by Tcl_GetBoolean, // such as true, false, 0, 1, yes, or no. // If the selection is exported, then selecting in the widget deselects // the current X selection, selecting outside the widget deselects any // widget selection, and the widget will respond to selection retrieval // requests when it has a selection. The default is usually for widgets // to export selections. // // Known uses: // - [Entry] // - [Listbox] // - [Spinbox] // - [TCombobox] (widget specific) // - [TEntry] (widget specific) // - [Text] func Exportselection(val any) Opt { return rawOption(fmt.Sprintf(`-exportselection %s`, optionString(val))) } // Exportselection — Get the configured option value. // // Known uses: // - [Entry] // - [Listbox] // - [Spinbox] // - [TCombobox] (widget specific) // - [TEntry] (widget specific) // - [Text] func (w *Window) Exportselection() string { return evalErr(fmt.Sprintf(`%s cget -exportselection`, w)) } // Family option. // // Known uses: // - [NewFont] (command specific) func Family(val any) Opt { return rawOption(fmt.Sprintf(`-family %s`, optionString(val))) } // Fgstipple option. // // Known uses: // - [TextWidget.TagConfigure] (command specific) func Fgstipple(val any) Opt { return rawOption(fmt.Sprintf(`-fgstipple %s`, optionString(val))) } // File option. // // Known uses: // - [NewBitmap] (command specific) // - [NewPhoto] (command specific) func File(val any) Opt { return rawOption(fmt.Sprintf(`-file %s`, optionString(val))) } // Filetypes option. // // Known uses: // - [GetOpenFile] (command specific) // - [GetSaveFile] (command specific) func Filetypes(val any) Opt { return rawOption(fmt.Sprintf(`-filetypes %s`, optionString(val))) } // Fill option. // // Known uses: // - [Pack] (command specific) func Fill(val any) Opt { return rawOption(fmt.Sprintf(`-fill %s`, optionString(val))) } // Force option. // // Known uses: // - [Focus] (command specific) func Force(val any) Opt { return rawOption(fmt.Sprintf(`-force %s`, optionString(val))) } // Foreground option. // // Specifies the normal foreground color to use when displaying the widget. // // Known uses: // - [Button] // - [Checkbutton] // - [Entry] // - [Label] // - [Labelframe] // - [Listbox] // - [MenuWidget.AddCascade] (command specific) // - [MenuWidget.AddCommand] (command specific) // - [MenuWidget.AddSeparator] (command specific) // - [Menu] // - [Menubutton] // - [Message] // - [NewBitmap] (command specific) // - [Radiobutton] // - [Scale] // - [Spinbox] // - [TEntry] // - [TLabel] // - [TProgressbar] // - [TextWidget.TagConfigure] (command specific) // - [Text] func Foreground(val any) Opt { return rawOption(fmt.Sprintf(`-foreground %s`, optionString(val))) } // Foreground — Get the configured option value. // // Known uses: // - [Button] // - [Checkbutton] // - [Entry] // - [Label] // - [Labelframe] // - [Listbox] // - [Menu] // - [Menubutton] // - [Message] // - [Radiobutton] // - [Scale] // - [Spinbox] // - [TEntry] // - [TLabel] // - [TProgressbar] // - [Text] func (w *Window) Foreground() string { return evalErr(fmt.Sprintf(`%s cget -foreground`, w)) } // Format option. // // Known uses: // - [ClipboardAppend] (command specific) // - [NewPhoto] (command specific) // - [Spinbox] (widget specific) // - [TSpinbox] (widget specific) func Format(val any) Opt { return rawOption(fmt.Sprintf(`-format %s`, optionString(val))) } // Format — Get the configured option value. // // Known uses: // - [Spinbox] (widget specific) // - [TSpinbox] (widget specific) func (w *Window) Format() string { return evalErr(fmt.Sprintf(`%s cget -format`, w)) } // Gamma option. // // Known uses: // - [NewPhoto] (command specific) func Gamma(val any) Opt { return rawOption(fmt.Sprintf(`-gamma %s`, optionString(val))) } // Handlepad option. // // Known uses: // - [Panedwindow] (widget specific) func Handlepad(val any) Opt { return rawOption(fmt.Sprintf(`-handlepad %s`, optionString(val))) } // Handlepad — Get the configured option value. // // Known uses: // - [Panedwindow] (widget specific) func (w *Window) Handlepad() string { return evalErr(fmt.Sprintf(`%s cget -handlepad`, w)) } // Handlesize option. // // Known uses: // - [Panedwindow] (widget specific) func Handlesize(val any) Opt { return rawOption(fmt.Sprintf(`-handlesize %s`, optionString(val))) } // Handlesize — Get the configured option value. // // Known uses: // - [Panedwindow] (widget specific) func (w *Window) Handlesize() string { return evalErr(fmt.Sprintf(`%s cget -handlesize`, w)) } // Height option. // // Known uses: // - [Button] (widget specific) // - [Canvas] (widget specific) // - [Checkbutton] (widget specific) // - [Frame] (widget specific) // - [Label] (widget specific) // - [Labelframe] (widget specific) // - [Listbox] (widget specific) // - [Menubutton] (widget specific) // - [NewPhoto] (command specific) // - [Panedwindow] (widget specific) // - [Place] (command specific) // - [Radiobutton] (widget specific) // - [TCombobox] (widget specific) // - [TFrame] (widget specific) // - [TLabelframe] (widget specific) // - [TNotebook] (widget specific) // - [TPanedwindow] (widget specific) // - [TTreeview] (widget specific) // - [Text] (widget specific) // - [Toplevel] (widget specific) func Height(val any) Opt { return rawOption(fmt.Sprintf(`-height %s`, optionString(val))) } // Height — Get the configured option value. // // Known uses: // - [Button] (widget specific) // - [Canvas] (widget specific) // - [Checkbutton] (widget specific) // - [Frame] (widget specific) // - [Label] (widget specific) // - [Labelframe] (widget specific) // - [Listbox] (widget specific) // - [Menubutton] (widget specific) // - [Panedwindow] (widget specific) // - [Radiobutton] (widget specific) // - [TCombobox] (widget specific) // - [TFrame] (widget specific) // - [TLabelframe] (widget specific) // - [TNotebook] (widget specific) // - [TPanedwindow] (widget specific) // - [TTreeview] (widget specific) // - [Text] (widget specific) // - [Toplevel] (widget specific) func (w *Window) Height() string { return evalErr(fmt.Sprintf(`%s cget -height`, w)) } // Hidemargin option. // // Known uses: // - [MenuWidget.AddCascade] (command specific) // - [MenuWidget.AddCommand] (command specific) // - [MenuWidget.AddSeparator] (command specific) func Hidemargin(val any) Opt { return rawOption(fmt.Sprintf(`-hidemargin %s`, optionString(val))) } // Highlightbackground option. // // Specifies the color to display in the traversal highlight region when // the widget does not have the input focus. // // Known uses: // - [Button] // - [Canvas] // - [Checkbutton] // - [Entry] // - [Frame] // - [Label] // - [Labelframe] // - [Listbox] // - [Menubutton] // - [Message] // - [Radiobutton] // - [Scale] // - [Scrollbar] // - [Spinbox] // - [Text] // - [Toplevel] func Highlightbackground(val any) Opt { return rawOption(fmt.Sprintf(`-highlightbackground %s`, optionString(val))) } // Highlightbackground — Get the configured option value. // // Known uses: // - [Button] // - [Canvas] // - [Checkbutton] // - [Entry] // - [Frame] // - [Label] // - [Labelframe] // - [Listbox] // - [Menubutton] // - [Message] // - [Radiobutton] // - [Scale] // - [Scrollbar] // - [Spinbox] // - [Text] // - [Toplevel] func (w *Window) Highlightbackground() string { return evalErr(fmt.Sprintf(`%s cget -highlightbackground`, w)) } // Highlightcolor option. // // Specifies the color to use for the traversal highlight rectangle that is // drawn around the widget when it has the input focus. // // Known uses: // - [Button] // - [Canvas] // - [Checkbutton] // - [Entry] // - [Frame] // - [Label] // - [Labelframe] // - [Listbox] // - [Menubutton] // - [Message] // - [Radiobutton] // - [Scale] // - [Scrollbar] // - [Spinbox] // - [Text] // - [Toplevel] func Highlightcolor(val any) Opt { return rawOption(fmt.Sprintf(`-highlightcolor %s`, optionString(val))) } // Highlightcolor — Get the configured option value. // // Known uses: // - [Button] // - [Canvas] // - [Checkbutton] // - [Entry] // - [Frame] // - [Label] // - [Labelframe] // - [Listbox] // - [Menubutton] // - [Message] // - [Radiobutton] // - [Scale] // - [Scrollbar] // - [Spinbox] // - [Text] // - [Toplevel] func (w *Window) Highlightcolor() string { return evalErr(fmt.Sprintf(`%s cget -highlightcolor`, w)) } // Highlightthickness option. // // Specifies a non-negative value indicating the width of the highlight // rectangle to draw around the outside of the widget when it has the // input focus. // The value may have any of the forms acceptable to Tk_GetPixels. // If the value is zero, no focus highlight is drawn around the widget. // // Known uses: // - [Button] // - [Canvas] // - [Checkbutton] // - [Entry] // - [Frame] // - [Label] // - [Labelframe] // - [Listbox] // - [Menubutton] // - [Message] // - [Radiobutton] // - [Scale] // - [Scrollbar] // - [Spinbox] // - [Text] // - [Toplevel] func Highlightthickness(val any) Opt { return rawOption(fmt.Sprintf(`-highlightthickness %s`, optionString(val))) } // Highlightthickness — Get the configured option value. // // Known uses: // - [Button] // - [Canvas] // - [Checkbutton] // - [Entry] // - [Frame] // - [Label] // - [Labelframe] // - [Listbox] // - [Menubutton] // - [Message] // - [Radiobutton] // - [Scale] // - [Scrollbar] // - [Spinbox] // - [Text] // - [Toplevel] func (w *Window) Highlightthickness() string { return evalErr(fmt.Sprintf(`%s cget -highlightthickness`, w)) } // Icon option. // // Known uses: // - [MessageBox] (command specific) func Icon(val any) Opt { return rawOption(fmt.Sprintf(`-icon %s`, optionString(val))) } // Image option. // // Specifies an image to display in the widget, which must have been // created with the image create command. // Typically, if the -image option is specified then it overrides other // options that specify a bitmap or textual value to display in the // widget, though this is controlled by the -compound option; // the -image option may be reset to an empty string to re-enable // a bitmap or text display. // // Known uses: // - [Button] // - [Checkbutton] // - [Label] // - [MenuWidget.AddCascade] (command specific) // - [MenuWidget.AddCommand] (command specific) // - [MenuWidget.AddSeparator] (command specific) // - [Menubutton] // - [Radiobutton] // - [TButton] // - [TCheckbutton] // - [TLabel] // - [TMenubutton] // - [TRadiobutton] func Image(val any) Opt { return rawOption(fmt.Sprintf(`-image %s`, optionString(val))) } // Image — Get the configured option value. // // Known uses: // - [Button] // - [Checkbutton] // - [Label] // - [Menubutton] // - [Radiobutton] // - [TButton] // - [TCheckbutton] // - [TLabel] // - [TMenubutton] // - [TRadiobutton] func (w *Window) Image() string { return evalErr(fmt.Sprintf(`%s cget -image`, w)) } // In option. // // Known uses: // - [Grid] (command specific) // - [Pack] (command specific) // - [Place] (command specific) func In(val any) Opt { return rawOption(fmt.Sprintf(`-in %s`, optionString(val))) } // Inactiveselectbackground option. // // Known uses: // - [Text] (widget specific) func Inactiveselectbackground(val any) Opt { return rawOption(fmt.Sprintf(`-inactiveselectbackground %s`, optionString(val))) } // Inactiveselectbackground — Get the configured option value. // // Known uses: // - [Text] (widget specific) func (w *Window) Inactiveselectbackground() string { return evalErr(fmt.Sprintf(`%s cget -inactiveselectbackground`, w)) } // Increment option. // // Known uses: // - [Spinbox] (widget specific) // - [TSpinbox] (widget specific) func Increment(val any) Opt { return rawOption(fmt.Sprintf(`-increment %s`, optionString(val))) } // Increment — Get the configured option value. // // Known uses: // - [Spinbox] (widget specific) // - [TSpinbox] (widget specific) func (w *Window) Increment() string { return evalErr(fmt.Sprintf(`%s cget -increment`, w)) } // Indicatoron option. // // Known uses: // - [Checkbutton] (widget specific) // - [MenuWidget.AddCascade] (command specific) // - [MenuWidget.AddCommand] (command specific) // - [MenuWidget.AddSeparator] (command specific) // - [Menubutton] (widget specific) // - [Radiobutton] (widget specific) func Indicatoron(val any) Opt { return rawOption(fmt.Sprintf(`-indicatoron %s`, optionString(val))) } // Indicatoron — Get the configured option value. // // Known uses: // - [Checkbutton] (widget specific) // - [Menubutton] (widget specific) // - [Radiobutton] (widget specific) func (w *Window) Indicatoron() string { return evalErr(fmt.Sprintf(`%s cget -indicatoron`, w)) } // Initialcolor option. // // Known uses: // - [ChooseColor] (command specific) func Initialcolor(val any) Opt { return rawOption(fmt.Sprintf(`-initialcolor %s`, optionString(val))) } // Initialdir option. // // Known uses: // - [ChooseDirectory] (command specific) // - [GetOpenFile] (command specific) // - [GetSaveFile] (command specific) func Initialdir(val any) Opt { return rawOption(fmt.Sprintf(`-initialdir %s`, optionString(val))) } // Initialfile option. // // Known uses: // - [GetOpenFile] (command specific) // - [GetSaveFile] (command specific) func Initialfile(val any) Opt { return rawOption(fmt.Sprintf(`-initialfile %s`, optionString(val))) } // Insertbackground option. // // Specifies the color to use as background in the area covered by the // insertion cursor. This color will normally override either the normal // background for the widget (or the selection background if the insertion // cursor happens to fall in the selection). // // Known uses: // - [Canvas] // - [Entry] // - [Spinbox] // - [Text] func Insertbackground(val any) Opt { return rawOption(fmt.Sprintf(`-insertbackground %s`, optionString(val))) } // Insertbackground — Get the configured option value. // // Known uses: // - [Canvas] // - [Entry] // - [Spinbox] // - [Text] func (w *Window) Insertbackground() string { return evalErr(fmt.Sprintf(`%s cget -insertbackground`, w)) } // Insertborderwidth option. // // Specifies a non-negative value indicating the width // of the 3-D border to draw around the insertion cursor. // The value may have any of the forms acceptable to Tk_GetPixels. // // Known uses: // - [Canvas] // - [Entry] // - [Spinbox] // - [Text] func Insertborderwidth(val any) Opt { return rawOption(fmt.Sprintf(`-insertborderwidth %s`, optionString(val))) } // Insertborderwidth — Get the configured option value. // // Known uses: // - [Canvas] // - [Entry] // - [Spinbox] // - [Text] func (w *Window) Insertborderwidth() string { return evalErr(fmt.Sprintf(`%s cget -insertborderwidth`, w)) } // Insertofftime option. // // Specifies a non-negative integer value indicating the number of // milliseconds the insertion cursor should remain // in each blink cycle. // If this option is zero then the cursor does not blink: it is on // all the time. // // Known uses: // - [Canvas] // - [Entry] // - [Spinbox] // - [Text] func Insertofftime(val any) Opt { return rawOption(fmt.Sprintf(`-insertofftime %s`, optionString(val))) } // Insertofftime — Get the configured option value. // // Known uses: // - [Canvas] // - [Entry] // - [Spinbox] // - [Text] func (w *Window) Insertofftime() string { return evalErr(fmt.Sprintf(`%s cget -insertofftime`, w)) } // Insertontime option. // // Specifies a non-negative integer value indicating the number of // milliseconds the insertion cursor should remain // in each blink cycle. // // Known uses: // - [Canvas] // - [Entry] // - [Spinbox] // - [Text] func Insertontime(val any) Opt { return rawOption(fmt.Sprintf(`-insertontime %s`, optionString(val))) } // Insertontime — Get the configured option value. // // Known uses: // - [Canvas] // - [Entry] // - [Spinbox] // - [Text] func (w *Window) Insertontime() string { return evalErr(fmt.Sprintf(`%s cget -insertontime`, w)) } // Insertunfocussed option. // // Known uses: // - [Text] (widget specific) func Insertunfocussed(val any) Opt { return rawOption(fmt.Sprintf(`-insertunfocussed %s`, optionString(val))) } // Insertunfocussed — Get the configured option value. // // Known uses: // - [Text] (widget specific) func (w *Window) Insertunfocussed() string { return evalErr(fmt.Sprintf(`%s cget -insertunfocussed`, w)) } // Insertwidth option. // // Specifies a non-negative value indicating the total width of the insertion cursor. // The value may have any of the forms acceptable to Tk_GetPixels. // If a border has been specified for the insertion // cursor (using the -insertborderwidth option), the border // will be drawn inside the width specified by the -insertwidth // option. // // Known uses: // - [Canvas] // - [Entry] // - [Spinbox] // - [Text] func Insertwidth(val any) Opt { return rawOption(fmt.Sprintf(`-insertwidth %s`, optionString(val))) } // Insertwidth — Get the configured option value. // // Known uses: // - [Canvas] // - [Entry] // - [Spinbox] // - [Text] func (w *Window) Insertwidth() string { return evalErr(fmt.Sprintf(`%s cget -insertwidth`, w)) } // Invalidcommand option. // // See also [Event handlers]. // // Known uses: // - [Entry] (widget specific) // - [Spinbox] (widget specific) // - [TEntry] (widget specific) // // [Event handlers]: https://pkg.go.dev/modernc.org/tk9.0#hdr-Event_handlers func Invalidcommand(handler any) Opt { return newEventHandler("-invalidcommand", handler) } // Ipadx option. // // Known uses: // - [Grid] (command specific) // - [Pack] (command specific) func Ipadx(val any) Opt { return rawOption(fmt.Sprintf(`-ipadx %s`, optionString(val))) } // Ipady option. // // Known uses: // - [Grid] (command specific) // - [Pack] (command specific) func Ipady(val any) Opt { return rawOption(fmt.Sprintf(`-ipady %s`, optionString(val))) } // Jump option. // // For widgets with a slider that can be dragged to adjust a value, // such as scrollbars, this option determines when // notifications are made about changes in the value. // The option's value must be a boolean of the form accepted by // Tcl_GetBoolean. // If the value is false, updates are made continuously as the // slider is dragged. // If the value is true, updates are delayed until the mouse button // is released to end the drag; at that point a single notification // is made (the value // rather than changing smoothly). // // Known uses: // - [Scrollbar] func Jump(val any) Opt { return rawOption(fmt.Sprintf(`-jump %s`, optionString(val))) } // Jump — Get the configured option value. // // Known uses: // - [Scrollbar] func (w *Window) Jump() string { return evalErr(fmt.Sprintf(`%s cget -jump`, w)) } // Justify option. // // When there are multiple lines of text displayed in a widget, this // option determines how the lines line up with each other. // Must be one of left, center, or right. // Left means that the lines' left edges all line up, center // means that the lines' centers are aligned, and right means // that the lines' right edges line up. // // Known uses: // - [Button] // - [Checkbutton] // - [Entry] // - [Label] // - [Listbox] // - [Menubutton] // - [Message] (widget specific) // - [Radiobutton] // - [Spinbox] // - [TButton] // - [TCombobox] (widget specific) // - [TEntry] (widget specific) // - [TLabel] // - [TProgressbar] // - [TextWidget.TagConfigure] (command specific) func Justify(val any) Opt { return rawOption(fmt.Sprintf(`-justify %s`, optionString(val))) } // Justify — Get the configured option value. // // Known uses: // - [Button] // - [Checkbutton] // - [Entry] // - [Label] // - [Listbox] // - [Menubutton] // - [Message] (widget specific) // - [Radiobutton] // - [Spinbox] // - [TButton] // - [TCombobox] (widget specific) // - [TEntry] (widget specific) // - [TLabel] // - [TProgressbar] func (w *Window) Justify() string { return evalErr(fmt.Sprintf(`%s cget -justify`, w)) } // Lbl option. // // Known uses: // - [MenuWidget.AddCascade] (command specific) // - [MenuWidget.AddCommand] (command specific) // - [MenuWidget.AddSeparator] (command specific) // - [Scale] (widget specific) func Lbl(val any) Opt { return rawOption(fmt.Sprintf(`-label %s`, optionString(val))) } // Lbl — Get the configured option value. // // Known uses: // - [Scale] (widget specific) func (w *Window) Lbl() string { return evalErr(fmt.Sprintf(`%s cget -label`, w)) } // Labelanchor option. // // Known uses: // - [Labelframe] (widget specific) // - [TLabelframe] (widget specific) func Labelanchor(val any) Opt { return rawOption(fmt.Sprintf(`-labelanchor %s`, optionString(val))) } // Labelanchor — Get the configured option value. // // Known uses: // - [Labelframe] (widget specific) // - [TLabelframe] (widget specific) func (w *Window) Labelanchor() string { return evalErr(fmt.Sprintf(`%s cget -labelanchor`, w)) } // Labelwidget option. // // Known uses: // - [Labelframe] (widget specific) // - [TLabelframe] (widget specific) func Labelwidget(val any) Opt { return rawOption(fmt.Sprintf(`-labelwidget %s`, optionString(val))) } // Labelwidget — Get the configured option value. // // Known uses: // - [Labelframe] (widget specific) // - [TLabelframe] (widget specific) func (w *Window) Labelwidget() string { return evalErr(fmt.Sprintf(`%s cget -labelwidget`, w)) } // Lastfor option. // // Known uses: // - [Focus] (command specific) func Lastfor(val any) Opt { return rawOption(fmt.Sprintf(`-lastfor %s`, optionString(val))) } // Length option. // // Known uses: // - [Scale] (widget specific) // - [TProgressbar] (widget specific) // - [TScale] (widget specific) func Length(val any) Opt { return rawOption(fmt.Sprintf(`-length %s`, optionString(val))) } // Length — Get the configured option value. // // Known uses: // - [Scale] (widget specific) // - [TProgressbar] (widget specific) // - [TScale] (widget specific) func (w *Window) Length() string { return evalErr(fmt.Sprintf(`%s cget -length`, w)) } // Listvariable option. // // Known uses: // - [Listbox] (widget specific) func Listvariable(val any) Opt { return rawOption(fmt.Sprintf(`-listvariable %s`, optionString(val))) } // Listvariable — Get the configured option value. // // Known uses: // - [Listbox] (widget specific) func (w *Window) Listvariable() string { return evalErr(fmt.Sprintf(`%s cget -listvariable`, w)) } // Lmargin1 option. // // Known uses: // - [TextWidget.TagConfigure] (command specific) func Lmargin1(val any) Opt { return rawOption(fmt.Sprintf(`-lmargin1 %s`, optionString(val))) } // Lmargin2 option. // // Known uses: // - [TextWidget.TagConfigure] (command specific) func Lmargin2(val any) Opt { return rawOption(fmt.Sprintf(`-lmargin2 %s`, optionString(val))) } // Lmargincolor option. // // Known uses: // - [TextWidget.TagConfigure] (command specific) func Lmargincolor(val any) Opt { return rawOption(fmt.Sprintf(`-lmargincolor %s`, optionString(val))) } // Maskdata option. // // Known uses: // - [NewBitmap] (command specific) func Maskdata(val any) Opt { return rawOption(fmt.Sprintf(`-maskdata %s`, optionString(val))) } // Maskfile option. // // Known uses: // - [NewBitmap] (command specific) func Maskfile(val any) Opt { return rawOption(fmt.Sprintf(`-maskfile %s`, optionString(val))) } // Maximum option. // // Known uses: // - [TProgressbar] (widget specific) func Maximum(val any) Opt { return rawOption(fmt.Sprintf(`-maximum %s`, optionString(val))) } // Maximum — Get the configured option value. // // Known uses: // - [TProgressbar] (widget specific) func (w *Window) Maximum() string { return evalErr(fmt.Sprintf(`%s cget -maximum`, w)) } // Maxundo option. // // Known uses: // - [Text] (widget specific) func Maxundo(val any) Opt { return rawOption(fmt.Sprintf(`-maxundo %s`, optionString(val))) } // Maxundo — Get the configured option value. // // Known uses: // - [Text] (widget specific) func (w *Window) Maxundo() string { return evalErr(fmt.Sprintf(`%s cget -maxundo`, w)) } // Mnu option. // // Known uses: // - [MenuWidget.AddCascade] (command specific) // - [MenuWidget.AddCommand] (command specific) // - [MenuWidget.AddSeparator] (command specific) // - [Menubutton] (widget specific) // - [TMenubutton] (widget specific) // - [Toplevel] (widget specific) func Mnu(val any) Opt { return rawOption(fmt.Sprintf(`-menu %s`, optionString(val))) } // Mnu — Get the configured option value. // // Known uses: // - [Menubutton] (widget specific) // - [TMenubutton] (widget specific) // - [Toplevel] (widget specific) func (w *Window) Mnu() string { return evalErr(fmt.Sprintf(`%s cget -menu`, w)) } // Msg option. // // Known uses: // - [ChooseDirectory] (command specific) // - [MessageBox] (command specific) func Msg(val any) Opt { return rawOption(fmt.Sprintf(`-message %s`, optionString(val))) } // Metadata option. // // Known uses: // - [NewPhoto] (command specific) func Metadata(val any) Opt { return rawOption(fmt.Sprintf(`-metadata %s`, optionString(val))) } // Mode option. // // Known uses: // - [TProgressbar] (widget specific) func Mode(val any) Opt { return rawOption(fmt.Sprintf(`-mode %s`, optionString(val))) } // Mode — Get the configured option value. // // Known uses: // - [TProgressbar] (widget specific) func (w *Window) Mode() string { return evalErr(fmt.Sprintf(`%s cget -mode`, w)) } // Multiple option. // // Known uses: // - [GetOpenFile] (command specific) func Multiple(val any) Opt { return rawOption(fmt.Sprintf(`-multiple %s`, optionString(val))) } // Mustexist option. // // Known uses: // - [ChooseDirectory] (command specific) func Mustexist(val any) Opt { return rawOption(fmt.Sprintf(`-mustexist %s`, optionString(val))) } // Nice option. // // Known uses: // - [Bell] (command specific) func Nice(val any) Opt { return rawOption(fmt.Sprintf(`-nice %s`, optionString(val))) } // Offrelief option. // // Known uses: // - [Checkbutton] (widget specific) // - [Radiobutton] (widget specific) func Offrelief(val any) Opt { return rawOption(fmt.Sprintf(`-offrelief %s`, optionString(val))) } // Offrelief — Get the configured option value. // // Known uses: // - [Checkbutton] (widget specific) // - [Radiobutton] (widget specific) func (w *Window) Offrelief() string { return evalErr(fmt.Sprintf(`%s cget -offrelief`, w)) } // Offset option. // // Known uses: // - [TextWidget.TagConfigure] (command specific) func Offset(val any) Opt { return rawOption(fmt.Sprintf(`-offset %s`, optionString(val))) } // Offvalue option. // // Known uses: // - [Checkbutton] (widget specific) // - [MenuWidget.AddCascade] (command specific) // - [MenuWidget.AddCommand] (command specific) // - [MenuWidget.AddSeparator] (command specific) // - [TCheckbutton] (widget specific) func Offvalue(val any) Opt { return rawOption(fmt.Sprintf(`-offvalue %s`, optionString(val))) } // Offvalue — Get the configured option value. // // Known uses: // - [Checkbutton] (widget specific) // - [TCheckbutton] (widget specific) func (w *Window) Offvalue() string { return evalErr(fmt.Sprintf(`%s cget -offvalue`, w)) } // Onvalue option. // // Known uses: // - [Checkbutton] (widget specific) // - [MenuWidget.AddCascade] (command specific) // - [MenuWidget.AddCommand] (command specific) // - [MenuWidget.AddSeparator] (command specific) // - [TCheckbutton] (widget specific) func Onvalue(val any) Opt { return rawOption(fmt.Sprintf(`-onvalue %s`, optionString(val))) } // Onvalue — Get the configured option value. // // Known uses: // - [Checkbutton] (widget specific) // - [TCheckbutton] (widget specific) func (w *Window) Onvalue() string { return evalErr(fmt.Sprintf(`%s cget -onvalue`, w)) } // Opaqueresize option. // // Known uses: // - [Panedwindow] (widget specific) func Opaqueresize(val any) Opt { return rawOption(fmt.Sprintf(`-opaqueresize %s`, optionString(val))) } // Opaqueresize — Get the configured option value. // // Known uses: // - [Panedwindow] (widget specific) func (w *Window) Opaqueresize() string { return evalErr(fmt.Sprintf(`%s cget -opaqueresize`, w)) } // Orient option. // // For widgets that can lay themselves out with either a horizontal // or vertical orientation, such as scrollbars, this option specifies // which orientation should be used. Must be either horizontal // or vertical or an abbreviation of one of these. // // Known uses: // - [Panedwindow] // - [Scale] // - [Scrollbar] // - [TPanedwindow] (widget specific) // - [TProgressbar] (widget specific) // - [TScale] (widget specific) // - [TScrollbar] (widget specific) // - [TSeparator] (widget specific) func Orient(val any) Opt { return rawOption(fmt.Sprintf(`-orient %s`, optionString(val))) } // Orient — Get the configured option value. // // Known uses: // - [Panedwindow] // - [Scale] // - [Scrollbar] // - [TPanedwindow] (widget specific) // - [TProgressbar] (widget specific) // - [TScale] (widget specific) // - [TScrollbar] (widget specific) // - [TSeparator] (widget specific) func (w *Window) Orient() string { return evalErr(fmt.Sprintf(`%s cget -orient`, w)) } // Overrelief option. // // Known uses: // - [Button] (widget specific) // - [Checkbutton] (widget specific) // - [Radiobutton] (widget specific) func Overrelief(val any) Opt { return rawOption(fmt.Sprintf(`-overrelief %s`, optionString(val))) } // Overrelief — Get the configured option value. // // Known uses: // - [Button] (widget specific) // - [Checkbutton] (widget specific) // - [Radiobutton] (widget specific) func (w *Window) Overrelief() string { return evalErr(fmt.Sprintf(`%s cget -overrelief`, w)) } // Overstrike option. // // Known uses: // - [NewFont] (command specific) // - [TextWidget.TagConfigure] (command specific) func Overstrike(val any) Opt { return rawOption(fmt.Sprintf(`-overstrike %s`, optionString(val))) } // Overstrikefg option. // // Known uses: // - [TextWidget.TagConfigure] (command specific) func Overstrikefg(val any) Opt { return rawOption(fmt.Sprintf(`-overstrikefg %s`, optionString(val))) } // Padding option. // // Specifies the internal padding for the widget. // The padding is a list of up to four length specifications // left top right bottom. // If fewer than four elements are specified, // bottom defaults to top, // right defaults to left, and // top defaults to left. // In other words, a list of three numbers specify the left, vertical, and right // padding; a list of two numbers specify the horizontal and the vertical padding; // a single number specifies the same padding all the way around the widget. // // Known uses: // - [TFrame] // - [TLabel] // - [TLabelframe] // - [TNotebook] (widget specific) // - [TTreeview] func Padding(val any) Opt { return rawOption(fmt.Sprintf(`-padding %s`, optionString(val))) } // Padding — Get the configured option value. // // Known uses: // - [TFrame] // - [TLabel] // - [TLabelframe] // - [TNotebook] (widget specific) // - [TTreeview] func (w *Window) Padding() string { return evalErr(fmt.Sprintf(`%s cget -padding`, w)) } // Padx option. // // Specifies a non-negative value indicating how much extra space // to request for the widget in the X-direction. // The value may have any of the forms acceptable to Tk_GetPixels. // When computing how large a window it needs, the widget will // add this amount to the width it would normally need (as determined // by the width of the things displayed in the widget); if the geometry // manager can satisfy this request, the widget will end up with extra // internal space to the left and/or right of what it displays inside. // Most widgets only use this option for padding text: if they are // displaying a bitmap or image, then they usually ignore padding // options. // // Known uses: // - [Button] // - [Checkbutton] // - [Frame] // - [Grid] (command specific) // - [Label] // - [Labelframe] // - [Menubutton] // - [Message] // - [Pack] (command specific) // - [Radiobutton] // - [Text] // - [Toplevel] func Padx(val any) Opt { return rawOption(fmt.Sprintf(`-padx %s`, optionString(val))) } // Padx — Get the configured option value. // // Known uses: // - [Button] // - [Checkbutton] // - [Frame] // - [Label] // - [Labelframe] // - [Menubutton] // - [Message] // - [Radiobutton] // - [Text] // - [Toplevel] func (w *Window) Padx() string { return evalErr(fmt.Sprintf(`%s cget -padx`, w)) } // Pady option. // // Specifies a non-negative value indicating how much extra space // to request for the widget in the Y-direction. // The value may have any of the forms acceptable to Tk_GetPixels. // When computing how large a window it needs, the widget will add // this amount to the height it would normally need (as determined by // the height of the things displayed in the widget); if the geometry // manager can satisfy this request, the widget will end up with extra // internal space above and/or below what it displays inside. // Most widgets only use this option for padding text: if they are // displaying a bitmap or image, then they usually ignore padding // options. // // Known uses: // - [Button] // - [Checkbutton] // - [Frame] // - [Grid] (command specific) // - [Label] // - [Labelframe] // - [Menubutton] // - [Message] // - [Pack] (command specific) // - [Radiobutton] // - [Text] // - [Toplevel] func Pady(val any) Opt { return rawOption(fmt.Sprintf(`-pady %s`, optionString(val))) } // Pady — Get the configured option value. // // Known uses: // - [Button] // - [Checkbutton] // - [Frame] // - [Label] // - [Labelframe] // - [Menubutton] // - [Message] // - [Radiobutton] // - [Text] // - [Toplevel] func (w *Window) Pady() string { return evalErr(fmt.Sprintf(`%s cget -pady`, w)) } // Palette option. // // Known uses: // - [NewPhoto] (command specific) func Palette(val any) Opt { return rawOption(fmt.Sprintf(`-palette %s`, optionString(val))) } // Parent option. // // Known uses: // - [ChooseColor] (command specific) // - [ChooseDirectory] (command specific) // - [Fontchooser] (command specific) // - [GetOpenFile] (command specific) // - [GetSaveFile] (command specific) // - [MessageBox] (command specific) func Parent(val any) Opt { return rawOption(fmt.Sprintf(`-parent %s`, optionString(val))) } // Phase option. // // Known uses: // - [TProgressbar] (widget specific) func Phase(val any) Opt { return rawOption(fmt.Sprintf(`-phase %s`, optionString(val))) } // Phase — Get the configured option value. // // Known uses: // - [TProgressbar] (widget specific) func (w *Window) Phase() string { return evalErr(fmt.Sprintf(`%s cget -phase`, w)) } // Placeholder option. // // Specifies a help text string to display if no text is otherwise displayed, // that is when the widget is empty. The placeholder text is displayed using // the values of the -font and -justify options. // // Known uses: // - [Entry] // - [Spinbox] // - [TCombobox] // - [TEntry] // - [TSpinbox] func Placeholder(val any) Opt { return rawOption(fmt.Sprintf(`-placeholder %s`, optionString(val))) } // Placeholder — Get the configured option value. // // Known uses: // - [Entry] // - [Spinbox] // - [TCombobox] // - [TEntry] // - [TSpinbox] func (w *Window) Placeholder() string { return evalErr(fmt.Sprintf(`%s cget -placeholder`, w)) } // Placeholderforeground option. // // Specifies the foreground color to use when the placeholder text is // displayed. The default color is platform-specific. // // Known uses: // - [Entry] // - [Spinbox] // - [TCombobox] // - [TEntry] // - [TSpinbox] func Placeholderforeground(val any) Opt { return rawOption(fmt.Sprintf(`-placeholderforeground %s`, optionString(val))) } // Placeholderforeground — Get the configured option value. // // Known uses: // - [Entry] // - [Spinbox] // - [TCombobox] // - [TEntry] // - [TSpinbox] func (w *Window) Placeholderforeground() string { return evalErr(fmt.Sprintf(`%s cget -placeholderforeground`, w)) } // Postcommand option. // // See also [Event handlers]. // // Known uses: // - [Menu] (widget specific) // - [TCombobox] (widget specific) // // [Event handlers]: https://pkg.go.dev/modernc.org/tk9.0#hdr-Event_handlers func Postcommand(handler any) Opt { return newEventHandler("-postcommand", handler) } // Proxybackground option. // // Known uses: // - [Panedwindow] (widget specific) func Proxybackground(val any) Opt { return rawOption(fmt.Sprintf(`-proxybackground %s`, optionString(val))) } // Proxybackground — Get the configured option value. // // Known uses: // - [Panedwindow] (widget specific) func (w *Window) Proxybackground() string { return evalErr(fmt.Sprintf(`%s cget -proxybackground`, w)) } // Proxyborderwidth option. // // Known uses: // - [Panedwindow] (widget specific) func Proxyborderwidth(val any) Opt { return rawOption(fmt.Sprintf(`-proxyborderwidth %s`, optionString(val))) } // Proxyborderwidth — Get the configured option value. // // Known uses: // - [Panedwindow] (widget specific) func (w *Window) Proxyborderwidth() string { return evalErr(fmt.Sprintf(`%s cget -proxyborderwidth`, w)) } // Proxyrelief option. // // Known uses: // - [Panedwindow] (widget specific) func Proxyrelief(val any) Opt { return rawOption(fmt.Sprintf(`-proxyrelief %s`, optionString(val))) } // Proxyrelief — Get the configured option value. // // Known uses: // - [Panedwindow] (widget specific) func (w *Window) Proxyrelief() string { return evalErr(fmt.Sprintf(`%s cget -proxyrelief`, w)) } // Readonlybackground option. // // Known uses: // - [Entry] (widget specific) // - [Spinbox] (widget specific) func Readonlybackground(val any) Opt { return rawOption(fmt.Sprintf(`-readonlybackground %s`, optionString(val))) } // Readonlybackground — Get the configured option value. // // Known uses: // - [Entry] (widget specific) // - [Spinbox] (widget specific) func (w *Window) Readonlybackground() string { return evalErr(fmt.Sprintf(`%s cget -readonlybackground`, w)) } // Relheight option. // // Known uses: // - [Place] (command specific) func Relheight(val any) Opt { return rawOption(fmt.Sprintf(`-relheight %s`, optionString(val))) } // Relief option. // // Specifies the 3-D effect desired for the widget. Acceptable // values are raised, sunken, flat, ridge, // solid, and groove. // The value // indicates how the interior of the widget should appear relative // to its exterior; for example, raised means the interior of // the widget should appear to protrude from the screen, relative to // the exterior of the widget. // // Known uses: // - [Button] // - [Canvas] // - [Checkbutton] // - [Entry] // - [Frame] // - [Label] // - [Labelframe] // - [Listbox] // - [Menu] // - [Menubutton] // - [Message] // - [Panedwindow] // - [Radiobutton] // - [Scale] // - [Scrollbar] // - [Spinbox] // - [TFrame] (widget specific) // - [TLabel] (widget specific) // - [TextWidget.TagConfigure] (command specific) // - [Text] // - [Toplevel] func Relief(val any) Opt { return rawOption(fmt.Sprintf(`-relief %s`, optionString(val))) } // Relief — Get the configured option value. // // Known uses: // - [Button] // - [Canvas] // - [Checkbutton] // - [Entry] // - [Frame] // - [Label] // - [Labelframe] // - [Listbox] // - [Menu] // - [Menubutton] // - [Message] // - [Panedwindow] // - [Radiobutton] // - [Scale] // - [Scrollbar] // - [Spinbox] // - [TFrame] (widget specific) // - [TLabel] (widget specific) // - [Text] // - [Toplevel] func (w *Window) Relief() string { return evalErr(fmt.Sprintf(`%s cget -relief`, w)) } // Relwidth option. // // Known uses: // - [Place] (command specific) func Relwidth(val any) Opt { return rawOption(fmt.Sprintf(`-relwidth %s`, optionString(val))) } // Relx option. // // Known uses: // - [Place] (command specific) func Relx(val any) Opt { return rawOption(fmt.Sprintf(`-relx %s`, optionString(val))) } // Rely option. // // Known uses: // - [Place] (command specific) func Rely(val any) Opt { return rawOption(fmt.Sprintf(`-rely %s`, optionString(val))) } // Repeatdelay option. // // Specifies the number of milliseconds a button or key must be held // down before it begins to auto-repeat. Used, for example, on the // up- and down-arrows in scrollbars. // // Known uses: // - [Button] // - [Scale] // - [Scrollbar] // - [Spinbox] func Repeatdelay(val any) Opt { return rawOption(fmt.Sprintf(`-repeatdelay %s`, optionString(val))) } // Repeatdelay — Get the configured option value. // // Known uses: // - [Button] // - [Scale] // - [Scrollbar] // - [Spinbox] func (w *Window) Repeatdelay() string { return evalErr(fmt.Sprintf(`%s cget -repeatdelay`, w)) } // Repeatinterval option. // // Used in conjunction with -repeatdelay: once auto-repeat // begins, this option determines the number of milliseconds between // auto-repeats. // // Known uses: // - [Button] // - [Scale] // - [Scrollbar] // - [Spinbox] func Repeatinterval(val any) Opt { return rawOption(fmt.Sprintf(`-repeatinterval %s`, optionString(val))) } // Repeatinterval — Get the configured option value. // // Known uses: // - [Button] // - [Scale] // - [Scrollbar] // - [Spinbox] func (w *Window) Repeatinterval() string { return evalErr(fmt.Sprintf(`%s cget -repeatinterval`, w)) } // Resolution option. // // Known uses: // - [Scale] (widget specific) func Resolution(val any) Opt { return rawOption(fmt.Sprintf(`-resolution %s`, optionString(val))) } // Resolution — Get the configured option value. // // Known uses: // - [Scale] (widget specific) func (w *Window) Resolution() string { return evalErr(fmt.Sprintf(`%s cget -resolution`, w)) } // Rmargin option. // // Known uses: // - [TextWidget.TagConfigure] (command specific) func Rmargin(val any) Opt { return rawOption(fmt.Sprintf(`-rmargin %s`, optionString(val))) } // Rmargincolor option. // // Known uses: // - [TextWidget.TagConfigure] (command specific) func Rmargincolor(val any) Opt { return rawOption(fmt.Sprintf(`-rmargincolor %s`, optionString(val))) } // Row option. // // Known uses: // - [Grid] (command specific) func Row(val any) Opt { return rawOption(fmt.Sprintf(`-row %s`, optionString(val))) } // Rowspan option. // // Known uses: // - [Grid] (command specific) func Rowspan(val any) Opt { return rawOption(fmt.Sprintf(`-rowspan %s`, optionString(val))) } // Sashcursor option. // // Known uses: // - [Panedwindow] (widget specific) func Sashcursor(val any) Opt { return rawOption(fmt.Sprintf(`-sashcursor %s`, optionString(val))) } // Sashcursor — Get the configured option value. // // Known uses: // - [Panedwindow] (widget specific) func (w *Window) Sashcursor() string { return evalErr(fmt.Sprintf(`%s cget -sashcursor`, w)) } // Sashpad option. // // Known uses: // - [Panedwindow] (widget specific) func Sashpad(val any) Opt { return rawOption(fmt.Sprintf(`-sashpad %s`, optionString(val))) } // Sashpad — Get the configured option value. // // Known uses: // - [Panedwindow] (widget specific) func (w *Window) Sashpad() string { return evalErr(fmt.Sprintf(`%s cget -sashpad`, w)) } // Sashrelief option. // // Known uses: // - [Panedwindow] (widget specific) func Sashrelief(val any) Opt { return rawOption(fmt.Sprintf(`-sashrelief %s`, optionString(val))) } // Sashrelief — Get the configured option value. // // Known uses: // - [Panedwindow] (widget specific) func (w *Window) Sashrelief() string { return evalErr(fmt.Sprintf(`%s cget -sashrelief`, w)) } // Sashwidth option. // // Known uses: // - [Panedwindow] (widget specific) func Sashwidth(val any) Opt { return rawOption(fmt.Sprintf(`-sashwidth %s`, optionString(val))) } // Sashwidth — Get the configured option value. // // Known uses: // - [Panedwindow] (widget specific) func (w *Window) Sashwidth() string { return evalErr(fmt.Sprintf(`%s cget -sashwidth`, w)) } // Screen option. // // Known uses: // - [Toplevel] (widget specific) func Screen(val any) Opt { return rawOption(fmt.Sprintf(`-screen %s`, optionString(val))) } // Screen — Get the configured option value. // // Known uses: // - [Toplevel] (widget specific) func (w *Window) Screen() string { return evalErr(fmt.Sprintf(`%s cget -screen`, w)) } // Scrollregion option. // // Known uses: // - [Canvas] (widget specific) func Scrollregion(val any) Opt { return rawOption(fmt.Sprintf(`-scrollregion %s`, optionString(val))) } // Scrollregion — Get the configured option value. // // Known uses: // - [Canvas] (widget specific) func (w *Window) Scrollregion() string { return evalErr(fmt.Sprintf(`%s cget -scrollregion`, w)) } // Selectbackground option. // // Specifies the background color to use when displaying selected // items. // // Known uses: // - [Canvas] // - [Entry] // - [Listbox] // - [Spinbox] // - [TextWidget.TagConfigure] (command specific) // - [Text] func Selectbackground(val any) Opt { return rawOption(fmt.Sprintf(`-selectbackground %s`, optionString(val))) } // Selectbackground — Get the configured option value. // // Known uses: // - [Canvas] // - [Entry] // - [Listbox] // - [Spinbox] // - [Text] func (w *Window) Selectbackground() string { return evalErr(fmt.Sprintf(`%s cget -selectbackground`, w)) } // Selectborderwidth option. // // Specifies a non-negative value indicating the width // of the 3-D border to draw around selected items. // The value may have any of the forms acceptable to Tk_GetPixels. // // Known uses: // - [Canvas] // - [Entry] // - [Listbox] // - [Spinbox] // - [Text] func Selectborderwidth(val any) Opt { return rawOption(fmt.Sprintf(`-selectborderwidth %s`, optionString(val))) } // Selectborderwidth — Get the configured option value. // // Known uses: // - [Canvas] // - [Entry] // - [Listbox] // - [Spinbox] // - [Text] func (w *Window) Selectborderwidth() string { return evalErr(fmt.Sprintf(`%s cget -selectborderwidth`, w)) } // Selectcolor option. // // Known uses: // - [Checkbutton] (widget specific) // - [MenuWidget.AddCascade] (command specific) // - [MenuWidget.AddCommand] (command specific) // - [MenuWidget.AddSeparator] (command specific) // - [Menu] (widget specific) // - [Radiobutton] (widget specific) func Selectcolor(val any) Opt { return rawOption(fmt.Sprintf(`-selectcolor %s`, optionString(val))) } // Selectcolor — Get the configured option value. // // Known uses: // - [Checkbutton] (widget specific) // - [Menu] (widget specific) // - [Radiobutton] (widget specific) func (w *Window) Selectcolor() string { return evalErr(fmt.Sprintf(`%s cget -selectcolor`, w)) } // Selectforeground option. // // Specifies the foreground color to use when displaying selected // items. // // Known uses: // - [Canvas] // - [Entry] // - [Listbox] // - [Spinbox] // - [TextWidget.TagConfigure] (command specific) // - [Text] func Selectforeground(val any) Opt { return rawOption(fmt.Sprintf(`-selectforeground %s`, optionString(val))) } // Selectforeground — Get the configured option value. // // Known uses: // - [Canvas] // - [Entry] // - [Listbox] // - [Spinbox] // - [Text] func (w *Window) Selectforeground() string { return evalErr(fmt.Sprintf(`%s cget -selectforeground`, w)) } // Selectimage option. // // Known uses: // - [Checkbutton] (widget specific) // - [MenuWidget.AddCascade] (command specific) // - [MenuWidget.AddCommand] (command specific) // - [MenuWidget.AddSeparator] (command specific) // - [Radiobutton] (widget specific) func Selectimage(val any) Opt { return rawOption(fmt.Sprintf(`-selectimage %s`, optionString(val))) } // Selectimage — Get the configured option value. // // Known uses: // - [Checkbutton] (widget specific) // - [Radiobutton] (widget specific) func (w *Window) Selectimage() string { return evalErr(fmt.Sprintf(`%s cget -selectimage`, w)) } // Selectmode option. // // Known uses: // - [Listbox] (widget specific) // - [TTreeview] (widget specific) func Selectmode(val any) Opt { return rawOption(fmt.Sprintf(`-selectmode %s`, optionString(val))) } // Selectmode — Get the configured option value. // // Known uses: // - [Listbox] (widget specific) // - [TTreeview] (widget specific) func (w *Window) Selectmode() string { return evalErr(fmt.Sprintf(`%s cget -selectmode`, w)) } // Selecttype option. // // Known uses: // - [TTreeview] (widget specific) func Selecttype(val any) Opt { return rawOption(fmt.Sprintf(`-selecttype %s`, optionString(val))) } // Selecttype — Get the configured option value. // // Known uses: // - [TTreeview] (widget specific) func (w *Window) Selecttype() string { return evalErr(fmt.Sprintf(`%s cget -selecttype`, w)) } // Setgrid option. // // Specifies a boolean value that determines whether this widget controls the // resizing grid for its top-level window. // This option is typically used in text widgets, where the information // in the widget has a natural size (the size of a character) and it makes // sense for the window's dimensions to be integral numbers of these units. // These natural window sizes form a grid. // If the -setgrid option is set to true then the widget will // communicate with the window manager so that when the user interactively // resizes the top-level window that contains the widget, the dimensions of // the window will be displayed to the user in grid units and the window // size will be constrained to integral numbers of grid units. // See the section GRIDDED GEOMETRY MANAGEMENT in the wm manual // entry for more details. // // Known uses: // - [Listbox] // - [Text] func Setgrid(val any) Opt { return rawOption(fmt.Sprintf(`-setgrid %s`, optionString(val))) } // Setgrid — Get the configured option value. // // Known uses: // - [Listbox] // - [Text] func (w *Window) Setgrid() string { return evalErr(fmt.Sprintf(`%s cget -setgrid`, w)) } // Show option. // // Known uses: // - [Entry] (widget specific) // - [TEntry] (widget specific) // - [TTreeview] (widget specific) func Show(val any) Opt { return rawOption(fmt.Sprintf(`-show %s`, optionString(val))) } // Show — Get the configured option value. // // Known uses: // - [Entry] (widget specific) // - [TEntry] (widget specific) // - [TTreeview] (widget specific) func (w *Window) Show() string { return evalErr(fmt.Sprintf(`%s cget -show`, w)) } // Showhandle option. // // Known uses: // - [Panedwindow] (widget specific) func Showhandle(val any) Opt { return rawOption(fmt.Sprintf(`-showhandle %s`, optionString(val))) } // Showhandle — Get the configured option value. // // Known uses: // - [Panedwindow] (widget specific) func (w *Window) Showhandle() string { return evalErr(fmt.Sprintf(`%s cget -showhandle`, w)) } // Showvalue option. // // Known uses: // - [Scale] (widget specific) func Showvalue(val any) Opt { return rawOption(fmt.Sprintf(`-showvalue %s`, optionString(val))) } // Showvalue — Get the configured option value. // // Known uses: // - [Scale] (widget specific) func (w *Window) Showvalue() string { return evalErr(fmt.Sprintf(`%s cget -showvalue`, w)) } // Side option. // // Known uses: // - [Pack] (command specific) func Side(val any) Opt { return rawOption(fmt.Sprintf(`-side %s`, optionString(val))) } // Size option. // // Known uses: // - [NewFont] (command specific) func Size(val any) Opt { return rawOption(fmt.Sprintf(`-size %s`, optionString(val))) } // Slant option. // // Known uses: // - [NewFont] (command specific) func Slant(val any) Opt { return rawOption(fmt.Sprintf(`-slant %s`, optionString(val))) } // Sliderlength option. // // Known uses: // - [Scale] (widget specific) func Sliderlength(val any) Opt { return rawOption(fmt.Sprintf(`-sliderlength %s`, optionString(val))) } // Sliderlength — Get the configured option value. // // Known uses: // - [Scale] (widget specific) func (w *Window) Sliderlength() string { return evalErr(fmt.Sprintf(`%s cget -sliderlength`, w)) } // Sliderrelief option. // // Known uses: // - [Scale] (widget specific) func Sliderrelief(val any) Opt { return rawOption(fmt.Sprintf(`-sliderrelief %s`, optionString(val))) } // Sliderrelief — Get the configured option value. // // Known uses: // - [Scale] (widget specific) func (w *Window) Sliderrelief() string { return evalErr(fmt.Sprintf(`%s cget -sliderrelief`, w)) } // Spacing1 option. // // Known uses: // - [TextWidget.TagConfigure] (command specific) // - [Text] (widget specific) func Spacing1(val any) Opt { return rawOption(fmt.Sprintf(`-spacing1 %s`, optionString(val))) } // Spacing1 — Get the configured option value. // // Known uses: // - [Text] (widget specific) func (w *Window) Spacing1() string { return evalErr(fmt.Sprintf(`%s cget -spacing1`, w)) } // Spacing2 option. // // Known uses: // - [TextWidget.TagConfigure] (command specific) // - [Text] (widget specific) func Spacing2(val any) Opt { return rawOption(fmt.Sprintf(`-spacing2 %s`, optionString(val))) } // Spacing2 — Get the configured option value. // // Known uses: // - [Text] (widget specific) func (w *Window) Spacing2() string { return evalErr(fmt.Sprintf(`%s cget -spacing2`, w)) } // Spacing3 option. // // Known uses: // - [TextWidget.TagConfigure] (command specific) // - [Text] (widget specific) func Spacing3(val any) Opt { return rawOption(fmt.Sprintf(`-spacing3 %s`, optionString(val))) } // Spacing3 — Get the configured option value. // // Known uses: // - [Text] (widget specific) func (w *Window) Spacing3() string { return evalErr(fmt.Sprintf(`%s cget -spacing3`, w)) } // Startline option. // // Known uses: // - [Text] (widget specific) func Startline(val any) Opt { return rawOption(fmt.Sprintf(`-startline %s`, optionString(val))) } // Startline — Get the configured option value. // // Known uses: // - [Text] (widget specific) func (w *Window) Startline() string { return evalErr(fmt.Sprintf(`%s cget -startline`, w)) } // State option. // // May be set to normal or disabled // to control the disabled state bit. // This is a write-only option: // setting it changes the widget state, // but the state widget command // does not affect the -state option. // // Known uses: // - [Button] (widget specific) // - [Canvas] (widget specific) // - [Checkbutton] (widget specific) // - [Entry] (widget specific) // - [Label] (widget specific) // - [Listbox] (widget specific) // - [MenuWidget.AddCascade] (command specific) // - [MenuWidget.AddCommand] (command specific) // - [MenuWidget.AddSeparator] (command specific) // - [Menubutton] (widget specific) // - [Radiobutton] (widget specific) // - [Scale] (widget specific) // - [Spinbox] (widget specific) // - [TButton] // - [TCheckbutton] // - [TCombobox] (widget specific) // - [TEntry] (widget specific) // - [TLabel] // - [TMenubutton] // - [TRadiobutton] // - [TSpinbox] // - [Text] (widget specific) func State(val any) Opt { return rawOption(fmt.Sprintf(`-state %s`, optionString(val))) } // State — Get the configured option value. // // Known uses: // - [Button] (widget specific) // - [Canvas] (widget specific) // - [Checkbutton] (widget specific) // - [Entry] (widget specific) // - [Label] (widget specific) // - [Listbox] (widget specific) // - [Menubutton] (widget specific) // - [Radiobutton] (widget specific) // - [Scale] (widget specific) // - [Spinbox] (widget specific) // - [TButton] // - [TCheckbutton] // - [TCombobox] (widget specific) // - [TEntry] (widget specific) // - [TLabel] // - [TMenubutton] // - [TRadiobutton] // - [TSpinbox] // - [Text] (widget specific) func (w *Window) State() string { return evalErr(fmt.Sprintf(`%s cget -state`, w)) } // Sticky option. // // Known uses: // - [Grid] (command specific) func Sticky(val any) Opt { return rawOption(fmt.Sprintf(`-sticky %s`, optionString(val))) } // Striped option. // // Known uses: // - [TTreeview] (widget specific) func Striped(val any) Opt { return rawOption(fmt.Sprintf(`-striped %s`, optionString(val))) } // Striped — Get the configured option value. // // Known uses: // - [TTreeview] (widget specific) func (w *Window) Striped() string { return evalErr(fmt.Sprintf(`%s cget -striped`, w)) } // Style option. // // May be used to specify a custom widget style. // // Known uses: // - [TButton] // - [TCheckbutton] // - [TCombobox] // - [TEntry] // - [TFrame] // - [TLabel] // - [TLabelframe] // - [TMenubutton] // - [TNotebook] // - [TPanedwindow] // - [TProgressbar] // - [TRadiobutton] // - [TScale] // - [TScrollbar] // - [TSeparator] // - [TSizegrip] // - [TSpinbox] // - [TTreeview] func Style(val any) Opt { return rawOption(fmt.Sprintf(`-style %s`, optionString(val))) } // Style — Get the configured option value. // // Known uses: // - [TButton] // - [TCheckbutton] // - [TCombobox] // - [TEntry] // - [TFrame] // - [TLabel] // - [TLabelframe] // - [TMenubutton] // - [TNotebook] // - [TPanedwindow] // - [TProgressbar] // - [TRadiobutton] // - [TScale] // - [TScrollbar] // - [TSeparator] // - [TSizegrip] // - [TSpinbox] // - [TTreeview] func (w *Window) Style() string { return evalErr(fmt.Sprintf(`%s cget -style`, w)) } // Tabs option. // // Known uses: // - [TextWidget.TagConfigure] (command specific) // - [Text] (widget specific) func Tabs(val any) Opt { return rawOption(fmt.Sprintf(`-tabs %s`, optionString(val))) } // Tabs — Get the configured option value. // // Known uses: // - [Text] (widget specific) func (w *Window) Tabs() string { return evalErr(fmt.Sprintf(`%s cget -tabs`, w)) } // Tabstyle option. // // Known uses: // - [TextWidget.TagConfigure] (command specific) // - [Text] (widget specific) func Tabstyle(val any) Opt { return rawOption(fmt.Sprintf(`-tabstyle %s`, optionString(val))) } // Tabstyle — Get the configured option value. // // Known uses: // - [Text] (widget specific) func (w *Window) Tabstyle() string { return evalErr(fmt.Sprintf(`%s cget -tabstyle`, w)) } // Takefocus option. // // Determines whether the window accepts the focus during keyboard // traversal (e.g., Tab and Shift-Tab). // Before setting the focus to a window, the traversal scripts // consult the value of the -takefocus option. // A value of 0 means that the window should be skipped entirely // during keyboard traversal. // 1 means that the window should receive the input // focus as long as it is viewable (it and all of its ancestors are mapped). // An empty value for the option means that the traversal scripts make // the decision about whether or not to focus on the window: the current // algorithm is to skip the window if it is // disabled, if it has no key bindings, or if it is not viewable. // If the value has any other form, then the traversal scripts take // the value, append the name of the window to it (with a separator space), // and evaluate the resulting string as a Tcl script. // The script must return 0, 1, or an empty string: a // 0 or 1 value specifies whether the window will receive // the input focus, and an empty string results in the default decision // described above. // Note that this interpretation of the option is defined entirely by // the Tcl scripts that implement traversal: the widget implementations // ignore the option entirely, so you can change its meaning if you // redefine the keyboard traversal scripts. // // Known uses: // - [Button] // - [Canvas] // - [Checkbutton] // - [Entry] // - [Frame] // - [Label] // - [Labelframe] // - [Listbox] // - [Menu] // - [Menubutton] // - [Message] // - [Radiobutton] // - [Scale] // - [Scrollbar] // - [Spinbox] // - [TButton] // - [TCheckbutton] // - [TCombobox] // - [TEntry] // - [TFrame] // - [TLabel] // - [TLabelframe] // - [TMenubutton] // - [TNotebook] // - [TPanedwindow] // - [TProgressbar] // - [TRadiobutton] // - [TScale] // - [TScrollbar] // - [TSeparator] // - [TSizegrip] // - [TSpinbox] // - [TTreeview] // - [Text] // - [Toplevel] func Takefocus(val any) Opt { return rawOption(fmt.Sprintf(`-takefocus %s`, optionString(val))) } // Takefocus — Get the configured option value. // // Known uses: // - [Button] // - [Canvas] // - [Checkbutton] // - [Entry] // - [Frame] // - [Label] // - [Labelframe] // - [Listbox] // - [Menu] // - [Menubutton] // - [Message] // - [Radiobutton] // - [Scale] // - [Scrollbar] // - [Spinbox] // - [TButton] // - [TCheckbutton] // - [TCombobox] // - [TEntry] // - [TFrame] // - [TLabel] // - [TLabelframe] // - [TMenubutton] // - [TNotebook] // - [TPanedwindow] // - [TProgressbar] // - [TRadiobutton] // - [TScale] // - [TScrollbar] // - [TSeparator] // - [TSizegrip] // - [TSpinbox] // - [TTreeview] // - [Text] // - [Toplevel] func (w *Window) Takefocus() string { return evalErr(fmt.Sprintf(`%s cget -takefocus`, w)) } // Tearoff option. // // Known uses: // - [Menu] (widget specific) func Tearoff(val any) Opt { return rawOption(fmt.Sprintf(`-tearoff %s`, optionString(val))) } // Tearoff — Get the configured option value. // // Known uses: // - [Menu] (widget specific) func (w *Window) Tearoff() string { return evalErr(fmt.Sprintf(`%s cget -tearoff`, w)) } // Tearoffcommand option. // // See also [Event handlers]. // // Known uses: // - [Menu] (widget specific) // // [Event handlers]: https://pkg.go.dev/modernc.org/tk9.0#hdr-Event_handlers func Tearoffcommand(handler any) Opt { return newEventHandler("-tearoffcommand", handler) } // Txt option. // // Specifies a string to be displayed inside the widget. The way in which // the string is displayed depends on the particular widget and may be // determined by other options, such as -anchor or -justify. // // Known uses: // - [Button] // - [Checkbutton] // - [Label] // - [Labelframe] // - [Menubutton] // - [Message] // - [Radiobutton] // - [TButton] // - [TCheckbutton] // - [TLabel] // - [TLabelframe] (widget specific) // - [TMenubutton] // - [TProgressbar] // - [TRadiobutton] func Txt(val any) Opt { return rawOption(fmt.Sprintf(`-text %s`, optionString(val))) } // Txt — Get the configured option value. // // Known uses: // - [Button] // - [Checkbutton] // - [Label] // - [Labelframe] // - [Menubutton] // - [Message] // - [Radiobutton] // - [TButton] // - [TCheckbutton] // - [TLabel] // - [TLabelframe] (widget specific) // - [TMenubutton] // - [TProgressbar] // - [TRadiobutton] func (w *Window) Txt() string { return evalErr(fmt.Sprintf(`%s cget -text`, w)) } // Tickinterval option. // // Known uses: // - [Scale] (widget specific) func Tickinterval(val any) Opt { return rawOption(fmt.Sprintf(`-tickinterval %s`, optionString(val))) } // Tickinterval — Get the configured option value. // // Known uses: // - [Scale] (widget specific) func (w *Window) Tickinterval() string { return evalErr(fmt.Sprintf(`%s cget -tickinterval`, w)) } // Tile option. // // Known uses: // - [Frame] (widget specific) // - [Toplevel] (widget specific) func Tile(val any) Opt { return rawOption(fmt.Sprintf(`-tile %s`, optionString(val))) } // Tile — Get the configured option value. // // Known uses: // - [Frame] (widget specific) // - [Toplevel] (widget specific) func (w *Window) Tile() string { return evalErr(fmt.Sprintf(`%s cget -tile`, w)) } // Title option. // // Known uses: // - [ChooseColor] (command specific) // - [ChooseDirectory] (command specific) // - [Fontchooser] (command specific) // - [GetOpenFile] (command specific) // - [GetSaveFile] (command specific) // - [Menu] (widget specific) // - [MessageBox] (command specific) func Title(val any) Opt { return rawOption(fmt.Sprintf(`-title %s`, optionString(val))) } // Title — Get the configured option value. // // Known uses: // - [Menu] (widget specific) func (w *Window) Title() string { return evalErr(fmt.Sprintf(`%s cget -title`, w)) } // Titlecolumns option. // // Known uses: // - [TTreeview] (widget specific) func Titlecolumns(val any) Opt { return rawOption(fmt.Sprintf(`-titlecolumns %s`, optionString(val))) } // Titlecolumns — Get the configured option value. // // Known uses: // - [TTreeview] (widget specific) func (w *Window) Titlecolumns() string { return evalErr(fmt.Sprintf(`%s cget -titlecolumns`, w)) } // Titleitems option. // // Known uses: // - [TTreeview] (widget specific) func Titleitems(val any) Opt { return rawOption(fmt.Sprintf(`-titleitems %s`, optionString(val))) } // Titleitems — Get the configured option value. // // Known uses: // - [TTreeview] (widget specific) func (w *Window) Titleitems() string { return evalErr(fmt.Sprintf(`%s cget -titleitems`, w)) } // Tristateimage option. // // Known uses: // - [Checkbutton] (widget specific) // - [Radiobutton] (widget specific) func Tristateimage(val any) Opt { return rawOption(fmt.Sprintf(`-tristateimage %s`, optionString(val))) } // Tristateimage — Get the configured option value. // // Known uses: // - [Checkbutton] (widget specific) // - [Radiobutton] (widget specific) func (w *Window) Tristateimage() string { return evalErr(fmt.Sprintf(`%s cget -tristateimage`, w)) } // Tristatevalue option. // // Known uses: // - [Checkbutton] (widget specific) // - [Radiobutton] (widget specific) func Tristatevalue(val any) Opt { return rawOption(fmt.Sprintf(`-tristatevalue %s`, optionString(val))) } // Tristatevalue — Get the configured option value. // // Known uses: // - [Checkbutton] (widget specific) // - [Radiobutton] (widget specific) func (w *Window) Tristatevalue() string { return evalErr(fmt.Sprintf(`%s cget -tristatevalue`, w)) } // Troughcolor option. // // Specifies the color to use for the rectangular trough areas // in widgets such as scrollbars and scales. This option is ignored for // scrollbars on Windows (native widget does not recognize this option). // // Known uses: // - [Scale] // - [Scrollbar] func Troughcolor(val any) Opt { return rawOption(fmt.Sprintf(`-troughcolor %s`, optionString(val))) } // Troughcolor — Get the configured option value. // // Known uses: // - [Scale] // - [Scrollbar] func (w *Window) Troughcolor() string { return evalErr(fmt.Sprintf(`%s cget -troughcolor`, w)) } // Underline option. // // Specifies the integer index of a character to underline in the widget. // This option is used by the default bindings to implement keyboard // traversal for menu buttons and menu entries. // 0 corresponds to the first character of the text displayed in the // widget, 1 to the next character, and so on. end corresponds to the // last character, end-1 to the before last character, and so on. // // Known uses: // - [Button] // - [Checkbutton] // - [Label] // - [MenuWidget.AddCascade] (command specific) // - [MenuWidget.AddCommand] (command specific) // - [MenuWidget.AddSeparator] (command specific) // - [Menubutton] // - [NewFont] (command specific) // - [Radiobutton] // - [TButton] // - [TCheckbutton] // - [TLabel] // - [TLabelframe] (widget specific) // - [TMenubutton] // - [TRadiobutton] // - [TextWidget.TagConfigure] (command specific) func Underline(val any) Opt { return rawOption(fmt.Sprintf(`-underline %s`, optionString(val))) } // Underline — Get the configured option value. // // Known uses: // - [Button] // - [Checkbutton] // - [Label] // - [Menubutton] // - [Radiobutton] // - [TButton] // - [TCheckbutton] // - [TLabel] // - [TLabelframe] (widget specific) // - [TMenubutton] // - [TRadiobutton] func (w *Window) Underline() string { return evalErr(fmt.Sprintf(`%s cget -underline`, w)) } // Underlinefg option. // // Known uses: // - [TextWidget.TagConfigure] (command specific) func Underlinefg(val any) Opt { return rawOption(fmt.Sprintf(`-underlinefg %s`, optionString(val))) } // Undo option. // // Known uses: // - [Text] (widget specific) func Undo(val any) Opt { return rawOption(fmt.Sprintf(`-undo %s`, optionString(val))) } // Undo — Get the configured option value. // // Known uses: // - [Text] (widget specific) func (w *Window) Undo() string { return evalErr(fmt.Sprintf(`%s cget -undo`, w)) } // Use option. // // Known uses: // - [Toplevel] (widget specific) func Use(val any) Opt { return rawOption(fmt.Sprintf(`-use %s`, optionString(val))) } // Use — Get the configured option value. // // Known uses: // - [Toplevel] (widget specific) func (w *Window) Use() string { return evalErr(fmt.Sprintf(`%s cget -use`, w)) } // Validate option. // // Known uses: // - [Entry] (widget specific) // - [Spinbox] (widget specific) // - [TEntry] (widget specific) // - [TSpinbox] func Validate(val any) Opt { return rawOption(fmt.Sprintf(`-validate %s`, optionString(val))) } // Validate — Get the configured option value. // // Known uses: // - [Entry] (widget specific) // - [Spinbox] (widget specific) // - [TEntry] (widget specific) // - [TSpinbox] func (w *Window) Validate() string { return evalErr(fmt.Sprintf(`%s cget -validate`, w)) } // Validatecommand option. // // See also [Event handlers]. // // Known uses: // - [Entry] (widget specific) // - [Spinbox] (widget specific) // - [TEntry] (widget specific) // - [TSpinbox] // // [Event handlers]: https://pkg.go.dev/modernc.org/tk9.0#hdr-Event_handlers func Validatecommand(handler any) Opt { return newEventHandler("-validatecommand", handler) } // Value option. // // Known uses: // - [MenuWidget.AddCascade] (command specific) // - [MenuWidget.AddCommand] (command specific) // - [MenuWidget.AddSeparator] (command specific) // - [Radiobutton] (widget specific) // - [TProgressbar] (widget specific) // - [TRadiobutton] (widget specific) // - [TScale] (widget specific) func Value(val any) Opt { return rawOption(fmt.Sprintf(`-value %s`, optionString(val))) } // Value — Get the configured option value. // // Known uses: // - [Radiobutton] (widget specific) // - [TProgressbar] (widget specific) // - [TRadiobutton] (widget specific) // - [TScale] (widget specific) func (w *Window) Value() string { return evalErr(fmt.Sprintf(`%s cget -value`, w)) } // Visual option. // // Known uses: // - [Frame] (widget specific) // - [Labelframe] (widget specific) // - [Toplevel] (widget specific) func Visual(val any) Opt { return rawOption(fmt.Sprintf(`-visual %s`, optionString(val))) } // Visual — Get the configured option value. // // Known uses: // - [Frame] (widget specific) // - [Labelframe] (widget specific) // - [Toplevel] (widget specific) func (w *Window) Visual() string { return evalErr(fmt.Sprintf(`%s cget -visual`, w)) } // Weight option. // // Known uses: // - [NewFont] (command specific) func Weight(val any) Opt { return rawOption(fmt.Sprintf(`-weight %s`, optionString(val))) } // Width option. // // If greater than zero, specifies how much space, in character widths, // to allocate for the text label. // If less than zero, specifies a minimum width. // If zero or unspecified, the natural width of the text label is used. // Note that some themes may specify a non-zero -width // in the style. // // Known uses: // - [Button] (widget specific) // - [Canvas] (widget specific) // - [Checkbutton] (widget specific) // - [Entry] (widget specific) // - [Frame] (widget specific) // - [Label] (widget specific) // - [Labelframe] (widget specific) // - [Listbox] (widget specific) // - [Menubutton] (widget specific) // - [Message] (widget specific) // - [NewPhoto] (command specific) // - [Panedwindow] (widget specific) // - [Place] (command specific) // - [Radiobutton] (widget specific) // - [Scale] (widget specific) // - [Scrollbar] (widget specific) // - [Spinbox] (widget specific) // - [TButton] // - [TCheckbutton] // - [TCombobox] (widget specific) // - [TEntry] (widget specific) // - [TFrame] (widget specific) // - [TLabel] // - [TLabelframe] (widget specific) // - [TMenubutton] // - [TNotebook] (widget specific) // - [TPanedwindow] (widget specific) // - [TRadiobutton] // - [Text] (widget specific) // - [Toplevel] (widget specific) func Width(val any) Opt { return rawOption(fmt.Sprintf(`-width %s`, optionString(val))) } // Width — Get the configured option value. // // Known uses: // - [Button] (widget specific) // - [Canvas] (widget specific) // - [Checkbutton] (widget specific) // - [Entry] (widget specific) // - [Frame] (widget specific) // - [Label] (widget specific) // - [Labelframe] (widget specific) // - [Listbox] (widget specific) // - [Menubutton] (widget specific) // - [Message] (widget specific) // - [Panedwindow] (widget specific) // - [Radiobutton] (widget specific) // - [Scale] (widget specific) // - [Scrollbar] (widget specific) // - [Spinbox] (widget specific) // - [TButton] // - [TCheckbutton] // - [TCombobox] (widget specific) // - [TEntry] (widget specific) // - [TFrame] (widget specific) // - [TLabel] // - [TLabelframe] (widget specific) // - [TMenubutton] // - [TNotebook] (widget specific) // - [TPanedwindow] (widget specific) // - [TRadiobutton] // - [Text] (widget specific) // - [Toplevel] (widget specific) func (w *Window) Width() string { return evalErr(fmt.Sprintf(`%s cget -width`, w)) } // Wrap option. // // Known uses: // - [Spinbox] (widget specific) // - [TSpinbox] (widget specific) // - [TextWidget.TagConfigure] (command specific) // - [Text] (widget specific) func Wrap(val any) Opt { return rawOption(fmt.Sprintf(`-wrap %s`, optionString(val))) } // Wrap — Get the configured option value. // // Known uses: // - [Spinbox] (widget specific) // - [TSpinbox] (widget specific) // - [Text] (widget specific) func (w *Window) Wrap() string { return evalErr(fmt.Sprintf(`%s cget -wrap`, w)) } // Wraplength option. // // For widgets that can perform word-wrapping, this option specifies // the maximum line length. // Lines that would exceed this length are wrapped onto the next line, // so that no line is longer than the specified length. // The value may be specified in any of the standard forms for // screen distances. // If this value is negative or zero then no wrapping is done: lines // will break only at newline characters in the text. // // Known uses: // - [Button] // - [Checkbutton] // - [Label] // - [Menubutton] // - [Radiobutton] // - [TLabel] // - [TLabel] (widget specific) // - [TProgressbar] func Wraplength(val any) Opt { return rawOption(fmt.Sprintf(`-wraplength %s`, optionString(val))) } // Wraplength — Get the configured option value. // // Known uses: // - [Button] // - [Checkbutton] // - [Label] // - [Menubutton] // - [Radiobutton] // - [TLabel] // - [TLabel] (widget specific) // - [TProgressbar] func (w *Window) Wraplength() string { return evalErr(fmt.Sprintf(`%s cget -wraplength`, w)) } // X option. // // Known uses: // - [Place] (command specific) func X(val any) Opt { return rawOption(fmt.Sprintf(`-x %s`, optionString(val))) } // Xscrollcommand option. // // See also [Event handlers]. // // Specifies the prefix for a command used to communicate with horizontal // scrollbars. // When the view in the widget's window changes (or // whenever anything else occurs that could change the display in a // scrollbar, such as a change in the total size of the widget's // contents), the widget will // generate a Tcl command by concatenating the scroll command and // two numbers. // Each of the numbers is a fraction between 0 and 1, which indicates // a position in the document. 0 indicates the beginning of the document, // 1 indicates the end, .333 indicates a position one third the way through // the document, and so on. // The first fraction indicates the first information in the document // that is visible in the window, and the second fraction indicates // the information just after the last portion that is visible. // The command is // then passed to the Tcl interpreter for execution. Typically the // -xscrollcommand option consists of the path name of a scrollbar // widget followed by // e.g. // this will cause // the scrollbar to be updated whenever the view in the window changes. // If this option is not specified, then no command will be executed. // // Known uses: // - [Canvas] // - [Entry] // - [Listbox] // - [Spinbox] // - [TEntry] // - [TSpinbox] // - [TTreeview] // - [Text] // // [Event handlers]: https://pkg.go.dev/modernc.org/tk9.0#hdr-Event_handlers func Xscrollcommand(handler any) Opt { return newEventHandler("-xscrollcommand", handler) } // Xscrollincrement option. // // Known uses: // - [Canvas] (widget specific) func Xscrollincrement(val any) Opt { return rawOption(fmt.Sprintf(`-xscrollincrement %s`, optionString(val))) } // Xscrollincrement — Get the configured option value. // // Known uses: // - [Canvas] (widget specific) func (w *Window) Xscrollincrement() string { return evalErr(fmt.Sprintf(`%s cget -xscrollincrement`, w)) } // Y option. // // Known uses: // - [Place] (command specific) func Y(val any) Opt { return rawOption(fmt.Sprintf(`-y %s`, optionString(val))) } // Yscrollcommand option. // // See also [Event handlers]. // // Specifies the prefix for a command used to communicate with vertical // scrollbars. This option is treated in the same way as the // -xscrollcommand option, except that it is used for vertical // scrollbars and is provided by widgets that support vertical scrolling. // See the description of -xscrollcommand for details // on how this option is used. // // Known uses: // - [Canvas] // - [Listbox] // - [TTreeview] // - [Text] // // [Event handlers]: https://pkg.go.dev/modernc.org/tk9.0#hdr-Event_handlers func Yscrollcommand(handler any) Opt { return newEventHandler("-yscrollcommand", handler) } // Yscrollincrement option. // // Known uses: // - [Canvas] (widget specific) func Yscrollincrement(val any) Opt { return rawOption(fmt.Sprintf(`-yscrollincrement %s`, optionString(val))) } // Yscrollincrement — Get the configured option value. // // Known uses: // - [Canvas] (widget specific) func (w *Window) Yscrollincrement() string { return evalErr(fmt.Sprintf(`%s cget -yscrollincrement`, w)) }