Delete extra_split if we're not using it. This keeps its handle from
[metze/wireshark/wip.git] / ui / gtk / gui_stat_util.h
1 /* gui_stat_util.h
2  * gui functions used by stats
3  * Copyright 2003 Lars Roland
4  *
5  * $Id$
6  *
7  * Wireshark - Network traffic analyzer
8  * By Gerald Combs <gerald@wireshark.org>
9  * Copyright 1998 Gerald Combs
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  */
25
26 #ifndef __GTK_STAT_UTIL_H__
27 #define __GTK_STAT_UTIL_H__
28
29 #include <gtk/gtk.h>
30
31
32 /** @file
33  *  Utilities for statistics.
34  */
35
36 #define LEFT 0
37 #define RIGHT 1
38
39 /** Columns definition
40  */
41 typedef struct {
42     GType      type;   /* column type */
43     gint       align;  /* alignement  */
44     const char *title; /* column title */
45 } stat_column;
46
47 /** Init a window for stats, set title and display used filter in window.
48  *
49  * @param window the window
50  * @param mainbox the vbox for the window
51  * @param title the title for the window
52  * @param filter the filter string
53  */
54 extern void init_main_stat_window(GtkWidget *window, GtkWidget *mainbox, const char *title, const char *filter);
55
56 /** Create a stats table, using a scrollable gtkclist.
57  *
58  * @param scrolled_window the scrolled window
59  * @param vbox the vbox for the window
60  * @param columns number of columns
61  * @param headers columns title and type, G_TYPE_POINTER is illegal, there's no default cell renderer for it
62  */
63 extern GtkTreeView *create_stat_table(GtkWidget *scrolled_window, GtkWidget *vbox, int columns, const stat_column *headers);
64
65 #endif /* __GUI_STAT_UTIL_H__ */