iwidgets-4.1.0/ 0000755 0036047 0045461 00000000000 13136712367 011737 5 ustar dgp 771div iwidgets-4.1.0/demos/ 0000755 0036047 0045461 00000000000 13136712365 013044 5 ustar dgp 771div iwidgets-4.1.0/demos/html/ 0000755 0036047 0045461 00000000000 13136712365 014010 5 ustar dgp 771div iwidgets-4.1.0/demos/html/buttonbox.n.html 0000644 0036047 0045461 00000016055 07347201064 017161 0 ustar dgp 771div
buttonbox - Create and manipulate a manager widget for buttons
buttonbox - Create and manipulate a manager widget for buttons
SYNOPSIS
buttonbox pathName ?options?
INHERITANCE
itk::Widget <- buttonbox
STANDARD OPTIONS
See the "options" manual entry for details on the standard options.
WIDGET-SPECIFIC OPTIONS
Name: orient
Class: Orient
Command-Line Switch: -orient
Orientation of the button box: horizontal or vertical. The default
is horizontal.
Name: padX
Class: PadX
Command-Line Switch: -padx
Specifies a non-negative padding distance to leave between the button group and
the outer edge of the button box in the x direction. The value may be
given in any of the forms acceptable to Tk_GetPixels. The default
is 5 pixels.
Name: padY
Class: PadY
Command-Line Switch: -pady
Specifies a non-negative padding distance to leave between the button group and
the outer edge of the button box in the y direction. The value may be given
in any of the forms acceptable to Tk_GetPixels. The default is 5 pixels.
DESCRIPTION
The buttonbox command creates a manager widget for controlling
buttons. The button box also supports the display and invocation
of a default button. The button box can be configured either horizontally
or vertically.
METHODS
The buttonbox command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command.
Many of the widget commands for the buttonbox take as one argument an
indicator of which button of the button box to operate on. These
indicators are called indexes and allow reference and manipulation
of buttons regardless of their current map state. buttonbox indexes
may be specified in any of the following forms:
- number
- Specifies the button numerically, where 0 corresponds to the
left/top-most button of the button box.
- end
- Indicates the right/bottom-most button of the button box.
- default
- Indicates the current default button of the button box. This is the
button with the default ring displayed.
- pattern
- If the index doesn't satisfy one of the above forms then this
form is used. Pattern is pattern-matched against the tag of
each button in the button box, in order from left/top to right/left,
until a matching entry is found. The rules of Tcl_StringMatch
are used.
WIDGET-SPECIFIC METHODS
- pathName add tag args
- Add a button distinguished by tag to the end of the button box.
If additional arguments are present they specify options to be applied
to the button. See PushButton for information on the options
available.
- pathName buttonconfigure index ?options?
- This command is similar to the configure command, except that
it applies to the options for an individual button,
whereas configure applies to the options for the button box as a whole.
Options may have any of the values accepted by the PushButton
command. If options are specified, options are modified
as indicated in the command and the command returns an empty string.
If no options are specified, returns a list describing
the current options for entry index (see Tk_ConfigureInfo for
information on the format of this list).
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the buttonbox
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the buttonbox
command.
- pathName default index
- Sets the default button to the button given by index. This causes
the default ring to appear arround the specified button.
- pathName delete index
- Deletes the button given by index from the button box.
- pathName hide index
- Hides the button denoted by index. This doesn't remove the button
permanently, just inhibits its display.
- pathName index index
- Returns the numerical index corresponding to index.
- pathName insert index tag ?option value option value ...?
- Same as the add command except that it inserts the new
button just before the one given by index, instead of appending
to the end of the button box. The option, and value
arguments have the same interpretation as for the add widget
command.
- pathName invoke ?index?
- Invoke the command associated with a button. If no arguments
are given then the current default button is invoked, otherwise the argument
is expected to be a button index.
- pathName show index
- Display a previously hidden button denoted by index.
EXAMPLE
buttonbox .bb
.bb add Yes -text Yes -command "puts Yes"
.bb add No -text No -command "puts No"
.bb add Maybe -text Maybe -command "puts Maybe"
.bb default Yes
pack .bb -expand yes -fill both
AUTHORS
Bret A. Schuhmacher
Mark L. Ulferts
KEYWORDS
buttonbox, pushbutton, button, widget
iwidgets-4.1.0/demos/html/calendar.n.html 0000644 0036047 0045461 00000025741 07375230203 016706 0 ustar dgp 771div calendar - Create and manipulate a monthly calendar
calendar - Create and manipulate a monthly calendar
SYNOPSIS
calendar pathName ?options?
INHERITANCE
itk::Widget <- calendar
STANDARD OPTIONS
background
|
cursor
|
foreground
|
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
See the "datefield" manual entry for details on this option. Note that
this option is needed when the calendar is used in conjunction
with the dateentry widget. It is necessary for support of international
date formats in versions of Tk less than 8.4.
WIDGET-SPECIFIC OPTIONS
Name: backwardImage
Class: Image
Command-Line Switch: -backwardimage
Specifies a image to be displayed on the backwards calendar
button. This image must have been created previously with
the image create command. If none is specified, a default
is provided.
Name: buttonForeground
Class: Foreground
Command-Line Switch: -buttonforeground
Specifies the foreground color of the forward and backward buttons
in any of the forms acceptable to Tk_GetColor. The default
color is blue.
Name: command
Class: Command
Command-Line Switch: -command
Specifies a Tcl script to executed upon selection of a date in the
calendar. If the command script contains any % characters,
then the script will not be executed directly. Instead, a new
script will be generated by replacing each %, and the
character following it, with information from the calendar. The
replacement depends on the character following the %, as
defined in the list below.
- %d
- Replaced with the date selected in the format mm/dd/yyyy.
Name: currentDateFont
Class: Font
Command-Line Switch: -currentdatefont
Specifies the font used for the current date text in any of the forms
acceptable to Tk_GetFont.
Name: dateFont
Class: Font
Command-Line Switch: -datefont
Specifies the font used for the days of the month text in any of the forms
acceptable to Tk_GetFont.
Name: dayFont
Class: Font
Command-Line Switch: -dayfont
Specifies the font used for the days of the week text in any of the forms
acceptable to Tk_GetFont.
Name: days
Class: days
Command-Line Switch: -days
Specifies a list of values to be used for the days of the week
text to displayed above the days of the month. The default value
is {Su Mo Tu We Th Fr Sa}.
Name: forewardImage
Class: Image
Command-Line Switch: -forewardimage
Specifies a image to be displayed on the forewards calendar
button. This image must have been created previously with
the image create command. If none is specified, a default
is provided.
Name: height
Class: Height
Command-Line Switch: -height
Specifies a desired window height that the calendar widget should
request from its geometry manager. The value may be specified in any
of the forms acceptable to Tk_GetPixels. The default height
is 165 pixels.
Name: outline
Class: Outline
Command-Line Switch: -outline
Specifies the outline color used to surround the days of the month text in
any of the forms acceptable to Tk_GetColor. The default is the
same color as the background.
Name: selectColor
Class: Foreground
Command-Line Switch: -selectcolor
Specifies the color of the ring displayed that distinguishes the
currently selected date in any of the forms acceptable to
Tk_GetColor. The default is red.
Name: selectThickness
Class: SelectThickness
Command-Line Switch: -selectthickness
Specifies the thickness of the ring displayed that distinguishes
the currently selected date. The default is 3 pixels.
Name: startday
Class: Day
Command-Line Switch: -startday
Specifies the starting day for the week: sunday, monday,
tuesday, wednesday, thursday, friday, or
saturday. The default is sunday.
Name: titleFont
Class: Font
Command-Line Switch: -titlefont
Specifies the font used for the title text which consists of the
month and year. The font may be given in any of the forms
acceptable to Tk_GetFont.
Name: weekdayBackground
Class: Background
Command-Line Switch: -weekdaybackground
Specifies the background color for the weekdays which allows it to
be visually distinguished from the weekend. The color may be given
in any of the forms acceptable to Tk_GetColor. The default is
the same as the background.
Name: weekendBackground
Class: Background
Command-Line Switch: -weekendbackground
Specifies the background color for the weekends which allows it to
be visually distinguished from the weekdays. The color may be given
in any of the forms acceptable to Tk_GetColor. The default is
the same as the background.
Name: width
Class: Width
Command-Line Switch: -width
Specifies a desired window width that the calendar widget should
request from its geometry manager. The value may be specified in any
of the forms acceptable to Tk_GetPixels. The default width
is 200 pixels.
DESCRIPTION
The calendar command creates a calendar widget for the selection
of a date, displaying a single month at a time. Buttons exist on the
top to change the month in effect turning the pages of a calendar. As
a page is turned, the dates for the month are modified. Selection of
a date visually marks that date. The selected value can be monitored
via the -command option or just retrieved using the get command.
METHODS
The calendar command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for calendar widgets:
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the calendar
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the calendar
command.
- pathName get ?format?
- Returns the currently selected date in a format of
string or as an integer clock value using the -string and -clicks
format options respectively. The default is by string. Reference the
clock command for more information on obtaining dates and their
formats.
- pathName select date
- Changes the currently selected date to the value specified which
must be in the form of a date string, an integer clock value or as
the keyword "now". Reference the clock
command for more information on obtaining dates and their formats.
Note that selecting a date does not change the
month being shown to that of the date given. This chore is left
to the show\R command.
- pathName show date
- Changes the currently displayed date to be that of the date
argument which must be in the form of a date string, an
integer clock value or as
the keyword "now". Reference the clock
command for more information on obtaining dates and their formats.
COMPONENTS
Name: forward
Class: Button
The forward component provides the button on the upper right of the
calendar that changes the month to be the next. See the "button"
widget manual entry for details on the forward component item.
Name: page
Class: Canvas
The page component provides the canvas on which the title, days of the
week, and days of the month appear. See the "canvas" widget manual
entry for details on the page component item.
Name: backward
Class: Button
The backward component provides the button on the upper right of the
calendar that changes the month to be the next. See the "button"
widget manual entry for details on the backward component item.
EXAMPLE
proc selectCmd {date} {
puts $date
}
calendar .c -command {selectCmd %d} -weekendbackground mistyrose \\
-weekdaybackground ghostwhite -outline black \\
-startday wednesday -days {We Th Fr Sa Su Mo Tu}
pack .c
AUTHORS
Mark L. Ulferts
Michael J. McLennan
KEYWORDS
calendar, widget
iwidgets-4.1.0/demos/html/canvasprintbox.n.html 0000644 0036047 0045461 00000022746 07347201103 020174 0 ustar dgp 771div canvasprintbox - Create and manipulate a canvas print box widget
canvasprintbox - Create and manipulate a canvas print box widget
SYNOPSIS
canvasprintbox pathName ?options?
INHERITANCE
itk::Widget <- Canvasprintbox
STANDARD OPTIONS
activeBackground
foreground
insertBackground
insertWidth
selectBackground
|
background
highlightBackground
insertBorderWidth
relief
selectBorderWidth
|
borderWidth
highlightColor
insertOffTime
repeatDelay
selectForeground
|
cursor
highlightThickness
insertOnTime
repeatInterval
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
WIDGET-SPECIFIC OPTIONS
Name: filename
Class: FileName
Command-Line Switch: -filename
The file to write the postscript output to (Only when output
is set to "file"). If posterizing is turned on and hpagecnt
and/or vpagecnt is more than 1, x.y is appended to the filename
where x is the horizontal page number and y the vertical page number.
Name: hpagecnt
Class: PageCnt
Command-Line Switch: -hpagecnt
Is used in combination with posterize to determine over
how many pages the output should be distributed. This
attribute specifies how many pages should be used horizontaly.
Any change to this attribute will automatically update the "stamp".
Defaults to 1.
Name: orient
Class: Orient
Command-Line Switch: -orient
Determines the orientation of the output to the printer (or file).
It can take the value "portrait" or "landscape" (default). Changes
to this attribute will be reflected immediately in the "stamp".
Defaults to "landscape" but will be changed automaticaly to the value
deemed appropiate for the current canvas. Setting this attribute
when the canvasprintbox is first constructed (instead of using the
"configure" method) will turn off the auto adjustment of this attribute.
Name: output
Class: Output
Command-Line Switch: -output
Specifies where the postscript output should go: to the printer
or to a file. Can take on the values "printer" or "file".
The corresponding entry-widget will reflect the contents of
either the printcmd attribute or the filename attribute.
Defaults to "printer".
Name: pageSize
Class: PageSize
Command-Line Switch: -pagesize
The pagesize the printer supports. Changes to this attribute
will be reflected immediately in the "stamp".
Defaults to "a4".
Name: posterize
Class: Posterize
Command-Line Switch: -posterize
Indicates if posterizing is turned on or not. Posterizing
the output means that it is possible to distribute the
output over more than one page. This way it is possible to
print a canvas/region which is larger than the specified
pagesize without stretching. If used in combination with
stretching it can be used to "blow up" the contents of a
canvas to as large as size as you want (See attributes:
hpagecnt and vpagecnt). Any change to this attribute will
automatically update the "stamp".
Defaults to 0.
Name: printCmd
Class: PrintCmd
Command-Line Switch: -printcmd
The command to execute when printing the postscript output.
The command will get the postscript directed to its standard
input (Only when output is set to "printer").
Defaults to "lpr".
Name: printRegion
Class: PrintRegion
Command-Line Switch: -printregion
A list of four coordinates specifying which part of the canvas to print.
An empty list means that the canvas' entire scrollregion should be
printed. Any change to this attribute will automatically update the "stamp".
Defaults to an empty list.
Name: stretch
Class: Stretch
Command-Line Switch: -stretch
Determines if the output should be stretched to fill the
page (as defined by the attribute pagesize) as large as
possible. The aspect-ratio of the output will be retained
and the output will never fall outside of the boundaries
of the page.
Defaults to 0 but will be changed automaticaly to the value
deemed appropiate for the current canvas. Setting this attribute
when the canvasprintbox is first constructed (instead of using the
"configure" method) will turn off the auto adjustment of this attribute.
Name: vPageCnt
Class: PageCnt
Command-Line Switch: -vpagecnt
Is used in combination with "posterize" to determine over
how many pages the output should be distributed. This
attribute specifies how many pages should be used verticaly.
Any change to this attribute will automatically update the "stamp".
Defaults to 1.
DESCRIPTION
Implements a print box for printing the contents of a canvas widget
to a printer or a file. It is possible to specify page orientation, the
number of pages to print the image on and if the output should be
stretched to fit the page. Options exist to control the appearance and
actions of the widget.
METHODS
The canvasprintbox command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for canvasprintbox widgets:
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the canvasprintbox
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the canvasprintbox
command.
- pathName getoutput
- Returns the value of the printercmd or filename option
depending on the current setting of output.
- pathName print
- Perfrom the actual printing of the canvas using the current settings of
all the attributes. Returns a boolean indicating wether the printing was
successful or not.
- pathName refresh
- Retrieves the current value for all edit fields and updates
the stamp accordingly. Is useful for Apply-buttons.
- pathName setcanvas canvas
- This is used to set the canvas that has to be printed.
A stamp-sized copy will automatically be drawn to show how the
output would look with the current settings.
- pathName stop
- Stops the drawing of the "stamp". I'm currently unable to detect
when a Canvasprintbox gets destroyed or withdrawn. It's therefore
advised that you perform a stop before you do something like that.
COMPONENTS
Name: prtflentry
Class: Entry
The prtflentry component is the entry field for user input of the
filename or printer command (depending on the value of
output).
Name: hpcnt
Class: Entry
The hpcnt component is the entry field for user input of the number of
pages to use horizontaly when posterize is turned on.
Name: vpcnt
Class: Entry
The vpcnt component is the entry field for user input of the number of
pages to use verticaly when posterize is turned on.
EXAMPLE
canvasprintbox .fsb -orient landscape -stretch 1
pack .fsb -padx 10 -pady 10 -fill both -expand yes
AUTHOR
Tako Schotanus
KEYWORDS
canvasprintbox, widget
iwidgets-4.1.0/demos/html/canvasprintdialog.n.html 0000644 0036047 0045461 00000013422 07347201111 020631 0 ustar dgp 771div canvasprintdialog - Create and manipulate a canvas print dialog widget
canvasprintdialog - Create and manipulate a canvas print dialog widget
SYNOPSIS
canvasprintdialog pathName ?options?
INHERITANCE
itk::Toplevel <- Dialogshell <- Dialog <- Canvasprintdialog
STANDARD OPTIONS
activeBackground
foreground
insertBackground
insertWidth
selectBackground
|
background
highlightBackground
insertBorderWidth
relief
selectBorderWidth
|
borderWidth
highlightColor
insertOffTime
repeatDelay
selectForeground
|
cursor
highlightThickness
insertOnTime
repeatInterval
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
filename
pagesize
vpagecnt
|
hpagecnt
posterize
|
orient
printcmd
|
output
printregion
|
See the "canvasprintbox" widget manual entry for details on the above
associated options.
INHERITED OPTIONS
buttonBoxPadX
padY
|
buttonBoxPadY
separator
|
buttonBoxPos
thickness
|
padX
|
See the "dialogshell" widget manual entry for details on the above
inherited options.
See the "shell" widget manual entry for details on the above
inherited options.
See the "Toplevel" widget manual entry for details on the above
inherited options.
WIDGET-SPECIFIC OPTIONS
DESCRIPTION
The canvasprintdialog command creates a print dialog for printing
the contents of a canvas widget to a printer or a file. It is possible
to specify page orientation, the number of pages to print the image on
and if the output should be stretched to fit the page.
METHODS
The canvasprintdialog command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for canvasprintdialog widgets:
ASSOCIATED METHODS
getoutput
|
setcanvas
|
refresh
|
print
|
See the "canvasprintbox" class manual entry for details on the
associated methods.
INHERITED METHODS
add
insert
|
buttonconfigure
invoke
|
default
show
|
hide
|
See the "buttonbox" widget manual entry for details on the above
inherited methods.
See the "dialogshell" widget manual entry for details on the above
inherited methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by
the canvasprintdialog command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by
the canvasprintdialog
command.
COMPONENTS
Name: cpb
Class: Canvasprintbox
The cpb component is the canvas print box for the canvas print dialog.
See the "canvasprintbox" widget manual entry for details on the cpb
component item.
EXAMPLE
canvasprintdialog .cpb
.cpb activate
AUTHOR
Tako Schotanus
KEYWORDS
canvasprintdialog, canvasprintbox, dialog, widget
iwidgets-4.1.0/demos/html/checkbox.n.html 0000644 0036047 0045461 00000014622 06570244356 016731 0 ustar dgp 771div checkbox - Create and manipulate a checkbox widget
checkbox - Create and manipulate a checkbox widget
SYNOPSIS
checkbox pathName ?options?
INHERITANCE
itk::Widget <- labeledframe <- checkbox
STANDARD OPTIONS
background
foreground
|
borderWidth
relief
|
cursor
selectColor
|
disabledForeground
|
See the "options" manual entry for details on the standard options.
INHERITED OPTIONS
labelBitmap
labelPos
|
labelFont
labelText
|
labelImage
labelVariable
|
labelMargin
|
See the "labeledframe" class manual entry for details on the
inherited options.
WIDGET-SPECIFIC OPTIONS
Name: command
Class: Command
Command-Line Switch: -command
Specifies a Tcl command procedure to be evaluated following a change in
the current check box selection.
DESCRIPTION
The checkbox command creates a check button box widget
capable of adding, inserting, deleting, selecting, and configuring
checkbuttons as well as obtaining the currently selected button.
METHODS
The checkbox command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command.
Many of the widget commands for the checkbox take as one argument an
indicator of which checkbutton of the checkbox to operate on. These indicators
are called indexes and allow reference and manipulation of checkbuttons.
Checkbox indexes may be specified in any of the following forms:
- number
- Specifies the checkbutton numerically, where 0 corresponds to the top
checkbutton of the checkbox.
- end
- Indicates the last checkbutton of the checkbox.
- pattern
- If the index doesn't satisfy one of the above forms then this
form is used. Pattern is pattern-matched against the tag of
each checkbutton in the checkbox, in order from top to bottom,
until a matching entry is found. The rules of Tcl_StringMatch
are used.
WIDGET-SPECIFIC METHODS
- pathName add tag ?option value option value?
- Adds a new checkbutton to the checkbuttond window on the bottom. The command
takes additional options which are passed on to the checkbutton as construction
arguments. These include the standard Tk checkbutton options. The tag is
returned.
- pathName buttonconfigure index ?options?
- This command is similar to the configure command, except that
it applies to the options for an individual checkbutton,
whereas configureapplies to the options for the checkbox as a whole.
Options may have any of the values accepted by the add
widget command. If options are specified, options are modified
as indicated in the command and the command returns an empty string.
If no options are specified, returns a list describing
the current options for entry index (see Tk_ConfigureInfo for
information on the format of this list).
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the checkbox
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the checkbox
command.
- pathName delete index
- Deletes a specified checkbutton given an index.
- pathName deselect index
- Deselects a specified checkbutton given an index.
- pathName flash index
- Flashes a specified checkbutton given an index.
- pathName get ?index?
- Returns the tags of the currently selected checkbuttons or the
selection status of specific checkbutton when given an index.
- pathName index index
- Returns the numerical index corresponding to index.
- pathName insert index tag ?option value option value ...?
- Same as the add command except that it inserts the new
checkbutton just before the one given by index, instead of appending
to the end of the checkbox. The option, and value
arguments have the same interpretation as for the add widget
command.
- pathName select index
- Selects a specified checkbutton given an index.
EXAMPLE
checkbox .cb -labeltext Styles
.cb add bold -text Bold
.cb add italic -text Italic
.cb add underline -text Underline
.cb select underline
pack .cb -padx 10 -pady 10 -fill both -expand yes
AUTHOR
John A. Tucker
KEYWORDS
checkbox, widget
iwidgets-4.1.0/demos/html/combobox.n.html 0000644 0036047 0045461 00000035432 07347201117 016744 0 ustar dgp 771div combobox - Create and manipulate combination box widgets
combobox - Create and manipulate combination box widgets
SYNOPSIS
combobox pathName ?options?
INHERITANCE
itk::Widget <- LabeledWidget <- Entryfield <- Combobox
STANDARD OPTIONS
cursor
highlightColor
insertWidth
insertWidth
selectBorderWidth
|
justify
highlightThickness
insertBackground
insertBorderWidth
textVariable
|
background
exportSelection
relief
insertOffTime
selectForeground
|
borderWidth
foreground
width
insertOnTime
selectBackground
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
hscrollmode
|
textBackground
|
textFont
|
vscrollmode
|
See the "scrolledlistbox" manual entry for details on the above inherited
options.
See the "entry" manual entry for details on the above inherited option.
INHERITED OPTIONS
childSitePos
invalid
|
command
textBackground
|
fixed
textFont
|
focusCommand
validate
|
See the "entryfield" class manual entry for details on the inherited options.
labelBitmap
labelPos
|
labelFont
labelText
|
labelImage
labelVariable
|
labelMargin
|
See the "labeledwidget" class manual entry for details on the
inherited options.
WIDGET-SPECIFIC OPTIONS
Name: arrowRelief
Class: Relief
Command-Line Switch: -arrowrelief
Specifies the relief style to use for a dropdown Combobox's arrow
button in a normal (not depressed) state. Acceptable values
are raised, sunken, flat, ridge, and groove.
Sunken is discouraged as this is the relief used to indicate a depressed
state. This option has no effect on simple Comboboxes. The default is raised.
Name: completion
Class: Completion
Command-Line Switch: -completion
Boolean given in any of the forms acceptable to Tcl_GetBoolean which
determines whether insertions into the entry field, whether from the
keyboard or programmatically via the insert method, are
automatically completed with the first matching item from the listbox. The
default is true.
Name: dropdown
Class: Dropdown
Command-Line Switch: -dropdown
Boolean describing the Combobox layout style given in any of the forms
acceptable to Tcl_GetBoolean. If true, the Combobox
will be a dropdown style
widget which displays an entry field and an arrow button which when activated
will pop up a scrollable list of items. If false, a simple Combobox style
will be used which has an entry field and a scrollable list beneath it
which is always visible. Both styles allow an optional label for the entry
field area. The default is true.
Name: editable
Class: Editable
Command-Line Switch: -editable
Boolean describing whether or not the text entry area is editable
by the user. If true the user can add items to the combobox by entering text
into the entry area and then pressing Return. If false, the list of items is
non-editable and can only be changed by calling the insert or delete
methods. (The value in the entry field can still be modified by selecting
from the list.) Given in any of the forms acceptable to Tcl_GetBoolean.
The default is true.
Name: grab
Class: Grab
Command-Line Switch: -grab
This option sets the grab scope for the appearance of the listbox in
drop-down comboboxes. It can be either global or local. The default is
local.
Name: listHeight
Class: Height
Command-Line Switch: -listheight
Height of the listbox specified in any of the forms acceptable to
Tk_GetPixels. The default is 150 pixels.
Name: margin
Class: Margin
Command-Line Switch: -margin
Specifies the width in pixels between the entry component and the arrow button
for a dropdown Combobox given in any of the forms acceptable to
Tk_GetPixels. This option has no effect on a simple Combobox. The
default is 1.
Name: popupCursor
Class: Cursor
Command-Line Switch: -popupcursor
Specifies the cursor to be used for dropdown style listboxes. The value
may have any of the forms acceptable to Tk_GetCursor. The default is
arrow.
Name: selectionCommand
Class: SelectionCommand
Command-Line Switch: -selectioncommand
Specifies a Tcl command procedure which is called when an item in the
listbox area is selected. The item will be selected in the list, the listbox
will be removed if it is a dropdown Combobox, and the selected item's
text will be inserted into the entry field before the -selectioncommand proc is
called. The default is {}.
Name: state
Class: State
Command-Line Switch: -state
Specifies the overall state of the Combobox megawidget. Can be either
normal or disabled. If the Combobox is disabled, no text can be entered
into the entry field, no selection can be made in the listbox, and the
arrowBtn component is disabled. The default is normal.
Name: unique
Class: Unique
Command-Line Switch: -unique
Boolean describing whether or not duplicate items are allowed in the combobox
list. If true, then duplicates are not allowed to be inserted. If false, a
duplicate entry causes selection of the item. Given in any of the forms
acceptable to Tcl_GetBoolean. The default is true.
DESCRIPTION
The combobox command creates an enhanced entry field widget with an
optional associated label and a scrollable list. When an item is selected in
the list area of a Combobox, its value is then displayed in the entry field
text area. Functionally similar to an Optionmenu, the Combobox adds (optional)
list scrolling and (optional) item editing and inserting capabilities.
There are two basic styles of Comboboxes (determined by the -dropdown option):
dropdown and simple. The dropdown style adds an arrow button to the right of
the entry field which when activated will pop up (and down) the scrolled
listbox beneath the entry field. The simple (non-dropdown) Combobox
permanently displays the listbox beneath the entry field and has no
arrow button. Either style allows an optional entry field label.
METHODS
The combobox command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for Combobox widgets:
ASSOCIATED METHODS
See the "entry" manual entries for details on the above associated methods.
curselection
xview
|
index
yview
|
see
|
size
|
See the "listbox" manual entries for details on the above associated methods.
getcurselection
|
justify
|
sort
|
|
See the "scrolledlistbox" manual entries for details on the above associated
methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the combobox
command.
- pathName clear ?component?
- Clears the contents from one or both components. Valid component values
are list, or entry. With no component specified, both are cleared.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the combobox
command.
- pathName delete component first ?last?
- Delete one or more elements from a given component, list or entry.
If a list item to be removed is currently selected (displayed in the entry
field area), the entry field will be cleared.
- pathName get ?index?
- With no arguments, returns the contents currently in the entry
field area. With a single argument, returns the contents of the
listbox item at the indicated index.
- pathName insert component index element ?element element ...?
- Insert one or more new elements into the given component, list or
entry, just before the element given by index.
- pathName selection option first ?last?
- Adjust the selection within the listbox component and updates the contents
of the entry field component to the value of the selected item. See the
"listbox" manual entry for more details on parameter options.
COMPONENTS
Name: entry
Class: Entry
Text entry area where the current selection is displayed. If the
Combobox is editable and its state is normal, the user can edit the
contents of this item.
Name: list
Class: Scrolledlistbox
Scrollable list which stores all the items which the user can select
from. For dropdown Comboboxes, this component is hidden until the user pops it
up by pressing on the arrow button to the right of the entry component. For
simple Comboboxes this component is always visible just beneath the entry
component.
DEFAULT BINDINGS
The Combobox generally has the same bindings as its primary component items -
the Scrolledlistbox and Entryfield. However it also adds these:
[1] Button-1 mouse press on the arrow key of a dropdown Combobox causes the
list to be popped up. If the combobox is non-editable, a Button-1 press on the
entry field area will also pop up the list.
[2] Button-1 mouse press anywhere on the display removes a dropdown listbox
which has been popped up, unless the keypress is upon one of the Combobox
scrollbars which scrolls the list. If it is pressed upon an item in the list
area, that item will be selected before the list is removed.
[3] Button-3 mouse press on the arrow key of a dropdown Combobox causes the
next item to be selected. Shift-Button-3 causes the previous item to be
selected.
[4] Escape keypress removes a dropdown list which has been popped up.
[5] The <space> and <Return> keystrokes select the current item. They also
remove the popped up list for dropdown comboboxes.
[6] Up and Down arrow keypresses from the entry field and arrow button
component cause the previous and next items in the listbox to be selected
respectively. Ctl-P and Ctl-N are similarly mapped for emacs emulation.
[7] Entry field and arrow button component Shift-Up and Shift-Down arrow keys
pop up and down the listbox of a dropdown Combobox. The arrow button component
also maps <Return> and <space> similarly.
EXAMPLE
proc selectCmd {} {
puts stdout "[.cb2 getcurselection]"
}
#
# Non-editable Dropdown Combobox
#
combobox .cb1 -labeltext Month: \\
-selectioncommand {puts "selected: [.cb1 getcurselection]"} \\
-editable false -listheight 185 -popupcursor hand1
.cb1 insert list end Jan Feb Mar Apr May June Jul Aug Sept Oct Nov Dec
#
# Editable Dropdown Combobox
#
combobox .cb2 -labeltext "Operating System:" -selectioncommand selectCmd
.cb2 insert list end Linux HP-UX SunOS Solaris Irix
.cb2 insert entry end L
pack .cb1 -padx 10 -pady 10 -fill x
pack .cb2 -padx 10 -pady 10 -fill x
ORIGINAL AUTHOR
John S. Sigler
CURRENT MAINTAINER
Mitch Gorman (logain@erols.com)
KEYWORDS
combobox, entryfield, scrolledlistbox, itk::Widget, entry, listbox, widget,
iwidgets
iwidgets-4.1.0/demos/html/dateentry.n.html 0000644 0036047 0045461 00000014231 07375230203 017124 0 ustar dgp 771div dateentry - Create and manipulate a dateentry widget
dateentry - Create and manipulate a dateentry widget
SYNOPSIS
dateentry pathName ?options?
INHERITANCE
itk::Widget <- LabeledWidget <- Datefield <- Dateentry
STANDARD OPTIONS
background
foreground
justify
|
borderWidth
highlightColor
relief
|
cursor
highlightThickness
|
exportSelection
insertBackground
|
See the "options" manual entry for details on the standard options.
INHERITED OPTIONS
disabledForeground
labelMargin
state
|
labelBitmap
labelPos
|
labelFont
labelText
|
labelImage
labelVariable
|
See the "labeledwidget" class manual entry for details on these
inherited options.
command
textFont
|
int
iq
|
state
|
textBackground
|
See the "datefield" class manual entry for details on these
inherited options.
ASSOCIATED OPTIONS
backwardImage
dateFont
outline
titleFont
|
buttonForeground
dayFont
selectColor
weekdayBackground
|
command
days
selectThickness
weekendBackground
|
currentDateFont
forwardImage
startDay
|
See the "calendar" manual entry for details on the associated options.
WIDGET-SPECIFIC OPTIONS
Name: grab
Class: Grab
Command-Line Switch: -grab
Specifies the grab level, local or global, to be obtained before
bringing up the popup calendar. The default is global. For more information
concerning grab levels, consult the documentation for Tk's grab command.
Name: icon
Class: Icon
Command-Line Switch: -icon
Specifies the calendar icon image to be used in the dateentry.
This image must have been created previously with
the image create command. Should one not be provided,
then one will be generated, pixmap if possible, bitmap otherwise.
DESCRIPTION
The dateentry command creates a quicken style date entry field
with a popup calendar by combining the datefield and calendar
widgets together. This allows a user to enter the date via the
keyboard or by using the mouse and selecting the calendar icon
which brings up a popup calendar.
METHODS
The dateentry command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for dateentry widgets:
INHERITED METHODS
See the "datefield" manual entry for details on the associated methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the dateentry
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the dateentry
command.
COMPONENTS
Name: label
Class: Label
The label component provides a label component to used to identify the date.
See the "label" widget manual entry for details on the label component item.
Name: iconbutton
Class: Label
The iconbutton component provides a labelbutton component to act as a
lightweight button
displaying the calendar icon. Upon pressing the labelbutton, the calendar
appears. See the "label" widget manual entry for details on the
labelbutton component item.
Name: date
Class: Entry
The date component provides the entry field for date input and display.
See the "entry" widget manual entry for details on the date component item.
EXAMPLE
dateentry .de
pack .de
AUTHOR
Mark L. Ulferts
KEYWORDS
dateentry, widget
iwidgets-4.1.0/demos/html/datefield.n.html 0000644 0036047 0045461 00000016670 07375230203 017057 0 ustar dgp 771div datefield - Create and manipulate a date field widget
datefield - Create and manipulate a date field widget
SYNOPSIS
datefield pathName ?options?
INHERITANCE
itk::Widget <- LabeledWidget <- datefield
STANDARD OPTIONS
background
foreground
justify
|
borderWidth
highlightColor
relief
|
cursor
highlightThickness
|
exportSelection
insertBackground
|
See the "options" manual entry for details on the standard options.
INHERITED OPTIONS
disabledForeground
labelMargin
state
|
labelBitmap
labelPos
|
labelFont
labelText
|
labelImage
labelVariable
|
See the "labeledwidget" class manual entry for details on the
inherited options.
WIDGET-SPECIFIC OPTIONS
Name: childSitePos
Class: Position
Command-Line Switch: -childsitepos
Specifies the position of the child site in the date field: n,
s, e, or w. The default is e.
Name: command
Class: Command
Command-Line Switch: -command
Specifies a Tcl command to be executed upon detection of a Return key
press event.
Name: gmt
Class: GMT
Command-Line Switch: -gmt
Determines whether the date is calculated relative to Greenwich
Mean Time. Accepts a boolean value. The default is no.
Name: int
Class: DateFormat
Command-Line Switch: -int
Used to specify international date formats. This option must be
a boolean value. When set to true, the date is formatted as
YYYY-MM-DD. When set to false, it is formatted as MM/DD/YYYY. Note
that this format is driven by the 'clock scan' command and that
YYYY-MM-DD is supported in Tk 8.4 or later. The default is no.
Name: iq
Class: Iq
Command-Line Switch: -iq
Specifies the level of intelligence to be shown in the actions
taken by the datefield during the processing of keypress events.
Valid settings include high, average, and low.
With a high iq,the date prevents the user from typing in an
invalid date. For example, if the current date is 05/31/1997 and
the user changes the month to 04, then the day will be instantly
modified for them to be 30. In addition, leap years are fully
taken into account. With average iq, the month is limited to the
values of 01-12, but it is possible to type in an invalid day.
A setting of low iq instructs the widget to do no validity
checking at all during date entry. With both average and low
iq levels, it is assumed that the validity will be determined
at a later time using the date's isvalid command.
Name: state
Class: State
Command-Line Switch: -state
Specifies one of two states for the datefield: normal or disabled.
If the datefield is disabled then input is not accepted. The default is
normal.
Name: textBackground
Class: Background
Command-Line Switch: -textbackground
Background color for inside textual portion of the entry field. The value
may be given in any of the forms acceptable to Tk_GetColor.
Name: textFont
Class: Font
Command-Line Switch: -textfont
Name of font to use for display of text in datefield. The value
may be given in any of the forms acceptable to Tk_GetFont.
DESCRIPTION
The datefield command creates an enhanced text entry widget for
the purpose of date entry with various degrees of built-in intelligence.
METHODS
The datefield command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for datefield widgets:
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the datefield
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the datefield
command.
- pathName get ?format?
- Returns the current contents of the datefield in a format of
string or as an integer clock value using the -string and -clicks
format options respectively. The default is by string. Reference the
clock command for more information on obtaining dates and their
formats.
- pathName isvalid
- Returns a boolean indication of the validity of the currently
displayed date value. For example, 03/03/1960 is valid whereas
02/29/1997 is invalid.
- pathName show date
- Changes the currently displayed date to be that of the date
argument. The date may be specified either as a string, an
integer clock value or the keyword "now". Reference the clock
command for more information on obtaining dates and their formats.
COMPONENTS
Name: date
Class: Entry
The date component provides the entry field for date input and display.
See the "entry" widget manual entry for details on the date component item.
EXAMPLE
proc returnCmd {} {
puts [.df get]
}
datefield .df -command returnCmd
pack .df -fill x -expand yes -padx 10 -pady 10
AUTHOR
Mark L. Ulferts
KEYWORDS
datefield, widget
iwidgets-4.1.0/demos/html/dialog.n.html 0000644 0036047 0045461 00000011456 07347201142 016371 0 ustar dgp 771div dialog - Create and manipulate a dialog widget
dialog - Create and manipulate a dialog widget
SYNOPSIS
dialog pathName ?options?
INHERITANCE
itk::Toplevel <- Shell <- Dialogshell <- Dialog
STANDARD OPTIONS
background
|
cursor
|
foreground
|
|
See the "options" manual entry for details on the standard options.
INHERITED OPTIONS
buttonBoxPadX
padY
|
buttonBoxPadY
separator
|
buttonBoxPos
thickness
|
padX
|
See the "dialogshell" manual entry for details on the above inherited options.
height
|
master
|
modality
|
width
|
See the "shell" manual entry for details on the above inherited options.
See the "Toplevel" manual entry for details on the above inherited options.
DESCRIPTION
The dialog command creates a dialog box providing standard
buttons and a child site for use in derived classes. The buttons
include ok, apply, cancel, and help. Methods and Options exist to
configure the buttons and their containing box.
METHODS
The dialog command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for dialog widgets:
INHERITED METHODS
add
index
|
buttonconfigure
insert
|
default
invoke
|
hide
show
|
See the "buttonbox" manual entry for details on the above inherited methods.
See the "dialogshell" manual entry for details on the above inherited methods.
activate
|
center
|
deactivate
|
|
See the "shell" manual entry for details on the above inherited methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the dialog
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the dialog
command.
EXAMPLE
dialog .d -modality global
.d buttonconfigure OK -command {puts OK; .d deactivate 1}
.d buttonconfigure Apply -command {puts Apply}
.d buttonconfigure Cancel -command {puts Cancel; .d deactivate 0}
.d buttonconfigure Help -command {puts Help}
listbox [.d childsite].lb -relief sunken
pack [.d childsite].lb -expand yes -fill both
if {[.d activate]} {
puts "Exit via OK button"
} else {
puts "Exit via Cancel button"
}
AUTHORS
Mark L. Ulferts
Bret A. Schuhmacher
KEYWORDS
dialog, dialogshell, shell, widget
iwidgets-4.1.0/demos/html/dialogshell.n.html 0000644 0036047 0045461 00000015722 07347201151 017421 0 ustar dgp 771div dialogshell - Create and manipulate a dialog shell widget
dialogshell - Create and manipulate a dialog shell widget
SYNOPSIS
dialogshell pathName ?options?
INHERITANCE
itk::Toplevel <- Shell <- Dialogshell
STANDARD OPTIONS
background
|
cursor
|
foreground
|
|
See the "options" manual entry for details on the standard options.
INHERITED OPTIONS
height
|
master
|
modality
|
width
|
See the "shell" manual entry for details on the above inherited options.
See the "Toplevel" manual entry for details on the above inherited options.
WIDGET-SPECIFIC OPTIONS
Name: buttonBoxPadX
Class: Pad
Command-Line Switch: -buttonboxpadx
Specifies a non-negative padding distance to leave between the button group and
the outer edge of the button box in the x direction. The value may be
given in any of the forms accpetable to Tk_GetPixels. The default
is 5 pixels.
Name: buttonBoxPadY
Class: Pad
Command-Line Switch: -buttonboxpady
Specifies a non-negative padding distance to leave between the button group and
the outer edge of the button box in the y direction. The value may be
given in any of the forms accpetable to Tk_GetPixels. The default
is 5 pixels.
Name: buttonBoxPos
Class: Position
Command-Line Switch: -buttonboxpos
Attaches buttons to the given side of the dialog: n, s,
e or w. The default is s.
Name: padX
Class: Pad
Command-Line Switch: -padx
Specifies a padding distance for the childsite in the X-direction in
any of the forms acceptable to Tk_GetPixels. The default is 10.
Name: padY
Class: Pad
Command-Line Switch: -pady
Specifies a padding distance for the childsite in the Y-direction in
any of the forms acceptable to Tk_GetPixels. The default is 10.
Name: separator
Class: Separator
Command-Line Switch: -separator
Specifies whether a line is drawn to separate the
buttons from the dialog box contents in any of the forms
acceptable to Tcl_GetBoolean. The default is true.
Name: thickness
Class: Thickness
Command-Line Switch: -thickness
Specifies the thickness of the separator in any of the forms acceptable
to Tk_GetPixels. The default is 3 pixels.
DESCRIPTION
The dialogshell command creates a dialog shell which is a top
level widget composed of a button box, separator, and child site area.
The class also has methods to control button construction.
METHODS
The dialogshell command create a new Tcl command whose
name is pathName. This command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for dialogshell widgets:
INHERITED METHODS
activate
|
center
|
deactivate
|
|
See the "shell" manual entry for details on the above inherited methods.
ASSOCIATED METHODS
add
hide
show
|
buttonconfigure
index
|
default
insert
|
delete
invoke
|
See the "buttonbox" manual entry for details on the associated methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the dialogshell
command.
- pathName childsite
- Returns the pathname of the child site widget.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the dialogshell
command.
COMPONENTS
Name: dschildsite
Class: frame
The dschildsite component is the user child site for the dialog shell. See
the "frame" widget manual entry for details on the dschildsite component item.
Name: separator
Class: frame
The separator component devides the area between the user child site and
the button box. See the "frame" widget manual entry for details on the
separator component item.
Name: bbox
Class: ButtonBox
The bbox component is the button box containing the buttons for the dialog
shell. See the "ButtonBox" widget manual entry for details on the
bbox component item.
EXAMPLE
dialogshell .ds -modality none
.ds add OK -text "OK"
.ds add Cancel -text "Cancel"
.ds default OK
.ds activate
AUTHOR
Mark L. Ulferts
KEYWORDS
dialogshell, dialog, shell, widget
iwidgets-4.1.0/demos/html/disjointlistbox.n.html 0000644 0036047 0045461 00000024760 07447553303 020376 0 ustar dgp 771div iwidgets::disjointlistbox - Create and manipulate a disjointlistbox widget
iwidgets::disjointlistbox - Create and manipulate a disjointlistbox widget
SYNOPSIS
iwidgets::disjointlistbox pathName ?options?
INHERITANCE
itk::Widget <- iwidgets::Disjointlistbox
STANDARD OPTIONS
activeForeground
buttonPlacement
highlightColor
|
activeBackground
activeRelief
clientData
highlightThickness
|
selectBorderWidth
background
cursor
disabledForeground
|
selectForeground
borderWidth
foreground
elementBorderWidth
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
lhsButtonLabel
|
rhsButtonLabel
|
|
|
See the "button" widget manual entry for details on the above
associated options.
labelFont
|
lhsLabelText
|
rhsLabelText
|
|
See the "label" widget manual entry for details on the above
associated options.
See the "scrollbar" widget class manual entry for details on the above
associated options.
textBackground
|
textFont
|
lhsItems
|
rhsItems
|
See the "scrolledlistbox" widget manual entry for details on the above
associated options.
WIDGET-SPECIFIC OPTIONS
Name: buttonPlacement
Class: ButtonPlacement
Command-Line Switch: -buttonplacement
Specifies the placement of the insertion and removal buttons relative to the
scrolledlistbox widgetsn,
bottom, or center. The default is bottom.
Name: lhsLabelText
Class: LabelText
Command-Line Switch: -lhslabeltext
Specifies the text for the label of the lhs scrolledlistbox.
The default is "Available".
Name: rhsLabelText
Class: LabelText
Command-Line Switch: -rhslabeltext
Specifies the text for the label of the rhs scrolledlistbox.
The default is "Available".
Name: lhsButtonLabel
Class: LabelText
Command-Line Switch: -lhsbuttonlabel
Specifies the text for the button of the lhs scrolledlistbox.
The default is "Insert >>".
Name: rhsButtonLabel
Class: LabelText
Command-Line Switch: -rhsbuttonlabel
Specifies the text for the button of the rhs scrolledlistbox.
The default is "<< Remove".
Name: lhsSortOption
Class: LhsSortOption
Command-Line Switch: -lhssortoption
Specifies the sort function to be applied to the lhs scrolledlistbox
after items are inserted. Accepts the same sort options as the scrolledlistbox
sort method (Tcl's lsort command). If "none" is specified, the inserted
items are appended to the end of the list, and no sorting is performed.
The default is "increasing".
Name: rhsSortOption
Class: RhsSortOption
Command-Line Switch: -rhssortoption
Specifies the sort function to be applied to the rhs scrolledlistbox
after items are inserted. Accepts the same sort options as the scrolledlistbox
sort method (Tcl's lsort command). If "none" is specified, the inserted
items are appended to the end of the list, and no sorting is performed.
The default is "increasing".
DESCRIPTION
The iwidgets::disjointlistbox command creates a disjoint pair of listboxs
similar to the OSF/Motif "Book" printing dialog of the "FrameMaker"
program. It is implementation constists of a two Scrolledlistboxs,
2 buttons, and 2 labels.
The disjoint behavior of this widget exists between the interaction of
the two Scrolledlistboxes with one another. That is, a given instance
of a Disjointlistbox will never exist, without the aid of a hack magician,
which has Scrolledlistbox widgets with items in common. That means the
relationship between the two is maintained similar to that of disjoint sets.
Users may transfer items between the two Listbox widgets using the
the two buttons.
Options exists which include the ability to configure the "items" displayed by
the 2 Scrolledlistboxes and to control the placement of the insertion and
removal buttons.
METHODS
The iwidgets::disjointlistbox command creates a new Tcl command whose
name is pathName. This command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for disjointlistbox widgets:
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the iwidgets::disjointlistbox
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the iwidgets::disjointlistbox
command.
- pathName setlhs
- Set the current contents of the left-most Scrolledlistbox with the input list
of items. Removes all (if any) items from the right-most Scrolledlistbox
which exist in the input list option to maintain the disjoint property
between the two
- pathName setrhs
- Set the current contents of the right-most Scrolledlistbox with the input list
of items. Removes all (if any) items from the left-most Scrolledlistbox
which exist in the input list option to maintain the disjoint property
between the two
- pathName getlhs
- Returns the current contents of the left-most Scrolledlistbox
- pathName getrhs
- Returns the current contents of the right-most Scrolledlistbox
- pathName insertlhs
- Add the input list of items to the current contents of the left-most
Scrolledlistbox. Removes all (if any) items from the right-most Scrolledlistbox
which exist in the input list option to maintain the disjoint property
between the two
- pathName insertrhs
- Add the input list of items to the current contents of the right-most
Scrolledlistbox. Removes all (if any) items from the left-most Scrolledlistbox
which exist in the input list option to maintain the disjoint property
between the two.
COMPONENTS
Name: lhs
Class: Scrolledlistbox
The lhs component is the scrolledlistbox for the rhs button.
See the "scrolledlistbox" widget manual entry for details on the lhs
component item.
Name: rhs
Class: Scrolledlistbox
The rhs component is the scrolledlistbox for the rhs button.
See the "scrolledlistbox" widget manual entry for details on the rhs
component item.
Name: lhsbutton
Class: utton
The lhsbutton component is the button for users to remove selected items
from the lhs Scrolledlistbox.
See the "button" widget manual entry for details on the lhs button component.
Name: rhsbutton
Class: Button
The rhsbutton component is the button for users to remove selected items
from the rhs Scrolledlistbox.
See the "button" widget manual entry for details on the rhs button component.
Name: lhsCount
Class: Label
The lhsCount component is the label for displaying a count of the current items in
the Scrolledlistbox.
See the "Label" widget manual entry for details on the lhsCount label component.
Name: rhsCount
Class: Label
The rhsCount component is the label for displaying a count of the current items in
the Scrolledlistbox.
See the "Label" widget manual entry for details on the rhsCount label component.
EXAMPLE
package require Iwidgets 4.0
iwidgets::disjointlistbox .dlb
pack .dlb -padx 10 -pady 10 -fill both -expand yes
AUTHOR(S)
John A. Tucker
Anthony Parent
KEYWORDS
disjointlistbox, widget
iwidgets-4.1.0/demos/html/entryfield.n.html 0000644 0036047 0045461 00000022503 07347201166 017300 0 ustar dgp 771div entryfield - Create and manipulate a entry field widget
entryfield - Create and manipulate a entry field widget
SYNOPSIS
entryfield pathName ?options?
INHERITANCE
itk::Widget <- LabeledWidget <- entryfield
STANDARD OPTIONS
background
foreground
insertBorderWidth
justify
selectForeground
|
borderWidth
highlightColor
insertOffTime
relief
textVariable
|
cursor
highlightThickness
insertOnTime
selectBackground
width
|
exportSelection
insertBackground
insertWidth
selectBorderWidth
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
See the "entry" manual entry for details on the associated options.
INHERITED OPTIONS
disabledForeground
labelMargin
state
|
labelBitmap
labelPos
|
labelFont
labelText
|
labelImage
labelVariable
|
See the "labeledwidget" class manual entry for details on the
inherited options.
WIDGET-SPECIFIC OPTIONS
Name: childSitePos
Class: Position
Command-Line Switch: -childsitepos
Specifies the position of the child site in the entry field: n,
s, e, or w. The default is e.
Name: command
Class: Command
Command-Line Switch: -command
Specifies a Tcl command to be executed upon detection of a Return key
press event.
Name: fixed
Class: Fixed
Command-Line Switch: -fixed
Restrict entry to the specified number of chars. A value of 0, which is the
default, denotes no limit. The value is the maximum number of chars the
user may type into the field, regardles of field width. For example,
if the field width is set to 20 and the fixed value is 10, the user will
only be able to type 10 characters into the field which is 20 characters long.
Name: focusCommand
Class: Command
Command-Line Switch: -focuscommand
Specifies a Tcl command to be executed upon reception of focus.
Name: invalid
Class: Command
Command-Line Switch: -invalid
Specifies a Tcl command to be executed upon determination of invalid input.
The default is bell.
Name: textBackground
Class: Background
Command-Line Switch: -textbackground
Background color for inside textual portion of the entry field. The value
may be given in any of the forms acceptable to Tk_GetColor.
Name: textFont
Class: Font
Command-Line Switch: -textfont
Name of font to use for display of text in entryfield. The value
may be given in any of the forms acceptable to Tk_GetFont.
Name: validate
Class: Command
Command-Line Switch: -validate
The validate option allows specification of a validation mechanism. Standard
character validation such as numeric, alphabetic, integer,
hexidecimal, real, and alphanumeric can be handled through
the use of keywords. Should more
extensive validation be necessary, the value may contain the name of
a command script. The script should return a boolean value. True for
valid, false for invalid. If false is returned, then the procedure
associated with the invalid option will be invoked.
If the validation script contains
any % characters, then the script will not be
executed directly. Instead, a new script will be
generated by replacing each %, and the character following
it, with information from the entryfield. The replacement
depends on the character following the %, as defined in the
list below.
- %c
- Replaced with the current input character.
- %P
- Replaced with the contents of the entryfield modified to include the latest
keystoke. This is equivalent to peeking at the future contents, enabling
rejection prior to the update.
- %S
- Replaced with the current contents of the entryfield prior to the latest
keystroke being added.
- %W
- Replaced with the entryfield widget pathname.
DESCRIPTION
The entryfield command creates an enhanced text entry widget with an
optional associated label. Addtional options support validation and
establishing a upper limit on the number of characters which may be
entered in the field.
METHODS
The entryfield command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for entryfield widgets:
ASSOCIATED METHODS
delete
insert
|
get
scan
|
icursor
selection
|
index
xview
|
See the "entry" manual entry for details on the associated methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the entryfield
command.
- pathName childsite
- Returns the path name of the child site.
- pathName clear
- Clear entry widget
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the entryfield
command.
COMPONENTS
Name: efchildsite
Class: frame
The efchildsite component is the user child site for the entry field. See
the "frame" widget manual entry for details on the efchildsite component item.
Name: entry
Class: entry
The entry component provides the entry field for user text input and display.
See the "entry" widget manual entry for details on the entry component item.
EXAMPLE
option add *textBackground white
proc returnCmd {} {
puts stdout "Return Pressed"
}
proc invalidCmd {} {
puts stdout "Alphabetic contents invalid"
}
entryfield .ef -command returnCmd
entryfield .fef -labeltext "Fixed:" -fixed 10 -width 12
entryfield .nef -labeltext "Numeric:" -validate numeric -width 12
entryfield .aef -labeltext "Alphabetic:" \\
-validate alphabetic -width 12 -invalid invalidCmd
entryfield .pef -labeltext "Password:" \\
-show \267 -width 12 -command returnCmd
Labeledwidget::alignlabels .ef .fef .nef .aef .pef
pack .ef -fill x -expand yes -padx 10 -pady 5
pack .fef -fill x -expand yes -padx 10 -pady 5
pack .nef -fill x -expand yes -padx 10 -pady 5
pack .aef -fill x -expand yes -padx 10 -pady 5
pack .pef -fill x -expand yes -padx 10 -pady 5
AUTHORS
Sue Yockey
Mark L. Ulferts
KEYWORDS
entryfield, widget
iwidgets-4.1.0/demos/html/extbutton.n.html 0000644 0036047 0045461 00000010673 07347201177 017176 0 ustar dgp 771div extbutton - Extends the behavior of the Tk button
extbutton - Extends the behavior of the Tk button
SYNOPSIS
extbutton pathName ?options?
INHERITANCE
itk::Widget <- extbutton
STANDARD OPTIONS
activebackground
bd
foreground
text
|
activeforeground
cursor
image
|
bitmap
disabledforeground
justify
|
background
font
relief
|
See the "options" manual entry for details on the standard options.
WIDGET-SPECIFIC OPTIONS
Name: bitmapforeground
Class: Foreground
Command-Line Switch: -bitmapforeground
Configures the foreground color of the bitmap.
Name: command
Class: Command
Command-Line Switch: -command
Associate a command with the extbutton. Simulates a Tk button's
-command option. Invoked by either <1> events or by explicitly
calling the public invoke() method.
Name: defaultring
Class: DefaultRing
Command-Line Switch: -defaultring
Boolean describing whether the extbutton displays its default ring given in
any of the forms acceptable to Tcl_GetBoolean. The default is false.
Name: defaultringpad
Class: Pad
Command-Line Switch: -defaultringpad
Specifies the amount of space to be allocated to the indentation of the
default ring ring given in any of the forms acceptable to Tcl_GetPixels.
The option has no effect if the defaultring option is set to false. The
default is 4 pixels.
Name: imagePos
Class: Position
Command-Line Switch: -imagepos
Specifies the image position relative to the message text: n, ne,
nw, s, se, sw, w, wn, ws, e,
en, or es. The default is w.
Name: ringBackground
Class: Background
Command-Line Switch: -ringbackground
Configures the background color of the default ring frame (if -defaultring
is set to boolean true).
DESCRIPTION
The extbutton extends the behavior of the atomic Tk button by
allowing text and an image or bitmap to coexist. The user may use
the -image or -bitmap options to specify an image as well as the
-imagepos option to specify image position relative to the text.
Note that the extbutton is not intended to be used without an
image/bitmap. There will be an emtpy space next to the text if
no image/bitmap is specified.
METHODS
The extbutton command creates a new Tcl command whose
name is pathName. This command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
INHERITED METHODS
Each of the following methods are inherited from itk::Archetype. See that
man page for details.
pathName cget
pathName component
pathName config
pathName configure
WIDGET-SPECIFIC METHODS
- pathName invoke
- Evaluates the command fragment associated with the -command option.
- pathName flash
- Simulates the Tk button's flash command.
EXAMPLES
iwidgets::extbutton .eb -text "Bitmap example" -bitmap info \
-background bisque -activeforeground red -bitmapforeground blue \
-defaultring 1 -command {puts "Bisque is beautiful"}
pack .eb -expand 1
iwidgets::extbutton .eb -text "Image example" -relief ridge -image \
[image create photo -file $itk::library/../iwidgets/demos/images/clear.gif] \
-font 9x15bold -background lightgreen -imagepos e \
-activebackground lightyellow
pack .eb -expand 1
AUTHOR
Chad Smith
KEYWORDS
button, pushbutton
iwidgets-4.1.0/demos/html/extfileselectionbox.n.html 0000644 0036047 0045461 00000030336 07347201205 021207 0 ustar dgp 771div extfileselectionbox - Create and manipulate a file selection box widget
extfileselectionbox - Create and manipulate a file selection box widget
SYNOPSIS
extfileselectionbox pathName ?options?
INHERITANCE
itk::Widget <- Extfileselectionbox
STANDARD OPTIONS
activeBackground
foreground
insertBorderWidth
selectBackground
|
background
highlightColor
insertOffTime
selectBorderWidth
|
borderWidth
highlightThickness
insertOnTime
selectForeground
|
cursor
insertBackground
insertWidth
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
popupCursor
|
textBackground
|
textFont
|
|
See the "combobox" widget manual entry for details on the above
associated options.
See the "labeledwidget" widget manual entry for details on the above
associated options.
See the "panedwindow" widget manual entry for details on the above
associated options.
activeRelief
|
elementBorderWidth
|
jump
|
troughColor
|
See the "scrollbar" widget class manual entry for details on the above
associated options.
See the "scrolledlistbox" widget manual entry for details on the above
associated options.
WIDGET-SPECIFIC OPTIONS
Name: childSitePos
Class: Position
Command-Line Switch: -childsitepos
Specifies the position of the child site in the extended fileselection
box: n, s, e, w, top, or bottom.
The default is s.
Name: directory
Class: Directory
Command-Line Switch: -directory
Specifies the initial default directory. The default is the present
working directory.
Name: dirSearchCommand
Class: Command
Command-Line Switch: -dirsearchcommand
Specifies a Tcl command to be executed to perform a directory search.
The command will receive the current working directory and filter
mask as arguments. The command should return a list of files which
will be placed into the directory list.
Name: dirsLabel
Class: Text
Command-Line Switch: -dirslabel
Specifies the text of the label for the directory list. The default is
"Directories".
Name: dirsOn
Class: DirsOn
Command-Line Switch: -dirson
Specifies whether or not to display the directory list. The
value may be given in any of the forms acceptable to Tcl_GetBoolean.
The default is true.
Name: fileSearchCommand
Class: Command
Command-Line Switch: -filesearchcommand
Specifies a Tcl command to be executed to perform a file search.
The command will receive the current working directory and filter
mask as arguments. The command should return a list of files which
will be placed into the file list.
Name: filesLabel
Class: Text
Command-Line Switch: -fileslabel
Specifies the text of the label for the files list. The default is "Files".
Name: filesOn
Class: FilesOn
Command-Line Switch: -fileson
Specifies whether or not to display the files list. The
value may be given in any of the forms acceptable to Tcl_GetBoolean.
The default is true.
Name: fileType
Class: FileType
Command-Line Switch: -filetype
Specify the type of files which may appear in the file list: regular,
directory, or any. The default is regular.
Name: filterCommand
Class: Command
Command-Line Switch: -filtercommand
Specifies a Tcl command to be executed upon hitting the Return key
in the filter combobox widget.
Name: filterLabel
Class: Text
Command-Line Switch: -filterlabel
Specifies the text of the label for the filter combobox. The default is
"Filter".
Name: filterOn
Class: FilterOn
Command-Line Switch: -filteron
Specifies whether or not to display the filter combobox. The
value may be given in any of the forms acceptable to Tcl_GetBoolean.
The default is true.
Name: height
Class: Height
Command-Line Switch: -height
Specifies the height of the selection box. The value may be specified in
any of the forms acceptable to Tk_GetPixels. The default is 300 pixels.
Name: invalid
Class: Command
Command-Line Switch: -invalid
Command to be executed should the filter contents be proven
invalid. The default is {bell}.
Name: mask
Class: Mask
Command-Line Switch: -mask
Specifies the initial file mask string. The default is "*".
Name: noMatchString
Class: NoMatchString
Command-Line Switch: -nomatchstring
Specifies the string to be displayed in the files list should no files
match the mask. The default is "".
Name: selectDirCommand
Class: Command
Command-Line Switch: -selectdirommand
Specifies a Tcl command to be executed following selection of a
directory in the directory list.
Name: selectFileCommand
Class: Command
Command-Line Switch: -selectfileommand
Specifies a Tcl command to be executed following selection of a
file in the files list.
Name: selectionCommand
Class: Command
Command-Line Switch: -selectioncommand
Specifies a Tcl command to be executed upon hitting the Return key
in the selection combobox widget.
Name: selectionLabel
Class: Text
Command-Line Switch: -selectionlabel
Specifies the text of the label for the selection combobox. The default
is "Selection".
Name: selectionOn
Class: SelectionOn
Command-Line Switch: -selectionon
Specifies whether or not to display the selection combobox. The
value may be given in any of the forms acceptable to Tcl_GetBoolean.
The default is true.
Name: width
Class: Width
Command-Line Switch: -width
Specifies the width of the selection box. The value may be specified in
any of the forms acceptable to Tk_GetPixels. The default is 350 pixels.
DESCRIPTION
The extfileselectionbox command creates an extended file
selection box which is slightly different than the fileselectionbox widget.
The differences are mostly cosmetic in that the listboxes are
within a panedwindow and the entryfields for the filter and selection
have been replaced by comboboxes. Other than that the interface is
practically the same.
METHODS
The extfileselectionbox command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for extfileselectionbox widgets:
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the extfileselectionbox
command.
- pathName childsite
- Returns the child site widget path name.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the extfileselectionbox
command.
- pathName filter
- Update the current contents of the extended file selection box based
on the current filter combobox value.
- pathName get
- Returns the current value of the selection combobox widget.
COMPONENTS
Name: dirs
Class: Scrolledlistbox
The dirs component is the directory list box for the extended fileselection
box. See the "scrolledlistbox" widget manual entry for details on the dirs
component item.
Name: files
Class: Scrolledlistbox
The files component is the file list box for the extended fileselection box.
See the "scrolledlistbox" widget manual entry for details on the files
component item.
Name: filter
Class: Combobox
The filter component is the field for user input of the filter value.
See the "combobox" widget manual entry for details on the filter
component item.
Name: selection
Class: Combobox
The selection component is the field for user input of the currently
selected file value. See the "combobox" widget manual entry for details
on the selection component item.
EXAMPLE
extfileselectionbox .fsb
pack .fsb -padx 10 -pady 10 -fill both -expand yes
AUTHORS
Mark L. Ulferts
Anthony Parent
KEYWORDS
extfileselectionbox, widget
iwidgets-4.1.0/demos/html/extfileselectiondialog.n.html 0000644 0036047 0045461 00000020357 07347201214 021660 0 ustar dgp 771div extfileselectiondialog - Create and manipulate a file selection dialog widget
extfileselectiondialog - Create and manipulate a file selection dialog widget
SYNOPSIS
extfileselectiondialog pathName ?options?
INHERITANCE
itk::Toplevel <- Shell <- Dialogshell <- Dialog <- Extfileselectiondialog
STANDARD OPTIONS
activeBackground
foreground
insertBorderWidth
selectBackground
|
background
highlightColor
insertOffTime
selectBorderWidth
|
borderWidth
highlightThickness
insertOnTime
selectForeground
|
cursor
insertBackground
insertWidth
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
popupCursor
|
textBackground
|
textFont
|
|
See the "combobox" widget manual entry for details on the above
associated options.
childSitePos
dirsOn
filesOn
invalid
selectionOn
|
directory
filesLabel
fileType
mask
|
dirsLabel
filesLabelOn
filterLabel
noMatchString
|
dirSearchCommand
fileSearchCommand
filterOn
selectionLabel
|
See the "extfileselectionbox" widget manual entry for details on the above
associated options.
See the "labeledwidget" widget manual entry for details on the above
associated options.
See the "panedwindow" widget manual entry for details on the above
associated options.
See the "labeledwidget" widget manual entry for details on the above
associated options.
activeRelief
|
elementBorderWidth
|
jump
|
troughColor
|
See the "scrollbar" widget class manual entry for details on the above
associated options.
See the "scrolledlistbox" widget manual entry for details on the above
associated options.
INHERITED OPTIONS
buttonBoxPadX
padY
|
buttonBoxPadY
separator
|
buttonBoxPos
thickness
|
padX
|
See the "dialogshell" widget manual entry for details on the above
inherited options.
height
|
master
|
modality
|
width
|
See the "shell" widget manual entry for details on the above
inherited options.
See the "Toplevel" widget manual entry for details on the above
inherited options.
DESCRIPTION
The extfileselectiondialog command creates an extended file
selection dialog which is slightly different than the
fileselectiondialog widget.
The differences are mostly cosmetic in that the listboxes are
within a panedwindow and the entryfields for the filter and selection
have been replaced by comboboxes. Other than that the interface is
practically the same.
METHODS
The extfileselectiondialog command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for extfileselectiondialog widgets:
ASSOCIATED METHODS
See the "fileselectionbox" class manual entry for details on the
associated methods.
INHERITED METHODS
add
insert
|
buttonconfigure
invoke
|
default
show
|
hide
|
See the "buttonbox" widget manual entry for details on the above
inherited methods.
activate
|
center
|
deactivate
|
|
See the "shell" widget manual entry for details on the above
inherited methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by
the extfileselectiondialog command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by
the extfileselectiondialog
command.
COMPONENTS
Name: fsb
Class: Fileselectionbox
The fsb component is the extfileselectionbox for the extfileselectiondialog.
See the "extfileselectionbox" widget manual entry for details on the fsb
component item.
EXAMPLE
#
# Non-modal example
#
proc okCallback {} {
puts "You selected [.nmfsd get]"
.nmfsd deactivate
}
extfileselectiondialog .nmfsd -title Non-Modal
.nmfsd buttonconfigure OK -command okCallback
.nmfsd activate
#
# Modal example
#
extfileselectiondialog .mfsd -modality application
.mfsd center
if {[.mfsd activate]} {
puts "You selected [.mfsd get]"
} else {
puts "You cancelled the dialog"
}
AUTHORS
Mark L. Ulferts
Anthony L. Parent
KEYWORDS
extfileselectiondialog, extfileselectionbox, dialog, dialogshell, shell, widget
iwidgets-4.1.0/demos/html/feedback.n.html 0000644 0036047 0045461 00000011543 06570255546 016671 0 ustar dgp 771div feedback - Create and manipulate a feedback widget to display feedback on
feedback - Create and manipulate a feedback widget to display feedback on
the current status of an ongoing operation to the user.
SYNOPSIS
feedback pathName ?options?
INHERITANCE
itk::Widget <- Labeledwidget <- Feedback
STANDARD OPTIONS
background
highlightThickness
|
cursor
|
foreground
|
highlightColor
|
See the "options" manual entry for details on the standard options.
INHERITED OPTIONS
labelBitmap
labelPos
|
labelFont
labelText
|
labelImage
labelVariable
|
labelMargin
|
See the "labeledwidget" class manual entry for details on the inherited options.
WIDGET-SPECIFIC OPTIONS
Name: barcolor
Class: BarColor
Command-Line Switch: -barcolor
Specifies the color of the status bar, in any of the forms
acceptable to Tk_GetColor. The default is DodgerBlue.
Name: barheight
Class: BarHeight
Command-Line Switch: -barheight
Specifies the height of the status bar, in any of the forms
acceptable to Tk_GetPixels. The default is 20.
Name: troughColor
Class: TroughColor
Command-Line Switch: -troughcolor
Specifies the color of the frame in which the status bar sits,
in any of the forms acceptable to Tk_GetColor. The default is white.
Name: steps
Class: Steps
Command-Line Switch: -steps
Specifies the total number of steps for the status bar. The default is 10.
DESCRIPTION
The feedback command creates a widget to display feedback on
the current status of an ongoing operation to the user. Display is given as
a percentage and as a thermometer type bar. Options exist for adding a label
and controlling its position.
METHODS
The feedback command creates a new Tcl command whose
name is pathName. This command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for scrolledtext widgets:
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the scrolledhtml
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the feedback
command.
- pathName reset
- Reset the current number of steps completed to 0, and configures the
percentage complete label text to 0%
- pathName step ?inc?
- Increase the current number of steps completed by the amount specified
by inc. Inc defaults to 1.
EXAMPLE
feedback .fb -labeltext "Status" -steps 20
pack .fb -padx 10 -pady 10 -fill both -expand yes
for {set i 0} {$i < 20} {incr i} {
.fb step
after 500
}
ACKNOWLEDGEMENTS
Sam Shen
This code is based largely on his feedback.tcl code from tk inspect. The
original feedback code is copyright 1995 Lawrence Berkeley Laboratory.
AUTHOR
Kris Raney
KEYWORDS
feedback, widget
iwidgets-4.1.0/demos/html/fileselectionbox.n.html 0000644 0036047 0045461 00000030344 07347201305 020466 0 ustar dgp 771div fileselectionbox - Create and manipulate a file selection box widget
fileselectionbox - Create and manipulate a file selection box widget
SYNOPSIS
fileselectionbox pathName ?options?
INHERITANCE
itk::Widget <- Fileselectionbox
STANDARD OPTIONS
activeBackground
foreground
insertBorderWidth
selectBackground
|
background
highlightColor
insertOffTime
selectBorderWidth
|
borderWidth
highlightThickness
insertOnTime
selectForeground
|
cursor
insertBackground
insertWidth
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
See the "entryfield" widget manual entry for details on the above
associated options.
See the "labeledwidget" widget manual entry for details on the above
associated options.
activeRelief
|
elementBorderWidth
|
jump
|
troughColor
|
See the "scrollbar" widget class manual entry for details on the above
associated options.
See the "scrolledlistbox" widget manual entry for details on the above
associated options.
WIDGET-SPECIFIC OPTIONS
Name: childSitePos
Class: Position
Command-Line Switch: -childsitepos
Specifies the position of the child site in the selection box: n,
s, e, w, top, bottom, or center. The
default is s.
Specifies a Tcl command procedure which is called when an file list item is
double clicked. Typically this occurs when mouse button 1 is double
clicked over a file name.
Name: directory
Class: Directory
Command-Line Switch: -directory
Specifies the initial default directory. The default is the present
working directory.
Name: dirSearchCommand
Class: Command
Command-Line Switch: -dirsearchcommand
Specifies a Tcl command to be executed to perform a directory search.
The command will receive the current working directory and filter
mask as arguments. The command should return a list of files which
will be placed into the directory list.
Name: dirsLabel
Class: Text
Command-Line Switch: -dirslabel
Specifies the text of the label for the directory list. The default is
"Directories".
Name: dirsOn
Class: DirsOn
Command-Line Switch: -dirson
Specifies whether or not to display the directory list. The
value may be given in any of the forms acceptable to Tcl_GetBoolean.
The default is true.
Name: fileSearchCommand
Class: Command
Command-Line Switch: -filesearchcommand
Specifies a Tcl command to be executed to perform a file search.
The command will receive the current working directory and filter
mask as arguments. The command should return a list of files which
will be placed into the file list.
Name: filesLabel
Class: Text
Command-Line Switch: -fileslabel
Specifies the text of the label for the files list. The default is "Files".
Name: filesOn
Class: FilesOn
Command-Line Switch: -fileson
Specifies whether or not to display the files list. The
value may be given in any of the forms acceptable to Tcl_GetBoolean.
The default is true.
Name: fileType
Class: FileType
Command-Line Switch: -filetype
Specify the type of files which may appear in the file list: regular,
directory, or any. The default is regular.
Name: filterCommand
Class: Command
Command-Line Switch: -filtercommand
Specifies a Tcl command to be executed upon hitting the Return key
in the filter entry widget.
Name: filterLabel
Class: Text
Command-Line Switch: -filterlabel
Specifies the text of the label for the filter entry field. The default is
"Filter".
Name: filterOn
Class: FilterOn
Command-Line Switch: -filteron
Specifies whether or not to display the filter entry. The
value may be given in any of the forms acceptable to Tcl_GetBoolean.
The default is true.
Name: height
Class: Height
Command-Line Switch: -height
Specifies the height of the selection box. The value may be specified in
any of the forms acceptable to Tk_GetPixels. The default is 360 pixels.
Name: invalid
Class: Command
Command-Line Switch: -invalid
Command to be executed should the filter contents be proven
invalid. The default is {bell}.
Name: mask
Class: Mask
Command-Line Switch: -mask
Specifies the initial file mask string. The default is "*".
Name: noMatchString
Class: NoMatchString
Command-Line Switch: -nomatchstring
Specifies the string to be displayed in the files list should no files
match the mask. The default is "".
Name: selectDirCommand
Class: Command
Command-Line Switch: -selectdirommand
Specifies a Tcl command to be executed following selection of a
directory in the directory list.
Name: selectFileCommand
Class: Command
Command-Line Switch: -selectfileommand
Specifies a Tcl command to be executed following selection of a
file in the files list.
Name: selectionCommand
Class: Command
Command-Line Switch: -selectioncommand
Specifies a Tcl command to be executed upon hitting the Return key
in the selection entry widget.
Name: selectionLabel
Class: Text
Command-Line Switch: -selectionlabel
Specifies the text of the label for the selection entry field. The default
is "Selection".
Name: selectionOn
Class: SelectionOn
Command-Line Switch: -selectionon
Specifies whether or not to display the selection entry. The
value may be given in any of the forms acceptable to Tcl_GetBoolean.
The default is true.
Name: width
Class: Width
Command-Line Switch: -width
Specifies the width of the selection box. The value may be specified in
any of the forms acceptable to Tk_GetPixels. The default is 470 pixels.
DESCRIPTION
The fileselectionbox command creates a file selection box similar
to the OSF/Motif standard Xmfileselectionbox composite widget. The
fileselectionbox is composed of directory and file scrolled lists as
well as filter and selection entry fields. Bindings are in place such that
selection of a directory list item loads the filter entry field and
selection of a file list item loads the selection entry field. Options
exist to control the appearance and actions of the widget.
METHODS
The fileselectionbox command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for fileselectionbox widgets:
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the fileselectionbox
command.
- pathName childsite
- Returns the child site widget path name.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the fileselectionbox
command.
- pathName filter
- Update the current contents of the file selection box based on the current
filter entry field value.
- pathName get
- Returns the current value of the selection entry widget.
COMPONENTS
Name: dirs
Class: Scrolledlistbox
The dirs component is the directory list box for the file selection box.
See the "scrolledlistbox" widget manual entry for details on the dirs
component item.
Name: files
Class: Scrolledlistbox
The files component is the file list box for the file selection box.
See the "scrolledlistbox" widget manual entry for details on the files
component item.
Name: filter
Class: Entryfield
The filter component is the entry field for user input of the filter value.
See the "entryfield" widget manual entry for details on the filter
component item.
Name: selection
Class: Entryfield
The selection component is the entry field for user input of the currently
selected file value. See the "entryfield" widget manual entry for details
on the selection component item.
EXAMPLE
fileselectionbox .fsb
pack .fsb -padx 10 -pady 10 -fill both -expand yes
AUTHOR
Mark L. Ulferts
KEYWORDS
fileselectionbox, widget
iwidgets-4.1.0/demos/html/fileselectiondialog.n.html 0000644 0036047 0045461 00000017145 07347201315 021142 0 ustar dgp 771div fileselectiondialog - Create and manipulate a file selection dialog widget
fileselectiondialog - Create and manipulate a file selection dialog widget
SYNOPSIS
fileselectiondialog pathName ?options?
INHERITANCE
itk::Toplevel <- Shell <- Dialogshell <- Dialog <- Fileselectiondialog
STANDARD OPTIONS
activeBackground
foreground
insertBorderWidth
selectBackground
|
background
highlightColor
insertOffTime
selectBorderWidth
|
borderWidth
highlightThickness
insertOnTime
selectForeground
|
cursor
insertBackground
insertWidth
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
See the "entryfield" widget manual entry for details on the above associated
options.
childSitePos
dirsOn
filesOn
invalid
selectionOn
|
directory
filesLabel
fileType
mask
|
dirsLabel
filesLabelOn
filterLabel
noMatchString
|
dirSearchCommand
fileSearchCommand
filterOn
selectionLabel
|
See the "fileselectionbox" widget manual entry for details on the above
associated options.
See the "labeledwidget" widget manual entry for details on the above
associated options.
See the "scrolledlistbox" widget manual entry for details on the above
associated options.
activeRelief
|
elementBorderWidth
|
jump
|
troughColor
|
See the "scrollbar" widget class manual entry for details on the above
associated options.
INHERITED OPTIONS
buttonBoxPadX
padY
|
buttonBoxPadY
separator
|
buttonBoxPos
thickness
|
padX
|
See the "dialogshell" widget manual entry for details on the above
inherited options.
height
|
master
|
modality
|
width
|
See the "shell" widget manual entry for details on the above
inherited options.
See the "Toplevel" widget manual entry for details on the above
inherited options.
DESCRIPTION
The fileselectiondialog command creates a file selection dialog
similar to the OSF/Motif standard composite widget. The
fileselectiondialog is derived from the Dialog class and is composed of
a FileSelectionBox with attributes set to manipulate the dialog buttons.
METHODS
The fileselectiondialog command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for fileselectiondialog widgets:
ASSOCIATED METHODS
See the "fileselectionbox" class manual entry for details on the
associated methods.
INHERITED METHODS
add
insert
|
buttonconfigure
invoke
|
default
show
|
hide
|
See the "buttonbox" widget manual entry for details on the above
inherited methods.
activate
|
center
|
deactivate
|
|
See the "shell" widget manual entry for details on the above
inherited methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by
the fileselectiondialog command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by
the fileselectiondialog
command.
COMPONENTS
Name: fsb
Class: Fileselectionbox
The fsb component is the file selection box for the file selection dialog.
See the "fileselectionbox" widget manual entry for details on the fsb
component item.
EXAMPLE
#
# Non-modal example
#
proc okCallback {} {
puts "You selected [.nmfsd get]"
.nmfsd deactivate
}
fileselectiondialog .nmfsd -title Non-Modal
.nmfsd buttonconfigure OK -command okCallback
.nmfsd activate
#
# Modal example
#
fileselectiondialog .mfsd -modality application
.mfsd center
if {[.mfsd activate]} {
puts "You selected [.mfsd get]"
} else {
puts "You cancelled the dialog"
}
AUTHOR
Mark L. Ulferts
KEYWORDS
fileselectiondialog, fileselectionbox, dialog, dialogshell, shell, widget
iwidgets-4.1.0/demos/html/finddialog.n.html 0000644 0036047 0045461 00000024035 07347201324 017231 0 ustar dgp 771div finddialog - Create and manipulate a find dialog widget
finddialog - Create and manipulate a find dialog widget
SYNOPSIS
finddialog pathName ?options?
INHERITANCE
itk::Toplevel <- Shell <- Dialogshell <- Finddialog
STANDARD OPTIONS
activeBackground
cursor
highlightColor
insertOffTime
selectBorderWidth
|
activeForeground
disabledForeground
highlightThickness
insertOnTime
selectColor
|
background
font
insertBackground
insertWidth
selectForeground
|
borderWidth
foreground
insertBorderWidth
selectBackground
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
See the "checkbutton" widget manual entry for details on the above
associated options.
See the "entryfield" widget manual entry for details on the above
associated options.
See the "labeledwidget" widget manual entry for details on the above
associated options.
INHERITED OPTIONS
buttonBoxPadX
padY
|
buttonBoxPadY
separator
|
buttonBoxPos
thickness
|
padX
|
See the "dialogshell" widget manual entry for details on the above
inherited options.
height
|
master
|
modality
|
width
|
See the "shell" widget manual entry for details on the above
inherited options.
See the "Toplevel" widget manual entry for details on the above
inherited options.
WIDGET-SPECIFIC OPTIONS
Name: clearCommand
Class: Command
Command-Line Switch: -clearcommand
Specifies a command to be invoked following a clear operation.
The option is meant to be used as means of notification that the
clear has taken place and allow other actions to take place such
as disabling a find again menu.
Name: matchCommand
Class: Command
Command-Line Switch: -matchcommand
Specifies a command to be invoked following a find operation.
The command is called with a match point as an argument which identifies
where exactly where in the text or scrolledtext widget that the match
is located. Should a match not be found the match point is {}. The
option is meant to be used as a means of notification that the
find operation has completed and allow other actions to take place
such as disabling a find again menu option if the match point was {}.
Name: patternBackground
Class: Background
Command-Line Switch: -patternbackground
Specifies the background color of the text matching the search
pattern. It may have any of the forms accepted by Tk_GetColor.
The default is gray44.
Name: patternForeground
Class: Background
Command-Line Switch: -patternforeground
Specifies the foreground color of the text matching the search
pattern. It may have any of the forms accepted by Tk_GetColor.
The default is white.
Name: searchBackground
Class: Background
Command-Line Switch: -searchbackground
Specifies the background color of the line containing the matching
the search pattern. It may have any of the forms accepted by Tk_GetColor.
The default is gray77.
Name: searchForeground
Class: Background
Command-Line Switch: -searchforeground
Specifies the foreground color of the line containing the matching
the search pattern. It may have any of the forms accepted by Tk_GetColor.
The default is black.
Name: textWidget
Class: TextWidget
Command-Line Switch: -textwidget
Specifies the text or scrolledtext widget to be searched.
DESCRIPTION
The finddialog command creates a find dialog that works in
conjunction with a text or scrolledtext widget to provide a means
of performing search operations. The user is prompted for a text
pattern to be found in the text or scrolledtext widget. The
search can be for all occurances, by regular expression, considerate
of the case, or backwards.
METHODS
The finddialog command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for finddialog widgets:
INHERITED METHODS
add
invoke
|
buttonconfigure
show
|
default
|
hide
|
See the "buttonbox" widget manual entry for details on the above
inherited methods.
activate
|
center
|
deactivate
|
|
See the "shell" widget manual entry for details on the above
inherited methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the finddialog
command.
- pathName clear
- Clears the pattern in the entry field and the pattern matchin
indicators in the text or scrolledtext widget.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the finddialog
command.
- pathName find
- Search for a specific text string in the text widget given by
the -textwidget option. This method is the standard callback
for the Find button. It is made available such that it can be
bound to a find again action.
COMPONENTS
Name: all
Class: Checkbutton
The all component specifies that all the matches of the pattern should be
found when performing the search. See the "checkbutton" widget manual
entry for details on the all component item.
Name: backwards
Class: Checkbutton
The backwards component specifies that the search should continue in
a backwards direction towards the beginning of the text or scrolledtext
widget. See the "checkbutton" widget manual entry for details on the
backwards component item.
Name: case
Class: Checkbutton
The case component specifies that the case of the pattern should be
taken into consideration when performing the search. See the
"checkbutton" widget manual entry for details on the case component item.
Name: pattern
Class: Entryfield
The pattern component provides the pattern entry field. See the
"entryfield" widget manual entry for details on the pattern component item.
Name: regexp
Class: Checkbutton
The regexp component specifies that the pattern is a regular expression.
See the "checkbutton" widget manual entry for details on the regexp
component item.
EXAMPLE
scrolledtext .st
pack .st
.st insert end "Now is the time for all good men\\n"
.st insert end "to come to the aid of their country"
finddialog .fd -textwidget .st
.fd center .st
.fd activate
AUTHOR
Mark L. Ulferts
KEYWORDS
finddialog, dialogshell, shell, widget
iwidgets-4.1.0/demos/html/hierarchy.n.html 0000644 0036047 0045461 00000051603 07347201334 017111 0 ustar dgp 771div hierarchy - Create and manipulate a hierarchy widget
hierarchy - Create and manipulate a hierarchy widget
SYNOPSIS
hierarchy pathName ?options?
INHERITANCE
itk::Widget <- Labeledwidget <- Scrolledwidget <- Hierarchy
STANDARD OPTIONS
activeBackground
cursor
highlightThickness
|
activeForeground
disabledForeground
relief
|
background
foreground
selectBackground
|
borderWidth
highlightColor
selectForeground
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
activeRelief
|
elementBorderWidth
|
jump
|
troughColor
|
See the "scrollbar" widget manual entry for details on the above
associated options.
spacing1
|
spacing2
|
spacing3
|
tabs
|
See the "text" widget manual entry for details on the above
associated options.
INHERITED OPTIONS
labelBitmap
labelPos
|
labelFont
labelText
|
labelImage
labelVariable
|
labelMargin
|
See the "labeledwidget" class manual entry for details on the inherited options.
WIDGET-SPECIFIC OPTIONS
Name: alwaysQuery
Class: AlwaysQuery
Command-Line Switch: -alwaysquery
Boolean flag which tells the hierarchy widget weather or not
each refresh of the display should be via a new query using
the command value of the -querycommand option or use the values
previous found the last time the query was made. The default
is no.
Name: closedIcon
Class: Icon
Command-Line Switch: -closedicon
Specifies the name of an existing closed icon image to be used in the
hierarchy before those nodes that are collapsed. Should one not be
provided, then a folder icon will be generated, pixmap if possible,
bitmap otherwise.
Name: expanded
Class: Expanded
Command-Line Switch: -expanded
When true, the hierarchy will be completely expanded when it
is first displayed. A fresh display can be triggered by
resetting the -querycommand option. The default is false.
Name: filter
Class: Filter
Command-Line Switch: -filter
When true only the branch nodes and selected items are displayed.
This gives a compact view of important items. The default is false.
Name: height
Class: Height
Command-Line Switch: -height
Specifies the height of the hierarchy as an entire unit.
The value may be specified in any of the forms acceptable to
Tk_GetPixels. Any additional space needed to display the other
components such as labels, margins, and scrollbars force the hierarchy
to be compressed. A value of zero along with the same value for
the width causes the value given for the visibleitems option
to be applied which administers geometry constraints in a different
manner. The default height is zero.
Name: iconCommand
Class: Command
Command-Line Switch: -iconcommand
Specifies a command to be executed upon user selection via mouse button
one of any additional icons given in the values returned by the command
associated with the -querycommand option. If this command contains "%n",
it is replaced with the name of the node the icon belongs to. Should it
contain "%i" then the icon name is substituted.
Name: markBackground
Class: Foreground
Command-Line Switch: -markbackground
Specifies the background color to use when displaying marked nodes.
Name: markForeground
Class: Background
Command-Line Switch: -markforeground
Specifies the foreground color to use when displaying marked nodes.
Name: menuCursor
Class: Cursor
Command-Line Switch: -menucursor
Specifies the mouse cursor to be used for the item and background
menus. The value may have any of the forms accept able to Tk_GetCursor.
Name: nodeIcon
Class: Icon
Command-Line Switch: -nodeicon
Specifies the name of an existing node icon image to be used in the
hierarchy before those nodes that are leafs. Should one not be provided,
then a dog-eared page icon will be generated, pixmap if possible, bitmap
otherwise.
Name: openIcon
Class: Icon
Command-Line Switch: -openicon
Specifies the name of an existing open icon image to be used in the
hierarchy before those nodes that are expanded. Should one not be provided,
then an open folder icon will be generated, pixmap if possible, bitmap
otherwise.
Name: queryCommand
Class: Command
Command-Line Switch: -querycommand
Specifies the command executed to query the contents of each node. If this
command contains "%n", it is replaced with the name of the desired
node. In its simpilest form it should return the children of the
given node as a list which will be depicted in the display.
Since the names of the children are used as tags in the underlying
text widget, each child must be unique in the hierarchy. Due to
the unique requirement, the nodes shall be reffered to as uids
or uid in the singular sense. The format of returned list is
where uid is a unique id and primary key for the hierarchy entry
Should the unique requirement pose a problem, the list returned
can take on another more extended form which enables the
association of text to be displayed with the uids. The uid must
still be unique, but the text does not have to obey the unique
rule. In addition, the format also allows the specification of
additional tags to be used on the same entry in the hierarchy
as the uid and additional icons to be displayed just before
the node. The tags and icons are considered to be the property of
the user in that the hierarchy widget will not depend on any of
their values. The extended format is
{{uid [text [tags [icons]]]} {uid [text [tags [icons]]]} ...}
where uid is a unique id and primary key for the hierarchy entry
text is the text to be displayed for this uid
tags is a list of user tags to be applied to the entry
icons is a list of icons to be displayed in front of the text
The hierarchy widget does a look ahead from each node to determine
if the node has a children. This can be cost some performace with
large hierarchies. User's can avoid this by providing a hint in
the user tags. A tag of "leaf" or "branch" tells the hierarchy
widget the information it needs to know thereby avoiding the look
ahead operation.
Name: hscrollMode
Class: ScrollMode
Command-Line Switch: -hscrollmode
Specifies the the display mode to be used for the horizontal
scrollbar: static, dynamic, or none. In static mode, the
scroll bar is displayed at all times. Dynamic mode displays the
scroll bar as required, and none disables the scroll bar display. The
default is static.
Name: sbWidth
Class: Width
Command-Line Switch: -sbwidth
Specifies the width of the scrollbar in any of the forms
acceptable to Tk_GetPixels.
Name: scrollMargin
Class: Margin
Command-Line Switch: -scrollmargin
Specifies the distance between the text portion of the hierarchy and
the scrollbars in any of the forms acceptable to Tk_GetPixels. The
default is 3 pixels.
Name: textBackground
Class: Background
Command-Line Switch: -textbackground
Specifies the background color for the text portion of the hierarchy in
any of the forms acceptable to Tk_GetColor.
Name: textFont
Class: Font
Command-Line Switch: -textfont
Specifies the font to be used in the text portion of the hierarchy.
Name: visibleitems
Class: VisibleItems
Command-Line Switch: -visibleitems
Specifies the widthxheight in characters and lines for the hierarchy.
This option is only administered if the width and height options
are both set to zero, otherwise they take precedence. The default value
is 80x24. With the visibleitems option engaged, geometry constraints
are maintained only on the text portion of the hierarchy. The size of
the other components such as
labels, margins, and scroll bars, are additive and independent,
effecting the overall size of the hierarchy. In contrast,
should the width and height options have non zero values, they
are applied to the hierarchy as a whole. The hierarchy
is compressed or expanded to maintain the geometry constraints.
Name: vscrollMode
Class: ScrollMode
Command-Line Switch: -vscrollmode
Specifies the the display mode to be used for the vertical
scrollbar: static, dynamic, or none. In static mode, the
scroll bar is displayed at all times. Dynamic mode displays the
scroll bar as required, and none disables the scroll bar display. The
default is static.
Name: width
Class: Width
Command-Line Switch: -width
Specifies the width of the hierarchy as an entire unit.
The value may be specified in any of the forms acceptable to
Tk_GetPixels. Any additional space needed to display the other
components such as labels, margins, and scrollbars force the text portion
of the hierarchy
to be compressed. A value of zero along with the same value for
the height causes the value given for the visibleitems option
to be applied which administers geometry constraints in a different
manner. The default width is zero.
DESCRIPTION
The hierarchy command creates a hierarchical data view widget.
It allows the graphical management of a a list of nodes that can be
expanded or collapsed. Individual nodes can be highlighted.
Clicking with the right mouse button on any item brings up a
special item menu. Clicking on the background area brings up
a different popup menu. Options exist to provide user control over
the loading of the nodes and actions associated with node selection.
Since the hierarchy is based on the scrolledtext widget, it includes
options to control the method in which the scrollbars are displayed,
i.e. statically or dynamically. Options also exist for adding a
label to the hierarchy and controlling its position.
METHODS
The hierarchy command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for hierarchy widgets:
ASSOCIATED METHODS
bbox
dlineinfo
insert
tag
|
compare
dump
scan
window
|
debug
get
search
xview
|
delete
index
see
yview
|
See the "text" manual entry for details on the standard methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the hierarchy
command.
- pathName clear
- Removes all items from the hierarchy display including all tags and icons.
The display will remain empty until the -filter or -querycommand
options are set.
- pathName collapse uid
- Collapses the hierarchy beneath the node with the specified unique id by
one level. Since this can take a moment for large hierarchies, the
cursor will be changed to a watch during the collapse. Also, if any
of the nodes beneath the node being collapsed are selected, their
status is changed to unselected.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the hierarchy
command.
- pathName current
- Returns the tags for the node that was most recently selected by the
right mouse button when the item menu was posted. Usually used by the code
in the item menu to figure out what item is being manipulated.
- pathName draw ?when?
- Performs a complete redraw of the entire hierarchy. When may be either -now
or -eventually where the latter means the draw can be performed after idle.
- pathName expand uid
- Expands the hierarchy beneath the node with the specified unique id by
one level. Since this can take a moment for large hierarchies, the cursor
will be changed to a watch during the expansion.
- pathName mark option ?arg arg ...?
- This command is used to manipulate marks which is quite similar to
selection, adding a secondary means of hilighting an item in the
hierarchy. The exact behavior of the command depends on the
option argument that follows the mark argument. The
following forms of the command are currently supported:
- pathName mark clear
- Clears all the currently marked nodes in the hierarchy.
- pathName mark add uid ?uid uid ...?
- Marks the nodes with the specified uids in the hierarchy using the
-markbackground and -markforeground options and without
affecting the mark state of any other nodes that were already
marked.
- pathName mark remove uid ?uid uid ...?
- Unmarks the nodes with the specified uids in the hierarchy without
affecting the mark state of any other nodes that were already
marked.
- pathName mark get
- Returns a list of the unique ids that are currently marked.
- pathName refresh uid
- Performs a redraw of a specific node that has the given uid. If the node
is not currently visible or in other words already drawn on the text,
then no action is taken.
- pathName prune uid
- Removes the node specified by the given uid from the hierarchy. Should
the node have children, then all of its children will be removed as well.
- pathName selection option ?arg arg ...?
- This command is used to manipulate the selection of nodes in the
hierarchy. The exact behavior of the command depends on the
option argument that follows the selection argument. The
following forms of the command are currently supported:
- pathName selection clear
- Clears all the currently selected nodes in the hierarchy.
- pathName selection add uid ?uid uid ...?
- Selects the nodes with the specified uids in the hierarchy using the
-selectionbackground and -selectionforeground options and without
affecting the selection state of any other nodes that were already
selected.
- pathName selection remove uid ?uid uid ...?
- Deselects the nodes with the specified uids in the hierarchy without
affecting the selection state of any other nodes that were already
selected.
- pathName selection get
- Returns a list of the unique ids that are currently selected.
A nodes selection status is also dependent on it being visible. If a
node is selected and its parent is then collapsed making the selected
node not visible, then its selection status is changed to unselected.
- pathName toggle uid
- Toggles the hierarchy beneath the node with the specified unique id. If
the hierarchy is currently expanded, then it is collapsed, and vice-versa.
COMPONENTS
Name: list
Class: Text
The list component is the text widget in which the hierarchy is displayed.
See the "text" widget manual entry for details on the text component item.
Name: bgMenu
Class: Menu
The bgMenu component is the popup menu which is displayed upon pressing
the right mouse button in the background, i.e. not over a specific node. Menu
items can be added along with their commands via the component command.
See the "menu" widget manual entry for details on the bgMenu component item.
Name: horizsb
Class: Scrollbar
The horizsb component is the horizontal scroll bar. See the "scrollbar"
widget manual entry for details on the horizsb component item.
Name: itemMenu
Class: Menu
The itemMenu component is the popup menu which is displayed upon selection
of a hierarchy node with the right mouse button. Menu items can be
added along with their commands via the component command. See the "menu"
widget manual entry for details on the itemMenu component item.
Name: vertsb
Class: Scrollbar
The vertsb component is the vertical scroll bar. See the "scrollbar" widget
manual entry for details on the vertsb component item.
EXAMPLE
proc get_files {file} {
global env
if {$file == ""} {
set dir $env(HOME)
} else {
set dir $file
}
if {[catch {cd $dir}] != 0} {
return ""
}
set rlist ""
foreach file [lsort [glob -nocomplain *]] {
lappend rlist [list [file join $dir $file] $file]
}
return $rlist
}
hierarchy .h -querycommand "get_files %n" -visibleitems 30x15 \
-labeltext $env(HOME)
pack .h -side left -expand yes -fill both
AUTHORS
Mark L. Ulferts
Michael J. McLennan
KEYWORDS
hierarchy, text, widget
iwidgets-4.1.0/demos/html/hyperhelp.n.html 0000644 0036047 0045461 00000016217 06570255551 017144 0 ustar dgp 771div hyperhelp - Create and manipulate a hyperhelp widget
hyperhelp - Create and manipulate a hyperhelp widget
SYNOPSIS
hyperhelp pathName ?options?
INHERITANCE
itk::Toplevel <- shell <- hyperhelp
STANDARD OPTIONS
activeBackground
cursor
highlightThickness
insertOnTime
relief
selectBorderWidth
|
background
exportSelection
insertBackground
insertWidth
repeatDelay
selectForeground
|
borderWidth
foreground
insertBorderWidth
padX
repeatInterval
setGrid
|
closecmd
highlightColor
insertOffTime
padY
selectBackground
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
hscrollmode
fontsize
width
unknownimage
|
vscrollmode
fixedfont
height
|
textbackground
link
state
|
fontname
linkhighlight
wrap
|
See the "scrolledhtml" widget manual entry for details on the above
associated options.
INHERITED OPTIONS
See the "shell" manual entry for details on the above inherited options.
WIDGET-SPECIFIC OPTIONS
Name: topics
Class: Topics
Command-Line Switch: -topics
Specifies a list of help topics in the form {?topic? ... }. Topic
may either be a topic name, in which case the
document associated with the topic should be in the file
helpdir/topic.html, or it may be of the form
{name file}. In the latter case, name is displayed in the
topic menu, and selecting the name loads file. If file has a relative
path, it is assumed to be relative to helpdir.
Name: helpdir
Class: Directory
Command-Line Switch: -helpdir
Specifies the directory where help files are located.
Name: closeCmd
Class: CloseCmd
Command-Line Switch: -closecmd
Specifies the tcl command to be executed when the close option is selected
from the topics menu.
Name: maxHistory
Class: MaxHistory
Command-Line Switch: -maxhistory
Specifies the maximum number of entries stored in the history list
Name: beforelink
Class: BeforeLink
Command-Line Switch: -beforelink
Specifies a command to be eval'ed before a new link is displayed. The path
of the link to be displayed is appended before evaling the command. A suggested
use might be to busy the widget while a new page is being displayed.
Name: afterlink
Class: AfterLink
Command-Line Switch: -afterlink
Specifies a command to be eval'ed after a new link is completely displayed.
The path of the link that was displayed is appended before evaling the command.
DESCRIPTION
The hyperhelp command creates a shell window with a pulldown menu
showing a list of topics. The topics are displayed by importing a HTML
formatted file named helpdir/topic.html. For a list of
supported HTML tags, see scrolledhtml(n).
METHODS
The hyperhelp command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for dialog widgets:
INHERITED METHODS
activate
|
center
|
childsite
|
deactivate
|
See the "shell" manual entry for details on the above inherited methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the hyperhelp
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the hyperhelp
command.
- pathName showtopic topic
- Display html file helpdir/topic.html. Topic may
optionally be of the form topicname#anchorname. In
this form, either topicname or anchorname or both may be empty. If
topicname is empty, the current topic is assumed. If anchorname
is empty, the top of the document is assumed
- pathName followlink href
- Display html file href. Href may
be optionally be of the form filename#anchorname. In
this form, either filename or anchorname or both may be empty. If
filename is empty, the current document is assumed. If anchorname
is empty, the top of the document is assumed.
- pathName forward
- Display html file one forward in history list, if applicable.
- pathName back
- Display html file one back in history list, if applicable.
EXAMPLE
hyperhelp .h -topics { Intro Help } -helpdir ~/help
.h showtopic Intro
AUTHOR
Kris Raney
KEYWORDS
hyperhelp, html, help, shell, widget
iwidgets-4.1.0/demos/html/iwidgets4.0.0UserCmds.html 0000755 0036047 0045461 00000007270 07340264623 020553 0 ustar dgp 771div
iwidgets4.0.0 User Commands
iwidgets4.0.0 User Commands
iwidgets-4.1.0/demos/html/labeledframe.n.html 0000644 0036047 0045461 00000014547 06570244361 017550 0 ustar dgp 771div labeledframe - Create and manipulate a labeled frame widget
labeledframe - Create and manipulate a labeled frame widget
SYNOPSIS
labeledframe pathName ?options?
INHERITANCE
itk::Archetype <- labeledframe
STANDARD OPTIONS
background
relief
|
borderwidth
|
cursor
|
foreground
|
See the "options" manual entry for details on the standard options.
WIDGET-SPECIFIC OPTIONS
Name: iPadX
Class: IPad
Command-Line Switch: -ipadx
Specifies horizontal padding space between the border and the childsite.
The value may have any of the forms acceptable to Tk_GetPixels.
The default is 0.
Name: iPadY
Class: IPad
Command-Line Switch: -ipady
Specifies vertical padding space between the border and the childsite.
The value may have any of the forms acceptable to Tk_GetPixels.
The default is 0.
Name: labelBitmap
Class: Bitmap
Command-Line Switch: -labelbitmap
Specifies a bitmap to display in the label, in any of the forms
acceptable to Tk_GetBitmap. This option overrides the labeltext
option.
Name: labelImage
Class: Image
Command-Line Switch: -labelimage
Specifies a image to be used as the label. The image may be any of the
values created by the image create command. This option overrides
both the labelbitmap and labeletext options.
Name: labelMargin
Class: Margin
Command-Line Switch: -labelmargin
Specifies the distance between the inner ede of the hull frames relief,
and the label in any of the forms acceptable to Tk_GetPixels.
The default is 10 pixels.
Name: labelText
Class: Text
Command-Line Switch: -labeltext
Specifies the text of the label around the childsite.
Name: labelVariable
Class: Variable
Command-Line Switch: -labelvariable
Specifies the text variable of the label around the childsite.
Name: labelFont
Class: Font
Command-Line Switch: -labelfont
Specifies the font of the label around the childsite.
Name: labelPos
Class: Position
Command-Line Switch: -labelpos
Specifies the position of the label within the grooved relief of the hull widget.
ne, n, nw, se, s, sw, en, e, es, wn, w, ws Default is n.
DESCRIPTION
The labeledframe command creates a hull frame with a
grooved relief, a label positioned within the grooved relief of
the hull frame, and a frame childsite. The frame childsite can filled with any
widget via a derived class or though the use of the childsite method.
This class was designed to be a general purpose base class for supporting the
combination of labeled frame and a childsite. The options include the
ability to position the label at configurable locations within the
grooved relief of the hull frame, and control the display of the label.
METHODS
The labeledframe command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for labeledframe widgets:
WIDGET-SPECIFIC METHODS
- pathName childsite
- Return the path name of the child site.
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the labeledframe
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the labeledframe
command.
COMPONENTS
Name: label
Class: label
The label component provides the label for the labeled widget. See the
"label" widget manual entry for details on the label component item.
EXAMPLE
The labeledframe was primarily meant to be a base class. The
Radiobox is a good example of a derived classe of the labeledframe class.
In order to provide equal support for composite classes, the 'childsite' methods
also exists. The following is an example of 'childsite' method usage.
labeledframe .lw -labeltext "Entry Frame" -labelpos n
pack .lw -fill both -expand yes -padx 10 -pady 10
set cs [.lw childsite]
pack [Entryfield $cs.entry1 -labeltext "Name:"] -side top -fill x
pack [Spinint $cs.entry2 -labeltext "Number:"] -side top -fill x
pack [Pushbutton $cs.entry3 -text "Details:"] -side top -fill x
AUTHOR
John A. Tucker
KEYWORDS
labeledframe, widget
iwidgets-4.1.0/demos/html/labeledwidget.n.html 0000644 0036047 0045461 00000015544 07347201342 017732 0 ustar dgp 771div labeledwidget - Create and manipulate a labeled widget
labeledwidget - Create and manipulate a labeled widget
SYNOPSIS
labeledwidget pathName ?options?
INHERITANCE
itk::Widget <- labeledwidget
STANDARD OPTIONS
background
|
cursor
|
foreground
|
|
See the "options" manual entry for details on the standard options.
WIDGET-SPECIFIC OPTIONS
Name: disabledForeground
Class: DisabledForeground
Command-Line Switch: -disabledforeground
Specifies the foreground to be used when the state is disabled.
Name: labelBitmap
Class: Bitmap
Command-Line Switch: -labelbitmap
Specifies a bitmap to display in the widget, in any of the forms
acceptable to Tk_GetBitmap. This option overrides the labeltext
option.
Name: labelFont
Class: Font
Command-Line Switch: -labelfont
Specifies the font to be used for the label.
Name: labelImage
Class: Image
Command-Line Switch: -labelimage
Specifies a image to be used as the label. The image may be any of the
values created by the image create command. This option overrides
both the labelbitmap and labeletext options.
Name: labelMargin
Class: Margin
Command-Line Switch: -labelmargin
Specifies the distance between the childsite and label in any of the forms
acceptable to Tk_GetPixels. The default is 2 pixel.
Name: labelPos
Class: Position
Command-Line Switch: -labelpos
Specifies the position of the label along the side of the childsite:
nw, n, ne, sw, s, se, en, e,
es, wn, w, or ws. The default is w.
Name: labelText
Class: Text
Command-Line Switch: -labeltext
Specifies the text of the label around the childsite.
Name: labelVariable
Class: Variable
Command-Line Switch: -labelvariable
Specifies the text variable of the label around the childsite.
Name: state
Class: State
Command-Line Switch: -state
Specifies one of two states for the label: normal or disabled.
If the label is disabled then it is displayed in a disabled foreground
color. The default is normal.
DESCRIPTION
The labeledwidget command creates a labeled widget which contains
a label and child site. The child site is a frame
which can filled with any widget via a derived class or though the use
of the childsite method. This class
was designed to be a general purpose base class for supporting the
combination of label widget and a childsite. The options include the
ability to position the label around the childsite widget, modify the
font and margin, and control the display of the labels.
METHODS
The labeledwidget command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for labeledwidget widgets:
WIDGET-SPECIFIC METHODS
- pathName childsite
- Return the path name of the child site.
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the labeledwidget
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the labeledwidget
command.
STATIC METHODS
- Labeledwidget::alignlabels widget ?widget ...?
- The alignlabels procedure takes a list of widgets derived from
the Labeledwidget class and uses the label margin to make each widget
have the same total space for the combination of label and margin. The
net effect is to left align the labels. Generally, this method is only
useful with a label position of w, which is the default.
COMPONENTS
Name: label
Class: label
The label component provides the label for the labeled widget. See the
"label" widget manual entry for details on the label component item.
Name: lwchildsite
Class: frame
The lwchildsite component is the user child site for the labeled widget. See
the "frame" widget manual entry for details on the lwchildsite component item.
EXAMPLE
The labeledwidget was primarily meant to be a base class. The
ScrolledListBox and EntryField are good examples of derived
classes of the labeledwidget class. In order to provide equal
support for composite classes, the 'childsite' methods also exists.
The following is an example of 'childsite' method usage.
labeledwidget .lw -labeltext "Canvas Widget" -labelpos s
pack .lw -fill both -expand yes -padx 10 -pady 10
set cw [canvas [.lw childsite].c -relief raised -width 200 -height 200]
pack $cw -padx 10 -pady 10
AUTHOR
Mark L. Ulferts
KEYWORDS
labeledwidget, widget
iwidgets-4.1.0/demos/html/mainwindow.n.html 0000644 0036047 0045461 00000024344 07347201354 017313 0 ustar dgp 771div mainwindow - Create and manipulate a mainwindow widget
mainwindow - Create and manipulate a mainwindow widget
SYNOPSIS
mainwindow pathName ?options?
INHERITANCE
itk::Toplevel <- shell <- mainwindow
STANDARD OPTIONS
background
foreground
|
cursor
highlightBackground
|
disabledForeground
highlightColor
|
font
highlightThickness
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
balloonBackground
balloonForeground
|
balloonDelay1
|
balloonDelay2
|
ballonFont
|
See the "toolbar" manual entry for details on the above associated options.
INHERITED OPTIONS
See the "Toplevel" manual entry for details on the above inherited options.
height
padY
|
master
width
|
modality
|
padX
|
See the "shell" manual entry for details on the above inherited options.
WIDGET-SPECIFIC OPTIONS
Name: helpLine
Class: HelpLine
Command-Line Switch: -helpline
Specifies whether or not to display the help line. The value
may be given in any of the forms acceptable to Tk_GetBoolean.
The default is yes.
Name: menuBarBackground
Class: Background
Command-Line Switch: -menubarbackground
Specifies the normal background color for the menubar.
Name: menuBarFont
Class: Font
Command-Line Switch: -menubarfont
Specifies the font to use when drawing text inside the menubar.
Name: menuBarForeround
Class: Foreground
Command-Line Switch: -menubarforeground
Specifies the normal foreground color for the menubar.
Name: statusLine
Class: StatusLine
Command-Line Switch: -statusline
Specifies whether or not to display the status line. The value
may be given in any of the forms acceptable to Tk_GetBoolean.
The default is yes.
Name: toolBarBackground
Class: Background
Command-Line Switch: -toolbarbackground
Specifies the normal background color for the toolbar.
Name: toolBarFont
Class: Font
Command-Line Switch: -toolbarfont
Specifies the font to use when drawing text inside the toolbar.
Name: toolBarForeround
Class: Foreground
Command-Line Switch: -toolbarforeground
Specifies the normal foreground color for the toolbar.
DESCRIPTION
The mainwindow command creates a mainwindow shell which contains
a menubar, toolbar, mousebar, childsite, status line, and help line.
Each item may be filled and configured to suit individual needs.
METHODS
The mainwindow command create a new Tcl command whose
name is pathName. This command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for mainwindow widgets:
INHERITED METHODS
activate
|
center
|
deactivate
|
|
See the "shell" manual entry for details on the above inherited methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the mainwindow
command.
- pathName childsite
- Returns the pathname of the child site widget.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the mainwindow
command.
- pathName menubar ?args?
- The menubar method provides access to the menubar. Invoked with
no arguments it returns the pathname of the menubar. With arguments,
they are evaluated against the menubar which in effect provides
access to the entire API of the menubar. See the "menubar" manual
entry for details on the commands available in the menubar.
- pathName mousebar ?args?
- The mousebar method provides access to the mousebar which is a
vertical toolbar. Invoked with no arguments it returns the pathname
of the mousebar. With arguments, they are evaluated against the mousebar
which in effect provides access to the entire API of the underlying
toolbar. See the "toolbar" manual entry for details on the commands
available in the mousebar.
- pathName msgd ?args?
- The msgd method provides access to the messagedialog contained
in the mainwindow. Invoked with no arguments it returns the pathname
of the messagedialog. With arguments, they are evaluated against the
messagedialog which in effect provides access to the entire API of the
messagedialog. See the "messagedialog" manual
entry for details on the commands available in the messagedialog.
- pathName toolbar ?args?
- The toolbar method provides access to the toolbar. Invoked with
no arguments it returns the pathname of the toolbar. With arguments,
they are evaluated against the toolbar which in effect provides
access to the entire API of the toolbar. See the "toolbar" manual
entry for details on the commands available in the toolbar.
COMPONENTS
Name: help
Class: Label
The help component provides a location for displaying any help
strings provided in the menubar, toolbar, or mousebar. See the "label"
widget manual entry for details on the help component item.
Name: menubar
Class: Menubar
The menubar component is the menubar located at the top of the window.
See the "menubar" widget manual entry for details on the menubar
component item.
Name: mousebar
Class: Toolbar
The mousebar component is the vertical toolbar located on the right side
of the window. See the "toolbar" widget manual entry for details on
the mousebar component item.
Name: msgd
Class: Messagedialog
The msgd component is a messagedialog which may be reconfigured as needed
and used repeatedly throughout the application. See the "messagedialog"
widget manual entry for details on the messagedialog component item.
Name: status
Class: Label
The status component provides a location for displaying application
status information. See the "label" widget manual entry for details
on the status component item.
Name: toolbar
Class: Toolbar
The toolbar component is the horizontal toolbar located on the top
of the window. See the "toolbar" widget manual entry for details on
the toolbar component item.
EXAMPLE
mainwindow .mw
#
# Add a File menubutton
#
.mw menubar add menubutton file -text "File" -underline 0 -padx 8 -pady 2 \\
-menu {options -tearoff no
command new -label "New" -underline 0 \\
-helpstr "Create a new file"
command open -label "Open ..." -underline 0 \\
-helpstr "Open an existing file"
command save -label "Save" -underline 0 \\
-helpstr "Save the current file"
command saveas -label "Save As ..." -underline 5 \\
-helpstr "Save the file as a differnet name"
command print -label "Print" -underline 0 \\
-helpstr "Print the file"
separator sep1
command close -label "Close" -underline 0 \\
-helpstr "Close the file"
separator sep2
command exit -label "Exit" -underline 1 \\
-helpstr "Exit this application"
}
#
# Install a scrolledtext widget in the childsite.
#
scrolledtext [.mw childsite].st
pack [.mw childsite].st -fill both -expand yes
#
# Activate the main window.
#
.mw activate
AUTHORS
Mark L. Ulferts
John A. Tucker
KEYWORDS
mainwindow, shell, widget
iwidgets-4.1.0/demos/html/menubar.n.html 0000644 0036047 0045461 00000055553 06570255552 016604 0 ustar dgp 771div menubar - Create and manipulate menubar menu widgets
menubar - Create and manipulate menubar menu widgets
SYNOPSIS
menubar pathName ?options?
INHERITANCE
itk::Widget <- menubar
STANDARD OPTIONS
activeBackground
activeBorderWidth
activeForeground
anchor
foreground
|
borderWidth
cursor
disabledForeground
font
padX
|
highlightBackground
highligthThickness
highlightColor
justify
|
padY
relief
wrapLength
background
|
See the "options" manual entry for details on the standard options.
WIDGET-SPECIFIC OPTIONS
Name: helpVariable
Class: HelpVariable
Command-Line Switch: -helpvariable
Specifies the global variable to update whenever the mouse is in motion over a menu entry. This global variable is updated with the current value of the active menu entry's helpStr. Other widgets can "watch" this variable with the trace command, or as is the case with entry or label widgets, they can set their textVariable to the same global variable. This allows for a simple implementation of a help status bar. Whenever the mouse leaves a menu entry, the helpVariable is set to the empty string {}. The mainwindow(1) associates its helpstatus and its menubar in this fashion.
Name: menuButtons
Class: MenuButtons
Command-Line Switch: -menubuttons
The menuButton option is a string which specifies the arrangement of menubuttons on the menubar frame. Each menubutton entry is delimited by the newline character.
-menubuttons
-text
-text
-text
|
{
File
Edit
Options
|
menubar
menubutton
menubutton
menubutton
}
|
.mb
file
edit
options
|
specifies that three menubuttons will be added to the menubar (file, edit, options). Each entry is translated into an add command call.
The menuButtons option can accept embedded variables, commands, and
backslash quoting. Embedded variables and commands must be enclosed in
curly braces ({}) to ensure proper parsing of the substituted values.
DESCRIPTION
The menubar command creates a new window (given by the pathName argument) and makes it into a menubar menu widget. Additional options, described above may be specified on the command line or in the option database to configure aspects of the menubar such as its colors and font. The menubar 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 menubar is a widget that simplifies the task of creating menu hierarchies. It encapsulates a frame widget, as well as menubuttons, menus, and menu entries. The menubar allows menus to be specified and referenced in a more consistent manner than using Tk to build menus directly.
Menubar allows a menu tree to be expressed in a hierachical "language". The menubar accepts a menuButtons option that allows a list of menubuttons to be added to the menubar. In turn, each menubutton accepts a menu option that specifies a list of menu entries to be added to the menubutton's menu. Cascade entries also accept the menu option for specifying a list of menu entries to be added to the cascade's menu.
Additionally, the menubar allows each component of the menubar system to be referenced by a simple menuPathName syntax. The menubar also extends the set of options for menu entries to include a helpStr option.
MENU PATH NAMES
A menuPathName is a series of component names separated by the `.' character. Each menubar component can be referenced via these menuPathNames. menuPathNames are similar to widget pathNames in Tk. Some correspond directly to a widget pathName (components of type menu or menubutton), others correspond to a menu entry type. Every widget and entry in a menubar can be referenced with the menuPathName naming convention. A menubar can have four types of components:
frame. A menubar holds exactly one frame which manages menubuttons. The frame is always signified by the `.' character as the path name.
menubutton. A menubutton corresponds directly to a Tk menubutton. See menubutton(n).
menu. A menu is attached to a menubutton and corresponds directly to Tk's menu widget. A menu is always signified by the menuPathName ending with the keyword menu. See menu(n).
entry. An entry corresponds directly to Tk's menu widget entries. Menus consist of a column of one line entries. Entries may be of type: command, checkbutton, radiobutton, separator, or cascade. For a complete description of these types see the discussion on ENTRIES in menu(n).
The suffix of a menuPathName may have the form of:
- tkWidgetName
- Specifies the name of the component, either a frame, menubutton, menu, or an entry. This is the normal naming of widgets. For example, .file references a menubutton named file.
The menuPathName is a series of segment names, each separated by the '.' character. Segment names may be one of the following forms:
- number
- Specifies the index of the the component. For menubuttons, 0 corresponds to the left-most menubutton of the menu bar frame. As an example, .1 would correspond to the second menubutton on the menu bar frame.
For entries, 0 corresponds to the top-most entry of the menu. For example, .file.0 would correspond to the first entry on the menu attached to the menubutton named file.
- end
- Specifes the last component. For menubuttons, it specifies the right-most entry of the menu bar frame. For menu entries, it specifies the bottom-most entry of the menu.
- last
- Same as end.
Finally, menu components always end with the menu keyword. These components are automatically created via the -menu option on menubuttons and cascades or via the add or insert commands.
- menu
- Specifes the menu pane that is associated with the given menubutton prefix. For example, .file.menu specifies the menu pane attached to the .file menubutton.
For example, the path .file.new specifies the entry named new on the menu associated with the file menubutton located on the menu bar. The path .file.menu specifies the menu pane associated with the menubutton .file. The path .last specifies the last menu on the menu bar. The path .0.last would specify the first menu (file) and the last entry on that menu (quit), yielding .file.quit.
As a restriction, the last name segment of menuPathName cannot be one of the keywords last, menu, end, nor may it be a numeric value (integer).
WIDGET-SPECIFIC METHODS
The menubar command creates a new Tcl command whose name is pathName.
This command may be used to invoke various operations on the widget. It has
the following general form:
pathName option ?arg arg ...?
option and the args
determine the exact behavior of the command.
In addition, many of the widget commands for menubar take as one argument a path name to a menu component. These path names are called menuPathNames. See the discussion on MENUBAR PATH NAMES above.
The following commands are possible for menubar widgets:
- pathName add type menuPathName ?option value option value?
- Adds either a menu to the menu bar or a menu entry to a menu pane.
If additional arguments are present, they specify options available to component type entry. See the man pages for menu(1) in the section on ENTRIES.
If type is one of cascade, checkbutton, command, radiobutton, or separator it adds a new entry to the bottom of the menu denoted by the prefix of menuPathName. If additonal arguments are present, they specify options available to menu entry widgets. In addition, the helpStr option is added by the menubar widget to all components of type entry.
- -helpstr value
- Specifes the string to associate with the entry. When the mouse moves over the associated entry, the variable denoted by helpVariable is set. Another widget can bind to the helpVariable and thus display status help.
If the type of the component added is menubutton or cascade, a menubutton or cascade is added to the menubar. If additional arguments are present, they specify options available to menubutton or cascade widgets. In addition, the menu option is added by the menubar widget to all menubutton and cascade widgets.
- -menu menuSpec
- This is only valid for menuPathNames of type menubutton or cascade. Specifes an option set and/or a set of entries to place on a menu and associate with the menubutton or cascade. The option keyword allows the menu widget to be configured. Each item in the menuSpec is treated as add commands (each with the possibility of having other -menu options). In this way a menu can be recursively built.
The last segment of menuPathName cannot be one of the keywords last, menu, end. Additionally, it may not be a number. However the menuPathName may be referenced in this manner (see discussion of COMPONENT PATH NAMES).
Note that the same curly brace quoting rules apply to -menu option strings as did to -menubuttons option strings. See the earlier discussion on umenubuttons in the "WIDGET-SPECIFIC OPTIONS" section.
- pathName cget option
- Returns the current value of the configuration option given by option.
- pathName configure ?options value option value?
- Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available options for pathName (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, 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 option is specified). If one or more option-value 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.
- pathName delete menuPathName ?menuPathName2?
- If menuPathName is of component type Menubutton or Menu, delete operates on menus. If menuPathName is of component type Entry, delete operates on menu entries.
This command deletes all components between menuPathName and menuPathName2 inclusive. If menuPathName2 is omitted then it defaults to menuPathName. Returns an empty string.
If menuPathName is of type menubar, then all menus and the menu bar frame will be destroyed. In this case menuPathName2 is ignored.
- pathName index menuPathName
- If menuPathName is of type menubutton or menu, it returns the position of the menu/menubutton on the menubar frame.
If menuPathName is of type command, separator, radiobutton, checkbutton, or cascade, it returns the menu widget's numerical index for the entry corresponding to menuPathName. If path is not found or the path is equal to ".", a value of -1 is returned.
- pathName insert menuPathName type name ?option value?
- Insert a new component named name before the component specified by menuPathName.
If menuPathName is of type Menubutton or Menu, the new component inserted is of type Menu and given the name name. In this case valid option value pairs are those accepted by menubuttons.
If menuPathName is of type Entry, the new component inserted is of type entry and given the name name. In this case, valid option value pairs are those accepted by menu entries.
Name cannot be one of the keywords last, menu, end. Additionally, it may not be a number. However the menuPathName may be referenced in this manner (see discussion of COMPONENT PATH NAMES).
- pathName invoke menuPathName
- Invoke the action of the menu entry denoted by menuPathName. See the sections on the individual entries in the menu(1) man pages. If the menu entry is disabled then nothing happens. If the entry has a command associated with it then the result of that command is returned as the result of the invoke widget command. Otherwise the result is an empty string.
If menuPathName is not a menu entry, an error is issued.
- pathName menucget menuPathName option
- Returns the current value of the configuration option given by option. The component type of menuPathName determines the valid available options.
- pathName menuconfigure menuPathName ?option value?
- Query or modify the configuration options of the componet of the menubar specified by menuPathName. If no option is specified, returns a list describing all of the available options for menuPathName (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, 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 option is specified). If one or more option-value 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. The component type of menuPathName determines the valid available options.
- pathName path ?mode? pattern
- Returns a fully formed menuPathName that matches pattern. If no match is found it returns -1. The mode argument indicates how the search is to be matched against pattern and it must have one of the following values:
- -glob
- Pattern is a glob-style pattern which is matched against each component path using the same rules as the string match command.
- -regexp
- Pattern is treated as a regular expression and matched against each component of the menuPathName using the same rules as the regexp command.
The default mode is -glob.
- pathName type menuPathName
- Returns the type of the component specified by menuPathName. For menu entries, this is the type argument passed to the add/insert widget command when the entry was created, such as command or separator. Othewise it is either a menubutton or a menu.
- pathName yposition menuPathName
- Returns a decimal string giving the y-coordinate within the menu window of the topmost pixel in the entry specified by menuPathName. If the menuPathName is not an entry, an error is issued.
EXAMPLE ONE: USING GRAMMAR
The following example creates a menubar with "File", "Edit", "Options" menubuttons. Each of these menubuttons has an associated menu.
In turn the File menu has menu entries, as well as the Edit
menu and the Options menu. The Options menu is a tearoff menu
with selectColor (for radiobuttons) set to blue.
In addition, the Options menu has a cascade titled More,
with several menu entries attached to it as well. An entry widget is
provided to display help status.
menubar .mb -helpvariable helpVar -menubuttons {
menubutton file -text File -menu {
options -tearoff false
command new -label New \\
-helpstr "Open new document" \\
-command {puts NEW}
command close -label Close \\
-helpstr "Close current document" \\
-command {puts CLOSE}
separator sep1
command exit -label Exit -command {exit} \\
-helpstr "Exit application"
}
menubutton edit -text Edit -menu {
options -tearoff false
command undo -label Undo -underline 0 \\
-helpstr "Undo last command" \\
-command {puts UNDO}
separator sep2
command cut -label Cut -underline 1 \\
-helpstr "Cut selection to clipboard" \\
-command {puts CUT}
command copy -label Copy -underline 1 \\
-helpstr "Copy selection to clipboard" \\
-command {puts COPY}
command paste -label Paste -underline 0 \\
-helpstr "Paste clipboard contents" \\
-command {puts PASTE}
}
menubutton options -text Options -menu {
options -tearoff false -selectcolor blue
radiobutton byName -variable viewMode \\
-value NAME -label "by Name" \\
-helpstr "View files by name order" \\
-command {puts NAME}
radiobutton byDate -variable viewMode \\
-value DATE -label "by Date" \\
-helpstr "View files by date order" \\
-command {puts DATE}
cascade prefs -label Preferences -menu {
command colors -label Colors... \\
-helpstr "Change text colors" \\
-command {puts COLORS}
command fonts -label Fonts... \\
-helpstr "Change text font" \\
-command {puts FONT}
}
}
}
frame
-height
-textvariable
-anchor
-expand
-fill
pack
-fill
EXAMPLE
Alternatively
could
using
configure
menubar
-menubuttons
-text
command
command
separator
-label
edit
.edit.undo
0
.edit.sep2
.edit.cut
1
.edit.copy
1
.edit.paste
0
.options
{
viewMode
-label
byDate
-value
Date"
cascade
-menu
-label
-label
.mb
nw
yes
option
the
evaluated
the
positive
is
string
commands,
However,
into
single
can
enclosing
curly
ensures,
value
will
as
and
The
this
Menu"
menubar
menubutton
menubutton
-menu
\\
-variable
-onvalue
0
-text
|
.fr
300
helpVar
nw
yes
both
.ef
x
TWO:
the
be
the
methods:
.mb
{
File
new
close
sep1
Quit
-text
.mb
-label
.mb
.mb
-label
.mb
-label
.mb
-label
.mb
-text
radiobutton
\\
"by
-variable
DATE
}
.options.prefs
{
Colors...
Fonts...
-side
-fill
CAVEATS
as
-menu
by
subst
side
that
may
and/or
substitutions
more
word.
be
candidate
braces
for
for
still
a
not
following
case:
set
set
.mb
file
edit
{
-label
{[scope
1
}
Options
|
-width
entry
pack
-fill
pack
-expand
-anchor
-expand
USING
same
created
add
.mb
menubutton
-menu
-label
-label
command
}
Edit
add
Undo
add
add
Cut
add
Copy
add
Paste
add
Options
byName
-value
Name"
viewMode
-label
.mb
-label
command
command
}
left
x
The
well
option
menubar
command.
of
the
contain
backslash
might
than
These
protected
substitutions
({}).
example,
an
be
single
multiple
example
fileMenuName
var
-menubuttons
-text
-text
checkbutton
Check
var]}
\\
menubutton
}
300
.ef
.mb
x
.fr
yes
sw
yes
METHODS
menu
by
and
configure
file
{
New
Close
quit
menubutton
}
command
-underline
separator
command
-underline
command
-underline
command
-underline
menubutton
-menu
-variable
NAME
radiobutton
\\
"by
add
Preferences
colors
fonts
pack
-anchor
-expand
-menubuttons
as
is
with
The
this
option
variables,
substitutions.
expand
a
expansions
by
in
This
a
option
treated
value
values.
illustrates
"File
{}
{
{$fileMenuName}
Edit
check
\\
\\
-offvalue
options
The variable fileMenuName will expand to "File Menu" when the subst command is used on the menubutton specification. In addition, the [scope...] command will expand to @scope :: var. By enclosing these inside {} they stay as a single value. Note that only {} work for this. [list...], "" etc. will not protect these from the subst command.
ACKNOWLEDGMENTS
Bret Schumaker
1994 - Early work on a menubar widget.
Mark Ulferts, Mark Harrison, John Sigler
Invaluable feedback on grammar and usability of the menubar widget
AUTHOR
Bill W. Scott
KEYWORDS
frame, menu, menubutton, entries, help
iwidgets-4.1.0/demos/html/messagebox.n.html 0000644 0036047 0045461 00000025006 07347201363 017270 0 ustar dgp 771div messagebox - Create and manipulate a messagebox text widget
messagebox - Create and manipulate a messagebox text widget
SYNOPSIS
messagebox pathName ?options?
INHERITANCE
itk::Widget <- Labeledwidget <- Scrolledwidget <- Messagebox
STANDARD OPTIONS
activeBackground
cursor
highlightColor
relief
|
activeForeground
exportSelection
highlightThickness
setGrid
|
background
font
padX
|
borderWidth
foreground
padY
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
labelBitmap
labelPos
|
labelFont
labelText
|
labelImage
labelVariable
|
labelMargin
|
See the "labeledwidget" class manual entry for details on the above
associated options.
activeRelief
|
elementBorderWidth
|
jump
|
troughColor
|
See the "scrollbar" widget manual entry for details on the above
associated options.
height
textBackground
|
hscrollMode
visibleItems
|
sbWidth
vscrollMode
|
scrollMargin
width
|
See the "scrolledtext" widget manual entry for details on the above
associated options.
spacing1
|
spacing2
|
spacing3
|
|
See the "text" widget manual entry for details on the above
associated options.
WIDGET-SPECIFIC OPTIONS
Name: fileName
Class: FileName
Command-Line Switch: -filename
Specifies the filename to be displayed in the file selection dialog when
it pops up during a save of the messagebox contents operation.
Name: maxLines
Class: MaxLines
Command-Line Switch: -maxlines
Specifies the maximum number of lines allowed in the text area of the
messagebox. When this limit is reached, the oldest line will be deleted
such that the total number of lines remains maxlines.
Name: saveDir
Class: SaveDir
Command-Line Switch: -savedir
Specifies the default directory to display when the file selection dialog
pops up during a save of the messagebox contents operation. If this
parameter is not specified, then the files in the current working directory
are displayed.
DESCRIPTION
The messagebox command creates
a scrolled information messages area widget.
Message types can be user defined and configured. Their options
include foreground, background, font, bell, and their display
mode of on or off. This allows message types to defined as needed,
removed when no longer so, and modified when necessary. An export
method is provided for file I/O.
The number of lines displayed may be limited with
the default being 1000. When this limit is reached, the oldest line
is removed. A popup menu which appears when the right mouse button
has been pressed in the message area has been predefined. The contents
of the popup menu by default support clearing the area and saving its
contents to a file. Additional operations may be defined or existing
operations removed by using the component command to access the
popup menu.
MESSAGE TYPES
The display characteristics of messages issued to the messagebox vary
with the message type. Types are defined by the user and they may
be added, removed, and configured. The options of the message type
control the display include the following:
- -background color
- Color specifies the background color to use for characters
associated with the message type.
It may have any of the forms accepted by Tk_GetColor.
- -bell boolean
- Specifies whether or not to ring the bell whenenver a message of this
type is issued. Boolean may have any of the forms accepted by
Tk_GetBoolean. The default is 0.
- -font\ fontName
- FontName is the name of a font to use for drawing
characters. It may have any of the forms accepted
by Tk_GetFontStruct.
- -foreground color
- Color specifies the foreground color to use for characters
associated with the message type.
It may have any of the forms accepted by Tk_GetColor.
- -show boolean
- Specifies whether of not to display this message type when issued.
Boolean may have any of the forms accepted by
Tk_GetBoolean. The default is 1.
METHODS
The messagebox command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for messagebox widgets:
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the messagebox
command.
- pathName clear
- Clear the messagebox of all messages.
- pathName export filename
- Write text to a file. If filename exists then
contents are replaced with text widget contents.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the messagebox
command.
- pathName type option msgtype ?arg arg ...?
- This command is used to manipulate message types. The behavior of
the command depends on the option argument that follows the type keyword.
The following forms of the command are supported:
- pathName type add msgtype ?option value ...?
- Adds a new message type given by msgtype with the display
properties defined by the option value pairs.
See MESSAGE TYPES for information on the options that
are supported.
- pathName type cget msgtype option
- Returns the value of a configuration option for a message type.
Msgtype identifies the message type, and option
specifies a particular configuration option, which must be one of
the ones listed in the section MESSAGE TYPES.
- pathName type configure msgtype ?option value ...?
- Query or modify the configuration options for a message type.
If no option is specified, returns a list describing all of
the available options for the message type msgtype.
If option is specified with no value, then the command
returns a list describing the one named option.
If one or more option-value pairs are specified, then the command
modifies the given option(s) to have the given value(s); in
this case the command returns an empty string.
See MESSAGE TYPES for information on the options that
are supported.
pathName type remove msgtype
Removes an existing message type given by msgtype.
- pathName issue string ?level? ?tags?
- Print a string to the text area at the given level and with
any additional tags specified.
COMPONENTS
Name: itemMenu
Class: Menu
This is the popup menu that gets displayed when you right-click in the
text area of the messagebox. Its contents may be modified via the component
command.
Name: text
Class: Scrolledtext
The text component is the scrolledtext widget. See the "scrolledtext" widget
manual entry for details on the text component item.
|
EXAMPLE
messagebox .mb -hscrollmode dynamic -labeltext "Messages" -labelpos n \\
-height 120 -width 550 -savedir "/tmp" -textbackground #d9d9d9
pack .mb -padx 5 -pady 5 -fill both -expand yes
.mb type add ERROR -background red -foreground white -bell 1
.mb type add WARNING -background yellow -foreground black
.mb type add INFO -background white -foreground black
.mb issue "This is an error message in red with a beep" ERROR
.mb issue "This warning message in yellow" WARNING
.mb issue "This is an informational message" INFO
AUTHORS
Alfredo Jahn V
Mark L. Ulferts
KEYWORDS
messagebox, scrolledtext, text, widget
iwidgets-4.1.0/demos/html/messagedialog.n.html 0000644 0036047 0045461 00000015305 07347201372 017740 0 ustar dgp 771div messagedialog - Create and manipulate a message dialog widget
messagedialog - Create and manipulate a message dialog widget
SYNOPSIS
messagedialog pathName ?options?
INHERITANCE
itk::Toplevel <- Shell <- Dialogshell <- Dialog <- Messagedialog
STANDARD OPTIONS
background
foreground
|
bitmap
image
|
cursor
text
|
font
|
See the "options" manual entry for details on the standard options.
INHERITED OPTIONS
buttonBoxPadX
padY
|
buttonBoxPadY
separator
|
buttonBoxPos
thickness
|
padX
|
See the "dialogshell" widget manual entry for details on the above
inherited options.
See the "shell" widget manual entry for details on the above
inherited options.
See the "Toplevel" widget manual entry for details on the above
inherited options.
WIDGET-SPECIFIC OPTIONS
Name: imagePos
Class: Position
Command-Line Switch: -imagepos
Specifies the image position relative to the message text: n, s,
e, or w. The default is w.
Name: textPadX
Class: Pad
Command-Line Switch: -textpadx
Specifies a non-negative value indicating how much extra space to request for
the message text in the X direction. The value may have any of the forms
acceptable to Tk_GetPixels.
Name: textPadY
Class: Pad
Command-Line Switch: -textpady
Specifies a non-negative value indicating how much extra space to request for
the message text in the X direction. The value may have any of the forms
acceptable to Tk_GetPixels.
DESCRIPTION
The messagedialog command creates a message dialog composite widget.
The messagedialog is derived from the Dialog class and is composed of
an image and associated message text with commands to manipulate the
dialog buttons.
METHODS
The messagedialog command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for messagedialog widgets:
INHERITED METHODS
add
insert
|
buttonconfigure
invoke
|
default
show
|
hide
|
See the "buttonbox" widget manual entry for details on the above
inherited methods.
See the "dialogshell" widget manual entry for details on the above
inherited methods.
activate
|
center
|
deactivate
|
|
See the "dialogshell" widget manual entry for details on the above
inherited methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the messagedialog
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the messagedialog
command.
COMPONENTS
Name: image
Class: Label
The image component is the bitmap or image of the message dialog. See
the "label" widget manual entry for details on the image component item.
Name: message
Class: Label
The message component provides the textual portion of the message dialog.
See the "label" widget manual entry for details on the message component item.
|
EXAMPLE
#
# Standard question message dialog used for confirmation.
#
messagedialog .md -title "Message Dialog" -text "Are you sure ?" \\
-bitmap questhead -modality global
.md buttonconfigure OK -text Yes
.md buttonconfigure Cancel -text No
if {[.md activate]} {
.md configure -text "Are you really sure ?"
if {[.md activate]} {
puts stdout "Yes"
} else {
puts stdout "No"
}
} else {
puts stdout "No"
}
destroy .md
#
# Copyright notice with automatic deactivation.
#
messagedialog .cr -title "Copyright" -bitmap @dsc.xbm -imagepos n \\
-text "Copyright 1995 DSC Communications Corporation\\n \\
All rights reserved"
.cr hide Cancel
.cr activate
after 10000 ".cr deactivate"
AUTHOR
Mark L. Ulferts
KEYWORDS
messagedialog, dialog, dialogshell, shell, widget
iwidgets-4.1.0/demos/html/notebook.n.html 0000644 0036047 0045461 00000036016 06570255554 016766 0 ustar dgp 771div notebook - create and manipulate notebook widgets
notebook - create and manipulate notebook widgets
SYNOPSIS
notebook pathName ?options?
INHERITANCE
itk::Widget <- notebook
STANDARD OPTIONS
background
cursor
|
foreground
height
|
scrollCommand
|
width
|
See the "options" manual entry for details on the standard options.
WIDGET-SPECIFIC OPTIONS
Name: auto
Class: Auto
Command-Line Switch: -auto
Specifies whether to use the automatic packing/unpacking algorithm of the
notebook. A value of true indicates that page frames will be unpacked
and packed acoording to the algorithm described in the select command.
A value of false leaves the current page packed and subsequent selects,
next, or previous commands do not switch pages automatically. In either
case the page's associated command (see the add command's description
of the command option) is invoked. The value may have any of the
forms accepted by the Tcl_GetBoolean, such as true, false, 0, 1, yes,
or no.
For example, if a series of pages in a notebook simply change certain display
configurations of a graphical display, the -auto flag could be used.
By setting it, the -command procs could do the appropriate reconfiguring
of the page when the page is switched.
DESCRIPTION
The notebook command creates a new window (given by the pathName
argument) and makes it into a notebook widget. Additional options, described
above may be specified on the command line or in the option database to
configure aspects of the notebook such as its colors, font, and text.
The notebook 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 notebook is a widget that contains a set of pages. It displays one page from
the set as the selected page. When a page is selected, the page's contents are
displayed in the page area. When first created a notebook has no pages. Pages
may be added or deleted using widget commands described below.
NOTEBOOK PAGES
A notebook's pages area contains a single child site frame. When a new
page is created it is a child of this frame. The page's child site frame
serves as a geometry container for applications to pack widgets into. It is
this frame that is automatically unpacked or packed when the auto
option is true. This creates the effect of one page being visible at
a time. When a new page is selected, the previously selected page's child
site frame is automatically unpacked from the notebook's child site frame
and the newly selected page's child site is packed into the notebook's
child site frame.
However, sometimes it is desirable to handle page changes in a different
manner. By specifying the auto option as false, child site
packing can be disabled and done differently. For example, all widgets might
be packed into the first page's child site frame. Then when a new page is
selected, the application can reconfigure the widgets and give the appearance
that the page was flipped.
In both cases the command option for a page specifies a Tcl Command to
execute when the page is selected. In the case of auto being true,
it is called between the unpacking of the previously selected page and the
packing of the newly selected page.
WIDGET-SPECIFIC METHODS
The notebookfR command creates a new Tcl command whose name
is pathName. This command may be used to invoke various operations
on the widget. It has the following general form:
pathName option ?arg arg ...?
option and the args
determine the exact behavior of the command.
Many of the widget commands for a notebook take as one argument an indicator
of which page of the notebook to operate on. These indicators are called
indexes and may be specified in any of the following forms:
- number
- Specifies the index of the the component. For menus, 0 corresponds to the
left-most menu of the menu bar. For entries, 0 corresponds to the top-most
entry of the menu.
number
Specifies the page numerically, where 0 corresponds to the first page in
the notebook, 1 to the second, and so on.
- select
- Specifies the currently selected page's index. If no page is currently
selected, the value -1 is returned.
- end
- Specifes the last page in the notebooks's index. If the notebook is empty
this will return -1.
- pattern
- If the index doesn't satisfy the form of a number, then this form is used.
Pattern is pattern-matched against the label of each page in the
notebook, in order from the first to the last page, until a matching entry
is found. The rules of Tcl_StringMatch are used.
'.............................................................................
The following commands are possible for notebook widgets:
- pathName add ?option value?
- Add a new page at the end of the notebook. A new child site frame is
created. Returns the child site pathName. If additional arguments are
present, they specify any of the following options:
- -background value
- Specifies a background color to use for displaying the child site frame
of this page. If this option is specified as an empty string (the default),
then the background option for the overall notebook is used.
- -command value
- Specifies a Tcl command to be executed when this page is selected. This
allows the programmer a hook to reconfigure this page's widgets or any other
page's widgets.
If the notebook has the auto option set to true, when a page is selected
this command will be called immediately after the previously selected page
is unpacked and immediately before this page is selected. The index value
select is valid during this Tcl command. `index select' will return this
page's page number.
If the auto option is set to false, when a page is selected the unpack and
pack calls are bypassed. This Tcl command is still called.
- -foreground value
- Specifies a foreground color to use for displaying tab labels when tabs are
in their normal unselected state. If this option is specified as an empty
string (the default), then the foreground option for the overall notebook
is used.
- -label value
- Specifies a string to associate with this page. This label serves as an
additional identifier used to reference the page. This label may be used
for the index value in widget commands.
- pathName childSite ?index?
- If passed no arguments, returns a list of pathNames for all the pages in
the notebook. If the notebook is empty, an empty list is returned
If index is passed, it returns the pathName for the page's child site
frame specified by index. Widgets that are created with this pathName will
be displayed when the associated page is selected. If index is not a valid
index, an empty string is returned.
- pathName cget option
- Returns the current value of the configuration option given by option.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget. If no option
is specified, returns a list describing all of the available options
for pathName (see Tk_ConfigureInfo for information on the
format of this list). If option is specified with no value,
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 option is specified). If one or more option-value 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. Option
may have any of the values accepted by the notebook command.
- pathName delete index1 ?index2?
- Delete all of the pages between index1 and index2 inclusive.
If index2 is omitted then it defaults to index1. Returns an
empty string.
- pathName index index
- Returns the numerical index corresponding to index.
- pathName insert index ?option value?
- Insert a new page in the notebook before the page specified by index.
A new child site frame is created. See the add command for
valid options. Returns the child site pathName.
- pathName next
- Advances the selected page to the next page (order is determined by insertion
order). If the currently selected page is the last page in the notebook,
the selection wraps around to the first page in the notebook.
For notebooks with auto set to true the current page's child site is
unpacked from the notebook's child site frame. Then the next page's child
site is packed into the notebooks child site frame. The Tcl command given
with the command option will be invoked between these two operations.
For notebooks with auto set to false the Tcl command given with the
command option will be invoked.
- pathName pagecget index ?option?
- Returns the current value of the configuration option given by option
for the page specified by index. The valid available options are the
same as available to the add command.
- pathName pageconfigure index ?option? ?value option value ...?
- This command is similar to the configure command, except that it applies to
the options for an individual page, whereas configure applies to the options
for the notebook. Options may have any of the values accepted by the add
widget command. If options are specified, options are modified as indicated
in the command and the command returns an empty string. If no options are
specified, returns a list describing the current options for
page index (see Tk_ConfigureInfo for information on the
format of this list).
- pathName prev
- Moves the selected page to the previous page (order is determined by
insertion order). If the currently selected page is the first page in the
notebook, the selection wraps around to the last page in the notebook.
For notebooks with auto set to true the current page's child
site is unpacked from the notebook's child site frame. Then the previous
page's child site is packed into the notebooks child site frame. The Tcl
command given with the command option will be invoked between these two
operations.
For notebooks with auto set to false the Tcl command given with
the command option will be invoked.
- pathName select index
- Selects the page specified by index as the currently selected page.
For notebooks with auto set to true the current page's child
site is unpacked from the notebook's child site frame. Then the index page's
child site is packed into the notebooks child site frame. The Tcl command
given with the command option will be invoked between these two operations.
For notebooks with auto set to false the Tcl command given with
the command option will be invoked.
- pathName view
- Returns the currently selected page. This command is for compatibility
with the scrollbar widget.
- pathName view index
- Selects the page specified by index as the currently selected page.
This command is for compatibility with the scrollbar widget.
- pathName view moveto fraction
- Uses the fraction value to determine the corresponding page to move to.
This command is for compatibility with the scrollbar widget.
- pathName view scroll num what
- Uses the num value to determine how many pages to move forward or
backward (num can be negative or positive). The what argument is
ignored. This command is for compatibility with the scrollbar widget.
EXAMPLE
Following is an example that creates a notebook with two pages. In this example, we use a scrollbar widget to control the notebook widget.
the
pack
-width
pack
\\
-expand
left
\\
#
to
#
"Page
add
.nb
Two"
Get
frames
pages.
childsite
[.nb
buttons
of
$page1CS.b
pack
-text
$page2CS.b
Select
of
select
#
and
#
together,
scrollbar
".nb
-scrollcommand
.scroll
yes
|
notebook
it.
100
.nb
-fill
yes
\\
-pady
Add
the
"Page
Two",
-label
add
the
of
set
0]
childsite
on
the
-text
$page1CS.b
"Button
the
the
0
Create
associate
and
then
ScrollBar
view"
".scroll
-fill
-pady
|
#
widget
notebook
-height
-anchor
both
\\
-padx
10
two
notebook,
One"
respectively.
"Page
-label
child
these
page1CS
set
"Page
#
each
notebook
"Button
button
Two"
the
teh
the
pack
.scroll
.nb
set"
y
10
|
Create
and
.nb
100
nw
\\
-side
10
pages
labelled
and
.nb
One"
"Page
#
site
two
[.nb
page2CS
Two"]
Create
page
button
One"
$page2CS.b
pack
#
page
.nb
scrollbar
scrollbar
notebook
the
-command
configure
pack
-expand
|
AUTHOR
Bill W. Scott
KEYWORDS
notebook page
iwidgets-4.1.0/demos/html/optionmenu.n.html 0000644 0036047 0045461 00000022402 07366300520 017321 0 ustar dgp 771div optionmenu - Create and manipulate a option menu widget
optionmenu - Create and manipulate a option menu widget
SYNOPSIS
optionmenu pathName ?options?
INHERITANCE
itk::Widget <- Labeledwidget <- optionmenu
STANDARD OPTIONS
activeBackground
borderWidth
foreground
|
activeBorderWidth
cursor
highlightColor
|
activeForeground
disabledForeground
highlightThickness
|
background
font
relief
|
See the "options" manual entry for details on the standard options.
INHERITED OPTIONS
disabledForeground
labelMargin
state
|
labelBitmap
labelPos
|
labelFont
labelText
|
labelImage
labelVariable
|
See the "LabeledWidget" manual entry for details on the inherited options.
WIDGET-SPECIFIC OPTIONS
Name: clickTime
Class: ClickTime
Command-Line Switch: -clicktime
Interval time, in msec, used to determine that a single mouse
click has occurred. Used to post menu on a "quick" mouse click.
Note: changing this value may cause the sigle-click
functionality to not work properly. The default is 150 msec.
Name: command
Class: Command
Command-Line Switch: -command
Specifies a Tcl command procedure to be evaluated following a change in
the current option menu selection.
Name: cyclicOn
Class: CyclicOn
Command-Line Switch: -cyclicon
Turns on/off the 3rd mouse button capability. The value may be specified
in any of the forms acceptable to Tcl_GetBoolean. This feature
allows the right mouse button to cycle through the popup
menu list without poping it up. The right mouse button cycles through
the menu in reverse order. The default is true.
Name: popupCursor
Class: Cursor
Command-Line Switch: -popupcursor
Specifies the mouse cursor to be used for the popup menu. The value may
have any of the forms acceptable to Tk_GetCursor.
Name: state
Class: State
Command-Line Switch: -state
Specified one of two states for the optionmenu: normal, or
disabled. If the optionmenu is disabled, then option menu
selection is ignored.
Name: width
Class: Width
Command-Line Switch: -width
Specifies a fixed size for the menu button label in any of the forms
acceptable to \Tk_GetPixels. If the text
is too small to fit in the label, the text is clipped.
Note: Normally, when a new list is created, or new items are
added to an existing list, the menu button label is resized
automatically. Setting this option overrides that functionality.
DESCRIPTION
The optionmenu command creates an option menu widget with options
to manage it. An option menu displays a frame containing a label and a button.
A pop-up menu will allow for the value of the button to change.
METHODS
The optionmenu command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command.
Many of the widget commands for an optionmenu take as one argument an
indicator of which entry of the option menu to operate on. These
indicators are called indexes and may be specified in
any of the following forms:
- number
- Specifies the entry numerically, where 0 corresponds
to the top-most entry of the option menu, 1 to the entry below it, and
so on.
- end
- Indicates the bottommost entry in the menu. If there are no
entries in the menu then -1 is returned.
- select
- Returns the numerical index of the currently selected option menu entry.
If no entries exist in the menu, then -1 is returned.
- pattern
- If the index doesn't satisfy one of the above forms then this
form is used. Pattern is pattern-matched against the label of
each entry in the option menu, in order from the top down, until a
matching entry is found. The rules of Tcl_StringMatch
are used.
The following widget commands are possible for optionmenu widgets:
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the optionmenu
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the optionmenu
command.
- pathName delete first ?last?
- Delete all of the option menu entries between first and
last inclusive. If last is omitted then it defaults
to first.
- pathName disable index
- Disable the option menu entry specified by index.
Disabling a menu item will prevent the user from being able to select
this item from the menu. This only effects the state of the item
in the menu, in other words, should the item be the currently
selected item, the programmer is responsible for determining this condition
and taking appropriate action.
- pathName enable index
- Enable the option menu entry specified by index.
Enabling a menu item allows the user to select this item from the menu.
- pathName get ?first? ?last?
- If no arguments are specified, this operation returns the currently
selected option menu item. Otherwise, it returns the name of the
option at index first, or a range of options between first
and last.
- pathName index index
- Returns the numerical index corresponding to index.
- pathName insert index string ?string?
- Insert an item, or list of items, into the menu at location index.
- pathName select index
- Select an item from the option menu to be displayed as the currently
selected item.
- pathName sort mode
- Sort the current menu in either ascending, or descending order.
The values increasing, or decreasing are also accepted.
COMPONENTS
Name: menuBtn
Class: Menubutton
The menuBtn component is the option menu button which displays the current
choice from the popup menu. See the "menubutton" widget manual entry
for details on the menuBtn component item.
Name: popupMenu
Class: Menu
The popupMenu component is menu displayed upon selection of the menu button.
The menu contains the choices for the option menu. See the "menu" widget
manual entry for details on the popupMenu component item.
EXAMPLE
optionmenu .om -labelmargin 5 \\
-labelon true -labelpos w -labeltext "Operating System :"
.om insert end Unix VMS Linux OS/2 {Windows NT} DOS
.om sort ascending
.om select Linux
pack .om -padx 10 -pady 10
ACKNOWLEDGEMENTS:
Michael J. McLennan
Borrowed some ideas (next & previous) from OptionButton class.
Steven B. Jaggers
Provided an initial prototype in [incr Tcl].
Bret Schuhmacher
Helped with popup menu functionality.
AUTHOR
Alfredo Jahn
KEYWORDS
optionmenu, widget
iwidgets-4.1.0/demos/html/panedwindow.n.html 0000644 0036047 0045461 00000025654 07347201410 017454 0 ustar dgp 771div panedwindow - Create and manipulate a paned window widget
panedwindow - Create and manipulate a paned window widget
SYNOPSIS
panedwindow pathName ?options?
INHERITANCE
itk::Widget <- panedwindow
STANDARD OPTIONS
See the "options" manual entry for details on the standard options.
WIDGET-SPECIFIC OPTIONS
Name: height
Class: Height
Command-Line Switch: -height
Specifies the overall height of the paned window in any of the forms
acceptable to Tk_GetPixels. The default is 10 pixels.
Name: orient
Class: Orient
Command-Line Switch: -orient
Specifies the orientation of the separators: vertical or
horizontal. The default is horizontal.
Name: sashBorderWidth
Class: BorderWidth
Command-Line Switch: -sashborderwidth
Specifies a value indicating the width of the 3-D border to draw
around the outside of the sash in any of the forms acceptable to
Tk_GetPixels. The default is 2 pixels.
Name: sashCursor
Class: Cursor
Command-Line Switch: -sashcursor
Specifies the type of cursor to be displayed in the sash. The default
is crosshair.
Name: sashHeight
Class: Height
Command-Line Switch: -sashheight
Specifies the height of the sash in any of the forms acceptable to
Tk_GetPixels. The default is 10 pixels.
Name: sashIndent
Class: SashIndent
Command-Line Switch sashindent
Specifies the placement of the sash along the panes in any of the forms
acceptable to Tk_GetPixels. A positive
value causes the sash to be offset from the near (left/top) side
of the pane, and a negative value causes the sash to be offset from
the far (right/bottom) side. If the offset is greater than the
width, then the sash is placed flush against the side. The
default is -10 pixels.
Name: sashWidth
Class: Width
Command-Line Switch: -sashwidth
Specifies the width of the sash in any of the forms acceptable to
Tk_GetPixels. The default is 10 pixels.
Name: showHandle
Class: ShowHandle
Command-Line Switch: -showhandle
Specifies whether or not to display the sashes on the window panes.
The default is 1, and valid options are 0 and 1.
Name: thickness
Class: Thickness
Command-Line Switch: -thickness
Specifies the thickness of the separators in any of the forms acceptable to
Tk_GetPixels. The default is 3 pixels.
Name: width
Class: Width
Command-Line Switch: -width
Specifies the overall width of the paned window in any of the forms
acceptable to Tk_GetPixels. The default is 10 pixels.
DESCRIPTION
The panedwindow command creates a multiple paned window widget
capable of orienting the panes
either vertically or horizontally. Each pane is itself a frame acting
as a child site for other widgets. The border separating each pane
contains a sash which allows user positioning of the panes relative to
one another.
METHODS
The panedwindow command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command.
Many of the widget commands for the panedwindow take as one argument an
indicator of which pane of the paned window to operate on. These indicators
are called indexes and allow reference and manipulation of panes
regardless of their current map state. Paned window indexes may be
specified in any of the following forms:
- number
- Specifies the pane numerically, where 0 corresponds to the nearest
(top/left-most) pane of the paned window.
- end
- Indicates the farthest (bottom/right-most) pane of the paned window.
- pattern
- If the index doesn't satisfy one of the above forms then this
form is used. Pattern is pattern-matched against the tag of
each pane in the panedwindow, in order from left/top to right/left,
until a matching entry is found. The rules of Tcl_StringMatch
are used.
WIDGET-SPECIFIC METHODS
- pathName add tag ?option value option value?
- Adds a new pane to the paned window on the far side (right/bottom). The
following options may be specified:
- -margin value
- Specifies the border distance between the pane and pane contents is any of
the forms acceptable to Tk_GetPixels. The default is 8 pixels.
- -minimum value
- Specifies the minimum size that a pane's contents may reach not
inclusive of twice the margin in any of the forms acceptable to
Tk_GetPixels. The default is 10 pixels.
The add method returns the path name of the pane.
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the panedwindow
command.
- pathName childsite ?index?
- Returns a list of the child site path names or a specific child site given
an index. The list is constructed from the near side (left/top) to the far
side (right/bottom).
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the panedwindow
command.
- pathName delete index
- Deletes a specified pane given an index.
- pathName fraction percentage percentage ?percentage percentage ...?
- Sets the visible percentage of the panes. Specifies a set of
percentages which are applied to the visible panes from the near side
(left/top). The number of percentages must be equal to the current number
of visible (mapped) panes and add up to 100.
- pathName hide index
- Changes the visiblity of the specified pane, allowing a previously displayed
pane to be visually removed rather than deleted.
- pathName index index
- Returns the numerical index corresponding to index.
- pathName insert index tag ?option value option value ...?
- Same as the add command except that it inserts the new
pane just before the one given by index, instead of appending
to the end of the panedwindow. The option, and value
arguments have the same interpretation as for the add widget
command.
- pathName paneconfigure index ?options?
- This command is similar to the configure command, except that
it applies to the options for an individual pane, whereas configure
applies to the options for the paned window as a whole.
Options may have any of the values accepted by the add
widget command. If options are specified, options are modified
as indicated in the command and the command returns an empty string.
If no options are specified, returns a list describing
the current options for entry index (see Tk_ConfigureInfo for
information on the format of this list).
- pathName reset
- Redisplays the pane window using default percentages.
- pathName show index
- Changes the visiblity of the specified pane, allowing a previously hidden
pane to be displayed.
NOTES
Dynamic changing of the margin and or minimum options to values which
make the current configuration invalid will block subsequent sash
movement until the fractions are modified via the fraction method.
For example a panedwindow is created with three panes and the minimum
and margin options are at their default settings. Next the user moves
the sashes to compact the panes to one side. Now, if the minimum is
increased on the most compressed pane via the paneconfigure method to
a large enough value, then sash movement is blocked
until the fractions are adjusted. This situation is unusual and under
normal operation of the panedwindow, this problem will never occur.
EXAMPLE
panedwindow .pw -width 300 -height 300
.pw add top
.pw add middle -margin 10
.pw add bottom -margin 10 -minimum 10
pack .pw -fill both -expand yes
foreach pane [.pw childSite] {
button $pane.b -text $pane -relief raised -borderwidth 2
pack $pane.b -fill both -expand yes
}
.pw fraction 50 30 20
.pw paneconfigure 0 -minimum 20
.pw paneconfigure bottom -margin 15
ACKNOWLEDGEMENTS:
Jay Schmidgall
1994 - Base logic posted to comp.lang.tcl
Joe Hidebrand <hildjj@fuentez.com>
07/25/94 - Posted first multipane version to comp.lang.tcl
07/28/94 - Added support for vertical panes
Ken Copeland <ken@hilco.com>
09/28/95 - Smoothed out the sash movement and added squeezable panes.
AUTHOR
Mark L. Ulferts
KEYWORDS
panedwindow, widget
iwidgets-4.1.0/demos/html/promptdialog.n.html 0000644 0036047 0045461 00000015734 07347201422 017637 0 ustar dgp 771div promptdialog - Create and manipulate a prompt dialog widget
promptdialog - Create and manipulate a prompt dialog widget
SYNOPSIS
promptdialog pathName ?options?
INHERITANCE
itk::Toplevel <- dialogshell <- dialog <- promptdialog
STANDARD OPTIONS
background
foreground
insertBorderWidth
relief
|
borderWidth
highlightColor
insertOffTime
selectBackground
|
cursor
highlightThickness
insertOnTime
selectBorderWidth
|
exportSelection
insertBackground
insertWidth
selectForeground
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
See the "entry" widget manual entry for details on the above
associated options.
invalid
|
textBackground
|
textFont
|
validate
|
See the "entryfield" widget manual entry for details on the above
associated options.
labelFont
|
labelPos
|
labelText
|
|
See the "labeledwidget" widget manual entry for details on the above
associated options.
INHERITED OPTIONS
buttonBoxPadX
padY
|
buttonBoxPadY
separator
|
buttonBoxPos
thickness
|
padX
|
See the "dialogshell" widget manual entry for details on the above
inherited options.
height
|
master
|
modality
|
width
|
See the "shell" widget manual entry for details on the above
inherited options.
See the "Toplevel" widget manual entry for details on the above
inherited options.
DESCRIPTION
The promptdialog command creates a prompt dialog similar to the
OSF/Motif standard prompt dialog composite widget. The promptdialog
is derived from the dialog class and is composed of a EntryField
with commands to manipulate the dialog buttons.
METHODS
The promptdialog command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for promptdialog widgets:
ASSOCIATED METHODS
delete
insert
|
get
scan
|
icursor
selection
|
index
xview
|
See the "entry" widget manual entry for details on the above
associated methods.
See the "entryfield" widget manual entry for details on the above
associated methods.
INHERITED METHODS
add
invoke
|
buttonconfigure
show
|
default
|
hide
|
See the "buttonbox" widget manual entry for details on the above
inherited methods.
See the "dialogshell" widget manual entry for details on the above
inherited methods.
activate
|
center
|
deactivate
|
|
See the "shell" widget manual entry for details on the above
inherited methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the promptdialog
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the promptdialog
command.
COMPONENTS
Name: prompt
Class: Entryfield
The prompt component is the entry field for user input in the prompt
dialog. See the "entryfield" widget manual entry for details on
the prompt component item.
EXAMPLE
option add *textBackground white
promptdialog .pd -modality global -title Password -labeltext Password: -show *
.pd hide Apply
if {[.pd activate]} {
puts "Password entered: [.pd get]"
} else {
puts "Password prompt cancelled"
}
AUTHOR
Mark L. Ulferts
KEYWORDS
promptdialog, dialog, dialogshell, shell, widget
iwidgets-4.1.0/demos/html/pushbutton.n.html 0000644 0036047 0045461 00000012144 07347201431 017341 0 ustar dgp 771div pushbutton - Create and manipulate a push button widget
pushbutton - Create and manipulate a push button widget
SYNOPSIS
pushbutton pathName ?options?
INHERITANCE
itk::Widget <- pushbutton
STANDARD OPTIONS
activeBackground
borderWidth
font
highlightThickness
state
|
activeForeground
command
foreground
image
text
|
background
cursor
highlightBackground
padX
underline
|
bitmap
disabledForeground
highlightColor
padY
wrapLength
|
See the "options" manual entry for details on the standard options.
WIDGET-SPECIFIC OPTIONS
Name: defaultRing
Class: DefaultRing
Command-Line Switch: -defaultring
Boolean describing whether the button displays its default ring given in
any of the forms acceptable to Tcl_GetBoolean. The default is false.
Name: defaultRingPad
Class: Pad
Command-Line Switch: -defaultringpad
Specifies the amount of space to be allocated to the indentation of the
default ring ring given in any of the forms acceptable to Tcl_GetPixels.
The option has no effect if the defaultring option is set to false. The
default is 2 pixels.
Name: height
Class: Height
Command-Line Switch: -height
Specifies the height of the button inclusive of any default ring given in
any of the forms acceptable to Tk_GetPixels. A value of zero lets
the push button determine the height based on the requested height plus
highlightring and defaultringpad.
Name: width
Class: Width
Command-Line Switch: -width
Specifies the width of the button inclusive of any default ring given in
any of the forms acceptable to Tk_GetPixels. A value of zero lets
the push button determine the width based on the requested width plus
highlightring and defaultringpad.
DESCRIPTION
The pushbutton command creates a push button with an
optional default ring used for default designation and traversal.
METHODS
The pushbutton command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for pushbutton widgets:
ASSOCIATED METHODS
See the "button" manual entry for details on the associated methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the pushbutton
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the pushbutton
command.
COMPONENTS
Name: pushbutton
Class: Button
The pushbutton component is the button surrounded by the optional default ring.
See the "button" widget manual entry for details on the pushbutton
component item.
EXAMPLE
pushbutton .pb -text "Hello" -command {puts "Hello World"} -defaultring 1
pack .pb -padx 10 -pady 10
AUTHOR
Bret A. Schuhmacher
Mark L. Ulferts
KEYWORDS
pushbutton, widget
iwidgets-4.1.0/demos/html/radiobox.n.html 0000644 0036047 0045461 00000014564 07347201437 016753 0 ustar dgp 771div radiobox - Create and manipulate a radiobox widget
radiobox - Create and manipulate a radiobox widget
SYNOPSIS
radiobox pathName ?options?
INHERITANCE
itk::Widget <- labeledframe <- radiobox
STANDARD OPTIONS
background
foreground
|
borderWidth
relief
|
cursor
selectColor
|
disabledForeground
|
See the "options" manual entry for details on the standard options.
INHERITED OPTIONS
labelBitmap
labelPos
|
labelFont
labelText
|
labelImage
labelVariable
|
labelMargin
|
See the "labeledframe" class manual entry for details on the
inherited options.
WIDGET-SPECIFIC OPTIONS
Name: command
Class: Command
Command-Line Switch: -command
Specifies a Tcl command procedure to be evaluated following a change in
the current radio box selection.
DESCRIPTION
The radiobox command creates a radio button box widget
capable of adding, inserting, deleting, selecting, and configuring
radiobuttons as well as obtaining the currently selected button.
METHODS
The radiobox command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command.
Many of the widget commands for the radiobox take as one argument an
indicator of which radiobutton of the radiobox to operate on. These indicators
are called indexes and allow reference and manipulation of radiobuttons.
Radiobox indexes may be specified in any of the following forms:
- number
- Specifies the radiobutton numerically, where 0 corresponds to the top
radiobutton of the radiobox.
- end
- Indicates the last radiobutton of the radiobox.
- pattern
- If the index doesn't satisfy one of the above forms then this
form is used. Pattern is pattern-matched against the tag of
each radiobutton in the radiobox, in order from top to bottom,
until a matching entry is found. The rules of Tcl_StringMatch
are used.
WIDGET-SPECIFIC METHODS
- pathName add tag ?option value option value?
- Adds a new radiobutton to the radiobuttond window on the bottom. The command
takes additional options which are passed on to the radiobutton as construction
arguments. These include the standard Tk radiobutton options. The tag is
returned.
- pathName buttonconfigure index ?options?
- This command is similar to the configure command, except that
it applies to the options for an individual radiobutton,
whereas configureapplies to the options for the radiobox as a whole.
Options may have any of the values accepted by the add
widget command. If options are specified, options are modified
as indicated in the command and the command returns an empty string.
If no options are specified, returns a list describing
the current options for entry index (see Tk_ConfigureInfo for
information on the format of this list).
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the radiobox
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the radiobox
command.
- pathName delete index
- Deletes a specified radiobutton given an index.
- pathName deselect index
- Deselects a specified radiobutton given an index.
- pathName flash index
- Flashes a specified radiobutton given an index.
- pathName get
- Returns the tag of the currently selected radiobutton.
- pathName index index
- Returns the numerical index corresponding to index.
- pathName insert index tag ?option value option value ...?
- Same as the add command except that it inserts the new
radiobutton just before the one given by index, instead of appending
to the end of the radiobox. The option, and value
arguments have the same interpretation as for the add widget
command.
- pathName select index
- Selects a specified radiobutton given an index.
EXAMPLE
radiobox .rb -labeltext Fonts
.rb add times -text Times
.rb add helvetica -text Helvetica
.rb add courier -text Courier
.rb add symbol -text Symbol
.rb select courier
pack .rb -padx 10 -pady 10 -fill both -expand yes
AUTHORS
Michael J. McLennan
Mark L. Ulferts
KEYWORDS
radiobox, widget
iwidgets-4.1.0/demos/html/scopedobject.n.html 0000644 0036047 0045461 00000006205 06570244362 017602 0 ustar dgp 771div scopedobject - Create and manipulate a scoped \[incr Tcl\] class object.
scopedobject - Create and manipulate a scoped \[incr Tcl\] class object.
SYNOPSIS
scopedobject objName ?options?
INHERITANCE
None
STANDARD OPTIONS
Name: enterscopecommand:
Command-Line Switch: -enterscopecommand
Specifies a Tcl command to invoke when an object enters scope
(i.e. when it is created..). The default is {}.
Name: enterscopecommand:
Command-Line Switch: -enterscopecommand
Specifies a Tcl command to invoke when an object exits scope
(i.e. when it is deleted..). The default is {}.
DESCRIPTION
The scopedobject command creates a base class for defining
Itcl classes which posses scoped behavior like Tcl variables.
The objects are only accessible within the procedure in which
they are instantiated and are deleted when the procedure returns.
This class was designed to be a general purpose base class for
supporting scoped incr Tcl classes. The options include the
execute a Tcl script command when an object enters and exits its
scope.
METHODS
The scopedobject command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various operations on the object.
It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for scopedobject objects:
OBJECT-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the scopedobject
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the object.
If no option is specified, returns a list describing all of
the available options for pathName. If option is specified
with no value, 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 option is specified). If
one or more option-value pairs are specified, then the command
modifies the given objects option(s) to have the given value(s); in
this case the command returns an empty string.
Option may have any of the values accepted by the scopedobject
command.
EXAMPLE
The scopedobject was primarily meant to be a base class. The
following is an example of usage without inheritance:
proc scopedobject_demo {} {
scopedobject #auto \
-exitscopecommand {puts "enter scopedobject_demo"} \
-exitscopecommand {puts "exit scopedobject_demo"}
}
scopedobject_demo
AUTHOR
John A. Tucker
KEYWORDS
scopedobject, object
iwidgets-4.1.0/demos/html/scrolledcanvas.n.html 0000644 0036047 0045461 00000022311 07347201447 020135 0 ustar dgp 771div scrolledcanvas - Create and manipulate scrolled canvas widgets
scrolledcanvas - Create and manipulate scrolled canvas widgets
SYNOPSIS
scrolledcanvas pathName ?options?
INHERITANCE
itk::Widget <- Labeledwidget <- Scrolledwidget <- Scrolledcanvas
STANDARD OPTIONS
activeBackground
exportSelection
highlightThickness
insertWidth
selectForeground
|
background
font
insertBorderWidth
relief
|
borderWidth
foreground
insertOffTime
selectBackground
|
cursor
highlightColor
insertOnTime
selectBorderWidth
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
closeEnough
yScrollIncrement
|
confine
|
scrollRegion
|
xScrollIncrement
|
See the "canvas" widget manual entry for details on the above
associated options.
activeRelief
|
elementBorderWidth
|
jump
|
troughColor
|
See the "scrollbar" widget manual entry for details on the above
associated options.
INHERITED OPTIONS
disabledForeground
labelMargin
state
|
labelBitmap
labelPos
|
labelFont
labelText
|
labelImage
labelVariable
|
See the "labeledwidget" class manual entry for details on the inherited options.
WIDGET-SPECIFIC OPTIONS
Name: autoMargin
Class: AutoMargin
Command-Line Switch: -automargin
Specifies the autoresize extra margin to reserve. This option is only
effective with autoresize turned on. The default is 10.
Name: autoResize
Class: AutoResize
Command-Line Switch: -autoresize
Automatically adjusts the scrolled region to be the bounding
box covering all the items in the canvas following the execution
of any method which creates or destroys items. Thus, as new
items are added, the scrollbars adjust accordingly.
Name: height
Class: Height
Command-Line Switch: -height
Specifies the height of the scrolled canvas widget in any of the forms
acceptable to Tk_GetPixels. The default height is 30 pixels.
Name: hscrollMode
Class: ScrollMode
Command-Line Switch: -hscrollmode
Specifies the the display mode to be used for the horizontal
scrollbar: static, dynamic, or none. In static mode, the
scroll bar is displayed at all times. Dynamic mode displays the
scroll bar as required, and none disables the scroll bar display. The
default is static.
Name: sbWidth
Class: Width
Command-Line Switch: -sbwidth
Specifies the width of the scrollbar in any of the forms acceptable
to Tk_GetPixels. The default width is 15 pixels..
Name: scrollMargin
Class: ScrollMargin
Command-Line Switch: -scrollmargin
Specifies the distance between the canvas and scrollbar in any of the
forms acceptable to Tk_GetPixels. The default is 3 pixels.
Name: textBackground
Class: Background
Command-Line Switch -textbackground
Specifies the background color for the canvas. This allows the background
within the canvas to be different from the normal background color.
Name: vscrollMode
Class: ScrollMode
Command-Line Switch: -vscrollmode
Specifies the the display mode to be used for the vertical
scrollbar: static, dynamic, or none. In static mode, the
scroll bar is displayed at all times. Dynamic mode displays the
scroll bar as required, and none disables the scroll bar display. The
default is static.
Name: width
Class: Width
Command-Line Switch: -width
Specifies the width of the scrolled canvas widget in any of the forms
acceptable to Tk_GetPixels. The default height is 30 pixels.
DESCRIPTION
The scrolledcanvas command creates
a scrolled canvas with additional options to manage
horizontal and vertical scrollbars. This includes options to control
which scrollbars are displayed and the method, i.e. statically or
dynamically.
METHODS
The scrolledcanvas command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for scrolledcanvas widgets:
ASSOCIATED METHODS
addtag
canvasy
delete
gettags
itemconfigure
raise
type
|
bbox
coords
dtag
icursor
lower
scale
xview
|
bind
create
find
index
move
scan
yview
|
canvasx
dchars
focus
insert
postscript
select
|
See the "canvas" manual entry for details on the associated methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the scrolledcanvas
command.
- pathName childsite
- Returns the child site widget path name.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the scrolledcanvas
command.
- pathName justify direction
- Justifies the canvas contents via the scroll bars in one of four directions:
left, right, top, or bottom.
COMPONENTS
Name: canvas
Class: Canvas
The canvas component is the canvas widget. See the "canvas" widget
manual entry for details on the canvas component item.
Name: horizsb
Class: Scrollbar
The horizsb component is the horizontal scroll bar. See the "ScrollBar"
widget manual entry for details on the horizsb component item.
Name: vertsb
Class: Scrollbar
The vertsb component is the vertical scroll bar. See the "ScrollBar" widget
manual entry for details on the vertsb component item.
EXAMPLE
scrolledcanvas .sc
.sc create rectangle 100 100 400 400 -fill red
.sc create rectangle 300 300 600 600 -fill green
.sc create rectangle 200 200 500 500 -fill blue
pack .sc -padx 10 -pady 10 -fill both -expand yes
AUTHOR
Mark L. Ulferts
KEYWORDS
scrolledcanvas, canvas, widget
iwidgets-4.1.0/demos/html/scrolledframe.n.html 0000644 0036047 0045461 00000017154 07347201672 017765 0 ustar dgp 771div scrolledframe - Create and manipulate scrolled frame widgets
scrolledframe - Create and manipulate scrolled frame widgets
SYNOPSIS
scrolledframe pathName ?options?
INHERITANCE
itk::Widget <- Labeledwidget <-Scrolledwidget <- Scrolledframe
STANDARD OPTIONS
activeBackground
font
relief
|
background
foreground
selectBackground
|
borderWidth
highlightColor
selectBorderWidth
|
cursor
highlightThickness
selectForeground
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
activeRelief
|
elementBorderWidth
|
jump
|
troughColor
|
See the "scrollbar" manual entry for details on the associated options.
INHERITED OPTIONS
LabelBitmap
labelPos
|
labelFont
labelText
|
labelImage
labelVariable
|
labelMargin
|
See the "labeledwidget" class manual entry for details on the inherited options.
WIDGET-SPECIFIC OPTIONS
Name: height
Class: Height
Command-Line Switch: -height
Specifies the height of the scrolled frame widget in any of the forms acceptable to Tk_GetPixels. The default height is 100 pixels.
Name: hscrollMode
Class: ScrollMode
Command-Line Switch: -hscrollmode
Specifies the the display mode to be used for the horizontal
scrollbar: static, dynamic, or none. In static mode, the
scroll bar is displayed at all times. Dynamic mode displays the
scroll bar as required, and none disables the scroll bar display. The
default is static.
Name: sbWidth
Class: Width
Command-Line Switch: -sbwidth
Specifies the width of the scrollbar in any of the forms acceptable
to Tk_GetPixels. The default width is 15 pixels.
Name: scrollMargin
Class: Margin
Command-Line Switch: -scrollmargin
Specifies the distance between the frame and scrollbar in any of the
forms acceptable to Tk_GetPixels. The default is 3 pixels.
Name: vscrollMode
Class: ScrollMode
Command-Line Switch: -vscrollmode
Specifies the the display mode to be used for the vertical
scrollbar: static, dynamic, or none. In static mode, the
scroll bar is displayed at all times. Dynamic mode displays the
scroll bar as required, and none disables the scroll bar display. The
default is static.
Name: width
Class: Width
Command-Line Switch: -width
Specifies the width of the scrolled frame widget in any of the forms
acceptable to Tk_GetPixels. The default height is 100 pixels.
DESCRIPTION
The scrolledframe combines the functionallity of scrolling with that
of a typical frame widget to implement a clipable viewing area whose visible
region may be modified with the scroll bars. This enables the contruction
of visually larger areas than which could normally be displayed, containing
a heterogenous mix of other widgets. Options exist which allow full control
over which scrollbars are displayed and the method, i.e. statically or
dynamically. The frame itself may be accessed by the childsite
method and then filled with other widget combinations.
METHODS
The scrolledframe command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for scrolledframe widgets:
ASSOCIATED METHODS
See the "canvas" manual entry for details on the associated methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the scrolledframe
command.
- pathName childsite
- Return the path name of the child site.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the scrolledframe
command.
- pathName justify direction
- Justifies the frame contents via the scroll bars in one of four directions:
left, right, top, or bottom.
COMPONENTS
Name: horizsb
Class: Scrollbar
The horizsb component is the horizontal scroll bar. See the "ScrollBar"
widget manual entry for details on the horizsb component item.
Name: vertsb
Class: Scrollbar
The vertsb component is the vertical scroll bar. See the "ScrollBar" widget
manual entry for details on the vertsb component item.
EXAMPLE
scrolledframe .sf -width 150 -height 180 -labelon yes -labeltext scrolledframe
set cs [.sf childsite]
pack [button $cs.b1 -text Hello] -pady 10
pack [button $cs.b2 -text World] -pady 10
pack [button $cs.b3 -text "This is a test"] -pady 10
pack [button $cs.b4 -text "This is a really big button"] -pady 10
pack [button $cs.b5 -text "This is another really big button"] -pady 10
pack [button $cs.b6 -text "This is the last really big button"] -pady 10
pack .sf -expand yes -fill both -padx 10 -pady 10
AUTHORS
Mark L. Ulferts
Sue Yockey
KEYWORDS
scrolledframe, frame, widget
iwidgets-4.1.0/demos/html/scrolledhtml.n.html 0000644 0036047 0045461 00000026527 07537260565 017652 0 ustar dgp 771div scrolledhtml - Create and manipulate a scrolled text widget with the capability
scrolledhtml - Create and manipulate a scrolled text widget with the capability
of displaying HTML formatted documents.
SYNOPSIS
scrolledhtml pathName ?options?
INHERITANCE
itk::Widget <- Labeledwidget <- Scrolledtext <- Scrolledhtml
STANDARD OPTIONS
activeBackground
exportSelection
insertBackground
insertWidth
repeatDelay
selectForeground
|
background
foreground
insertBorderWidth
padX
repeatInterval
setGrid
|
borderWidth
highlightColor
insertOffTime
padY
selectBackground
|
cursor
highlightThickness
insertOnTime
relief
selectBorderWidth
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
activeRelief
|
elementBorderWidth
|
jump
|
troughColor
|
See the "scrollbar" widget manual entry for details on the above
associated options.
spacing1
tabs
|
spacing2
wrap
|
spacing3
|
state
|
See the "text" widget manual entry for details on the above
associated options.
INHERITED OPTIONS
labelBitmap
labelPos
hscrollMode
vscrollMode
|
labelFont
labelText
sbWidth
width
|
labelImage
labelVariable
scrollMargin
|
labelMargin
height
visibleitems
|
See the "scrolledtext" class manual entry for details on the inherited options.
WIDGET-SPECIFIC OPTIONS
Name: feedback
Class: FeedBack
Command-Line Switch: -feedback
Specifies the callback command to use to give feedback on current
status. The command is executed in the form command <number of
characters remaining>
Name: fixedfont
Class: FixedFont
Command-Line Switch: -fixedfont
Specifies the name of the font to be used for fixed-width character
text (such as <pre>...</pre> or <tt>...</tt>.) The size, style, and
other font attributes are determined by the format tags in the
document. The default is courier.
Name: fontname
Class: FontName
Command-Line Switch: -fontname
Specifies the name of the font to be used for normal-width character
spaced text. The size, style, and other font attributes are
determined by the format tags in the document. The default is times.
Name: fontsize
Class: FontSize
Command-Line Switch: -fontsize
Specifies the general size of the fonts used. One of small, medium,
large, or huge. The default is medium.
Name: foreground
Class: Foreground
Command-Line Switch: -foreground
Specifies the color of text other than hypertext links, in any
of the forms acceptable to Tk_GetColor. This value may
be overridden in a particular document by the text attribute
of the Body HTML tag.
Name: link
Class: Link
Command-Line Switch: -link
Specifies the default color of hypertext links in any of the forms
acceptable to Tk_GetColor. This value may be overridden in a
particular document by the link attribute of the Body
HTML tag. The default is blue.
Name: linkcommand
Class: LinkCommand
Command-Line Switch: -linkcommand
Specifies the command to execute when the user clicks on a hypertext
link. Execution is of the form linkcommand href, where href is
the value given in the href attribute of the A HTML tag.
Name: alink
Class: alink
Command-Line Switch: -alink
Specifies the color of hypertext links when the cursor is over the link
in any of the forms acceptable to Tk_GetColor. The default is red.
Name: textBackground
Class: Background
Command-Line Switch: -textbackground
Specifies the background color for the text area in any of
the forms acceptable to Tk_GetColor. This value may be
overridden in a particular document by the bgcolor attribute
of the Body HTML tag.
Name: unknownimage
Class: UnknownImage
Command-Line Switch: -unknownimage
Specifies the name of the image file to display when an img
specified in the html document cannot be loaded.
Name: update
Class: Update
Command-Line Switch: -alink
A boolean value indicating whether to call update during html rendering.
DESCRIPTION
The scrolledhtml command creates
a scrolled text widget with the additional capability to display
html formatted documents.
An import method is provided to read an html document file, and
a render method is provided to display a html formatted text string.
METHODS
The scrolledhtml command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for scrolledhtml widgets:
ASSOCIATED METHODS
bbox
dlineinfo
mark
tag
|
compare
get
scan
window
|
debug
index
search
xview
|
delete
insert
see
yview
|
See the "text" manual entry for details on the standard methods.
INHERITED METHODS
See the "scrolledhtml" manual entry for details on the inherited methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the scrolledhtml
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the scrolledhtml
command.
- pathName import ?option? href
- Load html formatted text from a file. Href must exist.
If option is -link, href is assumed to be relative
to the application's current working directory. Otherwise,
href is assumed to be relative to the path of the last
page loaded. Href is either a filename, or a reference
of the form filename#anchorname. In the latter form,
fIFilename and/or anchorname may be empty.
If filename is empty, the current document is assumed.
If anchorname is empty, the top of the document is assumed.
- pathName pwd
- Print the current working directory of the widget, i.e. the directory of the
last page loaded.
- pathName render htmltext ?wd?
- Display HTML formatted text htmltext. Wd gives the base
path to use for all links and images in the document. Wd defaults
to the application's current working directory.
- pathName title
- Return the title of the current page, as given in the <title>...</title>
field in the document.
HTML COMPLIANCE
This widget is compliant with HTML 3.2 with the following exceptions:
No features requiring a connection to an http server are supported.
Some image alignments aren't supported, because they are not supported by
the text widget.
The <br> attributes dealing with image alignments aren't supported.
Automatic table sizing is not supported very well, due to limitations of the
text widget
EXAMPLE
option add *textBackground white
scrolledhtml .sh -fontname helvetica -linkcommand "this import -link"
pack .sh -padx 10 -pady 10 -fill both -expand yes
.sh import ~/public_html/index.html
BUGS
Cells in a table can be caused to overlap. ex:
<table border width="100%">
<tr><td>cell1</td><td align=right rowspan=2>cell2</td></tr>
<tr><td colspan=2>cell3 w/ overlap</td>
</table>
It hasn't been fixed because 1) it's a pain to fix, 2) it will slow
tables down by a significant amount, and 3) netscape has the same
bug, as of V3.01.
ACKNOWLEDGEMENTS
Sam Shen
This code is based largely on his tkhtml.tcl code from tk inspect. Tkhtml
is copyright 1995 Lawrence Berkeley Laboratory.
AUTHOR
Kris Raney
KEYWORDS
scrolledhtml, html, text, widget
iwidgets-4.1.0/demos/html/scrolledlistbox.n.html 0000644 0036047 0045461 00000032362 07444677035 020365 0 ustar dgp 771div iwidgets::scrolledlistbox - Create and manipulate scrolled listbox widgets
iwidgets::scrolledlistbox - Create and manipulate scrolled listbox widgets
SYNOPSIS
iwidgets::scrolledlistbox pathName ?options?
INHERITANCE
itk::Widget <- iwidgets::Labeledwidget <- iwidgets::Scrolledwidget <- iwidgets::Scrolledlistbox
STANDARD OPTIONS
cursor
highlightThickness
selectForeground
|
activeBackground
exportSelection
relief
|
background
foreground
selectBackground
|
borderWidth
highlightColor
selectBorderWidth
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
See the "listbox" widget manual entry for details on the above
associated options.
activeRelief
|
elementBorderwidth
|
jump
|
troughColor
|
See the "scrollbar" widget manual entry for details on the above
associated options.
INHERITED OPTIONS
disabledForeground
labelMargin
state
|
labelBitmap
labelPos
sticky
|
labelFont
labelText
|
labelImage
labelVariable
|
See the "labeledwidget" class manual entry for details on the inherited
options.
WIDGET-SPECIFIC OPTIONS
Name: dblClickCommand
Class: Command
Command-Line Switch: -dblclickcommand
Specifies a Tcl command procedure which is called when an item is
double clicked. Typically this occurs when mouse button 1 is double
clicked over an item. Selection policy does not matter.
Name: height
Class: Height
Command-Line Switch: -height
Specifies the height of the scrolled list box as an entire unit.
The value may be specified in any of the forms acceptable to
Tk_GetPixels. Any additional space needed to display the other
components such as labels, margins, and scrollbars force the listbox
to be compressed. A value of zero along with the same value for
the width causes the value given for the visibleitems option
to be applied which administers geometry constraints in a different
manner. The default height is zero.
Name: hscrollMode
Class: ScrollMode
Command-Line Switch: -hscrollmode
Specifies the the display mode to be used for the horizontal
scrollbar: static, dynamic, or none. In static mode, the
scroll bar is displayed at all times. Dynamic mode displays the
scroll bar as required, and none disables the scroll bar display. The
default is static.
Name: sbWidth
Class: Width
Command-Line Switch: -sbwidth
Specifies the width of the scrollbar in any of the forms acceptable
to Tk_GetPixels. The default width is 15 pixels..
Name: scrollMargin
Class: Margin
Command-Line Switch: -scrollmargin
Specifies the distance between the listbox and scrollbar in any of the
forms acceptable to Tk_GetPixels. The default is 3 pixels.
Name: selectionCommand
Class: Command
Command-Line Switch: -selectioncommand
Specifies a Tcl command procedure which is called when an item is
selected. Selection policy does not matter.
Name: state
Class: State
Command-Line Switch: -state
Specifies one of two states for the listbox: normal or disabled.
If the listbox is disabled then selection is ignored. The default is
normal.
Name: textBackground
Class: Background
Command-Line Switch -textbackground
Specifies the background color for the listbox. This allows the background
within the listbox to be different from the normal background color.
Name: textFont
Class: Font
Command-Line Switch: -textfont
Specifies the font to be used for text in the listbox. This allows for
the font associated with text internal to the scrolled listbox to be
different than the font for labels.
Name: visibleitems
Class: VisibleItems
Command-Line Switch: -visibleitems
Specifies the widthxheight in characters and lines for the listbox.
This option is only administered if the width and height options
are both set to zero, otherwise they take precedence. The default value
is 20x10. With the visibleitems option engaged, geometry constraints
are maintained only on the listbox. The size of the other components such as
labels, margins, and scroll bars, are additive and independent,
effecting the overall size of the scrolled list box. In contrast,
should the width and height options have non zero values, they
are applied to the scrolled list box as a whole. The listbox
is compressed or expanded to maintain the geometry constraints.
Name: vscrollMode
Class: ScrollMode
Command-Line Switch: -vscrollmode
Specifies the the display mode to be used for the vertical
scrollbar: static, dynamic, or none. In static mode, the
scroll bar is displayed at all times. Dynamic mode displays the
scroll bar as required, and none disables the scroll bar display. The
default is static.
Name: width
Class: Width
Command-Line Switch: -width
Specifies the width of the scrolled list box as an entire unit.
The value may be specified in any of the forms acceptable to
Tk_GetPixels. Any additional space needed to display the other
components such as labels, margins, and scrollbars force the listbox
to be compressed. A value of zero along with the same value for
the height causes the value given for the visibleitems option
to be applied which administers geometry constraints in a different
manner. The default width is zero.
DESCRIPTION
The iwidgets::scrolledlistbox command creates
a scrolled listbox with additional options to manage
horizontal and vertical scrollbars. This includes options to control
which scrollbars are displayed and the method, i.e. statically or
dynamically.
METHODS
The iwidgets::scrolledlistbox command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command.
Many of the widget commands for a scrolledlistbox take as one argument an
indicator of which entry of the list box to operate on. These
indicators are called indexes and may be specified in
any of the following forms:
- number
- Specifies the element as a numerical index, where 0 corresponds
to the first element in the listbox.
- active
- Indicates the element that has the location cursor. This element
will be displayed with an underline when the listbox has the
keyboard focus, and it is specified with the activate
widget command.
- anchor
- Indicates the anchor point for the selection, which is set with the
selection anchor widget command.
- end
- Indicates the end of the listbox.
For some commands this means just after the last element;
for other commands it means the last element.
- @x,y
- Indicates the element that covers the point in the listbox window
specified by x and y (in pixel coordinates). If no
element covers that point, then the closest element to that
point is used.
- pattern
- If the index doesn't satisfy one of the above forms then this
form is used. Pattern is pattern-matched against the items in
the list box, in order from the top down, until a matching entry is found.
The rules of Tcl_StringMatch are used.
The following widget commands are possible for scrolledlistbox widgets:
ASSOCIATED METHODS
activate
get
nearest
size
|
bbox
index
scan
xview
|
curselection
insert
see
yview
|
delete
itemconfigure
selection
|
See the "listbox" manual entry for details on the associated methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the iwidgets::scrolledlistbox
command.
- pathName clear
- Clears the listbox of all items.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the iwidgets::scrolledlistbox
command.
- pathName getcurselection
- Returns the contents of the listbox element indicated by the current
selection indexes. Short cut version of get and curselection command
combination.
- pathName justify direction
- Justifies the list contents via teh scroll bars in one of four directions:
left, right, top, or bottom.
- pathName selecteditemcount
- Returns the number of items currently selected in the list.
- pathName sort order
- Sort the current list in any of the forms accepted by Tcl's lsort command.
Also accepts either ascending or descending order.
COMPONENTS
Name: listbox
Class: listbox
The listbox component is the listbox widget. See the "listbox" widget
manual entry for details on the listbox component item.
Name: horizsb
Class: Scrollbar
The horizsb component is the horizontal scroll bar. See the "scrollbar"
widget manual entry for details on the horizsb component item.
Name: vertsb
Class: Scrollbar
The vertsb component is the vertical scroll bar. See the "scrollbar" widget
manual entry for details on the vertsb component item.
EXAMPLE
package require Iwidgets 4.0
option add *textBackground white
proc selCmd {} {
puts stdout "[.slb getcurselection]"
}
proc defCmd {} {
puts stdout "Double Click"
return [selCmd]
}
iwidgets::scrolledlistbox .slb -selection single \\
-vscrollmode static -hscrollmode dynamic -labeltext "List" \\
-selectioncommand selCmd -dblclickcommand defCmd
pack .slb -padx 10 -pady 10 -fill both -expand yes
.slb insert end {Hello {Out There} World}
AUTHOR
Mark L. Ulferts
KEYWORDS
scrolledlistbox, listbox, widget
iwidgets-4.1.0/demos/html/scrolledtext.n.html 0000644 0036047 0045461 00000024445 07537260565 017667 0 ustar dgp 771div scrolledtext - Create and manipulate a scrolled text widget
scrolledtext - Create and manipulate a scrolled text widget
SYNOPSIS
scrolledtext pathName ?options?
INHERITANCE
itk::Widget <- Labeledwidget <- Scrolledwidget <- Scrolledtext
STANDARD OPTIONS
activeBackground
exportSelection
insertBackground
insertWidth
selectBackground
|
background
foreground
insertBorderWidth
padX
selectBorderWidth
|
borderWidth
highlightColor
insertOffTime
padY
selectForeground
|
cursor
highlightThickness
insertOnTime
relief
setGrid
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
activeRelief
|
elementBorderWidth
|
jump
|
troughColor
|
See the "scrollbar" widget manual entry for details on the above
associated options.
spacing1
tabs
|
spacing2
wrap
|
spacing3
|
state
|
See the "text" widget manual entry for details on the above
associated options.
INHERITED OPTIONS
disabledForeground
labelMargin
state
|
labelBitmap
labelPos
|
labelFont
labelText
|
labelImage
labelVariable
|
See the "labeledwidget" class manual entry for details on the inherited options.
WIDGET-SPECIFIC OPTIONS
Name: height
Class: Height
Command-Line Switch: -height
Specifies the height of the scrolled text as an entire unit.
The value may be specified in any of the forms acceptable to
Tk_GetPixels. Any additional space needed to display the other
components such as labels, margins, and scrollbars force the text
to be compressed. A value of zero along with the same value for
the width causes the value given for the visibleitems option
to be applied which administers geometry constraints in a different
manner. The default height is zero.
Name: hscrollMode
Class: ScrollMode
Command-Line Switch: -hscrollmode
Specifies the the display mode to be used for the horizontal
scrollbar: static, dynamic, or none. In static mode, the
scroll bar is displayed at all times. Dynamic mode displays the
scroll bar as required, and none disables the scroll bar display. The
default is static.
Name: sbWidth
Class: Width
Command-Line Switch: -sbwidth
Specifies the width of the scrollbar in any of the forms
acceptable to Tk_GetPixels.
Name: scrollMargin
Class: Margin
Command-Line Switch: -scrollmargin
Specifies the distance between the text area and scrollbar in any of the forms
acceptable to Tk_GetPixels. The default is 3 pixels.
Name: textBackground
Class: Background
Command-Line Switch: -textbackground
Specifies the background color for the text area in any of the forms
acceptable to Tk_GetColor.
Name: textFont
Class: Font
Command-Line Switch: -textfont
Specifies the font to be used in the scrolled text area.
Name: visibleitems
Class: VisibleItems
Command-Line Switch: -visibleitems
Specifies the widthxheight in characters and lines for the text.
This option is only administered if the width and height options
are both set to zero, otherwise they take precedence. The default value
is 80x24. With the visibleitems option engaged, geometry constraints
are maintained only on the text. The size of the other components such as
labels, margins, and scroll bars, are additive and independent,
effecting the overall size of the scrolled text. In contrast,
should the width and height options have non zero values, they
are applied to the scrolled text as a whole. The text
is compressed or expanded to maintain the geometry constraints.
Name: vscrollMode
Class: ScrollMode
Command-Line Switch: -vscrollmode
Specifies the the display mode to be used for the vertical
scrollbar: static, dynamic, or none. In static mode, the
scroll bar is displayed at all times. Dynamic mode displays the
scroll bar as required, and none disables the scroll bar display. The
default is static.
Name: width
Class: Width
Command-Line Switch: -width
Specifies the width of the scrolled text as an entire unit.
The value may be specified in any of the forms acceptable to
Tk_GetPixels. Any additional space needed to display the other
components such as labels, margins, and scrollbars force the text
to be compressed. A value of zero along with the same value for
the height causes the value given for the visibleitems option
to be applied which administers geometry constraints in a different
manner. The default width is zero.
DESCRIPTION
The scrolledtext command creates
a scrolled text widget with additional options to manage
the scrollbars. This includes options to control the method
in which the scrollbars are displayed, i.e. statically or dynamically.
Options also exist for adding a label to the scrolled text area and
controlling its position. Import/export of methods are provided for
file I/O.
METHODS
The scrolledtext command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for scrolledtext widgets:
ASSOCIATED METHODS
bbox
dlineinfo
mark
tag
|
compare
get
scan
window
|
debug
index
search
xview
|
delete
insert
see
yview
|
See the "text" manual entry for details on the standard methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the scrolledtext
command.
- pathName childsite
- Returns the child site widget path name.
- pathName clear
- Clear the text area of all characters.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the scrolledtext
command.
- pathName import filename ?index?
- Load the text from a file into the text area at the index. The
filename must exist.
- pathName export filename
- Write text to a file. If filename exists then contents are
replaced with text widget contents.
COMPONENTS
Name: text
Class: Text
The text component is the text widget. See the "text" widget
manual entry for details on the text component item.
Name: horizsb
Class: Scrollbar
The horizsb component is the horizontal scroll bar. See the "scrollbar"
widget manual entry for details on the horizsb component item.
Name: vertsb
Class: Scrollbar
The vertsb component is the vertical scroll bar. See the "scrollbar" widget
manual entry for details on the vertsb component item.
EXAMPLE
option add *textBackground white
scrolledtext .st -scrollmode dynamic -labeltext "Password File"
pack .st -padx 10 -pady 10 -fill both -expand yes
.st import /etc/passwd
AUTHOR
Mark L. Ulferts
KEYWORDS
scrolledtext, text, widget
iwidgets-4.1.0/demos/html/selectionbox.n.html 0000644 0036047 0045461 00000024533 07347201717 017640 0 ustar dgp 771div selectionbox - Create and manipulate a selection box widget
selectionbox - Create and manipulate a selection box widget
SYNOPSIS
selectionbox pathName ?options?
INHERITANCE
itk::Widget <- selectionbox
STANDARD OPTIONS
activeBackground
exportSelection
insertBackground
insertWidth
selectBackground
|
background
foreground
insertBorderWidth
relief
selectBorderWidth
|
borderWidth
highlightColor
insertOffTime
repeatDelay
selectForeground
|
cursor
highlightThickness
insertOnTime
repeatInterval
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
See the "entryfield" widget class manual entry for details on the above
associated options.
See the "labeledwidget" class manual entry for details on the above
associated options.
activeRelief
|
elementBorderWidth
|
jump
|
troughColor
|
See the "scrollbar" widget class manual entry for details on the above
associated options.
dblClickCommand
textBackground
|
hscrollMode
textFont
|
sbWidth
vscrollMode
|
scrollMargin
|
See the "scrolledlistbox" widget class manual entry for details on the above
associated options.
WIDGET-SPECIFIC OPTIONS
Name: childSitePos
Class: Position
Command-Line Switch: -childsitepos
Specifies the position of the child site in the selection box: n,
s, e, w, or . The default is center
Name: height
Class: Height
Command-Line Switch: -height
Specifies the height of the selection box. The value may be specified in
any of the forms acceptable to Tk_GetPixels. The default is 320 pixels.
Name: itemsCommand
Class: Command
Command-Line Switch: -itemscommand
Specifies a command to be evaluated following selection of an item.
Name: itemsLabel
Class: Text
Command-Line Switch: -itemslabel
Specifies the text of the label for the items list. The default is "List".
Name: itemsLabelPos
Class: Position
Command-Line Switch: -itemslabelpos
Specifies the position of the label along the side of the items
list: n, ne, e, se, s, sw, w,
or nw. The default is nw.
Name: itemsOn
Class: ItemsOn
Command-Line Switch: -itemson
Specifies whether or not to display the items list in any
of the forms acceptable to Tcl_GetBoolean. The default is true.
Name: margin
Class: Margin
Command-Line Switch: -margin
Specifies distance between the items list and selection entry in any of
the forms acceptable to Tk_GetPixels. The default is 7 pixels.
Name: selectionCommand
Class: Command
Command-Line Switch: -selectioncommand
Specifies a Tcl procedure to be associated with a return key press event
in the selection entry field.
Name: selectionLabel
Class: Text
Command-Line Switch: -selectionlabel
Specifies the text of the label for the selection entry field. The default
is "Selection".
Name: selectionLabelPos
Class: Position
Command-Line Switch: -selectionlabelpos
Specifies the position of the label along the side of the selection:
n, ne, e, se, s, sw, w,
or nw. The default is nw.
Name: selectionOn
Class: SelectionOn
Command-Line Switch: -selectionon
Specifies whether or not to display the selection entry in any
of the forms acceptable to Tcl_GetBoolean. The default is true.
Name: width
Class: Width
Command-Line Switch: -width
Specifies the width of the selection box. The value may be specified in
any of the forms acceptable to Tk_GetPixels. The default is 260 pixels.
DESCRIPTION
The selectionbox command creates a scrolled list of items and
a selection entry field. The user may choose any of the items displayed
in the scrolled list of alternatives and the selection field will be
filled with the choice. The user is also free to enter a new value in
the selection entry field. Both the list and entry areas have labels.
A child site is also provided in which the user may create other widgets
to be used in conjunction with the selection box.
METHODS
The selectionbox command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command.
ASSOCIATED METHODS
curselection
scan
|
delete
selection
|
index
size
|
nearest
|
See the "listbox" widget class manual entry for details on the
associated methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the selectionbox
command.
- pathName childsite
- Returns the child site widget path name.
- pathName clear component
- Delete the contents of either the selection entry widget or
items list. The component argument may be either items
or selection.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the selectionbox
command.
- pathName get
- Returns the current value of the selection entry widget.
- pathName insert component args
- Insert element(s) into either the selection entry widget or
items list. The component argument may be either items
or selection. The args follow the rules of either an entry
or list widget depending on the component value.
- pathName selectitem
- Replace the selection entry field contents with the currently
selected items value.
COMPONENTS
Name: childsite
Class: Frame
The childsite component is the user child site for the selection box. See
the "frame" widget manual entry for details on the childsite component item.
Name: items
Class: Scrolledlistbox
The items component provides the scrolled list box of items for the selection
box. See the "scrolledlistbox" widget manual entry for details on the
items component item.
Name: selection
Class: Entryfield
The selection component provides the entry field in the selection box for
display of the selected item in the items component. See the "entryfield"
widget manual entry for details on the selection component item.
EXAMPLE
option add *textBackground white
selectionbox .sb -items {Hello {Out There} World}
pack .sb -padx 10 -pady 10 -fill both -expand yes
set cs [label [.sb childsite].label -text "Child Site"]
pack $cs -fill x -padx 10 -pady 10
.sb insert items 2 {Cruel Cruel}
.sb selection set 1
AUTHOR
Mark L. Ulferts
KEYWORDS
selectionbox, widget
iwidgets-4.1.0/demos/html/selectiondialog.n.html 0000644 0036047 0045461 00000016365 07347201727 020314 0 ustar dgp 771div selectiondialog - Create and manipulate a selection dialog widget
selectiondialog - Create and manipulate a selection dialog widget
SYNOPSIS
selectiondialog pathName ?options?
INHERITANCE
itk::Toplevel <- Shell <- Dialogshell <- Dialog <- Selectiondialog
STANDARD OPTIONS
activeBackground
exportSelection
insertBackground
insertWidth
|
background
foreground
insertBorderWidth
selectBackground
|
borderWidth
highlightColor
insertOffTime
selectBorderWidth
|
cursor
highlightThickness
insertOnTime
selectForeground
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
See the "entryfield" widget manual entry for details on the above
associated options.
See the "labeledwidget" widget manual entry for details on the above
associated options.
activeRelief
|
elementBorderWidth
|
jump
|
troughColor
|
See the "scrollbar" widget class manual entry for details on the above
associated options.
See the "scrolledlistbox" widget class manual entry for details on the above
associated options.
childsitepos itemsCommand itemsLabel itemsOn
selectionCommand selectionLabel selectionOn
See the "selectionbox" widget manual entry for details on the above
associated options.
INHERITED OPTIONS
buttonBoxPadX
padY
|
buttonBoxPadY
separator
|
buttonBoxPos
thickness
|
padX
|
See the "dialogshell" widget manual entry for details on the above
inherited options.
height
|
master
|
modality
|
width
|
See the "shell" widget manual entry for details on the above
inherited options.
See the "Toplevel" widget manual entry for details on the above
inherited options.
DESCRIPTION
The selectiondialog command creates a selection box similar to
the OSF/Motif standard selection
dialog composite widget. The selectiondialog is derived from the
Dialog class and is composed of a selectionbox with commands
to manipulate the dialog buttons.
METHODS
The selectiondialog command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for selectiondialog widgets:
ASSOCIATED METHODS
childsite
selectitem
|
clear
|
get
|
insert
|
See the "selectionbox" widget manual entry for details on the above
associated methods.
curselection
scan
|
delete
selection
|
index
size
|
nearest
|
See the "listbox" widget manual entry for details on the above
associated methods.
INHERITED METHODS
add
invoke
|
buttonconfigure
show
|
default
|
hide
|
See the "buttonbox" widget manual entry for details on the above
inherited methods.
activate
|
center
|
deactivate
|
|
See the "shell" widget manual entry for details on the above
inherited methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the selectiondialog
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the selectiondialog
command.
COMPONENTS
Name: selectionbox
Class: Selectionbox
The selectionbox component is the selection box for the selection
dialog. See the "selectionbox" widget manual entry for details on the
selectionbox component item.
EXAMPLE
selectiondialog .sd
.sd activate
AUTHOR
Mark L. Ulferts
KEYWORDS
selectiondialog, selectionbox, dialog, dialogshell, shell, widget
iwidgets-4.1.0/demos/html/shell.n.html 0000644 0036047 0045461 00000015237 07347201736 016253 0 ustar dgp 771div shell - Create and manipulate a shell widget
shell - Create and manipulate a shell widget
SYNOPSIS
shell pathName ?options?
INHERITANCE
itk::Toplevel <- shell
STANDARD OPTIONS
background
|
cursor
|
foreground
|
|
See the "options" manual entry for details on the standard options.
INHERITED OPTIONS
See the "Toplevel" manual entry for details on the above inherited options.
WIDGET-SPECIFIC OPTIONS
Name: height
Class: Height
Command-Line Switch: -height
Specifies the height of the shell. The value may be specified in
any of the forms acceptable to Tk_GetPixels. A value of zero
causes the height to be adjusted to the required value based on
the size requests of the components placed in the childsite.
Otherwise, the height is fixed. The default is zero. NOTE: This
may cause some amount of flickering on slower machines. To prevent it
simply set the width and height to a appropriate value.
Name: master
Class: Window
Command-Line Switch: -master
Defines the shell as being a transient window with the master window
given by the master option. The master window should be either another
existing toplevel window or {} for no master. The default is {} for
shells and "." for dialogs.
Name: modality
Class: Modality
Command-Line Switch: -modality
Allows the shell to grab control of the screen in one of three different ways:
application, system, or none.
Application modal prevents any other toplevel windows within the application
which are direct children of '.' from gaining focus. System modal locks
the screen and prevents all windows from gaining focus regardless of
application. A modality of none performs no grabs at all. The default
is none.
Name: padX
Class: Pad
Command-Line Switch: -padx
Specifies a padding distance for the childsite in the X-direction in
any of the forms acceptable to Tk_GetPixels. The default is 10.
Name: padY
Class: Pad
Command-Line Switch: -pady
Specifies a padding distance for the childsite in the Y-direction in
any of the forms acceptable to Tk_GetPixels. The default is 10.
Name: width
Class: Width
Command-Line Switch: -width
Specifies the width of the shell. The value may be specified in
any of the forms acceptable to Tk_GetPixels. A value of zero
causes the width to be adjusted to the required value based on
the size requests of the components placed in the childsite.
Otherwise, the width is fixed. The default is zero. NOTE: This
may cause some amount of flickering on slower machines. To prevent it
simply set the width and height to a appropriate value.
DESCRIPTION
The shell command creates a shell which is a top
level widget which supports modal operation.
METHODS
The shell command create a new Tcl command whose
name is pathName. This command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for shell widgets:
WIDGET-SPECIFIC METHODS
- pathName activate
- Display the shell and wait based on the modality. For application
and system modal activations, perform a grab operation, and wait
for the result. The result may be returned via an argument to the
deactivate method.
- pathName center ?widget?
- Centers the shell with respect to another widget. The widget argument
is optional. If provided, it should be the path of another widget with
to center upon. If absent, then the shell will be centered on the screen
as a whole.
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the shell
command.
- pathName childsite
- Returns the pathname of the child site widget.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the shell
command.
- pathName deactivate ?arg?
- Deactivate the display of the shell. The method takes an optional
argument to be passed to the activate method which returns the value.
The optional argument is only effective for application and system
modal dialogs.
COMPONENTS
Name: shellchildsite
Class: frame
The shellchildsite component is the user child site for the shell. See
the "frame" widget manual entry for details on the shellchildsite
component item.
EXAMPLE
shell .sh -modality application -padx 20 -pady 20 -title Shell
pack [label [.sh childsite].l -text SHELL]
.sh center
.sh activate
AUTHOR
Mark L. Ulferts
Kris Raney
KEYWORDS
shell, widget
iwidgets-4.1.0/demos/html/spindate.n.html 0000644 0036047 0045461 00000023707 07347201746 016755 0 ustar dgp 771div spindate - Create and manipulate time spinner widgets
spindate - Create and manipulate time spinner widgets
SYNOPSIS
spindate pathName ?options?
INHERITANCE
itk::Widget <- Spindate
STANDARD OPTIONS
background
|
cursor
|
foreground
|
relief
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
See the "entryfield" manual entry for details on the above associated options.
See the "labeledwidget" manual entry for details on the above associated
options.
arrowOrient
|
repeatDelay
|
repeatInterval
|
|
See the "spinner" manual entry for details on the above associated options.
WIDGET-SPECIFIC OPTIONS
Name: dateMargin
Class: Margin
Command-Line Switch: -datemargin
Specifies the margin space between the month, day, and year spinners is
any of the forms accpetable to Tcl_GetPixels. The default is 1 pixel.
Name: dayLabel
Class: Text
Command-Line Switch: -daylabel
Specifies the text of the label for the day spinner. The default is
"Day".
Name: dayOn
Class: dayOn
Command-Line Switch: -dayon
Specifies whether or not to display the day spinner in any of the forms
acceptable to Tcl_GetBoolean. The default is true.
Name: dayWidth
Class: Width
Command-Line Switch: -daywidth
Specifies the width of the day spinner in any of the forms acceptable to
Tcl_GetPixels. The default is 3 pixels.
Name: labelPos
Class: Position
Command-Line Switch: -labelpos
Specifies the position of the label along the sides of the various
spinners: n, e, s, or w. The default is w.
Name: monthFormat
Class: MonthFormat
Command-Line Switch: -monthformat
Specifies the format of month display, integer (1-12) or brief
strings (Jan - Dec), or full strings (January - December).
Name: monthLabel
Class: Text
Command-Line Switch: -monthlabel
Specifies the text of the label for the month spinner. The default is "Month".
Name: monthOn
Class: monthOn
Command-Line Switch: -monthon
Specifies whether or not to display the month spinner in any of the forms
acceptable to Tcl_GetBoolean. The default is true.
Name: monthWidth
Class: Width
Command-Line Switch: -monthwidth
Specifies the width of the month spinner in any of the forms acceptable to
Tcl_GetPixels. The default is 3 pixels.
Name: orient
Class: Orient
Command-Line Switch: -orient
Specifies the orientation of the month, day, and year spinners: vertical or horizontal. The default is horizontal.
Name: yearDigits
Class: YearDigits
Command-Line Switch: -yeardigits
Specifies the number of digits to be displayed as the value for the year
spinner. The valid values are 2 and 4. The default is 2.
Name: yearLabel
Class: Text
Command-Line Switch: -yearlabel
Specifies the text of the label for the year spinner. The default is
"Year"
Name: yearOn
Class: yearOn
Command-Line Switch: -yearon
Specifies whether or not to display the year spinner in any of the forms
acceptable to Tcl_GetBoolean. The default is true.
Name: yearWidth
Class: Width
Command-Line Switch: -yearwidth
Specifies the width of the year spinner in any of the forms acceptable to
Tcl_GetPixels. The default is 3 pixels.
spindate
set
use
entry.
an
year
creates
command
pathName.
be
various
widget.
following
pathName
...?
the
exact
command.
are
widgets:
current
configuration
option.
any
accepted
command.
pathName
option
the
the
option
a
of
for
for
format
If
with
the
list
named
will
the
the
no
If
option-value
then
the
to
value(s);
the
empty
have
values
spindate
current
spindate
format
as
value
and
respectively.
by
clock
information
and
date
the
to
the
date
either
an
or
Reference
for
obtaining
formats.
Spinner
DESCRIPTION
command
of
in
The
month,
spinner
The
a
whose
This
used
operations
It
general
option
args
behavior
The
possible
WIDGET-SPECIFIC
pathName
value
option
Option
of
by
configure
value
Query
configuration
widget.
is
list
the
pathName
information
of
option
no
command
describing
option
be
corresponding
value
option
one
pairs
the
given
have
in
command
string.
any
accepted
command.
pathName
contents
widget
of
an
using
-clicks
The
string.
command
on
their
currently
be
date
may
as
integer
the
the
more
dates
Name:
|
creates
spinners
date
set
day,
widget.
spindate
new
name
command
to
on
has
form:
?arg
Option
determine
of
following
for
METHODS
cget
Returns
of
given
may
the
the
?option?
... ?
or
options
If
specified,
describing
available
(see
on
this
is
value,
returns
the
(this
identical
sublist
returned
is
or
are
command
widget
the
this
returns
Option
of
by
get
Returns
of
in
string
integer
the
format
default
Reference
for
obtaining
formats.
pathName
displayed
that
argument.
be
a
clock
keyword
clock
information
and
COMPONENTS
month
|
The
a
for
value
includes
and
METHODS
command
Tcl
is
may
invoke
the
the
arg
and
the
the
commands
spindate
option
the
the
by
have
values
spindate
?value
modify
of
no
returns
all
options
Tk_ConfigureInfo
the
list).
specified
then
a
one
list
to
of
if
specified).
more
specified,
modifies
option(s)
given
case
an
may
the
the
?format?
the
the
a
or
clock
-string
options
is
the
more
dates
show
Changes
date
of
The
specified
string,
value
"now".
command
on
their
Class:
|
The month spinner component is the month spinner of the date spinner.
See the Spinner widget manual entry for details on the month component item.
Name: day
Class: Spinint
The day spinner component is the day spinner of the date spinner.
See the SpinInt widget manual entry for details on the day component item.
Name: year
Class: Spinint
The year spinner component is the year spinner of the date spinner.
See the SpinInt widget manual entry for details on the year component item.
|
EXAMPLE
spindate .sd
pack .sd -padx 10 -pady 10
AUTHORS
Sue Yockey
Mark L. Ulferts
KEYWORDS
spindate, spinint, spinner, entryfield, entry, widget
iwidgets-4.1.0/demos/html/spinint.n.html 0000644 0036047 0045461 00000014774 06570255571 016640 0 ustar dgp 771div spinint - Create and manipulate a integer spinner widget
spinint - Create and manipulate a integer spinner widget
SYNOPSIS
spinint pathName ?options?
INHERITANCE
itk::Widget <- Labeledwidget <- Spinner <- Spinint
STANDARD OPTIONS
background
foreground
insertBorderWidth
justify
selectForeground
|
borderWidth
highlightColor
insertOffTime
relief
textVariable
|
cursor
highlightThickness
insertOnTime
selectBackground
|
exportSelection
insertBackground
insertWidth
selectBorderWidth
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
See the "entry" manual entry for details on the associated options.
INHERITED OPTIONS
command
invalid
width
|
childSitePos
textBackground
|
fixed
textFont
|
focusCommand
validate
|
See the "entryfield" widget manual entry for details on the above
inherited options.
disabledForeground
labelMargin
state
|
labelBitmap
labelPos
|
labelFont
labelText
|
labelImage
labelVariable
|
See the "labeledwidget" widget manual entry for details on the above
inherited options.
arroworient
repeatInterval
|
decrement
|
increment
|
repeatDelay
|
See the "spinner" widget manual entry for details on the above
inherited options.
WIDGET-SPECIFIC OPTIONS
Name: range
Class: Range
Command-Line Switch: -range
Specifies a two element list of minimum and maximum integer values. The
default is no range, {{} {}}.
Name: step
Class: Step
Command-Line Switch: -step
Specifies the increment/decrement value. The default is 1.
Name: wrap
Class: Wrap
Command-Line Switch: -wrap
Specifies whether to wrap the spinner value upon reaching the minimum
or maximum value in any of the forms acceptable to Tcl_GetBoolean.
The default is true.
DESCRIPTION
The spinint command creates a spinint widget. The spinint allows
"spinning" of integer values within a specified range with wrap support.
The spinner arrows may be drawn horizontally or vertically.
METHODS
The spinint command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for spinint widgets:
ASSOCIATED METHODS
delete
insert
xview
|
get
peek
|
icursor
scan
|
index
selection
|
See the "entry" manual entry for details on the associated methods.
INHERITED METHODS
See the "entryfield" manual entry for details on the associated methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the spinint
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the spinint
command.
- pathName down
- Decrement the spinner value by the value given in the step option.
- pathName up
- Increment the spinner value by the value given in the step option.
COMPONENTS
See the "Spinner" widget manual entry for details on the integer spinner
component items.
EXAMPLE
option add *textBackground white
spinint .si -labeltext "Temperature" -labelpos w \\
-fixed yes -width 5 -range {32 212}
pack .si -pady 10
AUTHOR
Sue Yockey
KEYWORDS
spinint, widget
iwidgets-4.1.0/demos/html/spinner.n.html 0000644 0036047 0045461 00000017147 07347201755 016625 0 ustar dgp 771div spinner - Create and manipulate a spinner widget
spinner - Create and manipulate a spinner widget
SYNOPSIS
spinner pathName ?options?
INHERITANCE
itk::Widget <- Labeledwidget <- Spinner
STANDARD OPTIONS
background
foreground
insertBorderWidth
justify
selectForeground
|
borderWidth
highlightColor
insertOffTime
relief
textVariable
|
cursor
highlightThickness
insertOnTime
selectBackground
|
exportSelection
insertBackground
insertWidth
selectBorderWidth
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
See the "entry" manual entry for details on the associated options.
INHERITED OPTIONS
childSitePos
invalid
width
|
command
textBackground
|
fixed
textFont
|
focusCommand
validate
|
See the "entryfield" widget manual entry for details on the above
inherited options.
disabledForeground
labelMargin
state
|
labelBitmap
labelPos
|
labelFont
labelText
|
labelImage
labelVariable
|
See the "labeledwidget" widget manual entry for details on the above
inherited options.
WIDGET-SPECIFIC OPTIONS
Name: arrowOrient
Class: Orient
Command-Line Switch: -arroworient
Specifies placement of arrow buttons: horizontal or vertical.
The default is vertical.
Name: decrement
Class: Command
Command-Line Switch: -decrement
Tcl command to be executed when down arrow is pressed.
Name: increment
Class: Command
Command-Line Switch: -increment
Tcl command to be executed when up arrow is pressed.
Name: repeatDelay
Class: RepeatDelay
Command-Line Switch: -repeatdelay
Specifies the initial delay in milliseconds before the spinner repeat action
on the arrow buttons engages. The default is 300 milliseconds.
Name: repeatInterval
Class: RepeatInterval
Command-Line Switch: -repeatinterval
Specifies the repeat delay in milliseconds between selections of the arrow
buttons. A repeatinterval of 0 disables button repeat. The default is
100 milliseconds.
DESCRIPTION
The spinner command creates a spinner widget. The spinner is
comprised of an entryfield plus up and down arrow buttons.
Arrows may be drawn horizontally or vertically.
METHODS
The spinner command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for spinner widgets:
ASSOCIATED METHODS
delete
insert
|
get
scan
|
icursor
selection
|
index
xview
|
See the "entry" manual entry for details on the associated methods.
INHERITED METHODS
See the "entryfield" manual entry for details on the associated methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the spinner
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the spinner
command.
- pathName down
- Derived classes may overload this method to specialize functionality.
- pathName up
- Derived classes may overload this method to specialize functionality.
COMPONENTS
Name: downarrow
Class: Canvas
The downarrow component is the downward pointing button of the spinner. See
the "canvas" widget manual entry for details on the downarrow component item.
Name: uparrow
Class: Canvas
The uparrow component is the upward pointing button of the spinner. See
the "canvas" widget manual entry for details on the uparrow component item.
EXAMPLE
set months {January February March April May June July \\
August September October November December}
proc blockInput {char} {
return 0
}
proc spinMonth {step} {
global months
set index [expr [lsearch $months [.sm get]] + $step]
if {$index < 0} {set index 11}
if {$index > 11} {set index 0}
.sm delete 0 end
.sm insert 0 [lindex $months $index]
}
spinner .sm -labeltext "Month : " -width 10 -fixed 10 -validate blockInput \\
-decrement {spinMonth -1} -increment {spinMonth 1}
.sm insert 0 January
pack .sm -padx 10 -pady 10
ACKNOWLEDGEMENTS:
Ken Copeland <ken@hilco.com>
10/18/95 - Added auto-repeat action to spinner arrow buttons.
AUTHOR
Sue Yockey
KEYWORDS
spinner, widget
iwidgets-4.1.0/demos/html/spintime.n.html 0000644 0036047 0045461 00000023311 07347201764 016765 0 ustar dgp 771div spintime - Create and manipulate time spinner widgets
spintime - Create and manipulate time spinner widgets
SYNOPSIS
spintime pathName ?options?
INHERITANCE
itk::Widget <- Spintime
STANDARD OPTIONS
background
|
cursor
|
foreground
|
relief
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
See the "entryfield" manual entry for details on the above associated options.
See the "labeledwidget" manual entry for details on the above associated
options.
arrowOrient
|
repeatDelay
|
repeatInterval
|
|
See the "spinner" manual entry for details on the above associated options.
WIDGET-SPECIFIC OPTIONS
Name: labelPos
Class: Position
Command-Line Switch: -labelpos
Specifies the position of the label along the sides of the various
spinners: n, e, s, or w. The default is w.
Name: hourLabel
Class: Text
Command-Line Switch: -hourlabel
Specifies the text of the label for the hour spinner. The default is "Hour".
Name: hourOn
Class: hourOn
Command-Line Switch: -houron
Specifies whether or not to display the hour spinner in any of the forms
acceptable to Tcl_GetBoolean. The default is true.
Name: hourWidth
Class: Width
Command-Line Switch: -hourwidth
Specifies the width of the hour spinner in any of the forms acceptable to
Tcl_GetPixels. The default is 3 pixels.
Name: militaryOn
Class: militaryOn
Command-Line Switch: -militaryon
Specifies use of a 24 hour clock for hour display in any of the forms
acceptable to Tcl_GetBoolean. The default is true.
Name: minuteLabel
Class: Text
Command-Line Switch: -minutelabel
Specifies the text of the label for the minute spinner. The default is
"Minute".
Name: minuteOn
Class: minuteOn
Command-Line Switch: -minuteon
Specifies whether or not to display the minute spinner in any of the forms
acceptable to Tcl_GetBoolean. The default is true.
Name: minuteWidth
Class: Width
Command-Line Switch: -minutewidth
Specifies the width of the minute spinner in any of the forms acceptable to
Tcl_GetPixels. The default is 3 pixels.
Name: orient
Class: Orient
Command-Line Switch: -orient
Specifies the orientation of the hour, minute, and second spinners: vertical or horizontal. The default is horizontal.
Name: secondLabel
Class: Text
Command-Line Switch: -secondlabel
Specifies the text of the label for the second spinner. The default is
"Second"
Name: secondOn
Class: secondOn
Command-Line Switch: -secondon
Specifies whether or not to display the second spinner in any of the forms
acceptable to Tcl_GetBoolean. The default is true.
Name: secondWidth
Class: Width
Command-Line Switch: -secondwidth
Specifies the width of the second spinner in any of the forms acceptable to
Tcl_GetPixels. The default is 3 pixels.
Name: timeMargin
Class: Margin
Command-Line Switch: -timemargin
Specifies the margin space between the hour, minute, and second spinners is
any of the forms accpetable to Tcl_GetPixels. The default is 1 pixel.
spintime
set
use
entry.
an
second
creates
command
pathName.
be
various
widget.
following
pathName
...?
the
exact
command.
are
widgets:
current
configuration
option.
any
accepted
command.
pathName
option
the
the
option
a
of
for
for
format
If
with
the
list
named
will
the
the
no
If
option-value
then
the
to
value(s);
the
empty
have
values
spintime
current
spintime
format
as
value
and
respectively.
by
clock
information
and
time
the
to
the
time
either
an
or
Reference
for
obtaining
format.
Spinint
DESCRIPTION
command
of
in
The
hour,
spinner
The
a
whose
This
used
operations
It
general
option
args
behavior
The
possible
WIDGET-SPECIFIC
pathName
value
option
Option
of
by
configure
value
Query
configuration
widget.
is
list
the
pathName
information
of
option
no
command
describing
option
be
corresponding
value
option
one
pairs
the
given
have
in
command
string.
any
accepted
command.
pathName
contents
widget
of
an
using
-clicks
The
string.
command
on
its
currently
be
time
may
as
integer
the
the
more
times
Name:
|
creates
spinners
time
set
minute,
widget.
spintime
new
name
command
to
on
has
form:
?arg
Option
determine
of
following
for
METHODS
cget
Returns
of
given
may
the
the
?option?
... ?
or
options
If
specified,
describing
available
(see
on
this
is
value,
returns
the
(this
identical
sublist
returned
is
or
are
command
widget
the
this
returns
Option
of
by
get
Returns
of
in
string
integer
the
format
default
Reference
for
obtaining
formats.
pathName
displayed
that
argument.
be
a
clock
keyword
clock
information
and
COMPONENTS
hour
|
The
a
for
value
includes
and
METHODS
command
Tcl
is
may
invoke
the
the
arg
and
the
the
commands
spintime
option
the
the
by
have
values
spintime
?value
modify
of
no
returns
all
options
Tk_ConfigureInfo
the
list).
specified
then
a
one
list
to
of
if
specified).
more
specified,
modifies
option(s)
given
case
an
may
the
the
?format?
the
the
a
or
clock
-string
options
is
the
more
time
show
Changes
time
of
The
specified
string,
value
"now".
command
on
its
Class:
|
The hour component is the hour spinner of the time spinner. See the
SpinInt widget manual entry for details on the hour component item.
Name: minute
Class: Spinint
The minute component is the minute spinner of the time spinner. See
the SpinInt widget manual entry for details on the minute component item.
Name: second
Class: Spinint
The second component is the second spinner of the time spinner. See the
SpinInt widget manual entry for details on the second component item.
|
EXAMPLE
spintime .st
pack .st -padx 10 -pady 10
AUTHORS
Sue Yockey
Mark L. Ulferts
KEYWORDS
spintime, spinint, spinner, entryfield, entry, widget
iwidgets-4.1.0/demos/html/tabnotebook.n.html 0000644 0036047 0045461 00000073347 06570255576 017471 0 ustar dgp 771div tabnotebook - create and manipulate tabnotebook widgets
tabnotebook - create and manipulate tabnotebook widgets
SYNOPSIS
tabnotebook pathName? options?
INHERITANCE
itk::Widget <- tabnotebook
STANDARD OPTIONS
background
cursor
|
disabledForeground
font
|
foreground
height
|
scrollCommand
width
|
See the "options" manual entry for details on the standard options.
WIDGET-SPECIFIC OPTIONS
Name: angle
Class: Angle
Command-Line Switch: -angle
Specifes the angle of slope from the inner edge to the outer edge of the tab.
An angle of 0 specifies square tabs. Valid ranges are 0 to 45 degrees
inclusive. Default is 15 degrees. If tabPos is e or w, this option
is ignored.
Name: auto
Class: Auto
Command-Line Switch: -auto
Specifies whether to use the automatic packing/unpacking algorithm of the
notebook. A value of true indicates that page frames will be unpacked and
packed acoording to the algorithm described in the select command. A value
of false leaves the current page packed and
subsequent selects, next, or previous commands do not
switch pages automatically. In either case the page's associated
command (see the add command's description of the command option) is
invoked. The value may have any of the forms accepted by
the Tcl_GetBoolean, such as true, false, 0,
1, yes, or no.
Name: backdrop
Class: Backdrop
Command-Line Switch: -backdrop
Specifies a background color to use when filling in the backdrop area
behind the tabs.
Name: background
Class: Background
Command-Line Switch: -background
Specifies a background color to use for displaying a page and its associated
tab. This can be thought of as the selected tab background color, since the
tab associated with the selected page is the selected tab.
Name: bevelAmount
Class: BevelAmount
Command-Line Switch: -bevelamount
Specifes the size of tab corners. A value of 0 with angle set to
0 results in square tabs. A bevelAmount of 4, means that the tab will
be drawn with angled corners that cut in 4 pixels from the edge of
the tab. The default is 0.
Name: borderWidth
Class: BorderWidth
Command-Line Switch: -borderwidth
Specifies the width of shadowed border to place around the notebook area of
the tabnotebook. The default value is 2.
Name: disabledForeground
Class: DisabledForeground
Command-Line Switch: -disabledforeground
Specifies a foreground color to use for displaying a tab's label when
its state is disabled.
Name: equalTabs
Class: EqualTabs
Command-Line Switch: -equaltabs
Specifies whether to force tabs to be equal sized or not. A value
of true means constrain tabs to be equal sized. A value
of false allows each tab to size based on the text label size. The
value may have any of the forms accepted by the Tcl_GetBoolean, such
as true, false, 0, 1, yes, or no.
For horizontally positioned tabs (tabpos is either s or n),
true forces all tabs to be equal width (the width being equal to
the longest label plus any padX specified). Horizontal tabs are
always equal in height.
For vertically positioned tabs (tabpos is either w or e),
true forces all tabs to be equal height (the height being equal to the
height of the label with the largest font). Vertically oriented tabs
are always equal in width.
Name: foreground
Class: Foreground
Command-Line Switch: -foreground
Specifies a foreground color to use for displaying a page and its associated
tab label. This can be thought of as the selected tab background color,
since the tab associated with the selected page is the selected tab.
Name: gap
Class: Gap
Command-Line Switch: -gap
Specifies the amount of pixel space to place between each tab. Value may
be any pixel offset value. In addition, a special keyword overlap
can be used as the value to achieve a standard overlap of tabs. This value
may have any of the forms acceptable to Tk_GetPixels.
Name: margin
Class: Margin
Command-Line Switch: -Bmargin
Specifies the amount of space to place between the outside edge of the
tabnotebook and the outside edge of its tabs. If tabPos is s,
this is the amount of space between the bottom edge of the tabnotebook and
the bottom edge of the set of tabs. If tabPos is n, this is
the amount of space between the top edge of the tabnotebook and the top
edge of the set of tabs. If tabPos is e, this is the amount of
space between the right edge of the tabnotebook and the right edge of the
set of tabs. If tabPos is w, this is the amount of space
between the left edge of the tabnotebook and the left edge of the set
of tabs. This value may have any of the forms acceptable to Tk_GetPixels.
Name: padX
Class: PadX
Command-Line Switch: -padx
Specifies a non-negative value indicating how much extra space to request
for a tab around its label in the X-direction. When computing how large
a window it needs, the tab will add this amount to the width it would
normally need The tab will end up with extra internal space to the left
and right of its text label. This value may have any of the forms acceptable
to Tk_GetPixels.
Name: padY
Class: PadY
Command-Line Switch: -pady
Specifies a non-negative value indicating how much extra space to request for
a tab around its label in the Y-direction. When computing how large a
window it needs, the tab will add this amount to the height it would normally
need The tab will end up with extra internal space to the top and bottom of
its text label. This value may have any of the forms acceptable
to Tk_GetPixels.
Name: raiseSelect
Class: RaiseSelect
Command-Line Switch: -raiseselect
Specifes whether to slightly raise the selected tab from the rest of the
tabs. The selected tab is drawn 2 pixels closer to the outside of the
tabnotebook than the unselected tabs. A value of true says to
raise selected tabs, a value of false turns this feature off. The
default is false. The value may have any of the forms accepted
by the Tcl_GetBoolean, such as true, false, 0,
1, yes, or no.
Name: start
Class: Start
Command-Line Switch: -start
Specifies the amount of space to place between the left or top edge of the
tabnotebook and the starting edge of its tabs. For horizontally positioned
tabs, this is the amount of space between the left edge of the notebook and
the left edge of the first tab. For vertically positioned tabs, this is the
amount of space between the top of the notebook and the top of the first
tab. This value may change if the user performs a MButton-2 scroll on the
tabs. This value may have any of the forms acceptable to Tk_GetPixels.
Name: state
Class: State
Command-Line Switch: -state
Sets the active state of the tabnotebook. Specifying normal allows
all pages to be selectable. Specifying disabled disables the notebook
causing all page tabs to be drawn in the disabledForeground color.
Name: tabBackground
Class: TabBackground
Command-Line Switch: -tabbackground
Specifies a background color to use for displaying tab backgrounds when
they are in their unselected state. This is the background associated with
tabs on all pages other than the selected page.
Name: tabBorders
Class: TabBorders
Command-Line Switch: -tabborders
Specifies whether to draw the borders of tabs that are not selected.
Specifying true (the default) draws these borders,
specifying false draws only the border around the selected tab. The
value may have any of the forms accepted by the Tcl_GetBoolean,
such as true, false, 0, 1, yes, or no.
Name: tabForeground
Class: TabForeground
Command-Line Switch: -tabforeground
Specifies a foreground color to use for displaying tab labels when they
are in their unselected state. This is the foreground associated with tabs
on all pages other than the selected page.
Name: tabPos
Class: TabPos
Command-Line Switch: -tabpos
Specifies the location of the set of tabs in relation to the notebook
area. Must be n, s, e, or w. Defaults to s.
DESCRIPTION
The tabnotebook command creates a new window (given by the pathName
argument) and makes it into a tabnotebook widget. Additional options,
described above may be specified on the command line or in the option
database to configure aspects of the tabnotebook such as its colors, font,
and text. The tabnotebook 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 tabnotebook is a widget that contains a set of tabbed pages. It
displays one page from the set as the selected page. A Tab displays the
label for the page to which it is attached and serves as a page
selector. When a page's tab is selected, the page's contents are displayed
in the page area. The selected tab has a three-dimensional effect to make
it appear to float above the other tabs. The tabs are displayed as a group
along either the left, top, right, or bottom edge. When first created a
tabnotebook has no pages. Pages may be added or deleted using widget
commands described below.
A special option may be provided to the tabnotebook. The -auto
option specifies whether the tabnotebook will automatically handle the
unpacking and packing of pages when pages are selected. A value of
true signifies that the notebook will automatically manage it. This is the
default value. A value of false signifies the notebook will not perform
automatic switching of pages.
NOTEBOOK PAGES
A tabnotebook's pages area contains a single child site frame. When a
new page is created it is a child of this frame. The page's child site
frame serves as a geometry container for applications to pack widgets
into. It is this frame that is automatically unpacked or packed when
the auto option is true. This creates the effect of one page being visible
at a time. When a new page is selected, the previously selected page's
child site frame is automatically unpacked from the tabnotebook's child
site frame and the newly selected page's child site is packed into the
tabnotebook's child site frame.
However, sometimes it is desirable to handle page changes in a different
manner. By specifying the auto option as false, child site
packing can be disabled and done differently. For example, all widgets
might be packed into the first page's child site frame. Then when
a new page is selected, the application can reconfigure the widgets
and give the appearance that the page was flipped.
In both cases the command option for a page specifies a Tcl Command
to execute when the page is selected. In the case of auto
being true, it is between the unpacking of the previously selected
page and the packing of the newly selected page.
Notebook pages can also be controlled with scroll bars or other widgets
that obey the scrollcommand protocol. By giving a scrollbar
a -command to call the tabnotebook's select method, the
tabnotebook can be controlled with a scrollbar.
The notebook area is implemented with the notebook mega widget.
TABS
Tabs appear along the edge of the notebook area. Tabs are drawn to appear
attached to their associated page. When a tab is clicked on, the associated
page is selected and the tab is drawn as raised above all other tabs and as
a seamless part of its notebook page. Tabs can be controlled in their
location along the edges, the angle tab sides are drawn with, gap between
tabs, starting margin of tabs, internal padding around text labels in
a tab, the font, and its label.
The Tab area is implemented with the tabset mega widget.
See tabset(1). Tabs may be oriented along either the north, south,
east, or west sides with the tabPos option. North and south tabs
may appear as angled, square, or bevelled. West and east tabs may appear
as square or bevelled. By changing tab gaps, tab angles, bevelling,
orientations, colors, fonts, start locations, and margins; tabs may appear
in a wide variety of styles. For example, it is possible to implement
Microsoft-style tabs, Borland property tab styles, or Borland Delphi
style tabs all with the same tabnotebook.
WIDGET-SPECIFIC METHODS
The tabnotebook command creates a new Tcl command whose name
is pathName. This command may be used to invoke various operations
on the widget. It has the following general form:
pathName option ?arg arg ...?
option and the args
determine the exact behavior of the command.
Many of the widget commands for a notebook take as one argument an
indicator of which page of the notebook to operate on. These indicators are
called indexes and may be specified in any of the following forms:
- number
- Specifies the page numerically, where 0 corresponds to the first page
in the notebook, 1 to the second, and so on.
- select
- Specifies the currently selected page's index. If no page is currently
selected, the value -1 is returned.
- end
- Specifes the last page in the tabnotebook's index. If the notebook is empty
this will return -1.
- pattern
- If the index doesn't satisfy any of the above forms, then this form is
used. Pattern is pattern-matched against the label of each page in the
notebook, in order from the first to the last page, until a matching entry
is found. The rules of Tcl_StringMatch are used.
'.............................................................................
The following commands are possible for tabnotebook widgets:
- pathName add ?option value option value ...?
- Add a new page at the end of the tabnotebook. A new child site frame is
created. Returns the child site pathName. If additional arguments are
present, they specify any of the following options:
- -angle value
- Specifes the angle of slope from the inner edge to the outer edge of the
tab. An angle of 0 specifies square tabs. Valid ranges are 0 to 45 degrees
inclusive. Default is 15 degrees. If this option is specified as an empty
string (the default), then the angle option for the overall tabnotebook
is used. This is generally only set at the tabnotebook level. Tabs normally
will want to share the same angle value.
- -background value
- Specifies a background color to use for displaying tabs when they are
selected and for displaying the current page. If this option is specified
as an empty string (the default), then the background option for the
overall tabnotebook is used.
- -bevelamount value
- Specifes the size of tab corners. A value of 0 with angle set to 0
results in square tabs. A bevelAmount of 4, means that the tab will be
drawn with angled corners that cut in 4 pixels from the edge of the tab.
The default is 0. This is generally only set at the tabnotebook level.
Tabs normally will want to share the same bevelAmount.
- -bitmap value
- If label is a non-empty string, specifies a bitmap to display in this
page's tab. Bitmap may be of any of the forms accepted by Tk_GetPixmap.
- -command value
- Specifies a Tcl command to be executed when this page is selected. This
allows the programmer a hook to reconfigure this page's widgets or any
other page's widgets.
If the tabnotebook has the auto option set to true, when a page is
selected this command will be called immediately after the previously
selected page is unpacked and immediately before this page is selected. The
index value select is valid during this Tcl command. `index select' will
return this page's page number.
If the auto option is set to false, when a page is selected the unpack
and pack calls are bypassed. This Tcl command is still called.
- -disabledforeground value
- Specifies a foreground color to use for displaying tab labels when tabs
are in their disable state. If this option is specified as an empty
string (the default), then the disabledforeground option for the overall
tabnotebook is used.
- -font value
- Specifies the font to use when drawing a text label on a page tab. If
this option is specified as an empty string then the font option for the
overall tabnotebook is used..
- -foreground value
- Specifies a foreground color to use for displaying tab labels when they are
selected. If this option is specified as an empty string (the default),
then the foreground option for the overall tabnotebook is used.
- -label value
- Specifies a string to display as an identifying label for a notebook
page. This label serves as an additional identifier used to reference the
page. This label may be used for the index value in widget commands.
- -tabbackground value
- Specifies a background color to use for displaying a tab when it is not
elected. If this option is specified as an empty string (the default), then
the tabBackground option for the overall tabnotebook is used.
- -tabforeground value
- Specifies a foreground color to use for displaying the tab's text label
when it is not selected. If this option is specified as an empty
string (the default), then the tabForeground option for the overall
tabnotebook is used.
- -padx value
- Specifies a non-negative value indicating how much extra space to request
for a tab around its label in the X-direction. When computing how large a
window it needs, the tab will add this amount to the width it would
normally need The tab will end up with extra internal space to the
left and right of its text label. This value may have any of the forms
acceptable to Tk_GetPixels. If this option is specified as an empty
string (the default), then the padX option for the overall tabnotebook is used
- -pady value
- Specifies a non-negative value indicating how much extra space to request
for a tab around its label in the Y-direction. When computing how large
a window it needs, the tab will add this amount to the height it would
normally need The tab will end up with extra internal space to the top and
bottom of its text label. This value may have any of the forms acceptable
to Tk_GetPixels. If this option is specified as an empty string (the
default), then the padY option for the overall tabnotebook is used
- -state value
- Specifies one of two states for the page: normal or disabled. In normal state
unselected tabs are displayed using the tabforeground and tabbackground
option from the tabnotebook or the page. Selected tabs and pages are
displayed using the foreground and background option from the tabnotebook or
the page. The disabled state means that the page and its tab is
insensitive: it doesn't respond to mouse button presses or releases. In this
state the entry is displayed according to its disabledForeground option for
the tabnotebook and the background/tabbackground option from the page or
the tabnotebook.
- '>>>>>>>>>>
- pathName childSite ?index?
If passed no arguments, returns a list of pathNames for all the pages
in the tabnotebook. If the tab notebook is empty, an empty list is returned
If index is passed, it returns the pathName for the page's
child site frame specified by index. Widgets that are created
with this pathName will be displayed when the associated page is
selected. If index is not a valid index, an empty string is returned.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget. If no option
is specified, returns a list describing all of the available options
for pathName (see Tk_ConfigureInfo for information on the
format of this list). If option is specified with no value, 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 option
is specified). If one or more option-value 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. Option may have any
of the values accepted by the tabnotebook command.
- pathName delete index1 ?index2?
- Delete all of the pages between index1 and index2 inclusive.
If index2 is omitted then it defaults to index1. Returns an
empty string.
- pathName index index
- Returns the numerical index corresponding to index.
- pathName insert index ?option value option value ...?
- Insert a new page in the tabnotebook before the page specified
by index. A new child site frame is created. The additional
arguments are the same as for the add command. Returns the
child site pathName.
- pathName next
- Advances the selected page to the next page (order is determined by
insertion order). If the currently selected page is the last page in
the notebook, the selection wraps around to the first page in the
notebook. It behaves as if the user selected the new page.
For notebooks with auto set to true the current page's
child site is unpacked from the notebook's child site frame. Then the next
page's child site is packed into the notebook's child site frame. The
Tcl command given with the command option will be invoked between these
two operations.
For notebooks with auto set to false the Tcl command given
with the command option will be invoked.
- pathName pageconfigure index ?option? ?value option value ...?
- This command is similar to the configure command, except that it
applies to the options for an individual page, whereas configure applies
to the options for the tabnotebook as a whole. Options may have
any of the values accepted by the add widget command. If options are
specified, options are modified as indicated in the command and the
command returns an empty string. If no options are specified, returns a
list describing the current options for page index (see Tk_ConfigureInfo
for information on the format of this list).
- pathName prev
- Moves the selected page to the previous page (order is determined by
insertion order). If the currently selected page is the first page in
the notebook, the selection wraps around to the last page in the notebook. It
behaves as if the user selected the new page.
For notebooks with auto set to true the current page's
child site is unpacked from the notebook's child site frame. Then the
previous page's child site is packed into the notebook's child site frame.
The Tcl command given with the command option will be invoked between these
two operations.
For notebooks with auto set to false the Tcl command given
with the command option will be invoked.
- pathName select index
- Selects the page specified by index as the currently selected page.
It behaves as if the user selected the new page.
For notebooks with auto set to true the current page's child
site is unpacked from the notebook's child site frame. Then the index
page's child site is packed into the notebook's child site frame. The
Tcl command given with the command option will be invoked between these two
operations.
For notebooks with auto set to false the Tcl command given
with the command option will be invoked.
- pathName view
- Returns the currently selected page. This command is for compatibility with
the scrollbar widget.
- pathName view index
- Selects the page specified by index as the currently selected page.
This command is for compatibility with the scrollbar widget.
- pathName view moveto fraction
- Uses the fraction value to determine the corresponding page to move to.
This command is for compatibility with the scrollbar widget.
- pathName view scroll num what
- Uses the num value to determine how many pages to move forward or
backward (num can be negative or positive). The what argument
is ignored. This command is for compatibility with the scrollbar widget.
COMPONENTS
Generally all behavior of the internal components, tabset
and notebook are controlled via the pageconfigure method.
The following section documents these two components.
Name: tabset
Class: Tabset
This is the tabset component. It implements the tabs that are associated
with the notebook component.
See the "Tabset" widget manual entry for details on
the tabset component item.
Name: notebook
Class: Notebook
This is the notebook component. It implements the notebook that contains the
pages of the tabnotebook.
See the "Notebook" widget manual entry for details on
the notebook component item.
EXAMPLE
Following is an example that creates a tabnotebook with two pages.
the
pack
-width
pack
nw
\\
-side
10
pages
#
and
add
.tn
Two"
Get
frames
pages.
childsite
[.tn
buttons
of
$page1CS.b
pack
-text
$page2CS.b
Select
of
select
|
tabnotebook
it.
100
.tn
\\
-expand
left
\\
#
to
labelled
"Page
-label
add
the
of
set
0]
childsite
on
the
-text
$page1CS.b
"Button
the
the
0
|
#
widget
tabnotebook
-height
\\
-fill
yes
\\
-pady
Add
the
"Page
Two"
"Page
-label
child
these
page1CS
set
"Page
#
each
tabnotebook.
"Button
button
Two"
|
Create
and
.tn
100
-anchor
both
\\
-padx
10
two
tabnotebook,
One"
.tn
One"
"Page
#
site
two
[.tn
page2CS
Two"]
Create
page
button
One"
$page2CS.b
pack
#
page
.tn
|
AUTHOR
Bill W. Scott
KEYWORDS
tab tabset notebook tabnotebook page
iwidgets-4.1.0/demos/html/tabset.n.html 0000644 0036047 0045461 00000051703 06570255573 016431 0 ustar dgp 771div tabset - create and manipulate tabs as as set
tabset - create and manipulate tabs as as set
SYNOPSIS
tabset pathName ?options?
INHERITANCE
itk::Widget <- tabset
STANDARD OPTIONS
background
foreground
width
|
font
selectForeground
|
selectBackground
disabledForeground
|
cursor
height
|
See the "options" manual entry for details on the standard options.
WIDGET-SPECIFIC OPTIONS
Name: angle
Class: Angle
Command-Line Switch: -angle
Specifes the angle of slope from the inner edge to the outer edge of the
tab. An angle of 0 specifies square tabs. Valid ranges are 0 to 45 degrees
inclusive. Default is 15 degrees. If tabPos is e or w, this option is ignored.
Name: backdrop
Class: Backdrop
Command-Line Switch: -backdrop
Specifies a background color to use when filling in the area behind the tabs.
Name: bevelAmount
Class: BevelAmount
Command-Line Switch: -bevelamount
Specifes the size of tab corners. A value of 0 with angle set to 0 results
in square tabs. A bevelAmount of 4, means that the tab will be
drawn with angled corners that cut in 4 pixels from the edge of the
tab. The default is 0.
Name: command
Class: Command
Command-Line Switch: -command
Specifes the prefix of a Tcl command to invoke to change the view in the
widget associated with the tabset. When a user selects a tab, a Tcl command
is invoked. The actual command consists of this option followed by a space
and a number. The number is the numerical index of the tab that has been
selected.
Name: equalTabs
Class: EqualTabs
Command-Line Switch: -equaltabs
Specifies whether to force tabs to be equal sized or not. A value
of true means constrain tabs to be equal sized. A value
of false allows each tab to size based on the text label size. The
value may have any of the forms accepted by the Tcl_GetBoolean, such
as true, false, 0, 1, yes, or no.
For horizontally positioned tabs (tabPos is either s
or n), true forces all tabs to be equal width (the width being
equal to the longest label plus any padX specified). Horizontal tabs are
always equal in height.
For vertically positioned tabs (tabPos is either w or e),
true forces all tabs to be equal height (the height being equal to
the height of the label with the largest font). Vertically oriented tabs are
always equal in width.
Name: gap
Class: Gap
Command-Line Switch: -gap
Specifies the amount of pixel space to place between each tab. Value may
be any pixel offset value. In addition, a special keyword overlap
can be used as the value to achieve a standard overlap of tabs. This value
may have any of the forms acceptable to Tk_GetPixels.
Name: margin
Class: Margin
Command-Line Switch: -margin
Specifies the amount of space to place between the outside edge of the
tabset and the outside edge of its tabs. If tabPos is s, this
is the amount of space between the bottom edge of the tabset and the
bottom edge of the set of tabs. If tabPos is n, this is the
amount of space between the top edge of the tabset and the top edge of the
set of tabs. If tabPos is e, this is the amount of space between
the right edge of the tabset and the right edge of the set of tabs.
If tabPos is w, this is the amount of space between the left
edge of the tabset and the left edge of the set of tabs. This value may
have any of the forms acceptable to Tk_GetPixels.
Name: padX
Class: PadX
Command-Line Switch: -padx
Specifies a non-negative value indicating how much extra space to request for
a tab around its label in the X-direction. When computing how large a
window it needs, the tab will add this amount to the width it would normally
need The tab will end up with extra internal space to the left and right of
its text label. This value may have any of the forms acceptable
to Tk_GetPixels.
Name: padY
Class: PadY
Command-Line Switch: -pady
Specifies a non-negative value indicating how much extra space to request
for a tab around its label in the Y-direction. When computing how large a
window it needs, the tab will add this amount to the height it would
normally need The tab will end up with extra internal space to the top and
bottom of its text label. This value may have any of the forms acceptable
to Tk_GetPixels.
Name: raiseSelect
Class: RaiseSelect
Command-Line Switch: -raiseselect
Specifes whether to slightly raise the selected tab from the rest of the
tabs. The selected tab is drawn 2 pixels closer to the outside edge of the
tabset than the unselected tabs. A value of true says to raise selected
tabs, a value of false turns this off. The default is false. The value may
have any of the forms accepted by the Tcl_GetBoolean, such
as true, false, 0, 1, yes, or no.
Name: start
Class: Start
Command-Line Switch: -start
Specifies the amount of space to place between the left or top edge of the
tabset and the starting edge of its tabs. For horizontally positioned tabs,
this is the amount of space between the left edge of the tabset and the left
edge of the first tab. For vertically positioned tabs, this is the amount
of space between the top of the tabset and the top of the first tab. This
value may change if the user performs a MButton-2 scroll on the tabs. This
value may have any of the forms acceptable to Tk_GetPixels.
Name: state
Class: State
Command-Line Switch: -state
Sets the active state of the tabset. Specifying normal allows all
tabs to be selectable. Specifying disabled disables the tabset
causing all tabs to be drawn in the disabledForeground color.
Name: tabBorders
Class: TabBorders
Command-Line Switch: -tabborders
Specifies whether to draw the borders of tabs that are not selected.
Specifying true (the default) draws these borders, specifying false
draws only the border around the selected tab. The value may have any
of the forms accepted by the Tcl_GetBoolean, such
as true, false, 0, 1, yes, or no.
Name: tabPos
Class: TabPos
Command-Line Switch: -tabpos
Specifies the location of the set of tabs in relation to another widget. Must
be n, s, e, or w. Defaults to s. North tabs
open downward, South tabs open upward. West tabs open to the right, east
tabs open to the left.
DESCRIPTION
The tabset command creates a new window (given by the pathName
argument) and makes it into a tabset widget. Additional options,
described above may be specified on the command line or in the option
database to configure aspects of the tabset such as its colors, font, and
text. The tabset 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 tabset is a widget that contains a set of Tab buttons. It displays
these tabs in a row or column depending on it tabpos. When a tab is
clicked on, it becomes the only tab in the tab set that is selected. All
other tabs are deselected. The Tcl command prefix associated with this
tab (through the command tab configure option) is invoked with the tab
index number appended to its argument list. This allows the tabset to
control another widget such as a Notebook.
TABS
Tabs are drawn to appear attached to another widget. The tabset draws an
edge boundary along one of its edges. This edge is known as the attachment
edge. This edge location is dependent on the value of tabPos. For
example, if tabPos is s, the attachment edge wil be on the
top side of the tabset (in order to attach to the bottom or south side of
its attached widget). The selected tab is draw with a 3d relief to appear
above the other tabs. This selected tab "opens" toward attachment edge.
Tabs can be controlled in their location along the edges, the angle that
tab sides are drawn with, gap between tabs, starting margin of tabs,
internal padding around labels in a tab, the font, and its text or bitmap.
WIDGET-SPECIFIC METHODS
The tabset command creates a new Tcl command whose name
is pathName. This command may be used to invoke various operations on
the widget. It has the following general form:
pathName option ?arg arg ...?
option and the args
determine the exact behavior of the command.
Many of the widget commands for a tabset take as one argument an indicator
of which tab of the tabset to operate on. These indicators are called indexes
and may be specified in any of the following forms:
- number
- Specifies the tab numerically, where 0 corresponds to the first tab in
the tab set, 1 to the second, and so on.
- select
- Specifies the currently selected tab's index. If no tab is currently
selected, the value -1 is returned.
- end
- Specifes the last tab in the tabset's index. If the tabset is empty this
will return -1.
- pattern
- If the index doesn't satisfy any of the above forms, then this form is
used. Pattern is pattern-matched against the label of each tab in the
tabset, in order from the first to the last tab, until a matching entry is
found. The rules of Tcl_StringMatch are used.
'.............................................................................
The following commands are possible for tabset widgets:
- pathName add ?option value option value ...?
- Add a new tab at the end of the tabset. Returns the child
site pathName. If additional arguments are present, they specify
any of the following options:
- -angle value
- Specifes the angle of slope from the inner edge to the outer edge of
the tab. An angle of 0 specifies square tabs. Valid ranges are 0 to
45 degrees inclusive. Default is 15 degrees. If this option is specified as
an empty string (the default), then the angle option for the overall tabset
is used.
- -background value
- Specifies a background color to use for displaying tabs when they are in
their normal state (unselected). If this option is specified as an empty
string (the default), then the background option for the overall tabset is
used.
- -bevelamount value
- Specifes the size of tab corners. A value of 0 with angle set to 0 results
in square tabs. A bevelAmount of 4, means that the tab will be drawn with
angled corners that cut in 4 pixels from the edge of the tab. The default is
0. This is generally only set at the tabset configuration level. Tabs
normally will want to share the same bevelAmount.
- -bitmap value
- If label is a non-empty string, specifies a bitmap to display in the
tab. Bitmap may be of any of the forms accepted by Tk_GetBitmap.
- -disabledforeground value
- Specifies a foreground color to use for displaying tab labels when tabs are
in their disable state. If this option is specified as an empty
string (the default), then the disabledforeground option for the overall
tabset is used.
- -font value
- Specifies the font to use when drawing the label on a tab. If this option
is specified as an empty string then the font option for the overall
tabset is used.
- -foreground value
- Specifies a foreground color to use for displaying tab labels when tabs
are in their normal unselected state. If this option is specified as an
empty string (the default), then the foreground option for the overall
tabset is used.
- -image value
- If label is a non-empty string, specifies an image to display in the
tab. Image 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; the image
option may be reset to an empty string to re-enable a bitmap or text display.
- -label value
- Specifies a text string to be placed in the tabs label. If this value is
set, the bitmap option is overridden and this option is used instead. This
label serves as an additional identifier used to reference the tab. This
label may be used for the index value in widget commands.
- -selectbackground value
- Specifies a background color to use for displaying the selected tab. If
this option is specified as an empty string (the default), then the
selectBackground option for the overall tabset is used.
- -selectforeground value
- Specifies a foreground color to use for displaying the selected tab. If
this option is specified as an empty string (the default), then the
selectForeground option for the overall tabset is used.
- -padx value
- Specifies a non-negative value indicating how much extra space to request
for a tab around its label in the X-direction. When computing how large
a window it needs, the tab will add this amount to the width it would
normally need The tab will end up with extra internal space to the left
and right of its text label. This value may have any of the forms acceptable
to Tk_GetPixels. If this option is specified as an empty string (the
default), then the padX option for the overall tabset is used
- -pady value
- Specifies a non-negative value indicating how much extra space to request
for a tab around its label in the Y-direction. When computing how large
a window it needs, the tab will add this amount to the height it would
normally need The tab will end up with extra internal space to the top
and bottom of its text label. This value may have any of the forms
acceptable to Tk_GetPixels. If this option is specified as an empty
string (the default), then the padY option for the overall tabset is used
- -state value
- Sets the state of the tab. Specifying normal allows this tab to be
selectable. Specifying disabled disables the this tab causing its tab label
to be drawn in the disabledForeground color. The tab will not respond to
events until the state is set back to normal.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget. If no option
is specified, returns a list describing all of the available options
for pathName (see Tk_ConfigureInfo for information on the
format of this list). If option is specified with no value, 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 option
is specified). If one or more option-value 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. Option may have any
of the values accepted by the tabset command.
- pathName delete index1 ?index2?
- Delete all of the tabs between index1 and index2 inclusive.
If index2 is omitted then it defaults to index1. Returns an
empty string.
- pathName index index
- Returns the numerical index corresponding to index.
- pathName insert index ?option value option value ...?
- Insert a new tab in the tabset before the tab specified by index. The
additional arguments are the same as for the add command. Returns
the tab's pathName.
- pathName next
- Advances the selected tab to the next tab (order is determined by insertion
order). If the currently selected tab is the last tab in the tabset, the
selection wraps around to the first tab. It behaves as if the user
selected the next tab.
- pathName tabconfigure index ?option? ?value?
- This command is similar to the configure command, except that it
applies to the options for an individual tab, whereas configure applies to
the options for the tabset as a whole. Options may have any of the values
accepted by the add widget command. If options are specified, options
are modified as indicated in the command and the command returns an empty
string. If no options are specified, returns a list describing the current
options for tab index (see Tk_ConfigureInfo for information on
the format of this list).
- pathName prev
- Moves the selected tab to the previous tab (order is determined by insertion
order). If the currently selected tab is the first tab in the tabset, the
selection wraps around to the last tab in the tabset. It behaves as if
the user selected the previous tab.
- pathName select index
- Selects the tab specified by index as the currently selected tab. It
behaves as if the user selected the new tab.
EXAMPLE
Following is an example that creates a tabset with two tabs and a list box
that the tabset controls. In addition selecting an item from the list
also selects the corresponding tab.
a
how
item
list
from
callback.
item
selection
.l
.l
proc
to
#
pixel
list..
y
whichItem
.ts
a
items
#
1
selectTab
-selectmode
.l
.l
.l
pack
<ButtonPress-1>
}
Create
its
selectItem
labels
(one
.ts
add
add
select
-fill
|
proc
to
#
given
the
proc
}
clear
selection
see
#
that
select
given
coordinate
proc
}
[.l
select
listbox
(one
and
press
procedure.
single
insert
insert
selection
.l
{
a
-command
#
to
and
-command
-label
-label
0
x
|
#
that
select
from
an
tabset
selectItem
{
[.l
set
$item
Define
knows
a
a
from
selectTab
{
nearest
$whichItem
#
with
and
bind
to
listbox
-exportselection
end
end
set
bind
selectTab
tabset,
to
Add
the
two).
selectItem
1
2
pack
-expand
|
Define
knows
an
a
index
-command
{
.l
curselection]
$item
}
a
how
tab
y
the
{
set
$y]
}
Create
two
two)
button
the
.l
false
one
two
0
.l
%y
#
set
call
two
tabset
tabset
.ts
.ts
.ts
.ts
no
|
AUTHOR
Bill W. Scott
KEYWORDS
tab tabset notebook tabnotebook
iwidgets-4.1.0/demos/html/timeentry.n.html 0000644 0036047 0045461 00000015112 07347201773 017155 0 ustar dgp 771div timeentry - Create and manipulate a timeentry widget
timeentry - Create and manipulate a timeentry widget
SYNOPSIS
timeentry pathName ?options?
INHERITANCE
itk::Widget <- LabeledWidget <- Timefield <- Timeentry
STANDARD OPTIONS
background
foreground
justify
|
borderWidth
highlightColor
relief
|
cursor
highlightThickness
|
exportSelection
insertBackground
|
See the "options" manual entry for details on the standard options.
INHERITED OPTIONS
disabledForeground
labelMargin
state
|
labelBitmap
labelPos
|
labelFont
labelText
|
labelImage
labelVariable
|
See the "labeledwidget" class manual entry for details on these
inherited options.
command
textFont
|
format
|
seconds
|
textBackground
|
See the "timefield" class manual entry for details on these
inherited options.
ASSOCIATED OPTIONS
hourRadius
pivotRadius
clockColor
watchWidth
|
hourColor
pivotColor
clockStipple
|
minuteRadius
secondRadius
tickColor
|
minuteColor
secondColor
watchHeight
|
See the "watch" manual entry for details on the associated options.
WIDGET-SPECIFIC OPTIONS
Name: closeText
Class: Text
Command-Line Switch: -closetext
Specifies the text to be displayed on the close button of the watch
popup. The default is Close.
Name: grab
Class: Grab
Command-Line Switch: -grab
Specifies the grab level, local or global, to be obtained before
bringing up the popup watch. The default is global. For more information
concerning grab levels, consult the documentation for Tk's grab command.
Name: icon
Class: Icon
Command-Line Switch: -icon
Specifies the watch icon image to be used in the timeentry.
This image must have been created previously with
the image create command. Should one not be provided,
then one will be generated, pixmap if possible, bitmap otherwise.
Name: state
Class: State
Command-Line Switch: -state
Specifies the state of the widget which may be disabled or
normal. A disabled state prevents selection of the timefield
or time icon button.
DESCRIPTION
The timeentry command creates a time entry field
with a popup watch by combining the timefield and watch
widgets together. This allows a user to enter the time via the
keyboard or by using the mouse and selecting the watch icon
which brings up a popup watch.
METHODS
The timeentry command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for timeentry widgets:
INHERITED METHODS
See the "timefield" manual entry for details on the associated methods.
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the timeentry
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the timeentry
command.
COMPONENTS
Name: label
Class: Label
The label component provides a label component to used to identify the time.
See the "label" widget manual entry for details on the label component item.
Name: iconbutton
Class: Label
The iconbutton component provides a labelbutton component to act as a
lightweight button
displaying the watch icon. Upon pressing the labelbutton, the watch
appears. See the "label" widget manual entry for details on the
labelbutton component item.
Name: time
Class: Entry
The time component provides the entry field for time input and display.
See the "entry" widget manual entry for details on the time component item.
EXAMPLE
timeentry .te
pack .te
AUTHOR
Mark L. Ulferts
KEYWORDS
timeentry, widget
iwidgets-4.1.0/demos/html/timefield.n.html 0000644 0036047 0045461 00000013515 07347202003 017067 0 ustar dgp 771div timefield - Create and manipulate a time field widget
timefield - Create and manipulate a time field widget
SYNOPSIS
timefield pathName ?options?
INHERITANCE
itk::Widget <- LabeledWidget <- timefield
STANDARD OPTIONS
background
foreground
justify
|
borderWidth
highlightColor
relief
|
cursor
highlightThickness
|
exportSelection
insertBackground
|
See the "options" manual entry for details on the standard options.
INHERITED OPTIONS
disabledForeground
labelMargin
state
|
labelBitmap
labelPos
|
labelFont
labelText
|
labelImage
labelVariable
|
See the "labeledwidget" class manual entry for details on the
inherited options.
WIDGET-SPECIFIC OPTIONS
Name: childSitePos
Class: Position
Command-Line Switch: -childsitepos
Specifies the position of the child site in the time field: n,
s, e, or w. The default is e.
Name: command
Class: Command
Command-Line Switch: -command
Specifies a Tcl command to be executed upon detection of a Return key
press event.
Name: state
Class: State
Command-Line Switch: -state
Specifies one of two states for the timefield: normal or disabled.
If the timefield is disabled then input is not accepted. The default is
normal.
Name: textBackground
Class: Background
Command-Line Switch: -textbackground
Background color for inside textual portion of the entry field. The value
may be given in any of the forms acceptable to Tk_GetColor.
Name: textFont
Class: Font
Command-Line Switch: -textfont
Name of font to use for display of text in timefield. The value
may be given in any of the forms acceptable to Tk_GetFont.
DESCRIPTION
The timefield command creates an enhanced text entry widget for
the purpose of time entry with various degrees of built-in intelligence.
METHODS
The timefield command creates a new Tcl command whose
name is pathName. This
command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for timefield widgets:
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the timefield
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the timefield
command.
- pathName get ?format?
- Returns the current contents of the timefield in a format of
string or as an integer clock value using the -string and -clicks
format options respectively. The default is by string. Reference the
clock command for more information on obtaining times and their
formats.
- pathName isvalid
- Returns a boolean indication of the validity of the currently
displayed time value. For example, 12:59:59 is valid whereas
25:59:59 is invalid.
- pathName show time
- Changes the currently displayed time to be that of the time
argument. The time may be specified either as a string, an
integer clock value or the keyword "now" (the default).
Reference the clock command for more information on obtaining
times and their formats.
COMPONENTS
Name: time
Class: Entry
The time component provides the entry field for time input and display.
See the "entry" widget manual entry for details on the time component item.
EXAMPLE
proc returnCmd {} {
puts [.tf get]
}
timefield .tf -command returnCmd
pack .tf -fill x -expand yes -padx 10 -pady 10
AUTHOR
John A. Tucker
Mark L. Ulferts
KEYWORDS
timefield, widget
iwidgets-4.1.0/demos/html/toolbar.n.html 0000644 0036047 0045461 00000032560 07015107776 016605 0 ustar dgp 771div toolbar - Create and manipulate a tool bar
toolbar - Create and manipulate a tool bar
SYNOPSIS
toolbar pathName ?options?
STANDARD OPTIONS
activeBackground
activeForeground
background
borderWidth
cursor
|
disabledForeground
font
foreground
highlightBackground
highlightColor
|
highlightThickness
insertBackground
insertForeground
orient
selectBackground
|
selectBorderWidth
selectColor
selectForeground
state
troughColor
|
See the "options" manual entry for details on the standard options. For widgets
added to the toolbar, these options will be propogated if the widget supports
the option. For example, all widgets that support a font option will be changed
if the the toolbar's font option is configured.
WIDGET-SPECIFIC OPTIONS
Name: balloonBackground
Class: BalloonBackground
Command-Line Switch: -ballooonbackground
Specifies the background color of the balloon help displayed at the bottom
center of a widget on the toolbar that has a non empty string for its
balloonStr option. The default color is yellow.
Name: balloonDelay1
Class: BalloonDelay1
Command-Line Switch: -balloondelay1
Specifies the length of time (in milliseconds) to wait before initially
posting a balloon help hint window. This delay is in effect whenever 1)
the mouse leaves the toolbar, or 2) a toolbar item is selected with the
mouse button.
Name: balloonDelay2
Class: BalloonDelay2
Command-Line Switch: -balloondelay2
Specifies the length of time (in milliseconds) to wait before continuing to
post balloon help hint windows. This delay is in effect after the first
time a balloon hint window is activated. It remains in effect until 1) the
mouse leaves the toolbar, or 2) a toolbar item is selected with the mouse
button.
Name: balloonFont
Class: BalloonFont
Command-Line Switch: -balloonfont
Specifies the font of the balloon help text displayed at the bottom center
of a widget on the toolbar that has a non empty string for its
balloonStr option. The default font is 6x10.
Name: balloonForeground
Class: BalloonForeground
Command-Line Switch: -ballooonforeground
Specifies the foreground color of the balloon help displayed at the
bottom center of a widget on the toolbar that has a non empty string for
its balloonStr option. The default color is black.
Name: helpVariable
Class: HelpVariable
Command-Line Switch: -helpvariable
Specifies the global variable to update whenever the mouse is in motion
over a toolbar widget. This global variable is updated with the current
value of the active widget's helpStr. Other widgets can "watch" this
variable with the trace command, or as is the case with entry or label
widgets, they can set their textVariable to the same global variable. This
allows for a simple implementation of a help status bar. Whenever the
mouse leaves a menu entry, the helpVariable is set to the empty string {}.
Name: orient
Class: Orient
Command-Line Switch: -orient
Specifies the orientation of the toolbar. Must be either horizontal or
vertical.
DESCRIPTION
The toolbar command creates a new window (given by the pathName
argument) and makes it into a toolbar widget. Additional options,
described above may be specified on the command line or in the option
database to configure aspects of the toolbar such as its colors, font,
and orientation. The toolbar 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 toolbar is a widget that displays a collection of widgets arranged
either in a row or a column (depending on the value of the -orient option).
This collection of widgets is usually for user convenience to give access
to a set of commands or settings. Any widget may be placed on a toolbar.
However, command or value-oriented widgets (such as button, radiobutton,
etc.) are usually the most useful kind of widgets to appear on a toolbar.
In addition, the toolbar adds two new options to all widgets that are added to
it. These are the helpStr and balloonStr options. See the
discussion for the widget command add below.
WIDGET-SPECIFIC METHODS
The toolbar command creates a new Tcl command whose name is pathName. This
command may be used to invoke various operations on the widget. It has the
following general form:
pathName option ?arg arg ...?
Option and args determine the exact behavior of the command.
Many of the widget commands for a toolbar take as one argument an indicator of
which widget item of the toolbar to operate on. The indicator is called
an index and may be specified in any of the following forms:
- number
- Specifies the widget numerically, where 0 corresponds to the first
widget in the notebook, 1 to the second, and so on. (For horizontal, 0 is the
leftmost; for vertical, 0 is the topmost).
- end
- Specifes the last widget in the toolbar's index. If the toolbar is
empty this will return -1.
- last
- Same as end.
- pattern
- If the index doesn't satisfy any of the above forms, then this form is
used. Pattern is pattern-matched against the widgetName of each widget in the
toolbar, in order from the first to the last widget, until a matching entry is
found. An exact match must occur.
The following commands are possible for toolbar widgets:
- pathName add widgetCommand widgetName ?option value?
- Adds a widget with the command widgetCommand whose name is widgetName to the
toolbar. If widgetCommand is radiobutton or checkbutton, its packing is
slightly padded to match the geometry of button widgets. In addition, the
indicatorOn option is false by default and the selectColor is that of the
toolbar background by default. This allows Radiobutton and Checkbutton widgets
to be added as icons by simply setting their bitmap or image options. If
additional arguments are present, they are the set of available options
that the widget type of widgetCommand supports. In addition they may
also be one of the following options:
- -helpstr value
- Specifes the help string to associate with the widget. When the mouse moves
over the widget, the variable denoted by helpVariable is set
to helpStr. Another widget can bind to the helpVariable and thus
track status help.
- -balloonstr value
- Specifes the string to display in a balloon window for this widget. A
balloon window is a small popup window centered at the bottom of the
widget. Usually the balloonStr value is the name of the item on the
toolbar. It is sometimes known as a hint window.
When the mouse moves into an item on the toolbar, a timer is set based on
the value of balloonDelay1. If the mouse stays inside the item
for balloonDelay1, the balloon window will pop up displaying
the balloonStr value. Once the balloon window is posted, a new
timer based on balloonDelay2 is set. This is typically a shorter
timer. If the mouse is moved to another item, the window is unposted and
a new window will be posted over the item if the shorter delay time is
satisfied.
While the balloon window is posted, it can also be unposted if the item
is selected. In this case the timer is reset to balloonDelay1.
Whenever the mouse leaves the toolbar, the timer is also reset
to balloonDelay1.
This window posting/unposting model is the same model used in the
Windows95 environment.
- pathName cget option
- Returns the current value of the configuration option given by option.
- pathName configure ?option value?
- Query or modify the configuration options of the widget. If no option is
specified, returns a list describing all of the available options for pathName
(see Tk_ConfigureInfo for information on the format of this list). If
option is specified with no value, 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 option is specified). If one or more option-value 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.
- pathName delete index ?index2?
- This command deletes all items between index and index2
inclusive. If index2 is omitted then it defaults to index.
Returns an empty string.
- pathName index index
- Returns the widget's numerical index for the entry corresponding
to index. If index is not found, -1 is returned.
- pathName insert beforeIndex widgetCommand widgetName ?option value?
- Insert a new item named widgetName with the
- command widgetCommand before the item specified by beforeIndex.
If widgetCommand is radiobutton or checkbutton, its
packing is slightly padded to match the geometry of button widgets. In
addition, the indicatorOn option is false by default and the
selectColor is that of the toolbar background by default. This allows
Radiobutton and Checkbutton widgets to be added as icons by
simply setting their bitmap or image options. The set of
available options is the same as specified in the ad command.
- pathName itemcget index option
- Returns the current value of the configuration option given by option for
index. The item type of index determines the valid available options.
- pathName itemconfigure index ?option value?
- Query or modify the configuration options of the widget of the toolbar
specified by index. If no option is specified,
returns a list describing all of
the available options for index
(see Tk_ConfigureInfo for information on the
format of this list). If option is specified with no value,
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 option is specified). If
one or more option-value 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. The item type of index determines the valid
available options. The set of available options is the same as specified
in the ad command.
EXAMPLE
toolbar .tb -helpvariable statusVar
.tb add button item1 \\
-helpstr "Save It" -bitmap @./icons/Tool_32_box.xbm \\
-balloonstr "Save" -command {puts 1}
.tb add button item2 \\
-helpstr "Save It" -bitmap @./icons/Tool_32_brush.xbm \\
-balloonstr "Save" -command {puts 1}
.tb add button item3 \\
-helpstr "Save It" -bitmap @./icons/Tool_32_cut.xbm \\
-balloonstr "Save" -command {puts 1}
.tb add button item4 \\
-helpstr "Save It" -bitmap @./icons/Tool_32_draw.xbm \\
-balloonstr "Save" -command {puts 1}
.tb add button item5 \\
-bitmap @./icons/Tool_32_erase.xbm -helpstr "Play It" \\
-command {puts 2}
.tb add frame filler \\
-borderwidth 1 -width 10 -height 10
.tb add radiobutton item6 \\
-bitmap @./icons/Tool_32_oval.xbm -command {puts 4} \\
-variable result -value OPEN -helpstr "Radio Button # 1" \\
-balloonstr "Radio"
.tb add radiobutton item7 \\
-bitmap @./icons/Tool_32_line.xbm -command {puts 5} \\
-variable result -value CLOSED
.tb add checkbutton item8 \\
-bitmap @./icons/Tool_32_text.xbm -command {puts 6} \\
-variable checkit -onvalue yes -offvalue no
.tb add checkbutton check2 \\
-bitmap @./icons/Tool_32_points.xbm -command {puts 7} \\
-variable checkit2 -onvalue yes -offvalue no
pack .tb -side top -anchor nw
AUTHOR
Bill Scott
KEYWORDS
toolbar, button, radiobutton, checkbutton, iwidgets, widget
iwidgets-4.1.0/demos/html/watch.n.html 0000644 0036047 0045461 00000021406 07347202012 016231 0 ustar dgp 771div watch - Create and manipulate time with a watch widgets
watch - Create and manipulate time with a watch widgets
SYNOPSIS
watch pathName ?options?
INHERITANCE
itk::Widget <- Watch
STANDARD OPTIONS
background
|
cursor
|
foreground
|
relief
|
See the "options" manual entry for details on the standard options.
ASSOCIATED OPTIONS
See the "Canvas" manual entry for details on the above associated options.
WIDGET-SPECIFIC OPTIONS
Name: clockColor
Class: ColorfR
Command-Line Switch: -clockcolor
Fill color for the main oval encapsulating the watch, in any of the forms
acceptable to Tk_GetColor. The default is "White".
BitmapfR
|
Name:
Command-Line
|
clockStipple
Switch:
|
Class:
-clockstipple
|
Bitmap for the main oval encapsulating the watch, in any of the forms
acceptable to Tk_GetBitmap. The default is "".
Name: height
Class: Height
Command-Line Switch: -height
Specifies the height of the watch widget in any of the forms
acceptable to Tk_GetPixels. The default height is 175 pixels.
Name: hourColor
Class: ColorfR
Command-Line Switch: -hourcolor
Fill color for the hour hand, in any of the forms acceptable to Tk_GetColor.
The default is "Red".
Name: hourRadius
Class: Radius
Command-Line Switch: -hourradius
Specifies the radius of the hour hand as a percentage of the radius
from the center to the out perimeter of the clock.
The value must be a fraction <= 1. The default is ".5".
Name: minuteColor
Class: ColorfR
Command-Line Switch: -minutecolor
Fill color for the minute hand, in any of the forms acceptable to Tk_GetColor.
The default is "Yellow".
Name: minuteRadius
Class: Radius
Command-Line Switch: -minuteradius
Specifies the radius of the minute hand as a percentage of the radius
from the center to the out perimeter of the clock.
The value must be a fraction <= 1. The default is ".8".
Name: pivotColor
Class: ColorfR
Command-Line Switch: -pivotcolor
Fill color for the circle in which the watch hands rotate
in any of the forms acceptable to Tk_GetColor.
The default is "White".
Name: pivotRadius
Class: Radius
Command-Line Switch: -pivotradius
Specifies the radius of the circle in which the watch hands rotate
as a percentage of the radius. The value must be a fraction <= 1.
The default is ".1".
Name: secondColor
Class: ColorfR
Command-Line Switch: -secondcolor
Fill color for the second hand, in any of the forms acceptable to Tk_GetColor.
The default is "Black".
Name: secondRadius
Class: Radius
Command-Line Switch: -secondradius
Specifies the radius of the second hand as a percentage of the radius
from the center to the out perimeter of the clock.
The value must be a fraction <= 1. The default is ".9".
Name: showAmPm
Class: ShosAmPm
Command-Line Switch: -showampm
Specifies whether the AM/PM radiobuttons should be displayed, in any
of the forms acceptable to Tcl_GetBoolean. The default is yes.
Name: state
Class: State
Command-Line Switch: -state
Specifies the editable state for the hands on the watch. In a normal
state, the user can select and move the hands via mouse button 1. The
valid values are normal, and disabled. The defult is normal.
Name: tickColor
Class: ColorfR
Command-Line Switch: -tickcolor
Fill color for the 60 ticks around the perimeter of the watch,
in any of the forms acceptable to Tk_GetColor. The default is "Black".
Name: width
Class: Width
Command-Line Switch: -width
Specifies the width of the watch widget in any of the forms
acceptable to Tk_GetPixels. The default height is 155 pixels.
DESCRIPTION
The watch command creates a watch with hour, minute, and
second hands modifying the time value.
METHODS
The watch command creates a new Tcl command whose
name is pathName. This command may be used to invoke various
operations on the widget. It has the following general form:
pathName option ?arg arg ...?
Option and the args
determine the exact behavior of the command. The following
commands are possible for watch widgets:
WIDGET-SPECIFIC METHODS
- pathName cget option
- Returns the current value of the configuration option given
by option.
Option may have any of the values accepted by the watch
command.
- pathName configure ?option? ?value option value ...?
- Query or modify the configuration options of the widget.
If no option is specified, returns a list describing all of
the available options for pathName (see Tk_ConfigureInfo for
information on the format of this list). If option is specified
with no value, 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 option is specified). If
one or more option-value 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.
Option may have any of the values accepted by the watch
command.
- pathName get ?format?
- Returns the current time of the watch in a format of
string or as an integer clock value using the -string and -clicks
format options respectively. The default is by string. Reference the
clock command for more information on obtaining time and its
formats.
- pathName show time
- Changes the currently displayed time to be that of the time
argument. The time may be specified either as a string, an
integer clock value or the keyword "now". Reference the clock
command for more information on obtaining time and its format.
- pathName watch ?args?
- Evaluates the specifieds args against the canvas component.
COMPONENTS
Name: canvas
Class: Canvas
The canvas component is the where the clock is drawn. See the
Canvas widget manual entry for details.
Name: frame
Class: Frame
The frame component is the where the "AM" and "PM" radiobuttons are displayed.
See the Frame widget manual entry for details.
Name: am
Class: Radiobutton
The am component indicates whether on not the time is relative to "AM".
See the Radiobutton widget manual entry for details.
Name: pm
Class: Radiobutton
The pm component indicates whether on not the time is relative to "PM".
See the Radiobutton widget manual entry for details.
EXAMPLE
watch .w -state disabled -showampm no -width 155 -height 155
pack .w -padx 10 -pady 10 -fill both -expand yes
while {1} {
after 1000
.w show
update
}
AUTHORS
John Tucker
Mark L. Ulferts
KEYWORDS
watch, hand, ticks, pivot, widget
iwidgets-4.1.0/demos/buttonbox 0000644 0036047 0045461 00000000652 07340260050 015003 0 ustar dgp 771div # ----------------------------------------------------------------------
# DEMO: buttonbox in [incr Widgets]
# ----------------------------------------------------------------------
package require Iwidgets 4.0
iwidgets::buttonbox .bb
.bb add OK -text OK -command "puts OK"
.bb add Apply -text Apply -command "puts Apply"
.bb add Cancel -text Cancel -command "puts Cancel"
.bb default OK
pack .bb -expand yes -fill both
iwidgets-4.1.0/demos/calendar 0000644 0036047 0045461 00000001434 07340260063 014533 0 ustar dgp 771div # ----------------------------------------------------------------------
# DEMO: calendar in [incr Widgets]
# ----------------------------------------------------------------------
package require Iwidgets 4.0
option add *Calendar.buttonForeground black
option add *Calendar.outline black
option add *Calendar.weekdayBackground white
option add *Calendar.weekendBackground mistyrose
option add *Calendar.selectColor red
. configure -background white
iwidgets::calendar .cal
pack .cal -expand yes -fill both
iwidgets::optionmenu .days -labeltext "Start Day:" -command {
set day [.days get]
.cal configure -startday $day -days $caldays($day)
}
pack .days -padx 4 -pady 4
array set caldays {
sunday {S M T W T F S}
monday {Mo Tu We Th Fr Sa Su}
}
.days insert end sunday monday
iwidgets-4.1.0/demos/canvasprintbox 0000644 0036047 0045461 00000001171 07340260103 016014 0 ustar dgp 771div # ----------------------------------------------------------------------
# DEMO: canvasprintbox in [incr Widgets]
# ----------------------------------------------------------------------
package require Iwidgets 4.0
option add *textBackground seashell
#
# Make a canvas for the main application:
#
canvas .c -width 200 -height 200 -background white
pack .c
.c create rectangle 30 30 150 150 -fill blue
.c create oval 70 70 190 190 -fill red
.c create polygon 60 50 110 180 10 180 -fill green
.c create text 100 5 -anchor n -text "Example Drawing"
iwidgets::canvasprintbox .pcb -printcmd "lpr" -pagesize "A4"
.pcb setcanvas .c
iwidgets-4.1.0/demos/canvasprintdialog 0000644 0036047 0045461 00000001522 07340260112 016463 0 ustar dgp 771div # ----------------------------------------------------------------------
# DEMO: canvasprintdialog in [incr Widgets]
# ----------------------------------------------------------------------
package require Iwidgets 4.0
option add *textBackground seashell
#
# Make a canvas for the main application:
#
canvas .c -width 200 -height 200 -background white
pack .c
.c create rectangle 30 30 150 150 -fill blue
.c create oval 70 70 190 190 -fill red
.c create polygon 60 50 110 180 10 180 -fill green
.c create text 100 5 -anchor n -text "Example Drawing"
button .print -text "Print..." -command {
if {[.pcd activate]} {
puts "use command \".pcd print\" to really print"
} else {
puts "aborted"
}
}
pack .print
iwidgets::canvasprintdialog .pcd -modality application \
-printcmd "lpr" -pagesize "A4"
.pcd setcanvas .c
iwidgets-4.1.0/demos/catalog 0000644 0036047 0045461 00000031474 10625401371 014402 0 ustar dgp 771div #!/bin/sh
# ----------------------------------------------------------------------
# PROGRAM: demo program for [incr Widgets]
# ----------------------------------------------------------------------
# Michael J. McLennan
# Bell Labs Innovations for Lucent Technologies
# mmclennan@lucent.com
# http://www.tcltk.com/itcl/
# ======================================================================
# Copyright (c) 1993-1998 Lucent Technologies, Inc.
# ======================================================================
#\
exec wish8.4 "$0"
package require Iwidgets 4.0
# ----------------------------------------------------------------------
option add *Scrolledtext.textBackground white startupFile
option add *Scrolledlistbox.textBackground white startupFile
option add *Scrolledhtml.textBackground white startupFile
option add *Scrolledhtml.padX 10 startupFile
option add *boxColor blue startupFile
option add *boxTextColor white startupFile
# ----------------------------------------------------------------------
global selfdir
set selfdir [file normalize [file dirname [info script]]]
# ----------------------------------------------------------------------
# USAGE: iw_demo_file
#
# Returns the proper demo file name for a demo called .
# ----------------------------------------------------------------------
proc iw_demo_file {name} {
global selfdir
return [file join $selfdir $name]
}
# ----------------------------------------------------------------------
# USAGE: iw_demo_manpage
#
# Returns the proper man page file for a demo called .
# ----------------------------------------------------------------------
proc iw_demo_manpage {name} {
global selfdir
return [file join $selfdir html $name.n.html]
}
# ----------------------------------------------------------------------
# USAGE: iw_load_demo
#
# Loads a demo program with the given . Demos can be written
# as if they will pop up in the main application window, but they will
# pop up inside the tab notebook instead.
# ----------------------------------------------------------------------
proc iw_load_demo {name} {
global widgets
catch {eval destroy [winfo children $widgets(info-example)]}
iw_lock on
iw_status "Loading..."
set win [frame $widgets(info-example).inner]
pack $win -expand yes
set loadcmd {
set fid [open [iw_demo_file $name] r]
set code [read $fid]
close $fid
}
if {[catch $loadcmd result] == 0} {
regsub -all "(\"|\{|\\\[| |\n|^|\t)((\\.\[A-Za-z0-9\]+)+)" \
$code "\\1$win\\2" code
regsub -all "(\"|\{|\\\[| |\n|^)(\\. )" \
$code "\\1$win " code
if {[catch {uplevel #0 $code} result] == 0} {
$widgets(info-code) clear
$widgets(info-code) import [iw_demo_file $name]
iw_draw_hier $name
iw_load_manpage $name
iw_lock off
iw_status ""
return
}
}
catch {eval destroy [winfo children $win]}
label $win.err -background white -wraplength 4i \
-text "Can't load demo:\n$result"
pack $win.err -expand yes
iw_lock off
iw_status ""
}
# overload a few critical functions that might be used by demo programs...
rename exit tcl_exit
proc exit {{status 0}} {
# do nothing
}
rename puts tcl_puts
proc puts {args} {
global widgets
if {[llength $args] == 1} {
iw_status [lindex $args 0]
} else {
eval tcl_puts $args
}
}
# ----------------------------------------------------------------------
# USAGE: iw_load_manpage
#
# Loads the man page for the current demo. Man pages are not
# automatically loaded unless the man page viewer is visible.
# This procedure checks to see if the viewer is visible, and loads
# the man page if needed.
# ----------------------------------------------------------------------
set iwManPage ""
proc iw_load_manpage {{name ""}} {
global widgets iwManPage
if {[winfo ismapped $widgets(info-manpage)]} {
if {$name == ""} {
set name [$widgets(list) getcurselection]
}
if {$name != $iwManPage} {
iw_lock on
iw_status "Loading man page..."
$widgets(info-manpage) import [iw_demo_manpage $name]
iw_lock off
iw_status ""
place forget $widgets(info-manpage-feedback)
}
set iwManPage $name
}
}
# ----------------------------------------------------------------------
# USAGE: iw_manpage_progress
#
# Handles the progress meter whenever an HTML man page is rendered.
# If the progress meter is not showing, it is put up, and the current
# state is updated. If the meter is at 100%, it is taken down.
# ----------------------------------------------------------------------
proc iw_manpage_progress {n} {
global widgets remaining
if {![winfo ismapped $widgets(info-manpage-feedback)]} {
$widgets(info-manpage-feedback) configure -steps $n
$widgets(info-manpage-feedback) reset
place $widgets(info-manpage-feedback) -relx 0.5 -rely 0.5 \
-anchor c -width 200
update
set remaining $n
}
$widgets(info-manpage-feedback) step [expr $remaining - $n]
set remaining $n
}
# ----------------------------------------------------------------------
# USAGE: iw_status
#
# Displays a status near the top of the window.
# ----------------------------------------------------------------------
proc iw_status {message} {
global widgets
$widgets(status) configure -text $message
update
}
# ----------------------------------------------------------------------
# USAGE: iw_lock
#
# Locks or unlocks the main window. Sets a grab on the main menu,
# so that all events are sent to it.
# ----------------------------------------------------------------------
proc iw_lock {state} {
global widgets
if {$state} {
grab set $widgets(mainMenu)
. configure -cursor watch
} else {
grab release $widgets(mainMenu)
. configure -cursor ""
}
}
# ----------------------------------------------------------------------
# USAGE: iw_draw_hier
#
# Queries the hierarchy for a particular class in demo and
# draws a class diagram into a display window. Usually invoked when
# a demo is loaded to display the class hierarchy for the associated
# widget.
# ----------------------------------------------------------------------
proc iw_draw_hier {name} {
global widgets
set canv $widgets(info-hier)
$canv delete all
set class [string toupper [string index $name 0]][string tolower [string range $name 1 end]]
if {[catch [list namespace eval iwidgets [list itcl::find classes $class]]] == 0} {
set objs [namespace eval iwidgets [list itcl::find objects -class $class]]
if {[llength $objs]} {
update idletasks
set bases [[lindex $objs 0] info heritage]
iw_draw_level [lrange $bases 1 end] $canv [lindex $bases 0]
set bbox [$canv bbox all]
$canv move all [expr [lindex $bbox 0] * -1] [expr [lindex $bbox 1] * -1]
$canv xview moveto 0
$canv yview moveto 0
set bbox [$canv bbox all]
set x [expr ([winfo width $widgets(info)] / 2) - ([lindex $bbox 2] / 2)]
set y 10
$canv move all $x $y
}
}
}
# ----------------------------------------------------------------------
# USAGE: iw_draw_level
#
# Draws one level of the hierarchy for .
# ----------------------------------------------------------------------
proc iw_draw_level {bases canv class} {
set org [iw_draw_box $canv $class]
set top $org
set offset 0
if {[llength $bases]} {
$canv lower [$canv create line $offset $org \
$offset [expr $top-10] \
-40 [expr $top-10] \
-24 [expr $top-10] \
-20 [expr $top-16] \
-16 [expr $top-10] \
-20 [expr $top-16] \
-20 [expr $top-26]]
$canv move all 20 [expr -($top-26+$org)]
set del [iw_draw_level [lrange $bases 1 end] $canv [lindex $bases 0]]
$canv move all -20 [expr $top-26+$org]
set top [expr $top+$del-30+$org]
incr offset 4
}
return $top
}
# ----------------------------------------------------------------------
# USAGE: iw_draw_box
#
# Draws one box for a class hierarchy onto a canvas window.
# ----------------------------------------------------------------------
proc iw_draw_box {canv class} {
set bg [option get $canv boxColor BoxColor]
set textbg [option get $canv boxTextColor BoxTextColor]
set cname [string trimleft $class :]
$canv create text 0 0 -anchor center -text $cname \
-fill $textbg -tags $class
set bbox [$canv bbox $class]
set x0 [expr [lindex $bbox 0]-4]
set y0 [expr [lindex $bbox 1]-4]
set x1 [expr [lindex $bbox 2]+4]
set y1 [expr [lindex $bbox 3]+4]
$canv create rectangle $x0 $y0 $x1 $y1 \
-outline black -fill $bg
$canv raise $class
return $y0
}
# ----------------------------------------------------------------------
wm title . {[incr Widgets] Demo}
wm geometry . 750x440
frame .mbar -borderwidth 2 -relief raised
pack .mbar -fill x
set widgets(mainMenu) [menubutton .mbar.main -text "Main" -menu .mbar.main.m]
pack .mbar.main -side left
menu .mbar.main.m
.mbar.main.m add command -label "About..." -command {.about activate}
.mbar.main.m add separator
.mbar.main.m add command -label "Quit" -command tcl_exit
iwidgets::panedwindow .pw -orient vertical
pack .pw -expand yes -fill both
.pw add "widgets"
set pane [.pw childsite "widgets"]
set widgets(list) $pane.wlist
iwidgets::scrolledlistbox $widgets(list) -labeltext "Select a widget:" \
-selectioncommand {iw_load_demo [$widgets(list) getcurselection]} \
-labelpos nw -vscrollmode dynamic -hscrollmode none \
-exportselection no
pack $widgets(list) -expand yes -fill both -padx 8
.pw add "info"
set pane [.pw childsite "info"]
set widgets(info) $pane.info
.pw fraction 25 75
set widgets(status) [label $pane.status]
pack $pane.status -anchor w
iwidgets::tabnotebook $widgets(info) -tabpos s
pack $widgets(info) -expand yes -fill both
set widgets(info-example) [$widgets(info) add -label "Example"]
$widgets(info-example) configure -background white
set win [$widgets(info) add -label "Example Code"]
set widgets(info-code) [iwidgets::scrolledtext $win.code \
-wrap none -vscrollmode dynamic -hscrollmode none]
pack $widgets(info-code) -expand yes -fill both -padx 4 -pady 4
set win [$widgets(info) add -label "Inheritance"]
set widgets(info-hier) [iwidgets::scrolledcanvas $win.canv -textbackground white \
-vscrollmode dynamic -hscrollmode dynamic]
pack $widgets(info-hier) -expand yes -fill both -padx 4 -pady 4
set win [$widgets(info) add -label "Man Page"]
set widgets(info-manpage) [iwidgets::scrolledhtml $win.html \
-wrap word -vscrollmode dynamic -hscrollmode none \
-feedback "iw_manpage_progress" \
-linkcommand "$win.html import -link"]
pack $widgets(info-manpage) -expand yes -fill both -padx 4 -pady 4
set widgets(info-manpage-feedback) [iwidgets::feedback $win.html.fb \
-borderwidth 2]
bind $widgets(info-manpage)