[gtk+/gtk-2.90: 19/59] Remove GtkCList, GtkCTree, GtkFileSelection and GtkPreeview tests
- From: Christian Dywan <cdywan src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2.90: 19/59] Remove GtkCList, GtkCTree, GtkFileSelection and GtkPreeview tests
- Date: Wed, 7 Oct 2009 18:38:10 +0000 (UTC)
commit 8ea48888c89cd4c13a66a82db63dff09064a8d41
Author: Christian Dywan <christian twotoasts de>
Date: Wed Oct 7 18:00:37 2009 +0200
Remove GtkCList, GtkCTree, GtkFileSelection and GtkPreeview tests
tests/testgtk.c | 2011 -------------------------------------------------------
1 files changed, 0 insertions(+), 2011 deletions(-)
---
diff --git a/tests/testgtk.c b/tests/testgtk.c
index aa727e7..9d47b43 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -6400,1740 +6400,6 @@ create_cursors (GtkWidget *widget)
}
/*
- * GtkList
- */
-
-static void
-list_add (GtkWidget *widget,
- GtkWidget *list)
-{
- static int i = 1;
- gchar buffer[64];
- GtkWidget *list_item;
- GtkContainer *container;
-
- container = GTK_CONTAINER (list);
-
- sprintf (buffer, "added item %d", i++);
- list_item = gtk_list_item_new_with_label (buffer);
- gtk_widget_show (list_item);
-
- gtk_container_add (container, list_item);
-}
-
-static void
-list_remove (GtkWidget *widget,
- GtkList *list)
-{
- GList *clear_list = NULL;
- GList *sel_row = NULL;
- GList *work = NULL;
-
- if (list->selection_mode == GTK_SELECTION_EXTENDED)
- {
- GtkWidget *item;
-
- item = GTK_CONTAINER (list)->focus_child;
- if (!item && list->selection)
- item = list->selection->data;
-
- if (item)
- {
- work = g_list_find (list->children, item);
- for (sel_row = work; sel_row; sel_row = sel_row->next)
- if (GTK_WIDGET (sel_row->data)->state != GTK_STATE_SELECTED)
- break;
-
- if (!sel_row)
- {
- for (sel_row = work; sel_row; sel_row = sel_row->prev)
- if (GTK_WIDGET (sel_row->data)->state != GTK_STATE_SELECTED)
- break;
- }
- }
- }
-
- for (work = list->selection; work; work = work->next)
- clear_list = g_list_prepend (clear_list, work->data);
-
- clear_list = g_list_reverse (clear_list);
- gtk_list_remove_items (GTK_LIST (list), clear_list);
- g_list_free (clear_list);
-
- if (list->selection_mode == GTK_SELECTION_EXTENDED && sel_row)
- gtk_list_select_child (list, GTK_WIDGET(sel_row->data));
-}
-
-static void
-list_clear (GtkWidget *widget,
- GtkWidget *list)
-{
- gtk_list_clear_items (GTK_LIST (list), 0, -1);
-}
-
-static gchar *selection_mode_items[] =
-{
- "Single",
- "Browse",
- "Multiple"
-};
-
-static const GtkSelectionMode selection_modes[] = {
- GTK_SELECTION_SINGLE,
- GTK_SELECTION_BROWSE,
- GTK_SELECTION_MULTIPLE
-};
-
-static GtkWidget *list_omenu;
-
-static void
-list_toggle_sel_mode (GtkWidget *widget, gpointer data)
-{
- GtkList *list;
- gint i;
-
- list = GTK_LIST (data);
-
- if (!GTK_WIDGET_MAPPED (widget))
- return;
-
- i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget));
-
- gtk_list_set_selection_mode (list, selection_modes[i]);
-}
-
-static void
-create_list (GtkWidget *widget)
-{
- static GtkWidget *window = NULL;
-
- if (!window)
- {
- GtkWidget *cbox;
- GtkWidget *vbox;
- GtkWidget *hbox;
- GtkWidget *label;
- GtkWidget *scrolled_win;
- GtkWidget *list;
- GtkWidget *button;
- GtkWidget *separator;
- FILE *infile;
-
- window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-
- gtk_window_set_screen (GTK_WINDOW (window),
- gtk_widget_get_screen (widget));
-
- g_signal_connect (window, "destroy",
- G_CALLBACK (gtk_widget_destroyed),
- &window);
-
- gtk_window_set_title (GTK_WINDOW (window), "list");
- gtk_container_set_border_width (GTK_CONTAINER (window), 0);
-
- vbox = gtk_vbox_new (FALSE, 0);
- gtk_container_add (GTK_CONTAINER (window), vbox);
-
- scrolled_win = gtk_scrolled_window_new (NULL, NULL);
- gtk_container_set_border_width (GTK_CONTAINER (scrolled_win), 5);
- gtk_widget_set_size_request (scrolled_win, -1, 300);
- gtk_box_pack_start (GTK_BOX (vbox), scrolled_win, TRUE, TRUE, 0);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
- GTK_POLICY_AUTOMATIC,
- GTK_POLICY_AUTOMATIC);
-
- list = gtk_list_new ();
- gtk_list_set_selection_mode (GTK_LIST (list), GTK_SELECTION_SINGLE);
- gtk_scrolled_window_add_with_viewport
- (GTK_SCROLLED_WINDOW (scrolled_win), list);
- gtk_container_set_focus_vadjustment
- (GTK_CONTAINER (list),
- gtk_scrolled_window_get_vadjustment
- (GTK_SCROLLED_WINDOW (scrolled_win)));
- gtk_container_set_focus_hadjustment
- (GTK_CONTAINER (list),
- gtk_scrolled_window_get_hadjustment
- (GTK_SCROLLED_WINDOW (scrolled_win)));
-
- if ((infile = fopen("../gtk/gtkenums.h", "r")))
- {
- char buffer[256];
- char *pos;
- GtkWidget *item;
-
- while (fgets (buffer, 256, infile))
- {
- if ((pos = strchr (buffer, '\n')))
- *pos = 0;
- item = gtk_list_item_new_with_label (buffer);
- gtk_container_add (GTK_CONTAINER (list), item);
- }
-
- fclose (infile);
- }
-
-
- hbox = gtk_hbox_new (TRUE, 5);
- gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
-
- button = gtk_button_new_with_label ("Insert Row");
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
- g_signal_connect (button, "clicked",
- G_CALLBACK (list_add),
- list);
-
- button = gtk_button_new_with_label ("Clear List");
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
- g_signal_connect (button, "clicked",
- G_CALLBACK (list_clear),
- list);
-
- button = gtk_button_new_with_label ("Remove Selection");
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
- g_signal_connect (button, "clicked",
- G_CALLBACK (list_remove),
- list);
-
- cbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), cbox, FALSE, TRUE, 0);
-
- hbox = gtk_hbox_new (FALSE, 5);
- gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
- gtk_box_pack_start (GTK_BOX (cbox), hbox, TRUE, FALSE, 0);
-
- label = gtk_label_new ("Selection Mode :");
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
-
- list_omenu = build_option_menu (selection_mode_items, 3, 3,
- list_toggle_sel_mode,
- list);
- gtk_box_pack_start (GTK_BOX (hbox), list_omenu, FALSE, TRUE, 0);
-
- separator = gtk_hseparator_new ();
- gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, TRUE, 0);
-
- cbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), cbox, FALSE, TRUE, 0);
-
- button = gtk_button_new_with_label ("close");
- gtk_container_set_border_width (GTK_CONTAINER (button), 10);
- gtk_box_pack_start (GTK_BOX (cbox), button, TRUE, TRUE, 0);
- g_signal_connect_swapped (button, "clicked",
- G_CALLBACK (gtk_widget_destroy),
- window);
-
- GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
- gtk_widget_grab_default (button);
- }
-
- if (!GTK_WIDGET_VISIBLE (window))
- gtk_widget_show_all (window);
- else
- gtk_widget_destroy (window);
-}
-
-/*
- * GtkCList
- */
-
-static char * book_open_xpm[] = {
-"16 16 4 1",
-" c None s None",
-". c black",
-"X c #808080",
-"o c white",
-" ",
-" .. ",
-" .Xo. ... ",
-" .Xoo. ..oo. ",
-" .Xooo.Xooo... ",
-" .Xooo.oooo.X. ",
-" .Xooo.Xooo.X. ",
-" .Xooo.oooo.X. ",
-" .Xooo.Xooo.X. ",
-" .Xooo.oooo.X. ",
-" .Xoo.Xoo..X. ",
-" .Xo.o..ooX. ",
-" .X..XXXXX. ",
-" ..X....... ",
-" .. ",
-" "};
-
-static char * book_closed_xpm[] = {
-"16 16 6 1",
-" c None s None",
-". c black",
-"X c red",
-"o c yellow",
-"O c #808080",
-"# c white",
-" ",
-" .. ",
-" ..XX. ",
-" ..XXXXX. ",
-" ..XXXXXXXX. ",
-".ooXXXXXXXXX. ",
-"..ooXXXXXXXXX. ",
-".X.ooXXXXXXXXX. ",
-".XX.ooXXXXXX.. ",
-" .XX.ooXXX..#O ",
-" .XX.oo..##OO. ",
-" .XX..##OO.. ",
-" .X.#OO.. ",
-" ..O.. ",
-" .. ",
-" "};
-
-static char * mini_page_xpm[] = {
-"16 16 4 1",
-" c None s None",
-". c black",
-"X c white",
-"o c #808080",
-" ",
-" ....... ",
-" .XXXXX.. ",
-" .XoooX.X. ",
-" .XXXXX.... ",
-" .XooooXoo.o ",
-" .XXXXXXXX.o ",
-" .XooooooX.o ",
-" .XXXXXXXX.o ",
-" .XooooooX.o ",
-" .XXXXXXXX.o ",
-" .XooooooX.o ",
-" .XXXXXXXX.o ",
-" ..........o ",
-" oooooooooo ",
-" "};
-
-static char * gtk_mini_xpm[] = {
-"15 20 17 1",
-" c None",
-". c #14121F",
-"+ c #278828",
-"@ c #9B3334",
-"# c #284C72",
-"$ c #24692A",
-"% c #69282E",
-"& c #37C539",
-"* c #1D2F4D",
-"= c #6D7076",
-"- c #7D8482",
-"; c #E24A49",
-"> c #515357",
-", c #9B9C9B",
-"' c #2FA232",
-") c #3CE23D",
-"! c #3B6CCB",
-" ",
-" ***> ",
-" >.*!!!* ",
-" ***....#*= ",
-" *!*.!!!**!!# ",
-" .!!#*!#*!!!!# ",
-" @%#!.##.*!!$& ",
-" @;%*!*.#!#')) ",
-" @;;@%!!*$&)'' ",
-" @% % %$'&)$+' ",
-" @; $'*'*)+ ",
-" @;% $+* ')$ ",
-" @;%%;;$+..$)# ",
-" @;%%;@$$$'.$# ",
-" %;@@;;$$+))&* ",
-" %;;;@+$&)&* ",
-" %;;@'))+> ",
-" %;@'&# ",
-" >%$$ ",
-" >= "};
-
-#define TESTGTK_CLIST_COLUMNS 12
-static gint clist_rows = 0;
-static GtkWidget *clist_omenu;
-
-static void
-add1000_clist (GtkWidget *widget, gpointer data)
-{
- gint i, row;
- char text[TESTGTK_CLIST_COLUMNS][50];
- char *texts[TESTGTK_CLIST_COLUMNS];
- GdkBitmap *mask;
- GdkPixmap *pixmap;
- GtkCList *clist;
-
- clist = GTK_CLIST (data);
-
- pixmap = gdk_pixmap_create_from_xpm_d (clist->clist_window,
- &mask,
- >K_WIDGET (data)->style->white,
- gtk_mini_xpm);
-
- for (i = 0; i < TESTGTK_CLIST_COLUMNS; i++)
- {
- texts[i] = text[i];
- sprintf (text[i], "Column %d", i);
- }
-
- texts[3] = NULL;
- sprintf (text[1], "Right");
- sprintf (text[2], "Center");
-
- gtk_clist_freeze (GTK_CLIST (data));
- for (i = 0; i < 1000; i++)
- {
- sprintf (text[0], "CListRow %d", rand() % 10000);
- row = gtk_clist_append (clist, texts);
- gtk_clist_set_pixtext (clist, row, 3, "gtk+", 5, pixmap, mask);
- }
-
- gtk_clist_thaw (GTK_CLIST (data));
-
- g_object_unref (pixmap);
- g_object_unref (mask);
-}
-
-static void
-add10000_clist (GtkWidget *widget, gpointer data)
-{
- gint i;
- char text[TESTGTK_CLIST_COLUMNS][50];
- char *texts[TESTGTK_CLIST_COLUMNS];
-
- for (i = 0; i < TESTGTK_CLIST_COLUMNS; i++)
- {
- texts[i] = text[i];
- sprintf (text[i], "Column %d", i);
- }
-
- sprintf (text[1], "Right");
- sprintf (text[2], "Center");
-
- gtk_clist_freeze (GTK_CLIST (data));
- for (i = 0; i < 10000; i++)
- {
- sprintf (text[0], "CListRow %d", rand() % 10000);
- gtk_clist_append (GTK_CLIST (data), texts);
- }
- gtk_clist_thaw (GTK_CLIST (data));
-}
-
-void
-clear_clist (GtkWidget *widget, gpointer data)
-{
- gtk_clist_clear (GTK_CLIST (data));
- clist_rows = 0;
-}
-
-void clist_remove_selection (GtkWidget *widget, GtkCList *clist)
-{
- gtk_clist_freeze (clist);
-
- while (clist->selection)
- {
- gint row;
-
- clist_rows--;
- row = GPOINTER_TO_INT (clist->selection->data);
-
- gtk_clist_remove (clist, row);
-
- if (clist->selection_mode == GTK_SELECTION_BROWSE)
- break;
- }
-
- if (clist->selection_mode == GTK_SELECTION_EXTENDED && !clist->selection &&
- clist->focus_row >= 0)
- gtk_clist_select_row (clist, clist->focus_row, -1);
-
- gtk_clist_thaw (clist);
-}
-
-void toggle_title_buttons (GtkWidget *widget, GtkCList *clist)
-{
- if (GTK_TOGGLE_BUTTON (widget)->active)
- gtk_clist_column_titles_show (clist);
- else
- gtk_clist_column_titles_hide (clist);
-}
-
-void toggle_reorderable (GtkWidget *widget, GtkCList *clist)
-{
- gtk_clist_set_reorderable (clist, GTK_TOGGLE_BUTTON (widget)->active);
-}
-
-static void
-insert_row_clist (GtkWidget *widget, gpointer data)
-{
- static char *text[] =
- {
- "This", "is an", "inserted", "row.",
- "This", "is an", "inserted", "row.",
- "This", "is an", "inserted", "row."
- };
-
- static GtkStyle *style1 = NULL;
- static GtkStyle *style2 = NULL;
- static GtkStyle *style3 = NULL;
- gint row;
-
- if (GTK_CLIST (data)->focus_row >= 0)
- row = gtk_clist_insert (GTK_CLIST (data), GTK_CLIST (data)->focus_row,
- text);
- else
- row = gtk_clist_prepend (GTK_CLIST (data), text);
-
- if (!style1)
- {
- GdkColor col1 = { 0, 0, 56000, 0};
- GdkColor col2 = { 0, 32000, 0, 56000};
-
- style1 = gtk_style_copy (GTK_WIDGET (data)->style);
- style1->base[GTK_STATE_NORMAL] = col1;
- style1->base[GTK_STATE_SELECTED] = col2;
-
- style2 = gtk_style_copy (GTK_WIDGET (data)->style);
- style2->fg[GTK_STATE_NORMAL] = col1;
- style2->fg[GTK_STATE_SELECTED] = col2;
-
- style3 = gtk_style_copy (GTK_WIDGET (data)->style);
- style3->fg[GTK_STATE_NORMAL] = col1;
- style3->base[GTK_STATE_NORMAL] = col2;
- pango_font_description_free (style3->font_desc);
- style3->font_desc = pango_font_description_from_string ("courier 12");
- }
-
- gtk_clist_set_cell_style (GTK_CLIST (data), row, 3, style1);
- gtk_clist_set_cell_style (GTK_CLIST (data), row, 4, style2);
- gtk_clist_set_cell_style (GTK_CLIST (data), row, 0, style3);
-
- clist_rows++;
-}
-
-static void
-clist_warning_test (GtkWidget *button,
- GtkWidget *clist)
-{
- GtkWidget *child;
- static gboolean add_remove = FALSE;
-
- add_remove = !add_remove;
-
- child = gtk_label_new ("Test");
- g_object_ref (child);
- gtk_object_sink (GTK_OBJECT (child));
-
- if (add_remove)
- gtk_container_add (GTK_CONTAINER (clist), child);
- else
- {
- child->parent = clist;
- gtk_container_remove (GTK_CONTAINER (clist), child);
- child->parent = NULL;
- }
-
- gtk_widget_destroy (child);
- g_object_unref (child);
-}
-
-static void
-undo_selection (GtkWidget *button, GtkCList *clist)
-{
- gtk_clist_undo_selection (clist);
-}
-
-static void
-clist_toggle_sel_mode (GtkWidget *widget, gpointer data)
-{
- GtkCList *clist;
- gint i;
-
- clist = GTK_CLIST (data);
-
- if (!GTK_WIDGET_MAPPED (widget))
- return;
-
- i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget));
-
- gtk_clist_set_selection_mode (clist, selection_modes[i]);
-}
-
-static void
-clist_click_column (GtkCList *clist, gint column, gpointer data)
-{
- if (column == 4)
- gtk_clist_set_column_visibility (clist, column, FALSE);
- else if (column == clist->sort_column)
- {
- if (clist->sort_type == GTK_SORT_ASCENDING)
- clist->sort_type = GTK_SORT_DESCENDING;
- else
- clist->sort_type = GTK_SORT_ASCENDING;
- }
- else
- gtk_clist_set_sort_column (clist, column);
-
- gtk_clist_sort (clist);
-}
-
-static void
-create_clist (GtkWidget *widget)
-{
- gint i;
- static GtkWidget *window = NULL;
-
- static char *titles[] =
- {
- "auto resize", "not resizeable", "max width 100", "min width 50",
- "hide column", "Title 5", "Title 6", "Title 7",
- "Title 8", "Title 9", "Title 10", "Title 11"
- };
-
- char text[TESTGTK_CLIST_COLUMNS][50];
- char *texts[TESTGTK_CLIST_COLUMNS];
-
- GtkWidget *vbox;
- GtkWidget *hbox;
- GtkWidget *clist;
- GtkWidget *button;
- GtkWidget *separator;
- GtkWidget *scrolled_win;
- GtkWidget *check;
-
- GtkWidget *undo_button;
- GtkWidget *label;
-
- GtkStyle *style;
- GdkColor red_col = { 0, 56000, 0, 0};
- GdkColor light_green_col = { 0, 0, 56000, 32000};
-
- if (!window)
- {
- clist_rows = 0;
- window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_window_set_screen (GTK_WINDOW (window),
- gtk_widget_get_screen (widget));
-
- g_signal_connect (window, "destroy",
- G_CALLBACK (gtk_widget_destroyed), &window);
-
- gtk_window_set_title (GTK_WINDOW (window), "clist");
- gtk_container_set_border_width (GTK_CONTAINER (window), 0);
-
- vbox = gtk_vbox_new (FALSE, 0);
- gtk_container_add (GTK_CONTAINER (window), vbox);
-
- scrolled_win = gtk_scrolled_window_new (NULL, NULL);
- gtk_container_set_border_width (GTK_CONTAINER (scrolled_win), 5);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
- GTK_POLICY_AUTOMATIC,
- GTK_POLICY_AUTOMATIC);
-
- /* create GtkCList here so we have a pointer to throw at the
- * button callbacks -- more is done with it later */
- clist = gtk_clist_new_with_titles (TESTGTK_CLIST_COLUMNS, titles);
- gtk_container_add (GTK_CONTAINER (scrolled_win), clist);
- g_signal_connect (clist, "click_column",
- G_CALLBACK (clist_click_column), NULL);
-
- /* control buttons */
- hbox = gtk_hbox_new (FALSE, 5);
- gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
-
- button = gtk_button_new_with_label ("Insert Row");
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
- g_signal_connect (button, "clicked",
- G_CALLBACK (insert_row_clist), clist);
-
- button = gtk_button_new_with_label ("Add 1,000 Rows With Pixmaps");
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
- g_signal_connect (button, "clicked",
- G_CALLBACK (add1000_clist), clist);
-
- button = gtk_button_new_with_label ("Add 10,000 Rows");
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
- g_signal_connect (button, "clicked",
- G_CALLBACK (add10000_clist), clist);
-
- /* second layer of buttons */
- hbox = gtk_hbox_new (FALSE, 5);
- gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
-
- button = gtk_button_new_with_label ("Clear List");
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
- g_signal_connect (button, "clicked",
- G_CALLBACK (clear_clist), clist);
-
- button = gtk_button_new_with_label ("Remove Selection");
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
- g_signal_connect (button, "clicked",
- G_CALLBACK (clist_remove_selection), clist);
-
- undo_button = gtk_button_new_with_label ("Undo Selection");
- gtk_box_pack_start (GTK_BOX (hbox), undo_button, TRUE, TRUE, 0);
- g_signal_connect (undo_button, "clicked",
- G_CALLBACK (undo_selection), clist);
-
- button = gtk_button_new_with_label ("Warning Test");
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
- g_signal_connect (button, "clicked",
- G_CALLBACK (clist_warning_test), clist);
-
- /* third layer of buttons */
- hbox = gtk_hbox_new (FALSE, 5);
- gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
-
- check = gtk_check_button_new_with_label ("Show Title Buttons");
- gtk_box_pack_start (GTK_BOX (hbox), check, FALSE, TRUE, 0);
- g_signal_connect (check, "clicked",
- G_CALLBACK (toggle_title_buttons), clist);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), TRUE);
-
- check = gtk_check_button_new_with_label ("Reorderable");
- gtk_box_pack_start (GTK_BOX (hbox), check, FALSE, TRUE, 0);
- g_signal_connect (check, "clicked",
- G_CALLBACK (toggle_reorderable), clist);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), TRUE);
-
- label = gtk_label_new ("Selection Mode :");
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
-
- clist_omenu = build_option_menu (selection_mode_items, 3, 3,
- clist_toggle_sel_mode,
- clist);
- gtk_box_pack_start (GTK_BOX (hbox), clist_omenu, FALSE, TRUE, 0);
-
- /*
- * the rest of the clist configuration
- */
-
- gtk_box_pack_start (GTK_BOX (vbox), scrolled_win, TRUE, TRUE, 0);
- gtk_clist_set_row_height (GTK_CLIST (clist), 18);
- gtk_widget_set_size_request (clist, -1, 300);
-
- for (i = 1; i < TESTGTK_CLIST_COLUMNS; i++)
- gtk_clist_set_column_width (GTK_CLIST (clist), i, 80);
-
- gtk_clist_set_column_auto_resize (GTK_CLIST (clist), 0, TRUE);
- gtk_clist_set_column_resizeable (GTK_CLIST (clist), 1, FALSE);
- gtk_clist_set_column_max_width (GTK_CLIST (clist), 2, 100);
- gtk_clist_set_column_min_width (GTK_CLIST (clist), 3, 50);
- gtk_clist_set_selection_mode (GTK_CLIST (clist), GTK_SELECTION_EXTENDED);
- gtk_clist_set_column_justification (GTK_CLIST (clist), 1,
- GTK_JUSTIFY_RIGHT);
- gtk_clist_set_column_justification (GTK_CLIST (clist), 2,
- GTK_JUSTIFY_CENTER);
-
- for (i = 0; i < TESTGTK_CLIST_COLUMNS; i++)
- {
- texts[i] = text[i];
- sprintf (text[i], "Column %d", i);
- }
-
- sprintf (text[1], "Right");
- sprintf (text[2], "Center");
-
- style = gtk_style_new ();
- style->fg[GTK_STATE_NORMAL] = red_col;
- style->base[GTK_STATE_NORMAL] = light_green_col;
-
- pango_font_description_set_size (style->font_desc, 14 * PANGO_SCALE);
- pango_font_description_set_weight (style->font_desc, PANGO_WEIGHT_BOLD);
-
- for (i = 0; i < 10; i++)
- {
- sprintf (text[0], "CListRow %d", clist_rows++);
- gtk_clist_append (GTK_CLIST (clist), texts);
-
- switch (i % 4)
- {
- case 2:
- gtk_clist_set_row_style (GTK_CLIST (clist), i, style);
- break;
- default:
- gtk_clist_set_cell_style (GTK_CLIST (clist), i, i % 4, style);
- break;
- }
- }
-
- g_object_unref (style);
-
- separator = gtk_hseparator_new ();
- gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, TRUE, 0);
-
- hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
-
- button = gtk_button_new_with_label ("close");
- gtk_container_set_border_width (GTK_CONTAINER (button), 10);
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
- g_signal_connect_swapped (button, "clicked",
- G_CALLBACK (gtk_widget_destroy),
- window);
-
- GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
- gtk_widget_grab_default (button);
- }
-
- if (!GTK_WIDGET_VISIBLE (window))
- gtk_widget_show_all (window);
- else
- {
- clist_rows = 0;
- gtk_widget_destroy (window);
- }
-}
-
-/*
- * GtkCTree
- */
-
-typedef struct
-{
- GdkPixmap *pixmap1;
- GdkPixmap *pixmap2;
- GdkPixmap *pixmap3;
- GdkBitmap *mask1;
- GdkBitmap *mask2;
- GdkBitmap *mask3;
-} CTreePixmaps;
-
-static gint books = 0;
-static gint pages = 0;
-
-static GtkWidget *book_label;
-static GtkWidget *page_label;
-static GtkWidget *sel_label;
-static GtkWidget *vis_label;
-static GtkWidget *omenu1;
-static GtkWidget *omenu2;
-static GtkWidget *omenu3;
-static GtkWidget *omenu4;
-static GtkWidget *spin1;
-static GtkWidget *spin2;
-static GtkWidget *spin3;
-static gint line_style;
-
-
-static CTreePixmaps *
-get_ctree_pixmaps (GtkCTree *ctree)
-{
- GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (ctree));
- CTreePixmaps *pixmaps = g_object_get_data (G_OBJECT (screen), "ctree-pixmaps");
-
- if (!pixmaps)
- {
- GdkColormap *colormap = gdk_screen_get_rgb_colormap (screen);
- pixmaps = g_new (CTreePixmaps, 1);
-
- pixmaps->pixmap1 = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap,
- &pixmaps->mask1,
- NULL, book_closed_xpm);
- pixmaps->pixmap2 = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap,
- &pixmaps->mask2,
- NULL, book_open_xpm);
- pixmaps->pixmap3 = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap,
- &pixmaps->mask3,
- NULL, mini_page_xpm);
-
- g_object_set_data (G_OBJECT (screen), "ctree-pixmaps", pixmaps);
- }
-
- return pixmaps;
-}
-
-void after_press (GtkCTree *ctree, gpointer data)
-{
- char buf[80];
-
- sprintf (buf, "%d", g_list_length (GTK_CLIST (ctree)->selection));
- gtk_label_set_text (GTK_LABEL (sel_label), buf);
-
- sprintf (buf, "%d", g_list_length (GTK_CLIST (ctree)->row_list));
- gtk_label_set_text (GTK_LABEL (vis_label), buf);
-
- sprintf (buf, "%d", books);
- gtk_label_set_text (GTK_LABEL (book_label), buf);
-
- sprintf (buf, "%d", pages);
- gtk_label_set_text (GTK_LABEL (page_label), buf);
-}
-
-void after_move (GtkCTree *ctree, GtkCTreeNode *child, GtkCTreeNode *parent,
- GtkCTreeNode *sibling, gpointer data)
-{
- char *source;
- char *target1;
- char *target2;
-
- gtk_ctree_get_node_info (ctree, child, &source,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- if (parent)
- gtk_ctree_get_node_info (ctree, parent, &target1,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL);
- if (sibling)
- gtk_ctree_get_node_info (ctree, sibling, &target2,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-
- g_print ("Moving \"%s\" to \"%s\" with sibling \"%s\".\n", source,
- (parent) ? target1 : "nil", (sibling) ? target2 : "nil");
-}
-
-void count_items (GtkCTree *ctree, GtkCTreeNode *list)
-{
- if (GTK_CTREE_ROW (list)->is_leaf)
- pages--;
- else
- books--;
-}
-
-void expand_all (GtkWidget *widget, GtkCTree *ctree)
-{
- gtk_ctree_expand_recursive (ctree, NULL);
- after_press (ctree, NULL);
-}
-
-void collapse_all (GtkWidget *widget, GtkCTree *ctree)
-{
- gtk_ctree_collapse_recursive (ctree, NULL);
- after_press (ctree, NULL);
-}
-
-void select_all (GtkWidget *widget, GtkCTree *ctree)
-{
- gtk_ctree_select_recursive (ctree, NULL);
- after_press (ctree, NULL);
-}
-
-void change_style (GtkWidget *widget, GtkCTree *ctree)
-{
- static GtkStyle *style1 = NULL;
- static GtkStyle *style2 = NULL;
-
- GtkCTreeNode *node;
- GdkColor green_col = { 0, 0, 56000, 0};
- GdkColor purple_col = { 0, 32000, 0, 56000};
-
- if (GTK_CLIST (ctree)->focus_row >= 0)
- node = GTK_CTREE_NODE
- (g_list_nth (GTK_CLIST (ctree)->row_list,GTK_CLIST (ctree)->focus_row));
- else
- node = GTK_CTREE_NODE (GTK_CLIST (ctree)->row_list);
-
- if (!node)
- return;
-
- if (!style1)
- {
- style1 = gtk_style_new ();
- style1->base[GTK_STATE_NORMAL] = green_col;
- style1->fg[GTK_STATE_SELECTED] = purple_col;
-
- style2 = gtk_style_new ();
- style2->base[GTK_STATE_SELECTED] = purple_col;
- style2->fg[GTK_STATE_NORMAL] = green_col;
- style2->base[GTK_STATE_NORMAL] = purple_col;
- pango_font_description_free (style2->font_desc);
- style2->font_desc = pango_font_description_from_string ("courier 30");
- }
-
- gtk_ctree_node_set_cell_style (ctree, node, 1, style1);
- gtk_ctree_node_set_cell_style (ctree, node, 0, style2);
-
- if (GTK_CTREE_ROW (node)->children)
- gtk_ctree_node_set_row_style (ctree, GTK_CTREE_ROW (node)->children,
- style2);
-}
-
-void unselect_all (GtkWidget *widget, GtkCTree *ctree)
-{
- gtk_ctree_unselect_recursive (ctree, NULL);
- after_press (ctree, NULL);
-}
-
-void remove_selection (GtkWidget *widget, GtkCTree *ctree)
-{
- GtkCList *clist;
- GtkCTreeNode *node;
-
- clist = GTK_CLIST (ctree);
-
- gtk_clist_freeze (clist);
-
- while (clist->selection)
- {
- node = clist->selection->data;
-
- if (GTK_CTREE_ROW (node)->is_leaf)
- pages--;
- else
- gtk_ctree_post_recursive (ctree, node,
- (GtkCTreeFunc) count_items, NULL);
-
- gtk_ctree_remove_node (ctree, node);
-
- if (clist->selection_mode == GTK_SELECTION_BROWSE)
- break;
- }
-
- if (clist->selection_mode == GTK_SELECTION_EXTENDED && !clist->selection &&
- clist->focus_row >= 0)
- {
- node = gtk_ctree_node_nth (ctree, clist->focus_row);
-
- if (node)
- gtk_ctree_select (ctree, node);
- }
-
- gtk_clist_thaw (clist);
- after_press (ctree, NULL);
-}
-
-struct _ExportStruct {
- gchar *tree;
- gchar *info;
- gboolean is_leaf;
-};
-
-typedef struct _ExportStruct ExportStruct;
-
-gboolean
-gnode2ctree (GtkCTree *ctree,
- guint depth,
- GNode *gnode,
- GtkCTreeNode *cnode,
- gpointer data)
-{
- ExportStruct *es;
- GdkPixmap *pixmap_closed;
- GdkBitmap *mask_closed;
- GdkPixmap *pixmap_opened;
- GdkBitmap *mask_opened;
- CTreePixmaps *pixmaps;
-
- if (!cnode || !gnode || (!(es = gnode->data)))
- return FALSE;
-
- pixmaps = get_ctree_pixmaps (ctree);
-
- if (es->is_leaf)
- {
- pixmap_closed = pixmaps->pixmap3;
- mask_closed = pixmaps->mask3;
- pixmap_opened = NULL;
- mask_opened = NULL;
- }
- else
- {
- pixmap_closed = pixmaps->pixmap1;
- mask_closed = pixmaps->mask1;
- pixmap_opened = pixmaps->pixmap2;
- mask_opened = pixmaps->mask2;
- }
-
- gtk_ctree_set_node_info (ctree, cnode, es->tree, 2, pixmap_closed,
- mask_closed, pixmap_opened, mask_opened,
- es->is_leaf, (depth < 3));
- gtk_ctree_node_set_text (ctree, cnode, 1, es->info);
- g_free (es);
- gnode->data = NULL;
-
- return TRUE;
-}
-
-gboolean
-ctree2gnode (GtkCTree *ctree,
- guint depth,
- GNode *gnode,
- GtkCTreeNode *cnode,
- gpointer data)
-{
- ExportStruct *es;
-
- if (!cnode || !gnode)
- return FALSE;
-
- es = g_new (ExportStruct, 1);
- gnode->data = es;
- es->is_leaf = GTK_CTREE_ROW (cnode)->is_leaf;
- es->tree = GTK_CELL_PIXTEXT (GTK_CTREE_ROW (cnode)->row.cell[0])->text;
- es->info = GTK_CELL_PIXTEXT (GTK_CTREE_ROW (cnode)->row.cell[1])->text;
- return TRUE;
-}
-
-void export_ctree (GtkWidget *widget, GtkCTree *ctree)
-{
- char *title[] = { "Tree" , "Info" };
- static GtkWidget *export_window = NULL;
- static GtkCTree *export_ctree;
- GtkWidget *vbox;
- GtkWidget *scrolled_win;
- GtkWidget *button;
- GtkWidget *sep;
- GNode *gnode;
- GtkCTreeNode *node;
-
- if (!export_window)
- {
- export_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-
- gtk_window_set_screen (GTK_WINDOW (export_window),
- gtk_widget_get_screen (widget));
-
- g_signal_connect (export_window, "destroy",
- G_CALLBACK (gtk_widget_destroyed),
- &export_window);
-
- gtk_window_set_title (GTK_WINDOW (export_window), "exported ctree");
- gtk_container_set_border_width (GTK_CONTAINER (export_window), 5);
-
- vbox = gtk_vbox_new (FALSE, 0);
- gtk_container_add (GTK_CONTAINER (export_window), vbox);
-
- button = gtk_button_new_with_label ("Close");
- gtk_box_pack_end (GTK_BOX (vbox), button, FALSE, TRUE, 0);
-
- g_signal_connect_swapped (button, "clicked",
- G_CALLBACK (gtk_widget_destroy),
- export_window);
-
- sep = gtk_hseparator_new ();
- gtk_box_pack_end (GTK_BOX (vbox), sep, FALSE, TRUE, 10);
-
- export_ctree = GTK_CTREE (gtk_ctree_new_with_titles (2, 0, title));
- gtk_ctree_set_line_style (export_ctree, GTK_CTREE_LINES_DOTTED);
-
- scrolled_win = gtk_scrolled_window_new (NULL, NULL);
- gtk_container_add (GTK_CONTAINER (scrolled_win),
- GTK_WIDGET (export_ctree));
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
- GTK_POLICY_AUTOMATIC,
- GTK_POLICY_AUTOMATIC);
- gtk_box_pack_start (GTK_BOX (vbox), scrolled_win, TRUE, TRUE, 0);
- gtk_clist_set_selection_mode (GTK_CLIST (export_ctree),
- GTK_SELECTION_EXTENDED);
- gtk_clist_set_column_width (GTK_CLIST (export_ctree), 0, 200);
- gtk_clist_set_column_width (GTK_CLIST (export_ctree), 1, 200);
- gtk_widget_set_size_request (GTK_WIDGET (export_ctree), 300, 200);
- }
-
- if (!GTK_WIDGET_VISIBLE (export_window))
- gtk_widget_show_all (export_window);
-
- gtk_clist_clear (GTK_CLIST (export_ctree));
-
- node = GTK_CTREE_NODE (g_list_nth (GTK_CLIST (ctree)->row_list,
- GTK_CLIST (ctree)->focus_row));
- if (!node)
- return;
-
- gnode = gtk_ctree_export_to_gnode (ctree, NULL, NULL, node,
- ctree2gnode, NULL);
- if (gnode)
- {
- gtk_ctree_insert_gnode (export_ctree, NULL, NULL, gnode,
- gnode2ctree, NULL);
- g_node_destroy (gnode);
- }
-}
-
-void change_indent (GtkWidget *widget, GtkCTree *ctree)
-{
- gtk_ctree_set_indent (ctree, GTK_ADJUSTMENT (widget)->value);
-}
-
-void change_spacing (GtkWidget *widget, GtkCTree *ctree)
-{
- gtk_ctree_set_spacing (ctree, GTK_ADJUSTMENT (widget)->value);
-}
-
-void change_row_height (GtkWidget *widget, GtkCList *clist)
-{
- gtk_clist_set_row_height (clist, GTK_ADJUSTMENT (widget)->value);
-}
-
-void set_background (GtkCTree *ctree, GtkCTreeNode *node, gpointer data)
-{
- GtkStyle *style = NULL;
-
- if (!node)
- return;
-
- if (ctree->line_style != GTK_CTREE_LINES_TABBED)
- {
- if (!GTK_CTREE_ROW (node)->is_leaf)
- style = GTK_CTREE_ROW (node)->row.data;
- else if (GTK_CTREE_ROW (node)->parent)
- style = GTK_CTREE_ROW (GTK_CTREE_ROW (node)->parent)->row.data;
- }
-
- gtk_ctree_node_set_row_style (ctree, node, style);
-}
-
-void
-ctree_toggle_line_style (GtkWidget *widget, gpointer data)
-{
- GtkCTree *ctree;
- gint i;
-
- ctree = GTK_CTREE (data);
-
- if (!GTK_WIDGET_MAPPED (widget))
- return;
-
- i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget));
-
- if ((ctree->line_style == GTK_CTREE_LINES_TABBED &&
- ((GtkCTreeLineStyle) i) != GTK_CTREE_LINES_TABBED) ||
- (ctree->line_style != GTK_CTREE_LINES_TABBED &&
- ((GtkCTreeLineStyle) i) == GTK_CTREE_LINES_TABBED))
- gtk_ctree_pre_recursive (ctree, NULL, set_background, NULL);
- gtk_ctree_set_line_style (ctree, i);
- line_style = i;
-}
-
-void
-ctree_toggle_expander_style (GtkWidget *widget, gpointer data)
-{
- GtkCTree *ctree;
- gint i;
-
- ctree = GTK_CTREE (data);
-
- if (!GTK_WIDGET_MAPPED (widget))
- return;
-
- i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget));
-
- gtk_ctree_set_expander_style (ctree, (GtkCTreeExpanderStyle) i);
-}
-
-void
-ctree_toggle_justify (GtkWidget *widget, gpointer data)
-{
- GtkCTree *ctree;
- gint i;
-
- ctree = GTK_CTREE (data);
-
- if (!GTK_WIDGET_MAPPED (widget))
- return;
-
- i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget));
-
- gtk_clist_set_column_justification (GTK_CLIST (ctree), ctree->tree_column,
- (GtkJustification) i);
-}
-
-void
-ctree_toggle_sel_mode (GtkWidget *widget, gpointer data)
-{
- GtkCTree *ctree;
- gint i;
-
- ctree = GTK_CTREE (data);
-
- if (!GTK_WIDGET_MAPPED (widget))
- return;
-
- i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget));
-
- gtk_clist_set_selection_mode (GTK_CLIST (ctree), selection_modes[i]);
- after_press (ctree, NULL);
-}
-
-void build_recursive (GtkCTree *ctree, gint cur_depth, gint depth,
- gint num_books, gint num_pages, GtkCTreeNode *parent)
-{
- gchar *text[2];
- gchar buf1[60];
- gchar buf2[60];
- GtkCTreeNode *sibling;
- CTreePixmaps *pixmaps;
- gint i;
-
- text[0] = buf1;
- text[1] = buf2;
- sibling = NULL;
-
- pixmaps = get_ctree_pixmaps (ctree);
-
- for (i = num_pages + num_books; i > num_books; i--)
- {
- pages++;
- sprintf (buf1, "Page %02d", (gint) rand() % 100);
- sprintf (buf2, "Item %d-%d", cur_depth, i);
- sibling = gtk_ctree_insert_node (ctree, parent, sibling, text, 5,
- pixmaps->pixmap3, pixmaps->mask3, NULL, NULL,
- TRUE, FALSE);
-
- if (parent && ctree->line_style == GTK_CTREE_LINES_TABBED)
- gtk_ctree_node_set_row_style (ctree, sibling,
- GTK_CTREE_ROW (parent)->row.style);
- }
-
- if (cur_depth == depth)
- return;
-
- for (i = num_books; i > 0; i--)
- {
- GtkStyle *style;
-
- books++;
- sprintf (buf1, "Book %02d", (gint) rand() % 100);
- sprintf (buf2, "Item %d-%d", cur_depth, i);
- sibling = gtk_ctree_insert_node (ctree, parent, sibling, text, 5,
- pixmaps->pixmap1, pixmaps->mask1, pixmaps->pixmap2, pixmaps->mask2,
- FALSE, FALSE);
-
- style = gtk_style_new ();
- switch (cur_depth % 3)
- {
- case 0:
- style->base[GTK_STATE_NORMAL].red = 10000 * (cur_depth % 6);
- style->base[GTK_STATE_NORMAL].green = 0;
- style->base[GTK_STATE_NORMAL].blue = 65535 - ((i * 10000) % 65535);
- break;
- case 1:
- style->base[GTK_STATE_NORMAL].red = 10000 * (cur_depth % 6);
- style->base[GTK_STATE_NORMAL].green = 65535 - ((i * 10000) % 65535);
- style->base[GTK_STATE_NORMAL].blue = 0;
- break;
- default:
- style->base[GTK_STATE_NORMAL].red = 65535 - ((i * 10000) % 65535);
- style->base[GTK_STATE_NORMAL].green = 0;
- style->base[GTK_STATE_NORMAL].blue = 10000 * (cur_depth % 6);
- break;
- }
- gtk_ctree_node_set_row_data_full (ctree, sibling, style,
- (GDestroyNotify) g_object_unref);
-
- if (ctree->line_style == GTK_CTREE_LINES_TABBED)
- gtk_ctree_node_set_row_style (ctree, sibling, style);
-
- build_recursive (ctree, cur_depth + 1, depth, num_books, num_pages,
- sibling);
- }
-}
-
-void rebuild_tree (GtkWidget *widget, GtkCTree *ctree)
-{
- gchar *text [2];
- gchar label1[] = "Root";
- gchar label2[] = "";
- GtkCTreeNode *parent;
- GtkStyle *style;
- guint b, d, p, n;
- CTreePixmaps *pixmaps;
-
- pixmaps = get_ctree_pixmaps (ctree);
-
- text[0] = label1;
- text[1] = label2;
-
- d = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin1));
- b = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin2));
- p = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin3));
-
- n = ((pow (b, d) - 1) / (b - 1)) * (p + 1);
-
- if (n > 100000)
- {
- g_print ("%d total items? Try less\n",n);
- return;
- }
-
- gtk_clist_freeze (GTK_CLIST (ctree));
- gtk_clist_clear (GTK_CLIST (ctree));
-
- books = 1;
- pages = 0;
-
- parent = gtk_ctree_insert_node (ctree, NULL, NULL, text, 5, pixmaps->pixmap1,
- pixmaps->mask1, pixmaps->pixmap2, pixmaps->mask2, FALSE, TRUE);
-
- style = gtk_style_new ();
- style->base[GTK_STATE_NORMAL].red = 0;
- style->base[GTK_STATE_NORMAL].green = 45000;
- style->base[GTK_STATE_NORMAL].blue = 55000;
- gtk_ctree_node_set_row_data_full (ctree, parent, style,
- (GDestroyNotify) g_object_unref);
-
- if (ctree->line_style == GTK_CTREE_LINES_TABBED)
- gtk_ctree_node_set_row_style (ctree, parent, style);
-
- build_recursive (ctree, 1, d, b, p, parent);
- gtk_clist_thaw (GTK_CLIST (ctree));
- after_press (ctree, NULL);
-}
-
-static void
-ctree_click_column (GtkCTree *ctree, gint column, gpointer data)
-{
- GtkCList *clist;
-
- clist = GTK_CLIST (ctree);
-
- if (column == clist->sort_column)
- {
- if (clist->sort_type == GTK_SORT_ASCENDING)
- clist->sort_type = GTK_SORT_DESCENDING;
- else
- clist->sort_type = GTK_SORT_ASCENDING;
- }
- else
- gtk_clist_set_sort_column (clist, column);
-
- gtk_ctree_sort_recursive (ctree, NULL);
-}
-
-void create_ctree (GtkWidget *widget)
-{
- static GtkWidget *window = NULL;
- GtkTooltips *tooltips;
- GtkCTree *ctree;
- GtkWidget *scrolled_win;
- GtkWidget *vbox;
- GtkWidget *bbox;
- GtkWidget *mbox;
- GtkWidget *hbox;
- GtkWidget *hbox2;
- GtkWidget *frame;
- GtkWidget *label;
- GtkWidget *button;
- GtkWidget *check;
- GtkAdjustment *adj;
- GtkWidget *spinner;
-
- char *title[] = { "Tree" , "Info" };
- char buf[80];
-
- static gchar *items1[] =
- {
- "No lines",
- "Solid",
- "Dotted",
- "Tabbed"
- };
-
- static gchar *items2[] =
- {
- "None",
- "Square",
- "Triangle",
- "Circular"
- };
-
- static gchar *items3[] =
- {
- "Left",
- "Right"
- };
-
- if (!window)
- {
- window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_window_set_screen (GTK_WINDOW (window),
- gtk_widget_get_screen (widget));
-
- g_signal_connect (window, "destroy",
- G_CALLBACK (gtk_widget_destroyed),
- &window);
-
- gtk_window_set_title (GTK_WINDOW (window), "GtkCTree");
- gtk_container_set_border_width (GTK_CONTAINER (window), 0);
-
- tooltips = gtk_tooltips_new ();
- g_object_ref (tooltips);
- gtk_object_sink (GTK_OBJECT (tooltips));
-
- g_object_set_data_full (G_OBJECT (window), "tooltips", tooltips,
- g_object_unref);
-
- vbox = gtk_vbox_new (FALSE, 0);
- gtk_container_add (GTK_CONTAINER (window), vbox);
-
- hbox = gtk_hbox_new (FALSE, 5);
- gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
-
- label = gtk_label_new ("Depth :");
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
-
- adj = (GtkAdjustment *) gtk_adjustment_new (4, 1, 10, 1, 5, 0);
- spin1 = gtk_spin_button_new (adj, 0, 0);
- gtk_box_pack_start (GTK_BOX (hbox), spin1, FALSE, TRUE, 5);
-
- label = gtk_label_new ("Books :");
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
-
- adj = (GtkAdjustment *) gtk_adjustment_new (3, 1, 20, 1, 5, 0);
- spin2 = gtk_spin_button_new (adj, 0, 0);
- gtk_box_pack_start (GTK_BOX (hbox), spin2, FALSE, TRUE, 5);
-
- label = gtk_label_new ("Pages :");
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
-
- adj = (GtkAdjustment *) gtk_adjustment_new (5, 1, 20, 1, 5, 0);
- spin3 = gtk_spin_button_new (adj, 0, 0);
- gtk_box_pack_start (GTK_BOX (hbox), spin3, FALSE, TRUE, 5);
-
- button = gtk_button_new_with_label ("Close");
- gtk_box_pack_end (GTK_BOX (hbox), button, TRUE, TRUE, 0);
-
- g_signal_connect_swapped (button, "clicked",
- G_CALLBACK (gtk_widget_destroy),
- window);
-
- button = gtk_button_new_with_label ("Rebuild Tree");
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
-
- scrolled_win = gtk_scrolled_window_new (NULL, NULL);
- gtk_container_set_border_width (GTK_CONTAINER (scrolled_win), 5);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
- GTK_POLICY_AUTOMATIC,
- GTK_POLICY_ALWAYS);
- gtk_box_pack_start (GTK_BOX (vbox), scrolled_win, TRUE, TRUE, 0);
-
- ctree = GTK_CTREE (gtk_ctree_new_with_titles (2, 0, title));
- gtk_container_add (GTK_CONTAINER (scrolled_win), GTK_WIDGET (ctree));
-
- gtk_clist_set_column_auto_resize (GTK_CLIST (ctree), 0, TRUE);
- gtk_clist_set_column_width (GTK_CLIST (ctree), 1, 200);
- gtk_clist_set_selection_mode (GTK_CLIST (ctree), GTK_SELECTION_EXTENDED);
- gtk_ctree_set_line_style (ctree, GTK_CTREE_LINES_DOTTED);
- line_style = GTK_CTREE_LINES_DOTTED;
-
- g_signal_connect (button, "clicked",
- G_CALLBACK (rebuild_tree), ctree);
- g_signal_connect (ctree, "click_column",
- G_CALLBACK (ctree_click_column), NULL);
-
- g_signal_connect_after (ctree, "button_press_event",
- G_CALLBACK (after_press), NULL);
- g_signal_connect_after (ctree, "button_release_event",
- G_CALLBACK (after_press), NULL);
- g_signal_connect_after (ctree, "tree_move",
- G_CALLBACK (after_move), NULL);
- g_signal_connect_after (ctree, "end_selection",
- G_CALLBACK (after_press), NULL);
- g_signal_connect_after (ctree, "toggle_focus_row",
- G_CALLBACK (after_press), NULL);
- g_signal_connect_after (ctree, "select_all",
- G_CALLBACK (after_press), NULL);
- g_signal_connect_after (ctree, "unselect_all",
- G_CALLBACK (after_press), NULL);
- g_signal_connect_after (ctree, "scroll_vertical",
- G_CALLBACK (after_press), NULL);
-
- bbox = gtk_hbox_new (FALSE, 5);
- gtk_container_set_border_width (GTK_CONTAINER (bbox), 5);
- gtk_box_pack_start (GTK_BOX (vbox), bbox, FALSE, TRUE, 0);
-
- mbox = gtk_vbox_new (TRUE, 5);
- gtk_box_pack_start (GTK_BOX (bbox), mbox, FALSE, TRUE, 0);
-
- label = gtk_label_new ("Row Height :");
- gtk_box_pack_start (GTK_BOX (mbox), label, FALSE, FALSE, 0);
-
- label = gtk_label_new ("Indent :");
- gtk_box_pack_start (GTK_BOX (mbox), label, FALSE, FALSE, 0);
-
- label = gtk_label_new ("Spacing :");
- gtk_box_pack_start (GTK_BOX (mbox), label, FALSE, FALSE, 0);
-
- mbox = gtk_vbox_new (TRUE, 5);
- gtk_box_pack_start (GTK_BOX (bbox), mbox, FALSE, TRUE, 0);
-
- adj = (GtkAdjustment *) gtk_adjustment_new (20, 12, 100, 1, 10, 0);
- spinner = gtk_spin_button_new (adj, 0, 0);
- gtk_box_pack_start (GTK_BOX (mbox), spinner, FALSE, FALSE, 5);
- gtk_tooltips_set_tip (tooltips, spinner,
- "Row height of list items", NULL);
- g_signal_connect (adj, "value_changed",
- G_CALLBACK (change_row_height), ctree);
- gtk_clist_set_row_height ( GTK_CLIST (ctree), adj->value);
-
- adj = (GtkAdjustment *) gtk_adjustment_new (20, 0, 60, 1, 10, 0);
- spinner = gtk_spin_button_new (adj, 0, 0);
- gtk_box_pack_start (GTK_BOX (mbox), spinner, FALSE, FALSE, 5);
- gtk_tooltips_set_tip (tooltips, spinner, "Tree Indentation.", NULL);
- g_signal_connect (adj, "value_changed",
- G_CALLBACK (change_indent), ctree);
-
- adj = (GtkAdjustment *) gtk_adjustment_new (5, 0, 60, 1, 10, 0);
- spinner = gtk_spin_button_new (adj, 0, 0);
- gtk_box_pack_start (GTK_BOX (mbox), spinner, FALSE, FALSE, 5);
- gtk_tooltips_set_tip (tooltips, spinner, "Tree Spacing.", NULL);
- g_signal_connect (adj, "value_changed",
- G_CALLBACK (change_spacing), ctree);
-
- mbox = gtk_vbox_new (TRUE, 5);
- gtk_box_pack_start (GTK_BOX (bbox), mbox, FALSE, TRUE, 0);
-
- hbox = gtk_hbox_new (FALSE, 5);
- gtk_box_pack_start (GTK_BOX (mbox), hbox, FALSE, FALSE, 0);
-
- button = gtk_button_new_with_label ("Expand All");
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
- g_signal_connect (button, "clicked",
- G_CALLBACK (expand_all), ctree);
-
- button = gtk_button_new_with_label ("Collapse All");
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
- g_signal_connect (button, "clicked",
- G_CALLBACK (collapse_all), ctree);
-
- button = gtk_button_new_with_label ("Change Style");
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
- g_signal_connect (button, "clicked",
- G_CALLBACK (change_style), ctree);
-
- button = gtk_button_new_with_label ("Export Tree");
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
- g_signal_connect (button, "clicked",
- G_CALLBACK (export_ctree), ctree);
-
- hbox = gtk_hbox_new (FALSE, 5);
- gtk_box_pack_start (GTK_BOX (mbox), hbox, FALSE, FALSE, 0);
-
- button = gtk_button_new_with_label ("Select All");
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
- g_signal_connect (button, "clicked",
- G_CALLBACK (select_all), ctree);
-
- button = gtk_button_new_with_label ("Unselect All");
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
- g_signal_connect (button, "clicked",
- G_CALLBACK (unselect_all), ctree);
-
- button = gtk_button_new_with_label ("Remove Selection");
- gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
- g_signal_connect (button, "clicked",
- G_CALLBACK (remove_selection), ctree);
-
- check = gtk_check_button_new_with_label ("Reorderable");
- gtk_box_pack_start (GTK_BOX (hbox), check, FALSE, TRUE, 0);
- gtk_tooltips_set_tip (tooltips, check,
- "Tree items can be reordered by dragging.", NULL);
- g_signal_connect (check, "clicked",
- G_CALLBACK (toggle_reorderable), ctree);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), TRUE);
-
- hbox = gtk_hbox_new (TRUE, 5);
- gtk_box_pack_start (GTK_BOX (mbox), hbox, FALSE, FALSE, 0);
-
- omenu1 = build_option_menu (items1, 4, 2,
- ctree_toggle_line_style,
- ctree);
- gtk_box_pack_start (GTK_BOX (hbox), omenu1, FALSE, TRUE, 0);
- gtk_tooltips_set_tip (tooltips, omenu1, "The tree's line style.", NULL);
-
- omenu2 = build_option_menu (items2, 4, 1,
- ctree_toggle_expander_style,
- ctree);
- gtk_box_pack_start (GTK_BOX (hbox), omenu2, FALSE, TRUE, 0);
- gtk_tooltips_set_tip (tooltips, omenu2, "The tree's expander style.",
- NULL);
-
- omenu3 = build_option_menu (items3, 2, 0,
- ctree_toggle_justify, ctree);
- gtk_box_pack_start (GTK_BOX (hbox), omenu3, FALSE, TRUE, 0);
- gtk_tooltips_set_tip (tooltips, omenu3, "The tree's justification.",
- NULL);
-
- omenu4 = build_option_menu (selection_mode_items, 3, 3,
- ctree_toggle_sel_mode, ctree);
- gtk_box_pack_start (GTK_BOX (hbox), omenu4, FALSE, TRUE, 0);
- gtk_tooltips_set_tip (tooltips, omenu4, "The list's selection mode.",
- NULL);
-
- gtk_widget_realize (window);
-
- gtk_widget_set_size_request (GTK_WIDGET (ctree), -1, 300);
-
- frame = gtk_frame_new (NULL);
- gtk_container_set_border_width (GTK_CONTAINER (frame), 0);
- gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
- gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0);
-
- hbox = gtk_hbox_new (TRUE, 2);
- gtk_container_set_border_width (GTK_CONTAINER (hbox), 2);
- gtk_container_add (GTK_CONTAINER (frame), hbox);
-
- frame = gtk_frame_new (NULL);
- gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
- gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, TRUE, 0);
-
- hbox2 = gtk_hbox_new (FALSE, 0);
- gtk_container_set_border_width (GTK_CONTAINER (hbox2), 2);
- gtk_container_add (GTK_CONTAINER (frame), hbox2);
-
- label = gtk_label_new ("Books :");
- gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, TRUE, 0);
-
- sprintf (buf, "%d", books);
- book_label = gtk_label_new (buf);
- gtk_box_pack_end (GTK_BOX (hbox2), book_label, FALSE, TRUE, 5);
-
- frame = gtk_frame_new (NULL);
- gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
- gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, TRUE, 0);
-
- hbox2 = gtk_hbox_new (FALSE, 0);
- gtk_container_set_border_width (GTK_CONTAINER (hbox2), 2);
- gtk_container_add (GTK_CONTAINER (frame), hbox2);
-
- label = gtk_label_new ("Pages :");
- gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, TRUE, 0);
-
- sprintf (buf, "%d", pages);
- page_label = gtk_label_new (buf);
- gtk_box_pack_end (GTK_BOX (hbox2), page_label, FALSE, TRUE, 5);
-
- frame = gtk_frame_new (NULL);
- gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
- gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, TRUE, 0);
-
- hbox2 = gtk_hbox_new (FALSE, 0);
- gtk_container_set_border_width (GTK_CONTAINER (hbox2), 2);
- gtk_container_add (GTK_CONTAINER (frame), hbox2);
-
- label = gtk_label_new ("Selected :");
- gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, TRUE, 0);
-
- sprintf (buf, "%d", g_list_length (GTK_CLIST (ctree)->selection));
- sel_label = gtk_label_new (buf);
- gtk_box_pack_end (GTK_BOX (hbox2), sel_label, FALSE, TRUE, 5);
-
- frame = gtk_frame_new (NULL);
- gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
- gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, TRUE, 0);
-
- hbox2 = gtk_hbox_new (FALSE, 0);
- gtk_container_set_border_width (GTK_CONTAINER (hbox2), 2);
- gtk_container_add (GTK_CONTAINER (frame), hbox2);
-
- label = gtk_label_new ("Visible :");
- gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, TRUE, 0);
-
- sprintf (buf, "%d", g_list_length (GTK_CLIST (ctree)->row_list));
- vis_label = gtk_label_new (buf);
- gtk_box_pack_end (GTK_BOX (hbox2), vis_label, FALSE, TRUE, 5);
-
- rebuild_tree (NULL, ctree);
- }
-
- if (!GTK_WIDGET_VISIBLE (window))
- gtk_widget_show_all (window);
- else
- gtk_widget_destroy (window);
-}
-
-/*
* GtkColorSelection
*/
@@ -8225,102 +6491,6 @@ create_color_selection (GtkWidget *widget)
gtk_widget_destroy (window);
}
-/*
- * GtkFileSelection
- */
-
-void
-show_fileops (GtkWidget *widget,
- GtkFileSelection *fs)
-{
- gboolean show_ops;
-
- show_ops = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
-
- if (show_ops)
- gtk_file_selection_show_fileop_buttons (fs);
- else
- gtk_file_selection_hide_fileop_buttons (fs);
-}
-
-void
-select_multiple (GtkWidget *widget,
- GtkFileSelection *fs)
-{
- gboolean select_multiple;
-
- select_multiple = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
- gtk_file_selection_set_select_multiple (fs, select_multiple);
-}
-
-void
-file_selection_ok (GtkFileSelection *fs)
-{
- int i;
- gchar **selections;
-
- selections = gtk_file_selection_get_selections (fs);
-
- for (i = 0; selections[i] != NULL; i++)
- g_print ("%s\n", selections[i]);
-
- g_strfreev (selections);
-
- gtk_widget_destroy (GTK_WIDGET (fs));
-}
-
-void
-create_file_selection (GtkWidget *widget)
-{
- static GtkWidget *window = NULL;
- GtkWidget *button;
-
- if (!window)
- {
- window = gtk_file_selection_new ("file selection dialog");
- gtk_window_set_screen (GTK_WINDOW (window),
- gtk_widget_get_screen (widget));
-
- gtk_file_selection_hide_fileop_buttons (GTK_FILE_SELECTION (window));
-
- gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_MOUSE);
-
- g_signal_connect (window, "destroy",
- G_CALLBACK (gtk_widget_destroyed),
- &window);
-
- g_signal_connect_swapped (GTK_FILE_SELECTION (window)->ok_button,
- "clicked",
- G_CALLBACK (file_selection_ok),
- window);
- g_signal_connect_swapped (GTK_FILE_SELECTION (window)->cancel_button,
- "clicked",
- G_CALLBACK (gtk_widget_destroy),
- window);
-
- button = gtk_check_button_new_with_label ("Show Fileops");
- g_signal_connect (button, "toggled",
- G_CALLBACK (show_fileops),
- window);
- gtk_box_pack_start (GTK_BOX (GTK_FILE_SELECTION (window)->action_area),
- button, FALSE, FALSE, 0);
- gtk_widget_show (button);
-
- button = gtk_check_button_new_with_label ("Select Multiple");
- g_signal_connect (button, "clicked",
- G_CALLBACK (select_multiple),
- window);
- gtk_box_pack_start (GTK_BOX (GTK_FILE_SELECTION (window)->action_area),
- button, FALSE, FALSE, 0);
- gtk_widget_show (button);
- }
-
- if (!GTK_WIDGET_VISIBLE (window))
- gtk_widget_show (window);
- else
- gtk_widget_destroy (window);
-}
-
void
flipping_toggled_cb (GtkWidget *widget, gpointer data)
{
@@ -12519,182 +10689,6 @@ create_snapshot (GtkWidget *widget)
}
-
-
-/*
- * Color Preview
- */
-
-static int color_idle = 0;
-
-gint
-color_idle_func (GtkWidget *preview)
-{
- static int count = 1;
- guchar buf[768];
- int i, j, k;
-
- for (i = 0; i < 256; i++)
- {
- for (j = 0, k = 0; j < 256; j++)
- {
- buf[k+0] = i + count;
- buf[k+1] = 0;
- buf[k+2] = j + count;
- k += 3;
- }
-
- gtk_preview_draw_row (GTK_PREVIEW (preview), buf, 0, i, 256);
- }
-
- count += 1;
-
- gtk_widget_queue_draw (preview);
- gdk_window_process_updates (preview->window, TRUE);
-
- return TRUE;
-}
-
-static void
-color_preview_destroy (GtkWidget *widget,
- GtkWidget **window)
-{
- gtk_idle_remove (color_idle);
- color_idle = 0;
-
- *window = NULL;
-}
-
-void
-create_color_preview (GtkWidget *widget)
-{
- static GtkWidget *window = NULL;
- GtkWidget *preview;
- guchar buf[768];
- int i, j, k;
-
- if (!window)
- {
- window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-
- gtk_window_set_screen (GTK_WINDOW (window),
- gtk_widget_get_screen (widget));
-
- g_signal_connect (window, "destroy",
- G_CALLBACK (color_preview_destroy),
- &window);
-
- gtk_window_set_title (GTK_WINDOW (window), "test");
- gtk_container_set_border_width (GTK_CONTAINER (window), 10);
-
- preview = gtk_preview_new (GTK_PREVIEW_COLOR);
- gtk_preview_size (GTK_PREVIEW (preview), 256, 256);
- gtk_container_add (GTK_CONTAINER (window), preview);
-
- for (i = 0; i < 256; i++)
- {
- for (j = 0, k = 0; j < 256; j++)
- {
- buf[k+0] = i;
- buf[k+1] = 0;
- buf[k+2] = j;
- k += 3;
- }
-
- gtk_preview_draw_row (GTK_PREVIEW (preview), buf, 0, i, 256);
- }
-
- color_idle = gtk_idle_add ((GtkFunction) color_idle_func, preview);
- }
-
- if (!GTK_WIDGET_VISIBLE (window))
- gtk_widget_show_all (window);
- else
- gtk_widget_destroy (window);
-}
-
-/*
- * Gray Preview
- */
-
-static int gray_idle = 0;
-
-gint
-gray_idle_func (GtkWidget *preview)
-{
- static int count = 1;
- guchar buf[256];
- int i, j;
-
- for (i = 0; i < 256; i++)
- {
- for (j = 0; j < 256; j++)
- buf[j] = i + j + count;
-
- gtk_preview_draw_row (GTK_PREVIEW (preview), buf, 0, i, 256);
- }
-
- count += 1;
-
- gtk_widget_draw (preview, NULL);
-
- return TRUE;
-}
-
-static void
-gray_preview_destroy (GtkWidget *widget,
- GtkWidget **window)
-{
- gtk_idle_remove (gray_idle);
- gray_idle = 0;
-
- *window = NULL;
-}
-
-void
-create_gray_preview (GtkWidget *widget)
-{
- static GtkWidget *window = NULL;
- GtkWidget *preview;
- guchar buf[256];
- int i, j;
-
- if (!window)
- {
- window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-
- gtk_window_set_screen (GTK_WINDOW (window),
- gtk_widget_get_screen (widget));
-
- g_signal_connect (window, "destroy",
- G_CALLBACK (gray_preview_destroy),
- &window);
-
- gtk_window_set_title (GTK_WINDOW (window), "test");
- gtk_container_set_border_width (GTK_CONTAINER (window), 10);
-
- preview = gtk_preview_new (GTK_PREVIEW_GRAYSCALE);
- gtk_preview_size (GTK_PREVIEW (preview), 256, 256);
- gtk_container_add (GTK_CONTAINER (window), preview);
-
- for (i = 0; i < 256; i++)
- {
- for (j = 0; j < 256; j++)
- buf[j] = i + j;
-
- gtk_preview_draw_row (GTK_PREVIEW (preview), buf, 0, i, 256);
- }
-
- gray_idle = gtk_idle_add ((GtkFunction) gray_idle_func, preview);
- }
-
- if (!GTK_WIDGET_VISIBLE (window))
- gtk_widget_show_all (window);
- else
- gtk_widget_destroy (window);
-}
-
-
/*
* Selection Test
*/
@@ -13750,10 +11744,8 @@ struct {
{ "button box", create_button_box },
{ "buttons", create_buttons },
{ "check buttons", create_check_buttons },
- { "clist", create_clist},
{ "color selection", create_color_selection },
{ "composited window", create_composited_window },
- { "ctree", create_ctree },
{ "cursors", create_cursors },
{ "dialog", create_dialog },
{ "display & screen", create_display_screen, TRUE },
@@ -13761,7 +11753,6 @@ struct {
{ "event box", create_event_box },
{ "event watcher", create_event_watcher },
{ "expander", create_expander },
- { "file selection", create_file_selection },
{ "flipping", create_flipping },
{ "focus", create_focus },
{ "font selection", create_font_selection },
@@ -13782,8 +11773,6 @@ struct {
{ "panes", create_panes },
{ "paned keyboard", create_paned_keyboard_navigation },
{ "pixmap", create_pixmap },
- { "preview color", create_color_preview, TRUE },
- { "preview gray", create_gray_preview, TRUE },
{ "progress bar", create_progress_bar },
{ "properties", create_properties },
{ "radio buttons", create_radio_buttons },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]