Updated Spanish translation
[anjuta.git] / libanjuta / tests / anjuta-tabber-test.c
blob1bb0843546f37dd57d286acb618157b77c1b71c4
1 /*
2 * anjuta-tabber-test.c
4 * Copyright (C) 2011 - Johannes Schmid
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #include <libanjuta/anjuta-tabber.h>
23 int main (int argc, char** argv)
25 GtkWidget* window;
26 GtkWidget* tabber;
27 GtkWidget* notebook;
28 GtkWidget* box;
30 gtk_init(&argc, &argv);
32 window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
33 gtk_window_set_title (GTK_WINDOW (window), "tabber-test");
35 box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
36 notebook = gtk_notebook_new ();
37 gtk_notebook_set_show_tabs (GTK_NOTEBOOK(notebook), FALSE);
38 tabber = anjuta_tabber_new (GTK_NOTEBOOK(notebook));
39 gtk_box_pack_start (GTK_BOX(box), tabber, FALSE, FALSE, 0);
40 gtk_box_pack_start (GTK_BOX(box), notebook, TRUE, TRUE, 0);
42 gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
43 gtk_label_new ("First"),
44 gtk_label_new ("First page"));
45 gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
46 gtk_label_new ("Second"),
47 gtk_label_new ("Second page"));
48 gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
49 gtk_label_new ("Third"),
50 gtk_label_new ("Third page"));
52 anjuta_tabber_add_tab (ANJUTA_TABBER (tabber),
53 gtk_label_new ("First"));
54 anjuta_tabber_add_tab (ANJUTA_TABBER (tabber),
55 gtk_label_new ("Second"));
56 anjuta_tabber_add_tab (ANJUTA_TABBER (tabber),
57 gtk_label_new ("Third"));
59 gtk_container_add (GTK_CONTAINER (window), box);
60 gtk_widget_show_all (window);
62 g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
63 gtk_main ();
65 return 0;