1 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ |
---|
2 | /* This file is part of GtkHTML. |
---|
3 | |
---|
4 | Copyright (C) 1997 Martin Jones (mjones@kde.org) |
---|
5 | Copyright (C) 1997 Torben Weis (weis@kde.org) |
---|
6 | Copyright (C) 2000 Helix Code, Inc. |
---|
7 | |
---|
8 | This library is free software; you can redistribute it and/or |
---|
9 | modify it under the terms of the GNU Library General Public |
---|
10 | License as published by the Free Software Foundation; either |
---|
11 | version 2 of the License, or (at your option) any later version. |
---|
12 | |
---|
13 | This library is distributed in the hope that it will be useful, |
---|
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
16 | Library General Public License for more details. |
---|
17 | |
---|
18 | You should have received a copy of the GNU Library General Public License |
---|
19 | along with this library; see the file COPYING.LIB. If not, write to |
---|
20 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
---|
21 | Boston, MA 02111-1307, USA. |
---|
22 | */ |
---|
23 | |
---|
24 | #ifndef _HTMLTABLECELL_H_ |
---|
25 | #define _HTMLTABLECELL_H_ |
---|
26 | |
---|
27 | #include "htmlcluev.h" |
---|
28 | #include "htmlimage.h" |
---|
29 | |
---|
30 | #define HTML_TABLE_CELL(x) ((HTMLTableCell *)(x)) |
---|
31 | #define HTML_TABLE_CELL_CLASS(x) ((HTMLTableCellClass *)(x)) |
---|
32 | #define HTML_IS_TABLE_CELL(x) (HTML_OBJECT_TYPE (x) == HTML_TYPE_TABLECELL) |
---|
33 | |
---|
34 | struct _HTMLTableCell { |
---|
35 | HTMLClueV cluev; |
---|
36 | |
---|
37 | gint fixed_width; |
---|
38 | gint fixed_height; |
---|
39 | gboolean percent_width : 1; |
---|
40 | gboolean percent_height : 1; |
---|
41 | gboolean no_wrap; |
---|
42 | gboolean heading; |
---|
43 | |
---|
44 | gint rspan; |
---|
45 | gint cspan; |
---|
46 | gint row; |
---|
47 | gint col; |
---|
48 | |
---|
49 | GdkColor bg; |
---|
50 | guint have_bg : 1; |
---|
51 | guint bg_allocated : 1; |
---|
52 | |
---|
53 | HTMLImagePointer *bgPixmap; |
---|
54 | gboolean have_bgPixmap; |
---|
55 | }; |
---|
56 | |
---|
57 | struct _HTMLTableCellClass { |
---|
58 | HTMLClueVClass cluev_class; |
---|
59 | }; |
---|
60 | |
---|
61 | |
---|
62 | extern HTMLTableCellClass html_table_cell_class; |
---|
63 | |
---|
64 | |
---|
65 | void html_table_cell_type_init (void); |
---|
66 | void html_table_cell_class_init (HTMLTableCellClass *klass, |
---|
67 | HTMLType type, |
---|
68 | guint object_size); |
---|
69 | void html_table_cell_init (HTMLTableCell *cell, |
---|
70 | HTMLTableCellClass *klass, |
---|
71 | gint rs, |
---|
72 | gint cs, |
---|
73 | gint pad); |
---|
74 | HTMLObject *html_table_cell_new (gint rs, |
---|
75 | gint cs, |
---|
76 | gint pad); |
---|
77 | void html_table_cell_set_fixed_width (HTMLTableCell *cell, |
---|
78 | gint width, |
---|
79 | gboolean percented); |
---|
80 | void html_table_cell_set_fixed_height (HTMLTableCell *cell, |
---|
81 | gint height, |
---|
82 | gboolean percented); |
---|
83 | void html_table_cell_set_bg_pixmap (HTMLTableCell *cell, |
---|
84 | HTMLImagePointer *imagePtr); |
---|
85 | void html_table_cell_set_position (HTMLTableCell *cell, |
---|
86 | gint row, |
---|
87 | gint col); |
---|
88 | gint html_table_cell_get_fixed_width (HTMLTableCell *cell, |
---|
89 | HTMLPainter *painter); |
---|
90 | |
---|
91 | #endif /* _HTMLTABLECELL_H_ */ |
---|