Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / site_perl / 5.8.0 / sun4-solaris / Tk / NoteBook.pod
CommitLineData
86530b38
AT
1
2=head1 NAME
3
4Tk::NoteBook - display several windows in limited space with notebook metaphor.
5
6=for pm Tixish/NoteBook.pm
7
8=for category Tix Extensions
9
10=head1 SYNOPSIS
11
12 use Tk::NoteBook;
13 ...
14 $w = $frame->NoteBook();
15 $page1 = $w->add("page1", options);
16 $page2 = $w->add("page2", options);
17 ...
18 $page2 = $w->add("page2", options);
19
20=head1 DESCRIPTION
21
22The NoteBook widget provides a notebook metaphor to display several
23windows in limited space. The notebook is divided into a stack of pages
24of which only one is displayed at any time. The other pages can be
25selected by means of choosing the visual "tabs" at the top of the
26widget. Additionally, the <Tab> key may be used to traverse the pages.
27If B<-underline> is used, Alt- bindings will also work.
28
29The widget takes all the options that a Frame does. In addition,
30it supports the following options:
31
32=over 4
33
34=item B<-dynamicgeometry>
35
36If set to false (default and recommended), the size of the NoteBook
37will match the size of the largest page. Otherwise the size will
38match the size of the current page causing the NoteBook to change
39size when different pages of different sizes are selected.
40
41=item B<-ipadx>
42
43The amount of internal horizontal padding around the pages.
44
45=item B<-ipady>
46
47The amount of internal vertical padding around the pages.
48
49=back
50
51=head1 METHODS
52
53The following methods may be used with a NoteBook object in addition
54to standard methods.
55
56=over 4
57
58=item B<add(>I<pageName>, I<options>B<)>
59
60Adds a page with name I<pageName> to the notebook. Returns an object
61of type B<Frame>. The recognized I<options> are:
62
63=over 4
64
65=item B<-anchor>
66
67Specifies how the information in a tab is to be displayed. Must be
68one of B<n>, B<ne>, B<e>, B<se>, B<s>, B<sw>, B<w>, B<nw> or
69B<center>.
70
71=item B<-bitmap>
72
73Specifies a bitmap to display on the tab of this page. The bitmap
74is displayed only if none of the B<-label> or B<-image> options
75are specified.
76
77=item B<-image>
78
79Specifies an image to display on the tab of this page. The image
80is displayed only if the B<-label> option is not specified.
81
82=item B<-label>
83
84Specifies the text string to display on the tab of this page.
85
86=item B<-justify>
87
88When there are multiple lines of text displayed in a tab, this
89option determines the justification of the lines.
90
91=item B<-createcmd>
92
93Specifies a L<callback|Tk::callbacks> to be called the first time the page is
94shown on the screen. This option can be used to delay the creation
95of the contents of a page until necessary. It can be useful in
96situations where there are a large number of pages in a NoteBook
97widget; with B<-createcmd> you do not have to make the user wait
98until all pages are constructed before displaying the first page.
99
100=item B<-raisecmd>
101
102Specifies a L<callback|Tk::callbacks> to be called whenever this page is raised
103by the user.
104
105=item B<-state>
106
107Specifies whether this page can be raised by the user. Must be
108either B<normal> or B<disabled>.
109
110=item B<-underline>
111
112Specifies the integer index of a character to underline in the
113tab. This option is used by the default bindings to implement
114keyboard traversal for menu buttons and menu entries. 0
115corresponds to the first character of text displayed on the
116widget, 1 to the next character and so on.
117
118=item B<-wraplength>
119
120This option specifies the maximum line length of the label string
121on this tab. If the line length of the label string exceeds this
122length, then it is wrapped onto the next line so that no line is
123longer than the specified length. The value may be specified in
124any standard forms for screen distances. If this value is less
125than or equal to 0, then no wrapping is done: lines will break
126only at newline characters in the text.
127
128=back
129
130=item B<delete(>I<pageName>B<)>
131
132Deletes the page identified by I<pageName>.
133
134=item B<pagecget(>I<pageName>, I<-option>B<)>
135
136Returns the current value of the configuration option given by
137I<-option> in the page given by I<pageName>. I<Option> may have any of
138the values accepted in the B<add> method.
139
140=item B<pageconfigure(>I<pageName>, I<options>B<)>
141
142Like configure for the page indicated by I<pageName>. I<Options> may
143be any of the options accepted by the B<add> method.
144
145=item B<raise(>I<pageName>B<)>
146
147Raise the page identified by I<pageName>.
148
149=item B<raised()>
150
151Returns the name of the currently raised page.
152
153=back
154
155=head1 AUTHORS
156
157B<Rajappa Iyer> <rsi@earthling.net>
158Nick Ing-Simmons <nick@ni-s.u-net.com>
159
160This code and documentation was derived from NoteBook.tcl in
161Tix4.0 written by Ioi Lam. It may be distributed under the same
162conditions as Perl itself.
163
164=cut
165