tixNoteBook(n)

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

πŸ’… tixNoteBook(n) β€” the notebook widget, explained by your favorite Unix bestie

okay so this is the manual page for tixNoteBook, straight out of the Tix Built-In Commands crew. grab a boba, we're building tabbed pages πŸ’–


✨ NAME ✨

tixNoteBook β€” create and manipulate tixNoteBook widgets. that's it, that's the vibe πŸŽ€


✨ SYNOPSIS ✨

tixNoteBook pathName ?options?

literally just hand it a path name and some options and boom, notebook. ✨


✨ STANDARD OPTIONS ✨

bestie, the NoteBook widget supports all the standard options of a frame widget. like, all of them. go check out the options(n) manual entry if you want the details on those. iykyk 🫢


✨ WIDGET-SPECIFIC OPTIONS ✨

these are the ones that are, like, extra extra πŸ‘‘

  • -dynamicgeometry dynamicGeometry β€” if you set this to false, the Notebook sizes itself to fit the largest page. if you set it to true, it sizes itself to fit the current page instead (so yeah, the size can change when the user flips between pages). the default value is false. ngl, a setting of true is discouraged β€” so like, don't πŸ’€
  • -ipadx ipadX β€” how much internal horizontal padding goes around the sides of the page subwidgets.
  • -ipady ipadY β€” how much internal vertical padding goes around the sides of the page subwidgets.

✨ SUBWIDGETS ✨

🌸 nbframe β€” class tixNoteBookFrame

this is the "note book frame" widget that displays the tabs of the notebook. most of the display options for the page tabs are controlled by this subwidget. like β€” say you want a different font for the tab names of the pages, or you want to change the color of the inactive tabs, or the color behind the tabs? yeah, you configure the options of the nbframe subwidget, bestie. see the manual page of tixNoteBookFrame(n) for more details. slay πŸ¦‹

🌸 the page subwidgets

on top of that, all the page subwidgets created as a result of the add command can be accessed by the subwidget command. they're identified by the pageName parameter you pass to the add command. cute, right? πŸŽ€


✨ DESCRIPTION ✨

the tixNoteBook 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 widget such as its cursor and relief. πŸ’«

so the NoteBook widget can be used to display many windows in a limited space, using a "notebook" metaphor. the notebook is divided into a stack of pages (windows). at any one time only one of these pages can be shown. the user navigates through these pages by choosing the visual "tabs" at the top of the NoteBook widget. it's giving physical notebook but make it Tcl. obsessed πŸ’…


✨ WIDGET COMMANDS ✨

the tixNoteBook command creates a new Tcl command whose name is the same as the path name of the NoteBook widget's window. you can use this command to invoke various operations on the widget. general form goes like this:

pathName option ?arg arg ...?

PathName is the name of the command, which is the same as the NoteBook widget's path name. Option and the args determine the exact behavior of the command. here's everything a NoteBook widget can do πŸ‘‡

🌈 pathName add pageName ?option value ...?

adds a new notebook page subwidget into the NoteBook widget. you can supply additional parameters to configure this page subwidget. possible options are:

  • -anchor β€” specifies how the information in a tab (e.g. text or a bitmap) is to be displayed in the widget. must be one of the values n, ne, e, se, s, sw, w, nw, or center. for example, nw means display the information such that its top-left corner is at the top-left corner of the widget.
  • -bitmap β€” specifies a bitmap to display on the tab of this page. the bitmap is displayed only if none of the -label or -image options are specified.
  • -createcmd β€” specifies a TCL command to be called the first time a page is shown on the screen. you can use this option to delay the creation of the contents of a page until it's necessary. so it can be used to speed up the interface creation process, especially when there are a large number of pages in a NoteBook widget. lowkey a performance hack, love that for us πŸ”₯
  • -image β€” specifies an image to display on the tab of this page. the image is displayed only if the -label option is not specified.
  • -justify β€” when there are multiple lines of text displayed in a tab, this option determines how the lines line up with each other. must be one of left, center, or right. left means the lines' left edges all line up, center means the lines' centers are aligned, and right means the lines' right edges line up.
  • -label β€” specifies a text label string to display on the tab of this page subwidget.
  • -raisecmd β€” specifies a TCL command to be called whenever this page is raised by the user.
  • -state β€” specifies whether this page can be raised by the user. must be either normal or disabled.
  • -underline β€” specifies the integer index of a character to underline in the tab. this option is used by the default bindings to implement keyboard traversal for menu buttons and menu entries. 0 corresponds to the first character of the text displayed in the widget, 1 to the next character, and so on.
  • -wraplength β€” this option specifies the maximum line length of the label string on this tab. if the line length of the label string exceeds this length, it gets wrapped onto the next line, so that no line is longer than the specified length. the value may be specified in any of the standard forms for screen distances. if this value is less than or equal to 0 then no wrapping is done: lines will break only at newline characters in the text.

🌈 pathName cget option

returns the current value of the configuration option given by option. Option may have any of the values accepted by the tixNoteBook command. 🫢

🌈 pathName configure ?option? ?value option value ...?

query or modify the configuration options of the widget. if no option is specified, it returns a list describing all the available options for pathName (see Tk_ConfigureInfo for info 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 tixNoteBook command. iconic behavior ✨

🌈 pathName delete pageName?

deletes the page identified by pageName. bye bestie πŸ‘‹

🌈 pathName pagecget pageName option

returns the current value of the configuration option given by option in the page given by pageName. Option may have any of the values accepted by the add widget command.

🌈 pathName pageconfigure pageName ?option? ?value ...?

when no option is given, prints out the values of all options of this page. if option is specified with no value, then the command returns the current value of that option. if one or more option-value pairs are specified, then the command modifies the given page's option(s) to have the given value(s); in this case the command returns an empty string. Option may be any of the options accepted by the add widget command. πŸŽ€

🌈 pathName pages

returns a list of the names of all the pages. a little roster of your pages, adorable 🌸

🌈 pathName raise pageName

raise the page identified by pageName. main character energy, honestly πŸ‘‘

🌈 pathName raised

returns the name of the currently raised page. the one on top, the moment-haver, the chosen one ⭐

🌈 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. so you can just... reach straight in there. love that for you πŸ’œ


✨ BINDINGS ✨

  1. when the user presses the left mouse button over a notebook tab, the notebook page associated with that tab will be raised to the top of the stack of pages. click and slay πŸ–±οΈ
  2. the pages can also be selected using the keyboard. the user can type the Tab key to cycle among the set of pages. when the focus appears on the desired page, the user can type Return or space to select that page. or, if the user wants to cancel the selection, he/she can type the Escape key. keyboard girlies stay winning ⌨️

✨ KEYWORDS ✨

Tix(n) β€” that's the keyword, that's the whole list, no cap πŸ¦‹


πŸ’– and that's the whole page bestie β€” every flag, every command, every binding, nothing skipped, nothing invented. go build something cute with it.

🌸 version 4.0, Tix, and it's the tixNoteBook(n) page β€” mwah, love you, bye! πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from