3 * Copyright (C) 2008-2009 Didier Villevalois
4 * Copyright (C) 2008-2012 Florian Brosch
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 * Didier 'Ptitjes Villevalois <ptitjes@free.fr>
25 public class Valadoc
.Content
.TableCell
: InlineContent
, StyleAttributes
{
26 public HorizontalAlign horizontal_align
{
31 public VerticalAlign vertical_align
{
36 public string? style
{
51 internal TableCell () {
57 public override void check (Api
.Tree api_root
, Api
.Node container
, string file_path
,
58 ErrorReporter reporter
, Settings settings
)
60 // Check inline content
61 base.check (api_root
, container
, file_path
, reporter
, settings
);
64 public override void accept (ContentVisitor visitor
) {
65 visitor
.visit_table_cell (this
);
68 public override bool is_empty () {
69 // empty cells are displayed as well
73 public override ContentElement
copy (ContentElement? new_parent
= null) {
74 TableCell cell
= new
TableCell ();
75 cell
.parent
= new_parent
;
77 cell
.horizontal_align
= horizontal_align
;
78 cell
.vertical_align
= vertical_align
;
79 cell
.colspan
= colspan
;
80 cell
.rowspan
= rowspan
;
83 foreach (Inline element
in content
) {
84 Inline copy
= element
.copy (cell
) as Inline
;
85 cell
.content
.add (copy
);