SelectionListener 实现的构造函数接受一个布尔变量,该变量定义要展开还是折叠树项目,具体取决于选中了哪个按钮。
The constructor for the SelectionListener implementation accepts a Boolean variable that defines whether the tree items are to be expanded or collapsed, depending on which button is selected.
而且,该函数返回布尔值,因为为gtk Widget定义的delete - event信号的回调原型指明的是布尔返回值。
Also, the function returns a Boolean value because the callback prototype for the delete-event signal defined for GtkWidget states a Boolean return.
清单1显示了一个简单的例子,它声明了一个包含6个属性的hash:一个字符串、一个整数、一个布尔值、一个未定义的属性、另一个hash和一个函数。
A simple example is shown in Listing 1, declaring a hash consisting of 6 attributes: a string, an integer, a Boolean, an undefined attribute, another hash, and a function.
应用推荐