The notebook is a special layout class for displaying several pages of objects in a compact and easily accessible manner. It has somewhat the appearance of a notebook with tabs, showing one page fully and just tabs and edges for other pages. Each child has its own page, and can, of course, be of any class, including a layout or notebook. The notebook does not honor any constraints on a child, configuring it for the available space.Visual Representation
The user can choose an object to be shown by clicking on the tab of its page, which causes the currentpage attribute to be set to the name of the object and thus that page to be shown. This causes a `pagechangecb callback.
The tabs are actually arranged in a line (rather than apparently attached to the pages), and as many are shown as will fit in the window. When not all are shown, scrolling arrows are provided. The tab of the page being shown is absent if it is outside the range of tabs being shown. Otherwise, it is shown attached to its page and aligned with the position in which it would appear if its page were not being shown.
The backpages attribute controls the apparent thickness of the notebook, i.e., the number of page edges depicted. It is not related to either the number of pages in the notebook or the number of tabs that are shown.
The backpagefg and backpagebg attributes control the colors of the tabs and page edges, but not of the titles on the tabs, which obey the fg attribute (and use the various title... attributes for their text).
Notebooks can be shown in horizontal or vertical orientation, that is, with binding left and tabs right or binding top and tabs bottom. The spiral binding can be shown or not, and its width (diameter) can be specified. The current page (with its tab, if shown) is outlined by a frame, half highlighted and half in shadow, which, especially when thickened, gives it a strange raised and beveled appearance. The background color (framebg) and thickness (framethickness) of that frame can be specified; 0 thickness makes it vanish. There are margins around an object on its page. The top and bottom margins are controlled by the marginheight attribute, the left and right by marginwidth.
Attributes`page1 is `view Ý page1û80 40Ò" view " `page2 is `scalar Ý page2û"scalar" page3ûÉ10 10 `page3 has (`class;`array; `title;'Page 3') nbû`page1 `page2 `page3 `nb is `notebook `nb has (`title;'Sample Notebook'; `shelltitle;'Window with Notebook') `page1 has (`pagetitle;"1. View") ã Insert titles for the tabs, `page2 has (`pagetitle;"2. Scalar") ã after making the objects `page3 has (`pagetitle;"3. Array") ã the children of notebook. ã To make the tabs readable, lighten their background. `nb has `backpagebg `deepskyblue ã Place the third page at the front. `nb has (`currentpage;`page3) `nb has (`bg;`white) `nb has (`selectedpagebg;`yellow) show `nb
See the "Display Attributes" chapter for details concerning all the attributes that apply to objects in the notebook display class, as well as lists of colors and fonts. The keys in the Table of All Display Attributes that pertain to this class are O, ALL, CNFT, CNT, NFT, and TOP.
The attributes that are meaningful for the notebook display class (other than the print... attributes) are:
active(Point the mouse cursor to an attribute to display a short description at the bottom of the screen)
|firstname.lastname@example.org||© Copyright 19952008 Morgan Stanley Dean Witter & Co. All rights reserved.|