7.2.8. Assistant

学习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


源代码

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值