1  /*
2  *      latex.h
3  *
4  *      Copyright 2008-2012 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
5  *
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.
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, write to the Free Software
18  *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19  *      MA 02110-1301, USA.
20  */
21 
22 /* LaTeX plugin */
23 /* This plugin improves the work with LaTeX and Geany.*/
24 
25 #ifndef LATEX_H
26 #define LATEX_H
27 
28 #include <geanyplugin.h>
29 #include <gtk/gtk.h>
30 #include "datatypes.h"
31 #include "templates.h"
32 #include "letters.h"
33 #include "latexencodings.h"
34 #include "bibtex.h"
35 #include "latexutils.h"
36 #include "reftex.h"
37 #include "latexenvironments.h"
38 #include "formatutils.h"
39 #include "latexstructure.h"
40 #include "latexkeybindings.h"
41 
42 #include <string.h>
43 
44 typedef void (*MenuCallback) (G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_UNUSED gpointer gdata);
45 
46 
47 extern GeanyPlugin	*geany_plugin;
48 extern GeanyData	*geany_data;
49 
50 
51 #define create_sub_menu(base_menu, menu, item, title) \
52 		(menu) = gtk_menu_new(); \
53 		(item) = gtk_menu_item_new_with_mnemonic(_(title)); \
54 		gtk_menu_item_set_submenu(GTK_MENU_ITEM((item)), (menu)); \
55 		gtk_container_add(GTK_CONTAINER(base_menu), (item)); \
56 		gtk_widget_show((item));
57 
58 #define MAX_MENU_ENTRIES 20
59 
60 extern LaTeXWizard glatex_wizard;
61 extern gboolean glatex_autobraces_active;
62 extern gboolean glatex_lowercase_on_smallcaps;
63 
64 gint glatex_count_menu_entries(SubMenuTemplate *tmp, gint categorie);
65 void glatex_wizard_activated(G_GNUC_UNUSED GtkMenuItem * menuitem,
66 	 G_GNUC_UNUSED gpointer gdata);
67 void glatex_insert_label_activated(G_GNUC_UNUSED GtkMenuItem * menuitem,
68 	 G_GNUC_UNUSED gpointer gdata);
69 void glatex_insert_ref_activated(G_GNUC_UNUSED GtkMenuItem * menuitem,
70 	 G_GNUC_UNUSED gpointer gdata);
71 void glatex_insert_usepackage_dialog(G_GNUC_UNUSED GtkMenuItem * menuitem,
72 	 G_GNUC_UNUSED gpointer gdata);
73 void glatex_insert_command_activated(G_GNUC_UNUSED GtkMenuItem * menuitem,
74 	 G_GNUC_UNUSED gpointer gdata);
75 void on_insert_bibtex_dialog_activate(GtkMenuItem * menuitem, gpointer gdata);
76 #endif
77