'\" '\" Copyright (c) 1996, Expert Interface Technologies '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" '\" The definitions below are for supplemental macros used in Tix '\" manual entries. '\" '\" .HS name section [date [version]] '\" Replacement for .TH in other man pages. See below for valid '\" section names. '\" '\" .AP type name in/out [indent] '\" Start paragraph describing an argument to a library procedure. '\" type is type of argument (int, etc.), in/out is either "in", "out", '\" or "in/out" to describe whether procedure reads or modifies arg, '\" and indent is equivalent to second arg of .IP (shouldn't ever be '\" needed; use .AS below instead) '\" '\" .AS [type [name]] '\" Give maximum sizes of arguments for setting tab stops. Type and '\" name are examples of largest possible arguments that will be passed '\" to .AP later. If args are omitted, default tab stops are used. '\" '\" .BS '\" Start box enclosure. From here until next .BE, everything will be '\" enclosed in one large box. '\" '\" .BE '\" End of box enclosure. '\" '\" .VS '\" Begin vertical sidebar, for use in marking newly-changed parts '\" of man pages. '\" '\" .VE '\" End of vertical sidebar. '\" '\" .DS '\" Begin an indented unfilled display. '\" '\" .DE '\" End of indented unfilled display. '\" .\" '\" # Heading for Tix man pages .de HS .ds ^3 \\0 .if !"\\$3"" .ds ^3 \\$3 .if '\\$2'cmds' .TH "\\$1" 1 "\\*(^3" "\\$4" "\\$5" .if '\\$2'lib' .TH "\\$1" 3 "\\*(^3" "\\$4" "\\$5" .if '\\$2'ncmds' .TH "\\$1" n "\\*(^3" "\\$4" "\\$5" .if '\\$2'tcl' .TH "\\$1" n "\\*(^3" Tcl "Tcl Built-In Commands" .if '\\$2'tk' .TH "\\$1" n "\\*(^3" Tk "Tk Commands" .if '\\$2'tclc' .TH "\\$1" 3 "\\*(^3" Tcl "Tcl Library Procedures" .if '\\$2'tkc' .TH "\\$1" 3 "\\*(^3" Tk "Tk Library Procedures" .if '\\$2'tclcmds' .TH "\\$1" 1 "\\*(^3" Tcl "Tcl Applications" .if '\\$2'tkcmds' .TH "\\$1" 1 "\\*(^3" Tk "Tk Applications" .if '\\$2'tix' .TH "\\$1" n "\\*(^3" Tk "Tix Commands" .if '\\$2'tixcmds' .TH "\\$1" 1 "\\*(^3" Tk "Tix Applications" .if t .wh -1.3i ^B .nr ^l \\n(.l .ad b .. '\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ie !"\\$3"" \{\ .ta \\n()Au \\n()Bu \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. '\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. '\" # BS - start boxed text '\" # ^y = starting y location '\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. '\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. '\" # VS - start vertical sidebar '\" # ^Y = starting y location '\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. '\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. '\" # Special macro to handle page bottom: finish off current '\" # box/sidebar if in box/sidebar mode, then invoked standard '\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. '\" # DS - begin display .de DS .RS .nf .sp .. '\" # DE - end display .de DE .fi .RE .sp .. '\" copyrighted: (c) 1990 The Regents of the University of California. '\" (c) 1994-1995 Sun Microsystems, Inc. '\" The license terms of the Tcl/Tk distrobution are in the file '\" license.tcl. '\" The definitions below are for supplemental macros used in Tix '\" manual entries. '\" '\" .HS name section [date [version]] '\" Replacement for .TH in other man pages. See below for valid '\" section names. '\" '\" .AP type name in/out [indent] '\" Start paragraph describing an argument to a library procedure. '\" type is type of argument (int, etc.), in/out is either "in", "out", '\" or "in/out" to describe whether procedure reads or modifies arg, '\" and indent is equivalent to second arg of .IP (shouldn't ever be '\" needed; use .AS below instead) '\" '\" .AS [type [name]] '\" Give maximum sizes of arguments for setting tab stops. Type and '\" name are examples of largest possible arguments that will be passed '\" to .AP later. If args are omitted, default tab stops are used. '\" '\" .BS '\" Start box enclosure. From here until next .BE, everything will be '\" enclosed in one large box. '\" '\" .BE '\" End of box enclosure. '\" '\" .VS '\" Begin vertical sidebar, for use in marking newly-changed parts '\" of man pages. '\" '\" .VE '\" End of vertical sidebar. '\" '\" .DS '\" Begin an indented unfilled display. '\" '\" .DE '\" End of indented unfilled display. '\" .\" '\" # Heading for Tix man pages .de HS .ds ^3 \\0 .if !"\\$3"" .ds ^3 \\$3 .if '\\$2'cmds' .TH "\\$1" 1 "\\*(^3" "\\$4" "\\$5" .if '\\$2'lib' .TH "\\$1" 3 "\\*(^3" "\\$4" "\\$5" .if '\\$2'ncmds' .TH "\\$1" n "\\*(^3" "\\$4" "\\$5" .if '\\$2'tcl' .TH "\\$1" n "\\*(^3" Tcl "Tcl Built-In Commands" .if '\\$2'tk' .TH "\\$1" n "\\*(^3" Tk "Tk Commands" .if '\\$2'tclc' .TH "\\$1" 3 "\\*(^3" Tcl "Tcl Library Procedures" .if '\\$2'tkc' .TH "\\$1" 3 "\\*(^3" Tk "Tk Library Procedures" .if '\\$2'tclcmds' .TH "\\$1" 1 "\\*(^3" Tcl "Tcl Applications" .if '\\$2'tkcmds' .TH "\\$1" 1 "\\*(^3" Tk "Tk Applications" .if '\\$2'tix' .TH "\\$1" n "\\*(^3" Tk "Tix Commands" .if '\\$2'tixcmds' .TH "\\$1" 1 "\\*(^3" Tk "Tix Applications" .if t .wh -1.3i ^B .nr ^l \\n(.l .ad b .. '\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ie !"\\$3"" \{\ .ta \\n()Au \\n()Bu \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. '\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. '\" # BS - start boxed text '\" # ^y = starting y location '\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. '\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. '\" # VS - start vertical sidebar '\" # ^Y = starting y location '\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. '\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. '\" # Special macro to handle page bottom: finish off current '\" # box/sidebar if in box/sidebar mode, then invoked standard '\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. '\" # DS - begin display .de DS .RS .nf .sp .. '\" # DE - end display .de DE .fi .RE .sp .. '---------------------------------------------------------------------- .HS tixSelect tix 4.0 .BS ' ' '---------------------------------------------------------------------- .SH NAME tixSelect \- Create and manipulate tixSelect widgets ' ' ' '---------------------------------------------------------------------- .SH SYNOPSIS \fBtixSelect\fI \fIpathName ?\fIoptions\fR? ' ' ' '---------------------------------------------------------------------- .PP .SH SUPER-CLASS The \fBTixSelect\fR class is derived from the \fBTixLabelWidget\fR class and inherits all the commands, options and subwidgets of its super-class. ' '---------------------------------------------------------------------- .SH "STANDARD OPTIONS" ' The Select widget supports all the standard options of a frame widget. See the \fBoptions(n)\fR manual entry for details on the standard options. ' ' '---------------------------------------------------------------------- .SH "WIDGET-SPECIFIC OPTIONS" ' '----------BEGIN .LP .nf Name: \fBallowZero\fR Class: \fBAllowZero\fR Switch: \fB\-allowzero\fR .fi .IP A boolean value that specifies whether the selection can be empty. When set to false, at least one button subwidget must be selected at any time. \fBNote\fR: When the Select widget is first constructed, the default selection is always empty, even if \fB\-allowzero\fR is set to \fBfalse\fR. '----------END ' '----------BEGIN .LP .nf Name: \fBbuttonType\fR Class: \fBButtonType\fR Switch: \fB\-buttontype\fR .fi .IP The type of buttons to be used as subwidgets inside the Select widget. By default, the standard Tk \fBbutton\fR widget class is used. '----------END ' ' '----------BEGIN .LP .nf Name: \fBcommand\fR Class: \fBCommand\fR Switch: \fB\-command\fR .fi .IP Specifies the TCL command to be executed when the \fB\-value\fR of the Select widget is changed. This command will be invoked with two arguments. The first is the name of the button subwidget that has toggled. The second is a boolean value indicating whether the button subwidget is selected. This command is executed only when the \fB\-disableCallback\fR option is set to false. '----------END ' '----------BEGIN .LP .nf Name: \fBdisableCallback\fR Class: \fBDisableCallback\fR Switch: \fB\-disablecallback\fR .fi .IP A boolean value indicating whether callbacks should be disabled. When set to true, the TCL command specified by the \fB\-command\fR option is not executed when the \fB\-value\fR of the Select widget changes. '----------END ' '----------BEGIN .LP .nf Name: \fBorientation\fR Class: \fBOrientation\fR Switch: \fB\-orientation\fR Alias: \fB\-orient\fR .fi .IP Specifies the orientation of the button subwidgets. Only the values \fBhorizontal\fR and \fBvertical\fR are recognized. This is a \fIstatic option\fR and it can only be assigned during the creation of the widget. '----------END ' '----------BEGIN .LP .nf Name: \fBlabel\fR Class: \fBLabel\fR Switch: \fB\-label\fR .fi .IP Specifies the string to display as the label of this Select widget. '----------END ' '----------BEGIN .LP .nf Name: \fBlabelSide\fR Class: \fBLabelSide\fR Switch: \fB\-labelside\fR .fi .IP Specifies where the label should be displayed relative to the Select widget. Valid options are: \fBtop\fR, \fBleft\fR, \fBright\fR, \fBbottom\fR, \fBnone\fR or \fBacrosstop\fR. '----------END ' '----------BEGIN .LP .nf Name: \fBpadX\fR Class: \fBPad\fR Switch: \fB\-padx\fR .fi .IP Specifies the horizontal padding between two neighboring button subwidgets. This is a \fIstatic option\fR and it can only be assigned during the creation of the widget. '----------END ' '----------BEGIN .LP .nf Name: \fBpadY\fR Class: \fBPad\fR Switch: \fB\-padx\fR .fi .IP Specifies the vertical padding between two neighboring button subwidgets. This is a \fIstatic option\fR and it can only be assigned during the creation of the widget. '----------END ' '----------BEGIN .LP .nf Name: \fBradio\fR Class: \fBRadio\fR Switch: \fB\-radio\fR .fi .IP A boolean value that specifies whether the Select widget should act as a radio-box. When set to true, at most one button subwidget can be selected at any time. This is a \fIstatic option\fR and it can only be assigned during the creation of the widget. '----------END ' ' '----------BEGIN .LP .nf Name: \fBselectedBg\fR Class: \fBSelectedBg\fR Switch: \fB\-selectedbg\fR .fi .IP Specifies the background color of all the selected button subwidgets. '----------END ' '----------BEGIN .LP .nf Name: \fBstate\fR Class: \fBState\fR Switch: \fB\-state\fR .fi .IP Specifies the state of all the buttons inside the Select widget. Only the values \fBnormal\fR and \fBdisabled\fR are recognized. When the state is set to \fBdisabled\fR, all user actions on this Select widget are ignore. '----------END ' ' '----------BEGIN .LP .nf Name: \fBvalidateCmd\fR Class: \fBValidateCmd\fR Switch: \fB\-validatecmd\fR .fi .IP Specifies a TCL command to be called when the -value of the Select widget is about to change. This command is called with one parameter -- the new \fB\-value\fR entered by the user. This command is to validate this new value by returning a value it deems valid. '----------END ' '----------BEGIN .LP .nf Name: \fBvalue\fR Class: \fBValue\fR Switch: \fB\-value\fR .fi .IP The value of a Select widget is a list of the names of the button subwidgets that have been selected by the user. When you assign the value of a Select widget using the "config -value" widget command, the TCL command specified by the \fB\-command\fR option will be invoked if some button subwidgets are toggled. '----------END ' ' '----------BEGIN .LP .nf Name: \fBvariable\fR Class: \fBVariable\fR Switch: \fB\-variable\fR .fi .IP Specifies the global variable in which the value of the Select widget should be stored. The value of a Select widget is stored as a list of the names of the button subwidgets that have been selected by the user. The value of the Select widget will be automatically updated when this variable is changed. '----------END ' '---------------------------------------------------------------------- .SH SUBWIDGETS .PP ' ' '----------BEGIN .LP .nf Name: \fBlabel\fR Class: \fBLabel\fR .fi .IP The label subwidget. '----------END .PP In addition, all the button subwidgets created as a result of the \fBadd\fR widget command can be accessed by the \fBsubwidget\fR command. They are identified by the \fIbuttonName\fR parameter to the \fBadd\fR widget command. Here is an example: .PP .nf tixSelect .s pack .s .s add eat -text Eat .s add sleep -text Sleep .s subwidget eat config -fg green .s subwidget sleep config -fg red .fi ' ' .BE ' '---------------------------------------------------------------------- .SH DESCRIPTION ' .PP ' The \fBtixSelect\fR command creates a new window (given by the \fIpathName\fR argument) and makes it into a Select widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the Select widget such as its cursor and relief. The Select widget is a container of button subwidgets. It can be used to provide radio-box or check-box style of selection options for the user. ' '---------------------------------------------------------------------- .SH WIDGET COMMANDS .PP ' The \fBtixSelect\fR command creates a new Tcl command whose name is the same as the path name of the Select widget's window. This command may be used to invoke various operations on the widget. It has the following general form: ' .DS C ' \fIpathName option \fR?\fIarg arg ...\fR? .PP .DE ' \fIPathName\fR is the name of the command, which is the same as the Select widget's path name. \fIOption\fR and the \fIarg\fRs determine the exact behavior of the command. The following commands are possible for Select widgets: ' .TP \fIpathName \fBadd\fI buttonName \fR?\fIoption value ... \fR? ' Adds a new button subwidget with the name \fRbuttonName\fR into the Select widget. Additional configuration options can be given to configure the new button subwidget. ' .TP \fIpathName \fBcget\fI \fIoption\fR ' Returns the current value of the configuration option given by \fIoption\fR. \fIOption\fR may have any of the values accepted by the \fBtixSelect\fR command. ' .TP ' \fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR? ' Query or modify the configuration options of the widget. If no \fIoption\fR is specified, returns a list describing all of the available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for information on the format of this list). If \fIoption\fR is specified with no \fIvalue\fR, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no \fIoption\fR is specified). If one or more \fIoption\-value\fR pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. \fIOption\fR may have any of the values accepted by the \fBtixSelect\fR command. ' ' .TP \fIpathName \fBinvoke\fI buttonName\fR ' Invokes the button subwidget with the name \fRbuttonName\fR. ' ' .TP \fIpathName \fBsubwidget\fI name ?args?\fR ' When no options are given, returns the pathname of the subwidget of the specified name. When options are given, the widget command of the specified subwidget will be called with these options. ' ' '---------------------------------------------------------------------- .SH BINDINGS .PP ' When the user presses the left mouse button over the a button subwidget, it will be toggled and the \fB\-value\fR option of the tixSelect widget will be changed. ' '---------------------------------------------------------------------- .SH EXAMPLE .PP ' The following example creates a radio-box style iconbar for the user to choose one value among \fBeat\fR, \fBwork\fR or \fBsleep\fR. .PP .nf tixSelect .s \-radio true \-allowzero false .s add eat \-bitmap [tix getbitmap eat] .s add work \-bitmap [tix getbitmap work] .s add sleep \-bitmap [tix getbitmap sleep] .fi ' ' ' '---------------------------------------------------------------------- .SH KEYWORDS Tix(n), Container Widget