5 #include <gdk/gdkkeysyms.h>
10 #define GBDFED_VERSION "1.6"
12 /*************************************************************************
16 *************************************************************************/
22 gchar *accelerator_text;
23 gchar *unicode_name_file;
24 gchar *adobe_name_file;
27 gboolean overwrite_mode;
29 unsigned int pixel_size;
30 unsigned int resolution;
31 gboolean show_cap_height;
32 gboolean show_x_height;
38 gboolean colors_allocated;
40 unsigned short colors[20];
47 GtkOrientation orientation;
48 bdf_options_t font_opts;
53 * Numeric ID for the editor.
58 * Path and filenames of the font in question.
67 * The Open/Save file selection dialogs that will be used for related
68 * operations as well as the original.
70 GtkWidget *open_dialog;
71 GtkWidget *save_dialog;
74 * The menus that need to have item sensitivity checked on popup and
79 GtkWidget *name_submenu;
85 * This editor's item on the Windows menu. Used to toggle sensitivity.
87 GtkWidget *win_menu_item;
90 * The font name field.
95 * The encoding and metrics labels.
101 * The paging buttons and page tracking variables.
111 * The Page number and character code input fields.
117 * The FontGrid widget.
122 * Widgets that may change sensitivity depending on the state of the font
125 GtkWidget *file_save;
126 GtkWidget *file_export;
129 GtkWidget *edit_copy;
130 GtkWidget *edit_paste;
131 GtkWidget *edit_overlay;
132 GtkWidget *edit_insert;
133 GtkWidget *edit_rename_glyphs;
134 GtkWidget *edit_rename_menu;
135 GtkWidget *edit_make_xlfd;
136 GtkWidget *edit_unicode_names;
137 GtkWidget *edit_adobe_names;
138 GtkWidget *edit_test_glyphs;
141 * These are the toggle widgets that change the code base displayed
142 * in the Fontgrid to octal, decimal, or hex.
149 * The widget that toggles the view between the encoded and unencoded
150 * sections of the font.
152 GtkWidget *view_unencoded;
155 * The orientation label which changes depending on the current
156 * orientation of the Fontgrid.
158 GtkWidget *view_orientation;
161 * This is the font messages menu item that may or may not be
164 GtkWidget *view_messages;
167 * These are the widgets that make up the font messages dialog which is
168 * used to record the font I/O and modification messages.
170 GtkWidget *messages_label;
171 GtkWidget *messages_text;
172 GtkWidget *messages_dialog;
175 * These fields specify the font format being imported or exported.
181 * These are the preference widgets.
183 GtkWidget *pref_dialog;
186 * These are the widgets for editing information about the font.
188 GtkWidget *finfo_notebook;
189 GtkWidget *finfo_dialog;
190 GtkWidget *finfo_comments;
191 GtkWidget *finfo_erase_comments;
192 GtkWidget *finfo_apply_comments;
193 GtkWidget *finfo_font_props;
194 GtkWidget *finfo_all_props;
195 GtkWidget *finfo_prop_name;
196 GtkWidget *finfo_prop_value;
197 GtkWidget *finfo_prop_format[4];
198 GtkWidget *finfo_apply_prop;
199 GtkWidget *finfo_delete_prop;
201 GtkWidget *finfo_enc_count;
202 GtkWidget *finfo_unenc_count;
204 GtkWidget *finfo_default_char;
206 GtkWidget *finfo_spacing[4];
208 GtkWidget *finfo_hres;
209 GtkWidget *finfo_vres;
210 GtkWidget *finfo_bpp;
212 GtkWidget *finfo_dwidth;
213 GtkWidget *finfo_ascent;
214 GtkWidget *finfo_descent;
216 GtkWidget *finfo_apply_info;
217 gboolean finfo_xlfd_props_modified;
220 * A flag to indicate if the font was just imported from a non-BDF format
221 * file. It is set to FALSE whenever a save of any kind is done.
227 /*************************************************************************
231 *************************************************************************/
233 #include "fontgrid.h"
235 #include "colorswatch.h"
237 #include "glyphtest.h"
240 * List of editors and their number.
242 extern gbdfed_editor_t *editors;
243 extern guint num_editors;
246 * Buffers used for making messages and filenames.
248 extern gchar buffer1[];
249 extern gchar buffer2[];
252 * Options for loading/saving fonts and other application options.
254 extern gbdfed_options_t options;
256 /*************************************************************************
258 * The glyph test widget used by all editors in one session.
260 *************************************************************************/
262 extern GtkWidget *glyphtest;
264 /*************************************************************************
266 * Other functions: gbdfed.c
268 *************************************************************************/
270 extern guint gbdfed_make_editor(gchar *, gboolean);
272 /*************************************************************************
274 * File menu functions: guifile.c
276 *************************************************************************/
279 * New editor creation callback.
281 extern void guifile_new_editor(GtkWidget *, gpointer);
284 * File import callbacks.
286 extern void guifile_import_bdf_font(GtkWidget *, gpointer);
287 extern void guifile_import_console_font(GtkWidget *, gpointer);
288 extern void guifile_import_pkgf_font(GtkWidget *, gpointer);
289 extern void guifile_import_windows_font(GtkWidget *, gpointer);
292 extern void guifile_import_hbf_font(GtkWidget *, gpointer);
296 extern void guifile_import_otf_font(GtkWidget *, gpointer);
297 #endif /* HAVE_FREETYPE */
300 extern void guifile_import_xserver_font(GtkWidget *, gpointer);
304 * File save callbacks.
306 extern void guifile_save_as(GtkWidget *, gpointer);
307 extern void guifile_save_as_wait(GtkWidget *, gpointer);
308 extern void guifile_save(GtkWidget *, gpointer);
309 extern void guifile_export_psf_font(GtkWidget *, gpointer);
310 extern void guifile_export_hex_font(GtkWidget *, gpointer);
311 extern void guifile_export_header_font(GtkWidget *, gpointer);
314 * Special direct BDF font load call for recent fonts menu.
316 extern void guifile_load_bdf_font(gbdfed_editor_t *ed, const gchar *filename);
318 /*************************************************************************
320 * Edit functions: guiedit.c
322 *************************************************************************/
324 extern void guiedit_set_unicode_glyph_names(GtkWidget *, gpointer);
325 extern void guiedit_set_adobe_glyph_names(GtkWidget *, gpointer);
326 extern void guiedit_set_uni_glyph_names(GtkWidget *, gpointer);
327 extern void guiedit_set_zerox_glyph_names(GtkWidget *, gpointer);
328 extern void guiedit_set_uplus_glyph_names(GtkWidget *, gpointer);
329 extern void guiedit_set_bslashu_glyph_names(GtkWidget *, gpointer);
330 extern void guiedit_show_font_info(GtkWidget *, gpointer);
331 extern void guiedit_show_font_comments(GtkWidget *, gpointer);
332 extern void guiedit_show_font_properties(GtkWidget *, gpointer);
333 extern void guiedit_update_font_info(gbdfed_editor_t *);
334 extern void guiedit_update_font_properties(gbdfed_editor_t *);
335 extern void guiedit_update_font_details(gbdfed_editor_t *);
336 extern void guiedit_update_code_base(gbdfed_editor_t *);
337 extern void guiedit_copy_selection(GtkWidget *, gpointer);
338 extern void guiedit_cut_selection(GtkWidget *, gpointer);
339 extern void guiedit_paste_selection(GtkWidget *, gpointer);
340 extern void guiedit_overlay_selection(GtkWidget *, gpointer);
341 extern void guiedit_insert_selection(GtkWidget *, gpointer);
342 extern void guiedit_show_glyphtest(GtkWidget *, gpointer);
344 /*************************************************************************
346 * Glyph edit functions: guigedit.c
348 *************************************************************************/
350 extern void guigedit_edit_glyph(gbdfed_editor_t *ed,
351 FontgridSelectionInfo *si);
353 extern void guigedit_show_cap_height(gboolean show);
354 extern void guigedit_show_x_height(gboolean show);
355 extern void guigedit_set_pixel_size(guint pixel_size);
356 extern void guigedit_set_font_spacing(gint spacing, guint16 monowidth);
357 extern void guigedit_set_font_spacing(gint spacing, guint16 monowidth);
358 extern void guigedit_set_code_base(gint code_base);
360 extern void guigedit_cleanup(void);
363 /*************************************************************************
365 * Preference functions: guipref.c
367 *************************************************************************/
369 extern void guiedit_show_preferences(GtkWidget *, gpointer);
370 extern void guiedit_preference_cleanup(void);
372 /*************************************************************************
374 * Help functions: guihelp.c
376 *************************************************************************/
379 * Macros that specify the help text to be used.
381 #define GUIHELP_ABOUT 0
382 #define GUIHELP_PROGRAM 1
383 #define GUIHELP_FONTGRID 2
384 #define GUIHELP_GLYPH_EDITOR 3
385 #define GUIHELP_CONFIG_FILE 4
386 #define GUIHELP_PREFERENCES 5
387 #define GUIHELP_FNT 6
388 #define GUIHELP_OTF 7
389 #define GUIHELP_PSF 8
390 #define GUIHELP_HEX 9
391 #define GUIHELP_COLOR 10
392 #define GUIHELP_TIPS 11
394 extern void guihelp_show_help(GtkWidget *w, gpointer data);
396 extern void guigedit_cleanup(void);
397 extern void guihelp_cleanup(void);
399 /*************************************************************************
401 * Glyph operation functions: guiops.c
403 *************************************************************************/
405 extern void guiops_show_translate(GtkWidget *, gpointer);
406 extern void guiops_show_rotate(GtkWidget *, gpointer);
407 extern void guiops_show_shear(GtkWidget *, gpointer);
408 extern void guiops_show_embolden(GtkWidget *, gpointer);
410 /*************************************************************************
412 * Util functions: guiutil.c
414 *************************************************************************/
416 extern void guiutil_show_dialog_centered(GtkWidget *dialog, GtkWidget *parent);
417 extern void guiutil_cursor_cleanup(void);
418 extern void guiutil_busy_cursor(GtkWidget *w, gboolean on);
419 extern void guiutil_error_message(GtkWidget *parent, gchar *text);
420 extern gboolean guiutil_yes_or_no(GtkWidget *parent, gchar *text,
421 gboolean default_answer);
422 extern void guiutil_util_set_tooltip(GtkWidget *, gchar *);
426 #endif /* _h_gbdfed */