iwidgets::shell(1)
β¨ iwidgets::shell β¨
okay bestie, so this is iwidgets::shell(1) from the [incr Widgets] crew β a whole manual page about making a shell widget, and yes it's as iconic as it sounds π
πΈ NAME πΈ
iwidgets::shell β create and manipulate a shell widget
π¦ SYNOPSIS π¦
iwidgets::shell pathName ?options?
π INHERITANCE π
itk::Toplevel <- iwidgets::Shell
so it's inheriting from itk::Toplevel, slay β¨
π STANDARD OPTIONS π
backgroundcursorforeground
these are the basics bestie, and the "options" manual entry has the deets on all of them π
π INHERITED OPTIONS π
title
the "Toplevel" manual entry is where you go for the lowdown on that one π«Ά
π WIDGET-SPECIFIC OPTIONS π
-heightβ Name:height, Class:Height, Command-Line Switch:-height
Sets the height of the shell, and you can write the value in literally any form that Tk_GetPixels is happy with. If you pass zero, the height just auto-adjusts to whatever the components in the childsite actually need (size requests, bestie). Any other value and the height is locked in, fixed, no takebacks. Default is zero. β οΈ NOTE: this can make things flicker a lil bit on slower machines β and the fix is to just set width and height to an appropriate value. periodt.
-masterβ Name:master, Class:Window, Command-Line Switch:-master
This declares the shell a transient window, with the master window given by the master option. That master window should either be another existing toplevel window, or {} for no master at all. Default is {} for shells and . for dialogs. no cap π«‘
-modalityβ Name:modality, Class:Modality, Command-Line Switch:-modality
Lets the shell grab control of the screen, and there are three flavors: application, system, or none.
- application modal stops any other toplevel windows inside the application that are direct children of
.from gaining focus. - system modal goes feral and locks the whole screen, preventing all windows from gaining focus no matter what application they belong to.
- none does no grabs at all.
Default is none. π
-padxβ Name:padX, Class:Pad, Command-Line Switch:-padx
Padding distance for the childsite in the X-direction, in any form Tk_GetPixels accepts. Default is 10.
-padyβ Name:padY, Class:Pad, Command-Line Switch:-pady
Padding distance for the childsite in the Y-direction, again in any form Tk_GetPixels accepts. Default is 10.
-widthβ Name:width, Class:Width, Command-Line Switch:-width
Sets the width of the shell, in any form Tk_GetPixels accepts. Pass zero and the width auto-adjusts to fit what the components in the childsite are asking for. Otherwise the width is fixed, full stop. Default is zero. β οΈ NOTE: same flickering situation as height on slower machines β set width and height to an appropriate value to avoid it, iykyk.
π DESCRIPTION π
The iwidgets::shell command creates a shell β which is a top level widget that supports modal operation. main character energy, honestly π
β METHODS β
The iwidgets::shell command creates a new Tcl command whose name is pathName. You use that command to invoke various operations on the widget, and the general form is:
pathName option ?arg arg ...?
option and the args decide exactly what the command does. Here's everything shell widgets can do:
π§ WIDGET-SPECIFIC METHODS π§
pathName activateβ Displays the shell and waits, and how it waits depends on the modality. For application and system modal activations it performs a grab operation and waits for the result. That result can get returned through an argument to thedeactivatemethod.pathName center ?widget?β Centers the shell relative to another widget. The widget argument is optional. If you pass it, it should be the path of another widget to center upon. If you don't, the shell gets centered on the screen as a whole. π―pathName cget optionβ Returns the current value of the configuration option given by option. option can be any of the values that theiwidgets::shellcommand accepts.pathName childsiteβ Returns the pathname of the child site widget. πpathName configure ?option? ?value option value ...?β Query or modify the widget's configuration options.- No option at all β returns a list describing all the available options for pathName (peep
Tk_ConfigureInfofor the format of that list). - option with no value β returns a list describing that one named option (identical to the matching sublist from the no-option case).
- One or more option-value pairs β modifies the given widget option(s) to the given value(s), and the command returns an empty string.
- No option at all β returns a list describing all the available options for pathName (peep
option can be any of the values that the iwidgets::shell command accepts.
pathName deactivate ?arg?β Deactivates the display of the shell. Takes an optional arg that gets passed to theactivatemethod, which returns the value. Heads up: that optional argument only actually does anything for application and system modal dialogs. π«
π COMPONENTS π
- Name:
shellchildsite, Class:frame
The shellchildsite component is the user child site for the shell. Go read the "frame" widget manual entry for the details on the shellchildsite component item.
π EXAMPLE π
package require Iwidgets 4.0
iwidgets::shell .sh -modality application -padx 20 -pady 20 -title Shell
pack [label [.sh childsite].l -text SHELL]
.sh center
.sh activate
look at that, it's giving flawless ππ
π AUTHOR π
Mark L. Ulferts Kris Raney
π KEYWORDS π
shell, widget
and that's the whole page bestie!! this one came to you from Tk, page iwidgets::shell(1) β go forth and make shells, you absolute icon π«Άβ¨π
π¦ where this page comes from
- debian bookworm: iwidgets4-doc 4.1.1-2.1
- debian trixie: iwidgets4-doc 4.1.1-4
- ubuntu jammy: iwidgets4-doc 4.1.1-2.1
- ubuntu noble: iwidgets4-doc 4.1.1-2.1
- ubuntu resolute: iwidgets4-doc 4.1.1-4
- ubuntu stonking: iwidgets4-doc 4.1.1-4
- Copyright (c) 1995 DSC Technologies Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms