Witness: enum witness_notifyResponse_type
[wireshark-wip.git] / ui / gtk / gui_stat_util.h
blob1679ae2f7d40461d5b90df86dac7e1160c8678fa
1 /* gui_stat_util.h
2 * gui functions used by stats
3 * Copyright 2003 Lars Roland
5 * $Id$
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
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.
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.
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.
26 #ifndef __GTK_STAT_UTIL_H__
27 #define __GTK_STAT_UTIL_H__
29 #include <gtk/gtk.h>
32 /** @file
33 * Utilities for statistics.
36 #define LEFT 0
37 #define RIGHT 1
39 /** Columns definition
41 typedef struct {
42 GType type; /* column type */
43 gint align; /* alignement */
44 const char *title; /* column title */
45 } stat_column;
47 /** Init a window for stats, set title and display used filter in window.
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
54 extern void init_main_stat_window(GtkWidget *window, GtkWidget *mainbox, const char *title, const char *filter);
56 /** Create a stats table, using a scrollable gtkclist.
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
63 extern GtkTreeView *create_stat_table(GtkWidget *scrolled_window, GtkWidget *vbox, int columns, const stat_column *headers);
65 #endif /* __GUI_STAT_UTIL_H__ */