~ubuntu-branches/debian/sid/geany-plugins/sid

« back to all changes in this revision

Viewing changes to geanylatex/src/latexkeybindings.c

  • Committer: Bazaar Package Importer
  • Author(s): Chow Loong Jin
  • Date: 2009-07-10 22:56:41 UTC
  • Revision ID: james.westby@ubuntu.com-20090710225641-xc1126t7pq0jmpos
Tags: upstream-0.17.1
ImportĀ upstreamĀ versionĀ 0.17.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *      latexkeybindings.c
 
3
 *
 
4
 *      Copyright 2009 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
#include "latexkeybindings.h"
 
23
 
 
24
void glatex_kblabel_insert(G_GNUC_UNUSED guint key_id)
 
25
{
 
26
        if (NULL == document_get_current())
 
27
                return;
 
28
        glatex_insert_label_activated(NULL, NULL);
 
29
}
 
30
 
 
31
void glatex_kbref_insert(G_GNUC_UNUSED guint key_id)
 
32
{
 
33
        if (NULL == document_get_current())
 
34
                return;
 
35
        glatex_insert_ref_activated(NULL, NULL);
 
36
}
 
37
 
 
38
 
 
39
void glatex_kbref_insert_environment(G_GNUC_UNUSED guint key_id)
 
40
{
 
41
        if (NULL == document_get_current())
 
42
                return;
 
43
        glatex_insert_environment_dialog(NULL, NULL);
 
44
}
 
45
 
 
46
void glatex_kbwizard(G_GNUC_UNUSED guint key_id)
 
47
{
 
48
        glatex_wizard_activated(NULL, NULL);
 
49
}
 
50
 
 
51
void glatex_kb_insert_newline(G_GNUC_UNUSED guint key_id)
 
52
{
 
53
        if (NULL == document_get_current())
 
54
                return;
 
55
        glatex_insert_string("\\\\\n", TRUE);
 
56
}
 
57
 
 
58
void glatex_kb_insert_newitem(G_GNUC_UNUSED guint key_id)
 
59
{
 
60
        if (NULL == document_get_current())
 
61
                return;
 
62
        glatex_insert_string("\\item ", TRUE);
 
63
}
 
64
 
 
65
void glatex_kb_replace_special_chars(G_GNUC_UNUSED guint key_id)
 
66
{
 
67
        if (NULL == document_get_current())
 
68
                return;
 
69
        glatex_replace_special_character();
 
70
}
 
71
 
 
72
void glatex_kb_format_bold(G_GNUC_UNUSED guint key_id)
 
73
{
 
74
        if (NULL == document_get_current())
 
75
                return;
 
76
        glatex_insert_latex_format(NULL, GINT_TO_POINTER(LATEX_BOLD));
 
77
}
 
78
 
 
79
void glatex_kb_format_italic(G_GNUC_UNUSED guint key_id)
 
80
{
 
81
        if (NULL == document_get_current())
 
82
                return;
 
83
        glatex_insert_latex_format(NULL, GINT_TO_POINTER(LATEX_ITALIC));
 
84
}
 
85
 
 
86
void glatex_kb_format_typewriter(G_GNUC_UNUSED guint key_id)
 
87
{
 
88
        if (NULL == document_get_current())
 
89
                return;
 
90
        glatex_insert_latex_format(NULL, GINT_TO_POINTER(LATEX_TYPEWRITER));
 
91
}
 
92
 
 
93
void glatex_kb_format_centering(G_GNUC_UNUSED guint key_id)
 
94
{
 
95
        if (NULL == document_get_current())
 
96
                return;
 
97
        glatex_insert_latex_format(NULL, GINT_TO_POINTER(LATEX_CENTER));
 
98
}
 
99
 
 
100
void glatex_kb_format_left(G_GNUC_UNUSED guint key_id)
 
101
{
 
102
        if (NULL == document_get_current())
 
103
                return;
 
104
        glatex_insert_latex_format(NULL, GINT_TO_POINTER(LATEX_LEFT));
 
105
}
 
106
 
 
107
void glatex_kb_format_right(G_GNUC_UNUSED guint key_id)
 
108
{
 
109
        if (NULL == document_get_current())
 
110
                return;
 
111
        glatex_insert_latex_format(NULL, GINT_TO_POINTER(LATEX_RIGHT));
 
112
}