2 /* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
3 Written by James Clark (jjc@jclark.com)
5 This file is part of groff.
7 groff is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
12 groff is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 You should have received a copy of the GNU General Public License along
18 with groff; see the file COPYING. If not, write to the Free Software
19 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
30 virtual void debug_print() = 0;
33 virtual int compute_metrics(int);
34 virtual void compute_subscript_kern();
35 virtual void compute_skew();
36 virtual void output();
38 virtual list_box *to_list_box();
39 virtual int is_simple();
40 virtual int is_char();
41 virtual int left_is_italic();
42 virtual int right_is_italic();
43 virtual void handle_char_type(int, int);
44 enum { FOUND_NOTHING = 0, FOUND_MARK = 1, FOUND_LINEUP = 2 };
45 void set_spacing_type(char *type);
46 virtual void hint(unsigned);
47 virtual void check_tabs(int);
60 void list_check_tabs(int);
61 void list_debug_print(const char *sep);
62 friend class list_box;
65 class list_box : public box {
72 int compute_metrics(int);
73 void compute_subscript_kern();
77 list_box *to_list_box();
78 void handle_char_type(int, int);
79 void compute_sublist_width(int n);
80 friend box *make_script_box(box *, box *, box *);
81 friend box *make_mark_box(box *);
82 friend box *make_lineup_box(box *);
85 enum alignment { LEFT_ALIGN, RIGHT_ALIGN, CENTER_ALIGN };
87 class column : public box_list {
92 void set_alignment(alignment);
94 void debug_print(const char *);
96 friend class matrix_box;
97 friend class pile_box;
100 class pile_box : public box {
104 int compute_metrics(int);
107 void check_tabs(int);
108 void set_alignment(alignment a) { col.set_alignment(a); }
109 void set_space(int n) { col.set_space(n); }
110 void append(box *p) { col.append(p); }
113 class matrix_box : public box {
119 matrix_box(column *);
121 void append(column *);
122 int compute_metrics(int);
124 void check_tabs(int);
128 class pointer_box : public box {
134 int compute_metrics(int);
135 void compute_subscript_kern();
137 void debug_print() = 0;
138 void check_tabs(int);
141 class vcenter_box : public pointer_box {
144 int compute_metrics(int);
149 class simple_box : public box {
151 int compute_metrics(int);
152 void compute_subscript_kern();
155 void debug_print() = 0;
159 class quoted_text_box : public simple_box {
162 quoted_text_box(char *);
168 class half_space_box : public simple_box {
175 class space_box : public simple_box {
182 class tab_box : public box {
188 void check_tabs(int);
191 class size_box : public pointer_box {
195 size_box(char *, box *);
197 int compute_metrics(int);
202 class font_box : public pointer_box {
206 font_box(char *, box *);
208 int compute_metrics(int);
213 class fat_box : public pointer_box {
216 int compute_metrics(int);
221 class vmotion_box : public pointer_box {
225 vmotion_box(int, box *);
226 int compute_metrics(int);
231 class hmotion_box : public pointer_box {
234 hmotion_box(int, box *);
235 int compute_metrics(int);
240 box *split_text(char *);
241 box *make_script_box(box *, box *, box *);
242 box *make_mark_box(box *);
243 box *make_lineup_box(box *);
244 box *make_delim_box(char *, box *, char *);
245 box *make_sqrt_box(box *);
246 box *make_prime_box(box *);
247 box *make_over_box(box *, box *);
248 box *make_small_over_box(box *, box *);
249 box *make_limit_box(box *, box *, box *);
250 box *make_accent_box(box *, box *);
251 box *make_uaccent_box(box *, box *);
252 box *make_overline_box(box *);
253 box *make_underline_box(box *);
254 box *make_special_box(char *, box *);
257 int set_gsize(const char *);
258 void set_gfont(const char *);
259 void set_grfont(const char *);
260 void set_gbfont(const char *);
261 const char *get_gfont();
262 const char *get_grfont();
263 const char *get_gbfont();
265 void output_string();
266 void do_text(const char *);
267 void restore_compatibility();
268 void set_script_reduction(int n);
269 void set_minimum_size(int n);
270 void set_param(const char *name, int value);
272 void set_char_type(const char *type, char *ch);
274 void init_char_table();
275 void init_extensible();
276 void define_extensible(const char *name, const char *ext, const char *top = 0,
277 const char *mid = 0, const char *bot = 0);