2 * Copyright (c) 2014 - 2015 Steffen (Daode) Nurpmeso <sdaoden@users.sf.net>.
4 * Copyright (C) 1989 - 1992, 2004, 2005
5 * Free Software Foundation, Inc.
6 * Written by James Clark (jjc@jclark.com)
8 * This is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License as published by the Free
10 * Software Foundation; either version 2, or (at your option) any later
13 * This is distributed in the hope that it will be useful, but WITHOUT ANY
14 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 * You should have received a copy of the GNU General Public License along
19 * with groff; see the file COPYING. If not, write to the Free Software
20 * Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
26 #include "eqn-config.h"
38 virtual void debug_print() = 0;
41 virtual int compute_metrics(int);
42 virtual void compute_subscript_kern();
43 virtual void compute_skew();
44 virtual void output();
46 virtual list_box
*to_list_box();
47 virtual int is_simple();
48 virtual int is_char();
49 virtual int left_is_italic();
50 virtual int right_is_italic();
51 virtual void handle_char_type(int, int);
52 enum { FOUND_NOTHING
= 0, FOUND_MARK
= 1, FOUND_LINEUP
= 2 };
53 void set_spacing_type(char *type
);
54 virtual void hint(unsigned);
55 virtual void check_tabs(int);
69 void list_check_tabs(int);
70 void list_debug_print(const char *sep
);
71 friend class list_box
;
74 // declarations to avoid friend name injection problems
75 box
*make_script_box(box
*, box
*, box
*);
76 box
*make_mark_box(box
*);
77 box
*make_lineup_box(box
*);
89 int compute_metrics(int);
90 void compute_subscript_kern();
94 list_box
*to_list_box();
95 void handle_char_type(int, int);
96 void compute_sublist_width(int n
);
97 friend box
*make_script_box(box
*, box
*, box
*);
98 friend box
*make_mark_box(box
*);
99 friend box
*make_lineup_box(box
*);
102 enum alignment
{ LEFT_ALIGN
, RIGHT_ALIGN
, CENTER_ALIGN
};
112 void set_alignment(alignment
);
114 void debug_print(const char *);
116 friend class matrix_box
;
117 friend class pile_box
;
127 int compute_metrics(int);
130 void check_tabs(int);
131 void set_alignment(alignment a
) { col
.set_alignment(a
); }
132 void set_space(int n
) { col
.set_space(n
); }
133 void append(box
*p
) { col
.append(p
); }
144 matrix_box(column
*);
146 void append(column
*);
147 int compute_metrics(int);
149 void check_tabs(int);
162 int compute_metrics(int);
163 void compute_subscript_kern();
165 void debug_print() = 0;
166 void check_tabs(int);
174 int compute_metrics(int);
183 int compute_metrics(int);
184 void compute_subscript_kern();
187 void debug_print() = 0;
191 class quoted_text_box
197 quoted_text_box(char *);
230 void check_tabs(int);
239 size_box(char *, box
*);
241 int compute_metrics(int);
252 font_box(char *, box
*);
254 int compute_metrics(int);
264 int compute_metrics(int);
275 vmotion_box(int, box
*);
276 int compute_metrics(int);
287 hmotion_box(int, box
*);
288 int compute_metrics(int);
293 box
*split_text(char *);
294 box
*make_delim_box(char *, box
*, char *);
295 box
*make_sqrt_box(box
*);
296 box
*make_prime_box(box
*);
297 box
*make_over_box(box
*, box
*);
298 box
*make_small_over_box(box
*, box
*);
299 box
*make_limit_box(box
*, box
*, box
*);
300 box
*make_accent_box(box
*, box
*);
301 box
*make_uaccent_box(box
*, box
*);
302 box
*make_overline_box(box
*);
303 box
*make_underline_box(box
*);
304 box
*make_special_box(char *, box
*);
307 int set_gsize(const char *);
308 void set_gfont(const char *);
309 void set_grfont(const char *);
310 void set_gbfont(const char *);
311 const char *get_gfont();
312 const char *get_grfont();
313 const char *get_gbfont();
315 void output_string();
316 void do_text(const char *);
317 void restore_compatibility();
318 void set_script_reduction(int n
);
319 void set_minimum_size(int n
);
320 void set_param(const char *name
, int value
);
322 void set_char_type(const char *type
, char *ch
);
324 void init_char_table();
325 void init_extensible();
326 void define_extensible(const char *name
, const char *ext
, const char *top
= 0,
327 const char *mid
= 0, const char *bot
= 0);