7.2.8. Assistant

来源:互联网 发布:势不可挡网络剧第一季 编辑:程序博客网 时间:2024/06/11 15:35

学习gtkmm有几周了,英语太烂了,硬着头皮边看边记,还没把握,发上来,大家斧正

7.2.8. Assistant

AnAssistantsplits a complex operation into steps. Each step is a page, containing a header, a child widget and an action area. The Assistant's action area has navigation buttons which update automatically depending on the type of the page, set withset_page_type().

Assistant拆分复杂的操作步骤。每一步是一个包含标题、子控件和动作区的页面。Assistant的动作区有导航按钮,导航按钮依据页面类型自动设置更新,页面类型使用set_page_type()设置。

Use theappend_page(),prepend_pageandinsert_page()methods to add pages to theAssistant, supplying the child widget for each page.

使用append_page()prepend_pageinsert_page()的方法,将页面添加到Assistant,为页面添加子控件。

To determine the currently-visible page, use theget_current_page()method, and pass the result toget_nth_page(), which returns a pointer to the actual widget. To programmatically change the current page, use theset_current_page()method.

使用get_current_page()方法,获得当前可见页编号。然后用这个页编号调用get_nth_page(),得到指向子控件的指针。以编程方式更改当前页,可使用set_current_page()方法。

To set the title of a page, use theset_page_title()method. The header and side images of a page can be set with theset_page_header_image()andset_page_side_image()methods.

若要设置页的标题,可使用set_page_title()方法。用set_page_header_image()set_page_side_image()的方法,设置页的标题和边侧的图像。

To add widgets to the action area, use theadd_action_widget()method. They will be packed alongside the default buttons. Use theremove_action_widget()method to remove widgets.

使用add_action_widget()方法,将控件添加到动作区。他们将包装旁边的默认值按钮。用remove_action_widget()方法来删除控件。

参考

§  7.2.8.1. 示例

7.2.8.1. 示例

7-13 Assistant


源代码