亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? gtk_tut-31.html

?? GTK development guide
?? HTML
?? 第 1 頁 / 共 2 頁
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.7">
 <TITLE>GTK v1.2 Tutorial: List Widget</TITLE>
 <LINK HREF="gtk_tut-30.html" REL=previous>
 <LINK HREF="gtk_tut.html#toc31" REL=contents>
</HEAD>
<BODY TEXT="#CCCCCC" BGCOLOR="#000000" LINK="#33cc00" VLINK="#009900" ALINK="#FF0000">
Next
<A HREF="gtk_tut-30.html">Previous</A>
<A HREF="gtk_tut.html#toc31">Contents</A>
<HR>
<H2><A NAME="s31">31. List Widget</A></H2>

<P>NOTE: The List widget has been superseded by the CList widget. It is
detailed here just for completeness.
<P>The List widget is designed to act as a vertical container for
widgets that should be of the type ListItem.
<P>A List widget has its own window to receive events and its own
background color which is usually white. As it is directly derived
from a Container it can be treated as such by using the
GTK_CONTAINER(List) macro, see the Container widget for more on
this. One should already be familiar with the usage of a GList and
its related functions g_list_*() to be able to use the List widget
to it full extent.
<P>There is one field inside the structure definition of the List
widget that will be of greater interest to us, this is:
<P>
<BLOCKQUOTE><CODE>
<PRE>
struct _GtkList
{
  ...
  GList *selection;
  guint selection_mode;
  ...
}; 
</PRE>
</CODE></BLOCKQUOTE>
<P>The selection field of a List points to a linked list of all items
that are currently selected, or NULL if the selection is empty.  So to
learn about the current selection we read the GTK_LIST()->selection
field, but do not modify it since the internal fields are maintained
by the gtk_list_*() functions.
<P>The selection_mode of the List determines the selection facilities
of a List and therefore the contents of the GTK_LIST()->selection
field. The selection_mode may be one of the following:
<P>
<UL>
<LI> <CODE>GTK_SELECTION_SINGLE</CODE> - The selection is either NULL
or contains a GList pointer
for a single selected item.
</LI>
<LI> <CODE>GTK_SELECTION_BROWSE</CODE> -  The selection is NULL if the list
contains no widgets or insensitive
ones only, otherwise it contains
a GList pointer for one GList
structure, and therefore exactly
one list item.
</LI>
<LI> <CODE>GTK_SELECTION_MULTIPLE</CODE> -  The selection is NULL if no list
items are selected or a GList pointer
for the first selected item. That
in turn points to a GList structure
for the second selected item and so
on.
</LI>
<LI> <CODE>GTK_SELECTION_EXTENDED</CODE> - The selection is always NULL.</LI>
</UL>
<P>The default is <CODE>GTK_SELECTION_MULTIPLE</CODE>.
<P>
<H2><A NAME="ss31.1">31.1 Signals</A>
</H2>

<P>
<BLOCKQUOTE><CODE>
<PRE>
void selection_changed( GtkList *list );
</PRE>
</CODE></BLOCKQUOTE>
<P>This signal will be invoked whenever the selection field of a List
has changed. This happens when a child of thekList got selected or
deselected.
<P>
<BLOCKQUOTE><CODE>
<PRE>
void select_child( GtkList   *list,
                   GtkWidget *child);
</PRE>
</CODE></BLOCKQUOTE>
<P>This signal is invoked when a child of the List is about to get
selected. This happens mainly on calls to gtk_list_select_item(),
gtk_list_select_child(), button presses and sometimes indirectly
triggered on some else occasions where children get added to or
removed from the List.
<P>
<BLOCKQUOTE><CODE>
<PRE>
void unselect_child( GtkList   *list,
                     GtkWidget *child );
</PRE>
</CODE></BLOCKQUOTE>
<P>This signal is invoked when a child of the List is about to get
deselected. This happens mainly on calls to gtk_list_unselect_item(),
gtk_list_unselect_child(), button presses and sometimes indirectly
triggered on some else occasions where children get added to or
removed from the List.
<P>
<H2><A NAME="ss31.2">31.2 Functions</A>
</H2>

<P>
<BLOCKQUOTE><CODE>
<PRE>
guint gtk_list_get_type( void );
</PRE>
</CODE></BLOCKQUOTE>
<P>Returns the "GtkList" type identifier.
<P>
<BLOCKQUOTE><CODE>
<PRE>
GtkWidget *gtk_list_new( void );
</PRE>
</CODE></BLOCKQUOTE>
<P>Create a new List object. The new widget is returned as a pointer
to a GtkWidget object. NULL is returned on failure.
<P>
<BLOCKQUOTE><CODE>
<PRE>
void gtk_list_insert_items( GtkList *list,
                            GList   *items,
                            gint     position );
</PRE>
</CODE></BLOCKQUOTE>
<P>Insert list items into the list, starting at <CODE>position</CODE>.
<CODE>items</CODE> is a doubly linked list where each nodes data pointer is
expected to point to a newly created ListItem. The GList nodes of
<CODE>items</CODE> are taken over by the list.
<P>
<BLOCKQUOTE><CODE>
<PRE>
void gtk_list_append_items( GtkList *list,
                            GList   *items);
</PRE>
</CODE></BLOCKQUOTE>
<P>Insert list items just like gtk_list_insert_items() at the end of the
list. The GList nodes of <CODE>items</CODE> are taken over by the list.
<P>
<BLOCKQUOTE><CODE>
<PRE>
void gtk_list_prepend_items( GtkList *list,
                             GList   *items);
</PRE>
</CODE></BLOCKQUOTE>
<P>Insert list items just like gtk_list_insert_items() at the very
beginning of the list. The GList nodes of <CODE>items</CODE> are taken over by
the list.
<P>
<BLOCKQUOTE><CODE>
<PRE>
void gtk_list_remove_items( GtkList *list,
                            GList   *items);
</PRE>
</CODE></BLOCKQUOTE>
<P>Remove list items from the list. <CODE>items</CODE> is a doubly linked list
where each nodes data pointer is expected to point to a direct child
of list. It is the callers responsibility to make a call to
g_list_free(items) afterwards. Also the caller has to destroy the list
items himself.
<P>
<BLOCKQUOTE><CODE>
<PRE>
void gtk_list_clear_items( GtkList *list,
                           gint start,
                           gint end );
</PRE>
</CODE></BLOCKQUOTE>
<P>Remove and destroy list items from the list. A widget is affected if
its current position within the list is in the range specified by
<CODE>start</CODE> and <CODE>end</CODE>.
<P>
<BLOCKQUOTE><CODE>
<PRE>
void gtk_list_select_item( GtkList *list,
                           gint     item );
</PRE>
</CODE></BLOCKQUOTE>
<P>Invoke the select_child signal for a list item specified through its
current position within the list.
<P>
<BLOCKQUOTE><CODE>
<PRE>
void gtk_list_unselect_item( GtkList *list,
                             gint     item);
</PRE>
</CODE></BLOCKQUOTE>
<P>Invoke the unselect_child signal for a list item specified through its
current position within the list.
<P>
<BLOCKQUOTE><CODE>
<PRE>
void gtk_list_select_child( GtkList *list,
                            GtkWidget *child);
</PRE>
</CODE></BLOCKQUOTE>
<P>Invoke the select_child signal for the specified child.
<P>
<BLOCKQUOTE><CODE>
<PRE>
void gtk_list_unselect_child( GtkList   *list,
                              GtkWidget *child);
</PRE>
</CODE></BLOCKQUOTE>
<P>Invoke the unselect_child signal for the specified child.
<P>
<BLOCKQUOTE><CODE>
<PRE>
gint gtk_list_child_position( GtkList *list,
                              GtkWidget *child);
</PRE>
</CODE></BLOCKQUOTE>
<P>Return the position of <CODE>child</CODE> within the list. "-1" is returned on
failure.
<P>
<BLOCKQUOTE><CODE>
<PRE>
void gtk_list_set_selection_mode( GtkList         *list,
                                  GtkSelectionMode mode );
</PRE>
</CODE></BLOCKQUOTE>
<P>Set the selection mode MODE which can be of GTK_SELECTION_SINGLE,
GTK_SELECTION_BROWSE, GTK_SELECTION_MULTIPLE or
GTK_SELECTION_EXTENDED.
<P>
<BLOCKQUOTE><CODE>
<PRE>
GtkList *GTK_LIST( gpointer obj );
</PRE>
</CODE></BLOCKQUOTE>
<P>Cast a generic pointer to "GtkList *".
<P>
<BLOCKQUOTE><CODE>
<PRE>
GtkListClass *GTK_LIST_CLASS( gpointer class);
</PRE>
</CODE></BLOCKQUOTE>
<P>Cast a generic pointer to "GtkListClass *". 
<P>
<BLOCKQUOTE><CODE>
<PRE>
gint GTK_IS_LIST( gpointer obj);
</PRE>
</CODE></BLOCKQUOTE>
<P>Determine if a generic pointer refers to a "GtkList" object.
<P>
<H2><A NAME="ss31.3">31.3 Example</A>
</H2>

<P>Following is an example program that will print out the changes of the
selection of a List, and lets you "arrest" list items into a prison
by selecting them with the rightmost mouse button.
<P>
<BLOCKQUOTE><CODE>
<PRE>
/* example-start list list.c */

/* Include the GTK header files
 * Include stdio.h, we need that for the printf() function
 */
#include        &lt;gtk/gtk.h>
#include        &lt;stdio.h>

/* This is our data identification string to store
 * data in list items
 */
const gchar *list_item_data_key="list_item_data";


/* prototypes for signal handler that we are going to connect
 * to the List widget
 */
static void  sigh_print_selection( GtkWidget *gtklist,
                                   gpointer   func_data);

static void  sigh_button_event( GtkWidget      *gtklist,
                                GdkEventButton *event,
                                GtkWidget      *frame );


/* Main function to set up the user interface */

gint main( int    argc,
           gchar *argv[] )
{                                  
    GtkWidget *separator;
    GtkWidget *window;
    GtkWidget *vbox;
    GtkWidget *scrolled_window;
    GtkWidget *frame;
    GtkWidget *gtklist;
    GtkWidget *button;
    GtkWidget *list_item;
    GList *dlist;
    guint i;
    gchar buffer[64];
    
    
    /* Initialize GTK (and subsequently GDK) */

    gtk_init(&amp;argc, &amp;argv);
    
    
    /* Create a window to put all the widgets in
     * connect gtk_main_quit() to the "destroy" event of
     * the window to handle window manager close-window-events
     */
    window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
    gtk_window_set_title(GTK_WINDOW(window), "GtkList Example");
    gtk_signal_connect(GTK_OBJECT(window),
                       "destroy",
                       GTK_SIGNAL_FUNC(gtk_main_quit),
                       NULL);
    
    
    /* Inside the window we need a box to arrange the widgets
     * vertically */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品乱码久久久久久黑人| 99久久久精品免费观看国产蜜| 美腿丝袜一区二区三区| 国产精品一区二区果冻传媒| 欧洲在线/亚洲| 国产性色一区二区| 日本不卡一区二区| 色偷偷一区二区三区| 2023国产精华国产精品| 午夜视频一区在线观看| 99久久精品免费| 久久一区二区视频| 琪琪久久久久日韩精品| 91福利在线看| 日韩理论片网站| av高清久久久| 久久综合一区二区| 精品在线亚洲视频| 欧美一卡二卡三卡| 中文欧美字幕免费| 91在线精品一区二区| 日韩不卡手机在线v区| 国产香蕉久久精品综合网| 欧美日韩精品免费观看视频 | 国产99久久久精品| 中文幕一区二区三区久久蜜桃| 色婷婷久久99综合精品jk白丝| 久久91精品久久久久久秒播| 中文字幕亚洲视频| 日韩视频中午一区| 91.xcao| 欧洲一区在线电影| 色婷婷国产精品久久包臀| 91污在线观看| 香蕉影视欧美成人| 一区二区三区日韩| 精品一区二区久久| 91麻豆国产福利在线观看| 久久新电视剧免费观看| 六月丁香综合在线视频| 久久久亚洲欧洲日产国码αv| 精品系列免费在线观看| 久久精品国产色蜜蜜麻豆| 国产成a人亚洲精品| 精品毛片乱码1区2区3区| 婷婷综合五月天| 午夜久久电影网| 欧美精品一级二级| 麻豆精品一区二区三区| 精品福利在线导航| 成人涩涩免费视频| 亚洲卡通欧美制服中文| 欧美精选一区二区| 国产在线精品国自产拍免费| 国产精品理论片| 国产精品不卡一区二区三区| 国产精品免费人成网站| 曰韩精品一区二区| 久久99热狠狠色一区二区| 蜜臀av一区二区在线观看| 午夜久久久久久久久| 欧美在线不卡视频| 欧美午夜精品理论片a级按摩| 成人免费高清视频在线观看| 亚洲日本在线a| 欧美精品aⅴ在线视频| 九色综合狠狠综合久久| 中文字幕精品一区二区精品绿巨人| 91丨porny丨中文| 美国三级日本三级久久99 | 国产乱码精品一区二区三| 国产精品久久久久久久久免费桃花| 欧美亚洲愉拍一区二区| 国产在线精品国自产拍免费| 亚洲精品国产精品乱码不99 | 久久成人免费网站| 亚洲欧洲日韩一区二区三区| 在线亚洲+欧美+日本专区| 美脚の诱脚舐め脚责91 | 欧美aaaaaa午夜精品| 日韩一区中文字幕| 欧美精品xxxxbbbb| 国产盗摄精品一区二区三区在线| 亚洲综合免费观看高清完整版| 国内精品国产成人| ww亚洲ww在线观看国产| 欧美日韩综合在线| 男女性色大片免费观看一区二区| 欧美三级一区二区| 亚洲人成网站影音先锋播放| 丁香婷婷综合色啪| 综合久久国产九一剧情麻豆| 色综合久久久久| 亚洲综合一区二区三区| 色婷婷av一区二区三区大白胸 | 国产一区二区三区免费| 亚洲欧美激情小说另类| 久久综合九色综合97婷婷女人 | av动漫一区二区| 国模少妇一区二区三区| 亚洲成a人v欧美综合天堂下载| 国产欧美精品区一区二区三区 | 日韩伦理电影网| 国产日韩视频一区二区三区| 欧美成人aa大片| 欧美视频中文一区二区三区在线观看| 丁香五精品蜜臀久久久久99网站| 久久99精品久久只有精品| 五月激情综合网| 亚洲国产综合人成综合网站| 一区二区三区四区精品在线视频| 国产精品久久99| 中文字幕成人av| 国产精品久久久久天堂| 日本一区二区在线不卡| 久久毛片高清国产| 精品精品国产高清一毛片一天堂| 欧美日韩综合在线| 制服丝袜av成人在线看| 91精品国产美女浴室洗澡无遮挡| 在线观看免费成人| 欧美系列亚洲系列| 欧美理论电影在线| 欧美久久久久久久久| 日韩一区二区三区av| 日韩色在线观看| 久久在线观看免费| 国产日韩v精品一区二区| 久久九九全国免费| 亚洲人成亚洲人成在线观看图片 | 视频一区视频二区中文| 欧美a级理论片| 国产精品自拍一区| 99久久国产综合精品麻豆 | 成人av网站在线| 日本高清不卡视频| 制服丝袜亚洲播放| 久久精品网站免费观看| 国产精品国产自产拍在线| 亚洲精品中文字幕在线观看| 亚洲一二三专区| 蜜乳av一区二区| 粉嫩av一区二区三区粉嫩| 色综合天天狠狠| 欧美一区二区三区人| 久久久蜜桃精品| 一区二区三区在线视频免费观看 | 免费在线看成人av| 欧美色综合网站| 69堂亚洲精品首页| 精品国产3级a| 亚洲精品国产精华液| 日本91福利区| 国产不卡视频一区| 欧美在线|欧美| 欧美日韩亚洲综合| 国产精品嫩草99a| 天天亚洲美女在线视频| 97超碰欧美中文字幕| 日韩无一区二区| 国产精品久久久久久久久久免费看| 亚洲精品大片www| 国产成人精品亚洲午夜麻豆| 欧美精品国产精品| 中文字幕亚洲区| 激情欧美一区二区| 欧美色综合影院| 中文字幕一区二区三区不卡在线 | 亚洲精品在线一区二区| 亚洲精品中文在线| 国产高清在线精品| 91麻豆精品国产自产在线| 中文字幕一区二区三区四区 | 国产成人午夜99999| 欧美二区乱c少妇| 亚洲女同ⅹxx女同tv| 国产精品一二三区在线| 91精品午夜视频| 亚洲综合一二三区| 99国产精品久久久| 国产精品免费人成网站| 韩国三级在线一区| 欧美一级欧美三级| 五月天激情综合| 欧美三片在线视频观看| 亚洲视频在线一区| 成人激情免费视频| 久久丝袜美腿综合| 久久99精品网久久| 欧美大尺度电影在线| 日韩激情视频在线观看| 欧美网站大全在线观看| 亚洲一区二区三区美女| 日本久久电影网| 一区二区在线观看av| 色综合天天做天天爱| 自拍偷拍国产精品| 91福利在线看| 亚洲国产毛片aaaaa无费看| 一本久久精品一区二区|