diff options
author | jenglish <jenglish@flightlab.com> | 2007-11-25 18:11:10 (GMT) |
---|---|---|
committer | jenglish <jenglish@flightlab.com> | 2007-11-25 18:11:10 (GMT) |
commit | 37a492a973a6293e2324e7a9d66dee21daf1d033 (patch) | |
tree | 22175f1ab591c35a78f6f7b5914368ecf10d3186 /doc/ttk_notebook.n | |
parent | 81e551c563bf0c2e7ba07e4b6f207bbae50242df (diff) | |
download | tk-37a492a973a6293e2324e7a9d66dee21daf1d033.zip tk-37a492a973a6293e2324e7a9d66dee21daf1d033.tar.gz tk-37a492a973a6293e2324e7a9d66dee21daf1d033.tar.bz2 |
Internal Ttk_Manager API updates; Fixed [Bug 1343984];
Added [$nb hide] method; [$nb add] on already-managed windows
no longer throws an error, can be used to re-add a hidden tab.
Updated docs and test suite.
Diffstat (limited to 'doc/ttk_notebook.n')
-rw-r--r-- | doc/ttk_notebook.n | 62 |
1 files changed, 34 insertions, 28 deletions
diff --git a/doc/ttk_notebook.n b/doc/ttk_notebook.n index edef6ac..deb8648 100644 --- a/doc/ttk_notebook.n +++ b/doc/ttk_notebook.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ttk_notebook.n,v 1.8 2007/11/01 10:59:43 dkf Exp $ +'\" RCS: @(#) $Id: ttk_notebook.n,v 1.9 2007/11/25 18:11:12 jenglish Exp $ '\" .so man.macros .TH ttk::notebook n 8.5 Tk "Tk Themed Widget" @@ -13,17 +13,17 @@ ttk::notebook \- Multi-paned container widget .SH SYNOPSIS .nf -\fBttk::notebook\fR \fIpathName \fR?\fIoptions\fR? +\fBttk::notebook\fR \fIpathName \fR?\fIoptions...\fR? .br -\fIpathName \fBadd\fR \fIpathName\fR.\fIsubwindow\fR ?\fIoptions...\fR? -\fIpathName \fBinsert\fR \fIindex\fR \fIpathName\fR.\fIsubwindow\fR ?\fIoptions...\fR? +\fIpathName \fBadd\fR \fIwindow\fR ?\fIoptions...\fR? +\fIpathName \fBinsert\fR \fIindex\fR \fIwindow\fR ?\fIoptions...\fR? .fi .BE .SH DESCRIPTION -A \fBttk::notebook\fR widget manages a collection of subpanes +A \fBttk::notebook\fR widget manages a collection of windows and displays a single one at a time. -Each pane is associated with a tab, which the user -may select to change the currently-displayed pane. +Each slave window is associated with a \fItab\fR, +which the user may select to change the currently-displayed window. .SO \-class \-cursor \-takefocus \-style .SE @@ -51,14 +51,14 @@ Otherwise, the maximum width of all panes is used. The following options may be specified for individual notebook panes: .OP \-state state State Either \fBnormal\fR, \fBdisabled\fR or \fBhidden\fR. -If \fBdisabled\fR, then the tab is not selectable. If \fBhidden\fR, -then the tab is not shown. +If \fBdisabled\fR, then the tab is not selectable. +If \fBhidden\fR, then the tab is not shown. .OP \-sticky sticky Sticky -Specifies how the child pane is positioned within the pane area. +Specifies how the slave window is positioned within the pane area. Value is a string containing zero or more of the characters \fBn, s, e,\fR or \fBw\fR. Each letter refers to a side (north, south, east, or west) -that the child window will +that the slave window will .QW stick to, as per the \fBgrid\fR geometry manager. .OP \-padding padding Padding @@ -67,8 +67,8 @@ Syntax is the same as for the widget \fB\-padding\fR option. .OP \-text text Text Specifies a string to be displayed in the tab. .OP \-image image Image -Specifies an image to display in the tab, -which must have been created with the \fBimage create\fR command. +Specifies an image to display in the tab. +See \fIttk_widget(n)\fR for details. .OP \-compound compound Compound Specifies how to display the image relative to the text, in the case both \fB\-text\fR and \fB\-image\fR are present. @@ -80,12 +80,11 @@ The underlined character is used for mnemonic activation if \fBttk::notebook::enableTraversal\fR is called. .SH "WIDGET COMMAND" .TP -\fIpathname \fBadd \fIchild\fR ?\fIoptions...\fR? +\fIpathname \fBadd\fR \fIwindow\fR ?\fIoptions...\fR? Adds a new tab to the notebook. -When the tab is selected, the \fIchild\fR window -will be displayed. -\fIchild\fR must be a direct child of the notebook window. See \fBTAB OPTIONS\fR for the list of available \fIoptions\fR. +If \fIwindow\fR is currently managed by the notebook but hidden, +it is restored to its previous position. .TP \fIpathname \fBconfigure\fR ?\fIoptions\fR? See \fIttk::widget(n)\fR. @@ -95,7 +94,13 @@ See \fIttk::widget(n)\fR. .TP \fIpathname \fBforget\fR \fItabid\fR Removes the tab specified by \fItabid\fR, -unmaps and unmanages the associated child window. +unmaps and unmanages the associated window. +.TP +\fIpathname \fBhide\fR \fItabid\fR +Hides the tab specified by \fItabid\fR. +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 \fBadd\fR command. .TP \fIpathname \fBindex\fR \fItabid\fR Returns the numeric index of the tab specified by \fItabid\fR, @@ -114,25 +119,26 @@ See \fBTAB OPTIONS\fR for the list of available options. See \fIttk::widget(n)\fR. .TP \fIpathname \fBselect\fR ?\fItabid\fR? -Selects the specified tab. The associated child pane will be displayed, -and the previously-selected pane (if different) is unmapped. +Selects the specified tab. +The associated slave window will be displayed, +and the previously-selected window (if different) is unmapped. If \fItabid\fR is omitted, returns the widget name of the currently selected pane. .TP \fIpathname \fBstate\fR ?\fIstatespec\fR? See \fIttk::widget(n)\fR. .TP -\fIpathname \fBtab\fR \fItabid\fR ?\fI\-options \fR?\fIvalue ...\fR +\fIpathname \fBtab\fR \fItabid\fR ?\fI\-option \fR?\fIvalue ...\fR Query or modify the options of the specific tab. -If no \fI\-option\fR is specified, returns a dictionary of the tab -option values. -If one \fI\-option\fR is specified, returns the value of that \fIoption\fR. +If no \fI\-option\fR is specified, +returns a dictionary of the tab option values. +If one \fI\-option\fR is specified, +returns the value of that \fIoption\fR. Otherwise, sets the \fI\-option\fRs to the corresponding \fIvalue\fRs. See \fBTAB OPTIONS\fR for the available options. .TP \fIpathname \fBtabs\fR -Returns a list of all windows managed by the widget. -.\" Perhaps "panes" is a better name for this command? +Returns the list of windows managed by the notebook. .SH "KEYBOARD TRAVERSAL" To enable keyboard traversal for a toplevel window containing a notebook widget \fI$nb\fR, call: @@ -140,7 +146,7 @@ containing a notebook widget \fI$nb\fR, call: ttk::notebook::enableTraversal $nb .CE .PP -This will extend the bindings for the toplevel widget +This will extend the bindings for the toplevel window containing the notebook as follows: .IP \(bu \fBControl-Tab\fR selects the tab following the currently selected one. @@ -160,7 +166,7 @@ any of the following forms: .IP \(bu An integer between zero and the number of tabs; .IP \(bu -The name of a child pane window; +The name of a slave window; .IP \(bu A positional specification of the form .QW @\fIx\fR,\fIy\fR , |