File: notebook.tmml

package info (click to toggle)
tile 0.8.2-2.1
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 3,152 kB
  • ctags: 3,093
  • sloc: ansic: 18,144; tcl: 4,607; makefile: 398; sh: 71
file content (306 lines) | stat: -rw-r--r-- 9,174 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
<manpage cat="cmd" id="notebook" title="notebook" version="0.2">
<!-- This file was automatically generated.  DO NOT EDIT (yet)! -->
<!-- 
     Copyright (c) 2004 Joe English
 -->
<?TROFF.TH title="notebook" section="n" date="0.2" source="tile" manual="Tile Widget Set" ?>
<namesection>
<name>ttk::notebook</name>
<desc>Multi-paned container widget</desc>
</namesection>
<synopsis>
<syntax>
<b>ttk::notebook</b> <m>pathName</m> ?<m>options...</m>?

<m>pathName</m> <b>add</b> <m>window</m> ?<m>options...</m>?
<m>pathName</m> <b>insert</b> <m>index</m> <m>window</m> ?<m>options...</m>?
</syntax>
</synopsis>
<section>
<title>DESCRIPTION</title>
<p>A <b>ttk::notebook</b> widget manages a collection of windows
and displays a single one at a time.
Each slave window is associated with a <i>tab</i>,
which the user may select to change the currently-displayed window.
</p>
</section>
<section>
<title>STANDARD OPTIONS</title>
<sl cat="stdopt" cols="4">
<li>-class</li>
<li>-cursor</li>
<li>-style</li>
<li>-takefocus</li>
</sl>
</section>
<section>
<title>WIDGET OPTIONS</title>
<optionlist>
<optiondef>
<name>-height</name>
<dbname>height</dbname>
<dbclass>Height</dbclass>
<desc>If present and greater than zero, 
specifies the desired height of the pane area
(not including internal padding or tabs).
Otherwise, the maximum height of all panes is used.
</desc>
</optiondef>
<optiondef>
<name>-padding</name>
<dbname>padding</dbname>
<dbclass>Padding</dbclass>
<desc>Specifies the amount of extra space to add around the outside
of the notebook.
The padding is a list of up to four length specifications 
<i>left top right bottom</i>.
If fewer than four elements are specified, 
<i>bottom</i> defaults to <i>top</i>,
<i>right</i> defaults to <i>left</i>, and 
<i>top</i> defaults to <i>left</i>.
</desc>
</optiondef>
<optiondef>
<name>-width</name>
<dbname>width</dbname>
<dbclass>Width</dbclass>
<desc>If present and greater than zero, 
specifies the desired width of the pane area
(not including internal padding).
Otherwise, the maximum width of all panes is used.
</desc>
</optiondef>
</optionlist>
</section>
<section id="tab-options">
<title>TAB OPTIONS</title>
<p>The following options may be specified for individual notebook panes:
</p>
<optionlist>
<optiondef>
<name>-state</name>
<dbname>state</dbname>
<dbclass>State</dbclass>
<desc>Either <b>normal</b>, <b>disabled</b> or <b>hidden</b>.  
If <b>disabled</b>, then the tab is not selectable.
If <b>hidden</b>, then the tab is not shown.
</desc>
</optiondef>
<optiondef>
<name>-sticky</name>
<dbname>sticky</dbname>
<dbclass>Sticky</dbclass>
<desc>Specifies how the slave window is positioned within the pane area.
Value is a string containing zero or more of the characters
<b>n, s, e,</b> or <b>w</b>.
Each letter refers to a side (north, south, east, or west) 
that the slave window will "stick" to,
as per the <cmd>grid</cmd> geometry manager.
</desc>
</optiondef>
<optiondef>
<name>-padding</name>
<dbname>padding</dbname>
<dbclass>Padding</dbclass>
<desc>Specifies the amount of extra space to add between the notebook and this pane.
Syntax is the same as for the widget <b>-padding</b> option.
</desc>
</optiondef>
<optiondef>
<name>-text</name>
<dbname>text</dbname>
<dbclass>Text</dbclass>
<desc>Specifies a string to be displayed in the tab.
</desc>
</optiondef>
<optiondef>
<name>-image</name>
<dbname>image</dbname>
<dbclass>Image</dbclass>
<desc>Specifies an image to display in the tab.
See <i>widget(n)</i> for details.
</desc>
</optiondef>
<optiondef>
<name>-compound</name>
<dbname>compound</dbname>
<dbclass>Compound</dbclass>
<desc>Specifies how to display the image relative to the text,
in the case both <b>-text</b> and <b>-image</b> are present.
See <i>label(n)</i> for legal values.
</desc>
</optiondef>
<optiondef>
<name>-underline</name>
<dbname>underline</dbname>
<dbclass>Underline</dbclass>
<desc>Specifies the integer index (0-based) of a character to underline 
in the text string.
The underlined character is used for mnemonic activation
if <b>ttk::notebook::enableTraversal</b> is called.
</desc>
</optiondef>
</optionlist>
</section>
<section>
<title>WIDGET COMMAND</title>
<commandlist>
<commanddef>
<command><m>pathname</m> <b>add</b> <m>window</m> ?<m>options...</m>?</command>
<desc>Adds a new tab to the notebook.
See <ref refid="tab-options">TAB OPTIONS</ref> for the list of available <i>options</i>.
If <i>window</i> is currently managed by the notebook but hidden,
it is restored to its previous position.
</desc>
</commanddef>
<commanddef>
<command><m>pathname</m> <b>configure</b> ?<m>options</m>?</command>
<desc>See <i>widget(n)</i>.
</desc>
</commanddef>
<commanddef>
<command><m>pathname</m> <b>cget</b> <m>option</m></command>
<desc>See <i>widget(n)</i>.
</desc>
</commanddef>
<commanddef>
<command><m>pathname</m> <b>forget</b> <m>tabid</m></command>
<desc>Removes the tab specified by <i>tabid</i>,
unmaps and unmanages the associated window.
</desc>
</commanddef>
<commanddef>
<command><m>pathname</m> <b>hide</b> <m>tabid</m></command>
<desc>Hides the tab specified by <i>tabid</i>.
The tab will not be displayed, but the associated window
remains managed by the notebook and its configuration remembered.
Hidden tabs may be restored with the <b>add</b> command.
</desc>
</commanddef>
<commanddef>
<command><m>pathname</m> <b>index</b> <m>tabid</m></command>
<desc>Returns the numeric index of the tab specified by <i>tabid</i>,
or the total number of tabs if <i>tabid</i> is the string "<b>end</b>".
</desc>
</commanddef>
<commanddef>
<command><m>pathname</m> <b>insert</b> <m>pos</m> <m>subwindow</m> <m>options...</m></command>
<desc>Inserts a pane at the specified position.
<i>pos</i> is either the string <b>end</b>, an integer index, 
or the name of a managed subwindow.
If <i>subwindow</i> is already managed by the notebook, 
moves it to the specified position.
See <ref refid="tab-options">TAB OPTIONS</ref> for the list of available options.
</desc>
</commanddef>
<commanddef>
<command><m>pathname</m> <b>instate</b> <m>statespec</m> ?<m>script...</m>?</command>
<desc>See <i>widget(n)</i>.
</desc>
</commanddef>
<commanddef>
<command><m>pathname</m> <b>select</b> ?<m>tabid</m>?</command>
<desc>Selects the specified tab.  
The associated slave window will be displayed,
and the previously-selected window (if different) is unmapped.
If <i>tabid</i> is omitted, returns the widget name of the
currently selected pane.
</desc>
</commanddef>
<commanddef>
<command><m>pathname</m> <b>state</b> ?<m>statespec</m>?</command>
<desc>See <i>widget(n)</i>.
</desc>
</commanddef>
<commanddef>
<command><m>pathname</m> <b>tab</b> <m>tabid</m> ?<m>-option</m> ?<m>value ...</m></command>
<desc>Query or modify the options of the specific tab.
If no <i>-option</i> is specified,
returns a dictionary of the tab option values.
If one <i>-option</i> is specified,
returns the value of that <i>option</i>.
Otherwise, sets the <i>-option</i>s to the corresponding <i>value</i>s.
See <ref refid="tab-options">TAB OPTIONS</ref> for the available options.
</desc>
</commanddef>
<commanddef>
<command><m>pathname</m> <b>tabs</b></command>
<desc>Returns the list of windows managed by the notebook.
</desc>
</commanddef>
</commandlist>
</section>
<section>
<title>KEYBOARD TRAVERSAL</title>
<p>To enable keyboard traversal for a toplevel window
containing a notebook widget <i>$nb</i>, call:
</p>
<example>
ttk::notebook::enableTraversal $nb
</example>
<p>This will extend the bindings for the toplevel window
containing the notebook as follows:
</p>
<ul>
<li><b>Control-Tab</b> selects the tab following the currently selected one.
</li>
<li><b>Shift-Control-Tab</b> selects the tab preceding the currently selected one.
</li>
<li><b>Alt-K</b>, where <b>K</b> is the mnemonic (underlined) character
of any tab, will select that tab.
</li>
</ul>
<p>Multiple notebooks in a single toplevel may be enabled for traversal,
including nested notebooks.  
However, notebook traversal only works properly if all panes
are direct children of the notebook.
</p>
</section>
<section>
<title>TAB IDENTIFIERS</title>
<p>The <i>tabid</i> argument to the above commands may take
any of the following forms:
</p>
<ul>
<li>An integer between zero and the number of tabs;
</li>
<li>The name of a slave window;
</li>
<li>A positional specification of the form "@<i>x</i>,<i>y</i>",
which identifies the tab 
</li>
<li>The literal string "<b>current</b>",
which identifies the currently-selected tab; or:
</li>
<li>The literal string "<b>end</b>",
which returns the number of tabs 
(only valid for "<i>pathname</i> <b>index</b>").

</li>
</ul>
</section>
<section>
<title>VIRTUAL EVENTS</title>
<p>The notebook widget generates a <b>&lt;&lt;NotebookTabChanged&gt;&gt;</b>
virtual event after a new tab is selected.
</p>
</section>
<section>
<title>EXAMPLE</title>
<example>
notebook .nb
.nb add [frame .nb.f1] -text "First tab"
.nb add [frame .nb.f2] -text "Second tab"
.nb select .nb.f2
ttk::notebook::enableTraversal .nb
</example>
</section>
<seealso>
<ref>widget(n)</ref>
<ref>grid(n)</ref>
</seealso>
<keywords>
<keyword>pane</keyword>
<keyword>tab</keyword>
</keywords>
</manpage>