Linux中国 Linux中国门户站!
设为主页 设为主页
收藏本站 收藏本站
 
当前位置 :首页 ->Linux技术 ->系统管理 ->正文

GTK入门导引

来源:Linux-cn.com 作者:Webmaster 时间:2007-05-05 点击: [收藏] [投稿]

  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 函数


guint gtk_list_item_get_type (void)

  返回`GtkListItem' type identifier.


GtkWidget* gtk_list_item_new (void)

  产生新的`GtkListItem' object. 新物件返回一个指标给`GtkWidget'物件. `NULL'表示错误.


GtkWidget* gtk_list_item_new_with_label (gchar *LABEL)

  产生新的`GtkListItem'物件, 并带一个标签. 并返回一个`GtkWidget' object. `NULL'表示错误.


void gtk_list_item_select (GtkListItem *LIST_ITEM)

  这个函数基本上是将gtk_item_select (GTK_ITEM (list_item))包装起来. 它将会送GtkItem::select信号. *Note GtkItem::, for more info.


void gtk_list_item_deselect (GtkListItem *LIST_ITEM)

  这个函数基本上是将gtk_item_deselect (GTK_ITEM (list_item))包装起来. 它将会送GtkItem::deselect信号. *Note GtkItem::, for more info.


GtkListItem* GTK_LIST_ITEM (gpointer OBJ)

  传一个generic pointer到`GtkListItem*'. *Note Standard Macros::, for more info.


GtkListItemClass* GTK_LIST_ITEM_CLASS (gpointer CLASS)

  传一个generic pointer到`GtkListItemClass*'. *Note Standard Macros::, for more info.


gint GTK_IS_LIST_ITEM (gpointer OBJ)

  决定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!

 如果您对本文有任何疑问或者建议,请到讨论区发表您的意见: >> 论坛入口 <<

上一页 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1617 18 19 20 21 22 23 24 25 26 27 28 下一页


上一篇:GTK+/Gnome应用开发   下一篇:GTK v1.2 Tutorial(英文)

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章
·Motorola微处理器bootloader分析与应用
·Fedora Core5 NFS服务器搭建过程介绍
·Linux系统:让内存不再泄漏的实用技巧
·新手看招 手把手教你安装VMware虚拟机
·“侵权事件” 红帽称微软企图干扰用户
·删除Linux后 如何找回Windows启动菜单
·菜鸟乐园 Linux中常见文件系统格式介绍
·Linux操作系统下IPTables配置方法详解
·实用技巧 Linux系统的经典使用技巧八则
·Linux系统文件优化及磁盘检查方法介绍
推荐文章
·和luster一起学习系统调用(5)
·Java入门(2) 面向对象的程序设计
·Linux 99问(四)
·Enhydra入门-走进中国的Enhydra
·Servlet、Jsp性能优化
·解读Linux文件权限的设置方法
·了解你的敌人:Statistics
·在LINUX下安装 Sybase ASE 11.0.3.
精彩文章
·读核日记(一)
·活用Linux的后台任务
·如何配置Linux操作系统安全管理服务
·UW IMAP 服务器的性能优化
·在linux下如何使用USB盘
·怎样设置一个档案来作为 linux 的转
·Red Hat测试新版Linux 支持Xen虚拟
·Linux Remote-Boot mini-HOWTO
·GAWK 手册(七)
·RedHat环境下使用APT在线更新系统
·系统管理进阶-用户管理
·Linux命令Man解释:usermod:修改使用
·X-Window中如何设置字体
·基于IPsec的虚拟专用网在Linux上的
·Linux下的IP隧道研究(2)
·Linux下新手装网卡指南
·Linux 网管 123 --- 第9章. 各种杂
·设置一个高容量的Linux POP3服务器
·Linux指令大全
·Ethernet HOWTO Linux以太网-HOWTO
·FreeBSD 5.0 硬盘安装指南
·Java入门(8) 创建新类
·进程vs线程,如何选择?
·网站综合实例
·搭建基于Linux桌面环境的影音平台
·提升PHP速度全攻略
Power by linux-cn.com 粤ICP备05006655号