12.4 List Item物件
GtkListItem物件是设计用来做为container的子物件, 用来提供selection/deselection的功能.
GtkListItem有自己的视窗来接收事件并有其自身的背景颜色, 一般是白色的.
因为是由GtkItem而来的, 它也可以用GTK_ITEM(ListItem)巨集. 一般GtkListItem只有一个标签, 用来记录例如一个档名. 另外还有一个很好用的函数gtk_list_item_new_with_label(). 若您不想加GtkLabel到GtkListItem, 也可以加GtkVBox或GtkArrow.
12.5 信号
GtkListItem不产生自己的新的信号, 但它继承GtkItem的信号.
12.6 函数
|
返回`GtkListItem' type identifier.
|
产生新的`GtkListItem' object. 新物件返回一个指标给`GtkWidget'物件. `NULL'表示错误.
|
产生新的`GtkListItem'物件, 并带一个标签. 并返回一个`GtkWidget' object. `NULL'表示错误.
|
这个函数基本上是将gtk_item_select (GTK_ITEM (list_item))包装起来. 它将会送GtkItem::select信号. *Note GtkItem::, for more info.
|
这个函数基本上是将gtk_item_deselect (GTK_ITEM (list_item))包装起来. 它将会送GtkItem::deselect信号. *Note GtkItem::, for more info.
|
传一个generic pointer到`GtkListItem*'. *Note Standard Macros::, for more info.
|
传一个generic pointer到`GtkListItemClass*'. *Note Standard Macros::, for more info.
|
决定generic pointer是否对照到`GtkListItem' object. *Note Standard Macros::, for more info.
12.7 例子
Please see the GtkList example on this, which covers the usage of a GtkListItem as well.
--------------------------------------------------------------------------------
译注: List物件这一篇本身比较不容易翻译, 因原文本身讲的并不太清楚. 此外, 其结构原本就比较繁琐. 若您在此糟遇问题, 可来信反应. 译者会想办法将其改善.
If you got stuck here, it's mostly not your problem. Don't feel frustration. The List Widget itself is pretty complicated. You may drop me a word if you need. I will try to improve it.
13. Undocumented Widgets
These all require authors! :) Please consider contributing to our tutorial.
If you must use one of these widgets that are undocumented, I strongly suggest you take a look at their respective header files in the GTK distro. GTK's function names are very descriptive. Once you have an understanding of how things work, it's not easy to figure out how to use a widget simply by looking at it's function declarations. This, along with a few examples from others' code, and it should be no problem.
When you do come to understand all the functions of a new undocumented widget, please consider writing a tutorial on it so others may benifit from your time.
13.1 Text Entries
13.2 Color Selections
13.3 Range Controls
13.4 Rulers
13.5 Text Boxes
13.6 Previews
(This may need to be rewritten to follow the style of the rest of the tutorial)
Previews serve a number of purposes in GIMP/GTK. The most important one is this. High quality images may take up to tens of megabytes of memory - easy! Any operation on an image that big is bound to take a long time. If it takes you 5-10 trial-and-errors (i.e. 10-20 steps, since you have to revert after you make an error) to choose the desired modification, it make take you literally hours to make the right one - if you don't run out of memory first. People who have spent hours in color darkrooms know the feeling.Previews to the rescue!
But the annoyance of the delay is not the only issue. Oftentimes it is helpful to compare the Before and After versions side-by-side or at least back-to-back. If you're working with big images and 10 second delays, obtaining the Before and After impressions is, to say the least, difficult. For 30M images (4"x6", 600dpi, 24 bit) the side-by-side comparison is right out for most people, while back-to-back is more like back-to-1001, 1002, ..., 1010-back! Previews to the rescue!