Removed unused argument to new_packet_list_copy_summary_cb().
[obnox/wireshark/wip.git] / gtk / dlg_utils.h
1 /* dlg_utils.h
2  * Declarations of utilities to use when constructing dialogs
3  *
4  * $Id$
5  *
6  * Wireshark - Network traffic analyzer
7  * By Gerald Combs <gerald@wireshark.org>
8  * Copyright 1998 Gerald Combs
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23  */
24
25 /** @defgroup dialog_group Dialogs
26  *
27  * Dialogs are specially created windows and are related to their parent windows (usually the main window).
28  * See: @ref howto_window_page for details.
29  *
30  * Normal dialogs are created using dlg_window_new().
31  *
32  * - "About" about_wireshark_cb()
33  * - "Capture Options" capture_prep_cb()
34  * - "Capture" capture_info_ui_create()
35  * - "Interface Options" ifopts_edit_cb()
36  * - "Coloring Rules" colorize_dialog_new()
37  * - "Edit Color Filter" edit_color_filter_dialog_new()
38  * - "Compute DCE-RPC SRT statistics" gtk_dcerpcstat_cb()
39  * - "Decode As: Show" decode_show_cb()
40  * - "Decode As" decode_as_cb()
41  * - "Filter Expression" dfilter_expr_dlg_new()
42  * - "Compute Fibre Channel Service Response Time statistics" gtk_fcstat_cb()
43  * - "Filter" (display and capture) filter_dialog_new()
44  * - "Find Packet" find_frame_cb()
45  * - "Follow TCP stream" follow_stream_cb()
46  * - "Go To Packet" goto_frame_cb()
47  * - "Compute LDAP Service Response Time statistics" gtk_ldapstat_cb()
48  * - "Preferences" tools_plugins_cmd_cb()
49  * - "Print" / "Export" open_print_dialog()
50  * - "Progress" create_progress_dlg()
51  * - "Enabled Protocols" proto_cb()
52  * - "Compute ONC-RPC SRT statistics" gtk_rpcstat_cb()
53  * - "RTP Streams" rtpstream_dlg_create()
54  * - "Simple Dialog" display_simple_dialog()
55  * - "Compute SMB SRT statistics" gtk_smbstat_cb()
56  * - "Compute ..." tap_param_dlg_cb()
57  * - "Tcp Graph" create_drawing_area()
58  * - "Tcp Graph Control" control_panel_create()
59  * - "Help for TCP graphing" callback_create_help()
60  * - "Tcp Graph Magnify" magnify_create()
61  */
62
63 /** @file
64  * Utilities for dialog boxes. Depending on the window functions in
65  * gui_utils.h, see: @ref howto_window_page for details.
66  * @ingroup dialog_group
67  */
68
69 #ifndef __DLG_UTILS_H__
70 #define __DLG_UTILS_H__
71
72
73 /** Create a dialog box window that belongs to Wireshark's main window.
74  * If you want to create a window, use window_new() instead.
75  * See window_new() for general window usage.
76  *
77  * @param title the title for the new dialog
78  * @return the newly created dialog
79  */
80 extern GtkWidget *dlg_window_new(const gchar *title);
81
82 /** Create a configuration dialog box window that belongs to Wireshark's
83  * main window and add the name of the current profile name to it's title bar
84  * If you want to create a window, use window_new() instead.
85  * See window_new() for general window usage.
86  *
87  * @param title the title for the new dialog
88  * @return the newly created dialog
89  */
90 extern GtkWidget *dlg_conf_window_new(const gchar *title);
91
92 /** Create a button row (with variable number of buttons) for a dialog.
93  *  The button widgets will be available by g_object_get_data(dlg, stock_id) later.
94  *
95  * @param stock_id_first the first button (e.g. GTK_STOCK_OK)
96  * @param ... the next buttons, just like stock_id_first
97  * @return the new button row
98  * @todo move this to gui_utils.h
99  */
100 extern GtkWidget *dlg_button_row_new(const gchar *stock_id_first, ...);
101
102 /** Set the "activate" signal for a widget to call a routine to
103  *  activate the "OK" button for a dialog box.
104  *
105  * @param widget a widget which should be connected (usually a GtkEntry)
106  * @param ok_button the button to be activated
107  * @todo move this to gui_utils.h
108  */
109 extern void dlg_set_activate(GtkWidget *widget, GtkWidget *ok_button);
110
111 /** Set the focus and default for the nth item in a button row.
112  *
113  * @param hbox A button row returned by dlg_button_row_new().
114  * @param focus_item The button to focus (0 is the first).
115  * @see dlg_button_row_new()
116  */
117 void dlg_button_focus_nth(GtkWidget *hbox, gint focus_item);
118
119 #endif