学习gtkmm有几周了,英语太烂了,硬着头皮边看边记,还没把握,发上来,大家斧正
7.2.7. Notebook
ANotebookhas a set of stackedpages, each of which contains widgets. Labelledtabsallow the user to select the pages.Notebooks allow several sets of widgets to be placed in a small space, by only showing one page at a time. For instance, they are often used in preferences dialogs.
Notebook有一个堆迭的页的集合,其中每个页可包含子控件。标签选项卡允许用户选择页面。Notebook允许几套子控件放在同一块空间,每次只显示一页。例如,常用的首选项对话框。
Use theappend_page(),prepend_page()andinsert_page()methods to add tabbed pages to theNotebook, supplying the child widget and the name for the tab.
提供子控件和选项卡的名称,使用append_page()、prepend_page()和insert_page()的方法,将选项卡式的页面添加到Notebook。
To discover the currently visible page, use theget_current_page()method. This returns the page number, and then callingget_nth_page()with that number will give you a pointer to the actual child widget.
使用get_current_page()方法,获得当前可见页编号。然后用这个页编号调用get_nth_page(),得到指向子控件的指针。
To programmatically change the selected page, use theset_current_page()method.
以编程方式更改选定的页面,可使用set_current_page()方法。
§ 7.2.7.1. 示例
7.2.7.1. 示例
图 7-12 Notebook