tixDirList(n)

πŸ“¦ version 8.4.3, in opensuse-leap 16.0

✨ tixDirList(n) ✨

hii bestie 🫢 welcome to tixDirList(n), a page straight outta the Tix Built-In Commands manual. it's giving "let's build a whole directory browser widget" and honestly? iconic. let's get into it πŸ’…


🌸 NAME 🌸

tixDirList β€” create and manipulate tixDirList widgets. that's it, that's the name, no cap ✨

πŸŽ€ SYNOPSIS πŸŽ€

tixDirList pathName ?options?

πŸ¦‹ SUPER-CLASS πŸ¦‹

okay so the TixDirList class is derived from the TixScrolledHList class, and it inherits all the commands, options and subwidgets of its super-class. so it's literally nepo-babying off its parent class and we love that for it πŸ’–

⭐ STANDARD OPTIONS ⭐

TixDirList supports all the standard options of a frame widget. for the deets on those, go peek at the options(n) manual entry β€” iykyk πŸ‘‘

πŸ‘‘ WIDGET-SPECIFIC OPTIONS πŸ‘‘

  • -browsecmd browseCmd β€” specifies a command to call whenever the user browses on a directory (usually by single-clicking on the name of the directory). the command is called with one argument: the complete pathname of the directory. one click, one callback, slay 🌸
  • -command command β€” specifies the command to be called when the user activates on a directory (usually by double-clicking on the name of the directory). the command is called with one argument: the complete pathname of the directory. double-click energy πŸ”₯
  • -dircmd dircmd β€” specifies the TCL command to be called when a directory listing is needed for a particular directory. if this option is not specified, by default the DirList widget will attempt to read the directory as a Unix directory. on special occasions, the application programmer may want to supply a special method for reading directories: for example, when he needs to list remote directories. in this case, the -dircmd option can be used. the specified command accepts two arguments: the first is the name of the directory to be listed; the second is a Boolean value indicating whether hidden sub-directories should be listed. this command returns a list of names of the sub-directories of this directory. for example:
proc read_dir {dir show_hidden} {
    if {$dir == "C:\"} {
        return {DOS NORTON WINDOWS}
    } else {
        return {}
    }
}
  • -disablecallback disableCallback β€” a boolean value indicating whether callbacks should be disabled. when set to true, the TCL command specified by the -command option is not executed when the -value of the DirList widget changes. it's the "shhh, not right now" switch πŸ™ˆ
  • -showhidden showHidden β€” specifies whether hidden directories should be shown. by default, a directory name starting with a period "." is considered as a hidden directory. this rule can be overridden by supplying an alternative -dircmd option. periodt πŸ’…
  • -root root β€” specifies the name of the root directory. usually this is "/" under Unix machines, but can be changed to "C:\" in DOS environments. home base πŸŽ€
  • -rootname rootName β€” specifies a text string to display at the root directory. if unspecified, the text string will be the same as the string specified by -root. aesthetic labeling, obsessed ✨
  • -value β€” here's the full spec sheet, bestie: Name: value, Class: Value, Switch: -value, Alias: -directory. it specifies the name of the current directory to be displayed in the DirList widget. your main character directory πŸ’–

πŸ’œ SUBWIDGETS πŸ’œ

  • Name: hlist β€” Class: TixHList. the hierarchical listbox that displays the directory listing. the actual star of the show πŸ‘‘
  • Name: hsb β€” Class: Scrollbar. the horizontal scrollbar subwidget. side to side 🌈
  • Name: vsb β€” Class: Scrollbar. the vertical scrollbar subwidget. up and down πŸ¦‹

🌼 DESCRIPTION 🌼

the tixDirList command creates a new window (given by the pathName argument) and makes it into a DirList widget. additional options, described above, may be specified on the command line or in the option database to configure aspects of the DirList such as its cursor and relief. fancy πŸ’…

the DirList widget displays a list view of a directory, its previous directories and its sub-directories. the user can choose one of the directories displayed in the list or change to another directory. it's literally a whole little map of your filesystem, no cap πŸ—ΊοΈβœ¨

🧚 WIDGET COMMANDS 🧚

the tixDirList command creates a new Tcl command whose name is the same as the path name of the DirList's window. this command may be used to invoke various operations on the widget. it has the following general form:

pathName option ?arg arg ...?

PathName is the name of the command, which is the same as the DirList widget's path name. Option and the args determine the exact behavior of the command. the following commands are possible for DirList widgets:

  • pathName cget option β€” returns the current value of the configuration option given by option. Option may have any of the values accepted by the tixDirList command. it's the "what's your setting rn" ask 🫢
  • pathName chdir dir β€” change the current directory to dir. boom, you moved πŸšΆβ€β™€οΈ
  • 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 tixDirList command. it does it all, honestly πŸ’€
  • pathName subwidget name ?args? β€” when no options are given, this command returns the pathname of the subwidget of the specified name. when options are given, the widget command of the specified subwidget will be called with these options. subwidget access, unlocked πŸ”“

🌈 BINDINGS 🌈

the mouse and keyboard bindings of the DirList widget are the same as the bindings of the HList widget. no new key lore here, just inherited vibes πŸ’«

⭐ KEYWORDS ⭐

Tix(n)


and that's the whole page bestie, you ate that πŸ“πŸ’… signing off β€” this was Tix version 4.0, page tixDirList(n), mwah πŸ˜˜πŸŽ€

πŸ“¦ where this page comes from