GnuCash  5.6-150-g038405b370+
gnc-csv-gnumeric-popup.h
1 /* The following is code copied from Gnumeric 1.7.8 licensed under the
2  * GNU General Public License version 2 and/or version 3. It is from the file
3  * gnumeric/src/gui-util.h, and it has been modified slightly to work
4  * within GnuCash. */
5 /********************************************************************\
6  * This program is free software; you can redistribute it and/or *
7  * modify it under the terms of the GNU General Public License as *
8  * published by the Free Software Foundation; either version 2 of *
9  * the License, or (at your option) any later version. *
10  * *
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. *
15  * *
16  * You should have received a copy of the GNU General Public License*
17  * along with this program; if not, contact: *
18  * *
19  * Free Software Foundation Voice: +1-617-542-5942 *
20  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
21  * Boston, MA 02110-1301, USA gnu@gnu.org *
22  * *
23 \********************************************************************/
24 
25 
26 /* Miguel de Icaza is not sure specifically who from the Gnumeric
27  * community is the copyright owner of the code below, so, on his
28  * recommendation, here is the full list of Gnumeric authors.
29  *
30  * Miguel de Icaza, creator.
31  * Jody Goldberg, maintainer.
32  * Harald Ashburner, Options pricers
33  * Sean Atkinson, functions and X-Base importing.
34  * Michel Berkelaar, Simplex algorithm for Solver (LP Solve).
35  * Jean Brefort, Core charting engine.
36  * Grandma Chema Celorio, Tester and sheet copy.
37  * Frank Chiulli, OLE support.
38  * Kenneth Christiansen, i18n, misc stuff.
39  * Zbigniew Chyla, plugin system, i18n.
40  * J.H.M. Dassen (Ray), debian packaging.
41  * Jeroen Dirks, Simplex algorithm for Solver (LP Solve).
42  * Tom Dyas, plugin support.
43  * Gergo Erdi, Gnumeric hacker.
44  * John Gotts, rpm packaging.
45  * Andreas J. Guelzow, Gnumeric hacker.
46  * Jon K. Hellan, Gnumeric hacker.
47  * Ross Ihaka, special functions.
48  * Jukka-Pekka Iivonen, numerous functions and tools.
49  * Jakub Jelinek, Gnumeric hacker.
50  * Chris Lahey, number format engine.
51  * Adrian Likins, documentation, debugging.
52  * Takashi Matsuda, original text plugin.
53  * Michael Meeks, Excel and OLE2 importing.
54  * Lutz Muller, SheetObject improvements.
55  * Emmanuel Pacaud, Many plot types for charting engine.
56  * Federico M. Quintero, canvas support.
57  * Mark Probst, Guile support.
58  * Rasca, HTML, troff, LaTeX exporters.
59  * Vincent Renardias, original CSV support, French localization.
60  * Ariel Rios, Guile support.
61  * Uwe Steinmann, Paradox Importer.
62  * Arturo Tena, OLE support.
63  * Almer S. Tigelaar, Gnumeric hacker.
64  * Bruno Unna, Excel bits.
65  * Daniel Veillard, XML support.
66  * Vladimir Vuksan, financial functions.
67  * Morten Welinder, Gnumeric hacker and leak plugging demi-god.
68  */
69 
70 #ifndef GNC_CSV_GNUMERIC_POPUP
71 #define GNC_CSV_GNUMERIC_POPUP
72 
73 #include <gtk/gtk.h>
74 
75 #ifdef __cplusplus
76 extern "C" {
77 #endif
78 
79 typedef struct
80 {
81  char const *name;
82  char const *pixmap;
83  int display_filter;
84  int sensitive_filter;
85 
86  int index;
88 
89 typedef gboolean (*GnumericPopupMenuHandler) (GnumericPopupMenuElement const *e,
90  gpointer user_data);
91 
92 /* Use this on menus that are popped up */
93 void gnumeric_popup_menu (GtkMenu *menu, GdkEventButton *event);
94 
95 void gnumeric_create_popup_menu (GnumericPopupMenuElement const *elements,
96  GnumericPopupMenuHandler handler,
97  gpointer user_data,
98  int display_filter,
99  int sensitive_filter,
100  GdkEventButton *event);
101 
102 #ifdef __cplusplus
103 }
104 #endif
105 
106 
107 #endif