2
* Xiphos Bible Study Tool
3
* webkit_editor.h - html editor using webkit
5
* Copyright (C) 2005-2014 Xiphos Developer Team
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU Library General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
22
#ifndef _WEBKIT_EDITOR_H
23
#define _WEBKIT_EDITOR_H
34
#ifdef USE_WEBKIT_EDITOR
38
#include "main/navbar_versekey.h"
41
GtkToggleToolButton *bold;
42
GtkToggleToolButton *italic;
43
GtkToggleToolButton *underline;
44
GtkToggleToolButton *strike;
45
GtkColorButton *color;
46
GtkToolButton *newdoc;
48
GtkToolButton *deletedoc;
52
typedef struct _tool_items TOOL_ITEMS;
54
typedef struct _editor EDITOR;
58
GtkWidget *scrollwindow;
61
GtkWidget *sync_button;
62
GtkWidget *html_widget;
64
GtkWidget *navbar_box;
65
NAVBAR_VERSEKEY navbar;
95
typedef struct _menu MENU;
101
GtkWidget *find_entry;
102
GtkWidget *replace_entry;
103
GtkWidget *box_replace;
104
GtkWidget *button_replace;
108
typedef struct _find_dialog FIND_DIALOG;
110
extern FIND_DIALOG find_dialog;
112
struct _buttons_state {
121
typedef struct _buttons_state BUTTONS_STATE;
123
void action_about_activate_cb (GtkWidget *widget, EDITOR * e);
125
void action_increase_indent_activate_cb (GtkWidget *widget, EDITOR * e);
126
void action_decrease_indent_activate_cb (GtkWidget *widget, EDITOR * e);
128
void action_insert_image_activate_cb (GtkWidget *widget, EDITOR * e);
129
void action_insert_rule_activate_cb (GtkWidget *widget, EDITOR * e);
130
void action_insert_table_activate_cb (GtkWidget *widget, EDITOR * e);
131
void action_insert_emoticon_activate_cb (GtkWidget *widget, EDITOR * e);
132
void action_insert_sword_link_activate_cb (GtkWidget * widget, gpointer data);
133
void action_insert_link_activate_cb (GtkWidget * widget, EDITOR *e);
136
void action_insert_outline_activate_cb (GtkWidget *widget, EDITOR * e);
138
void action_justify_right_activate_cb (GtkWidget *widget, EDITOR * e);
139
void action_justify_left_activate_cb (GtkWidget *widget, EDITOR * e);
140
void action_justify_center_activate_cb (GtkWidget *widget, EDITOR * e);
141
void action_justify_full_activate_cb (GtkWidget *widget, EDITOR * e);
143
void action_bold_activate_cb (GtkWidget *widget, EDITOR * e);
144
void action_italic_activate_cb (GtkWidget *widget, EDITOR * e);
145
void action_underline_activate_cb (GtkWidget *widget, EDITOR * e);
146
void action_strikethrough_activate_cb (GtkWidget *widget, EDITOR * e);
148
void action_undo_activate_cb (GtkWidget *widget, EDITOR * e);
149
void action_redo_activate_cb (GtkWidget *widget, EDITOR * e);
151
void action_cut_activate_cb (GtkWidget *widget, EDITOR * e);
152
void action_copy_activate_cb (GtkWidget *widget, EDITOR * e);
153
void action_paste_activate_cb (GtkWidget *widget, EDITOR * e);
154
void action_delete_activate_cb (GtkWidget *widget, EDITOR * e);
155
void action_delete_item_activate_cb (GtkWidget *widget, EDITOR * e);
157
void set_button_state(BUTTONS_STATE state, EDITOR * e);
158
void action_fontcolor_activate_cb (GtkWidget *widget, EDITOR * e);
159
void action_font_activate_cb (GtkWidget *widget, EDITOR * e);
160
void find_replace_response_cb (GtkDialog *dialog, gint response_id,
162
void action_replace_activate_cb (GtkWidget *widget, EDITOR * e);
163
void action_find_activate_cb (GtkWidget *widget, EDITOR * e);
164
int delete_event (GtkWidget *widget, GdkEvent *event, EDITOR * e);
165
void action_quit_activate_cb (GtkWidget *widget, EDITOR * e);
166
void action_new_activate_cb (GtkWidget *widget, EDITOR *e);
167
void action_open_activate_cb (GtkWidget *widget, EDITOR *e);
168
void action_print_cb (GtkAction *action, EDITOR *e);
169
void action_print_preview_cb (GtkAction *action, EDITOR *e);
170
void action_save_activate_cb (GtkWidget *widget, EDITOR * e);
171
void action_save_as_activate_cb (GtkWidget *widget, EDITOR * e);
173
void editor_sync_with_main(void);
174
void editor_load_note(EDITOR * e, const gchar * module_name, const gchar * key);
175
void editor_load_book(EDITOR * e);
176
gint editor_create_new(const gchar * filename, const gchar * key, gint note);
177
void editor_save_book(EDITOR * e);
178
void editor_maybe_save_all(void);
179
gint ask_about_saving(EDITOR * e);
180
void colorbutton1_color_set_cb (GtkColorButton *widget, EDITOR * e );
181
void colorbutton_highlight_color_set_cb (GtkColorButton *widget, EDITOR * e );
182
void combo_box_changed_cb (GtkComboBox *widget, EDITOR * e);
186
#endif /* USE_WEBKIT_EDITOR */
188
#endif /* _WEBKIT_EDITOR_H */