.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "NoteBook 3" .TH NoteBook 3 2023-07-25 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Tk::NoteBook \- display several windows in limited space with notebook metaphor. .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 7 \& use Tk::NoteBook; \& ... \& $w = $frame\->NoteBook(); \& $page1 = $w\->add("page1", options); \& $page2 = $w\->add("page2", options); \& ... \& $page2 = $w\->add("page2", options); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" The NoteBook widget provides a notebook metaphor to display several windows in limited space. The notebook is divided into a stack of pages of which only one is displayed at any time. The other pages can be selected by means of choosing the visual "tabs" at the top of the widget. Additionally, the key may be used to traverse the pages. If \fB\-underline\fR is used, Alt\- bindings will also work. .PP The widget takes all the options that a Frame does. In addition, it supports the following options: .IP \fB\-dynamicgeometry\fR 4 .IX Item "-dynamicgeometry" If set to false (default and recommended), the size of the NoteBook will match the size of the largest page. Otherwise the size will match the size of the current page causing the NoteBook to change size when different pages of different sizes are selected. .IP \fB\-ipadx\fR 4 .IX Item "-ipadx" The amount of internal horizontal padding around the pages. .IP \fB\-ipady\fR 4 .IX Item "-ipady" The amount of internal vertical padding around the pages. .IP \fB\-backpagecolor\fR 4 .IX Item "-backpagecolor" The background color of the tabs and back page. .IP \fB\-disabledforeground\fR 4 .IX Item "-disabledforeground" XXX .IP \fB\-focuscolor\fR 4 .IX Item "-focuscolor" The color of the focus border around the tabs. .IP \fB\-font\fR 4 .IX Item "-font" The font of the tab labels. .IP \fB\-inactivebackground\fR 4 .IX Item "-inactivebackground" XXX .IP \fB\-tabpadx\fR 4 .IX Item "-tabpadx" Horizonzal padding around the tab label. .IP \fB\-tabpady\fR 4 .IX Item "-tabpady" Vertical padding around the tab label. .SH METHODS .IX Header "METHODS" The following methods may be used with a NoteBook object in addition to standard methods. .IP "\fBadd(\fR\fIpageName\fR, \fIoptions\fR\fB)\fR" 4 .IX Item "add(pageName, options)" Adds a page with name \fIpageName\fR to the notebook. Returns an object of type \fBFrame\fR. The recognized \fIoptions\fR are: .RS 4 .IP \fB\-anchor\fR 4 .IX Item "-anchor" Specifies how the information in a tab is to be displayed. Must be one of \fBn\fR, \fBne\fR, \fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR or \&\fBcenter\fR. .IP \fB\-bitmap\fR 4 .IX Item "-bitmap" Specifies a bitmap to display on the tab of this page. The bitmap is displayed only if none of the \fB\-label\fR or \fB\-image\fR options are specified. .IP \fB\-image\fR 4 .IX Item "-image" Specifies an image to display on the tab of this page. The image is displayed only if the \fB\-label\fR option is not specified. .IP \fB\-label\fR 4 .IX Item "-label" Specifies the text string to display on the tab of this page. .IP \fB\-justify\fR 4 .IX Item "-justify" When there are multiple lines of text displayed in a tab, this option determines the justification of the lines. .IP \fB\-createcmd\fR 4 .IX Item "-createcmd" Specifies a callback to be called the first time the page is shown on the screen. This option can be used to delay the creation of the contents of a page until necessary. It can be useful in situations where there are a large number of pages in a NoteBook widget; with \fB\-createcmd\fR you do not have to make the user wait until all pages are constructed before displaying the first page. .IP \fB\-raisecmd\fR 4 .IX Item "-raisecmd" Specifies a callback to be called whenever this page is raised by the user. .IP \fB\-state\fR 4 .IX Item "-state" Specifies whether this page can be raised by the user. Must be either \fBnormal\fR or \fBdisabled\fR. .IP \fB\-underline\fR 4 .IX Item "-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 text displayed on the widget, 1 to the next character and so on. .IP \fB\-wraplength\fR 4 .IX Item "-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, then it is wrapped onto the next line so that no line is longer than the specified length. The value may be specified in any 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. .RE .RS 4 .RE .IP \fBdelete(\fR\fIpageName\fR\fB)\fR 4 .IX Item "delete(pageName)" Deletes the page identified by \fIpageName\fR. .IP "\fBpagecget(\fR\fIpageName\fR, \fI\-option\fR\fB)\fR" 4 .IX Item "pagecget(pageName, -option)" Returns the current value of the configuration option given by \&\fI\-option\fR in the page given by \fIpageName\fR. \fIOption\fR may have any of the values accepted in the \fBadd\fR method. .IP "\fBpageconfigure(\fR\fIpageName\fR, \fIoptions\fR\fB)\fR" 4 .IX Item "pageconfigure(pageName, options)" Like configure for the page indicated by \fIpageName\fR. \fIOptions\fR may be any of the options accepted by the \fBadd\fR method. .IP \fBpages\fR 4 .IX Item "pages" Returns a list consisting of the names of all currently defined pages, i.e., those created with the \fBadd\fR method. .IP \fBpage_widget(\fR\fIpageName\fR\fB)\fR 4 .IX Item "page_widget(pageName)" Returns the page with name \fIpageName\fR. .IP \fBraise(\fR\fIpageName\fR\fB)\fR 4 .IX Item "raise(pageName)" Raise the page identified by \fIpageName\fR. .IP \fBraised()\fR 4 .IX Item "raised()" Returns the name of the currently raised page. .IP \fBgeometryinfo\fR 4 .IX Item "geometryinfo" Return the dimensions of the tab area. .IP \fBidentify(\fR\fIx\fR,\fIy\fR\fB)\fR 4 .IX Item "identify(x,y)" Identify the tab's page name under the specified coordinates. Return an empty string if there's no tab. .IP "\fBinfo(""pages"")\fR" 4 .IX Item "info(""pages"")" Return a list of all pages. .IP "\fBinfo(""focus"")\fR" 4 .IX Item "info(""focus"")" Return the page name of the tab with the current focus. .IP "\fBinfo(""focusnext"")\fR" 4 .IX Item "info(""focusnext"")" Return the page name of the tab which would receive the next focus. .IP "\fBinfo(""focusprev"")\fR" 4 .IX Item "info(""focusprev"")" Return the page name of the tab which had the previous focus. .IP "\fBinfo(""active"")\fR" 4 .IX Item "info(""active"")" Return the page name of the active tab. .SH BUGS .IX Header "BUGS" The options \f(CW\*(C`\-width\*(C'\fR and \f(CW\*(C`\-height\*(C'\fR do not work. .SH AUTHORS .IX Header "AUTHORS" \&\fBRajappa Iyer\fR Nick Ing-Simmons .PP This code and documentation was derived from NoteBook.tcl in Tix4.0 written by Ioi Lam. It may be distributed under the same conditions as Perl itself.