Release 0.41.92
[vala-gnome.git] / libvaladoc / content / paragraph.vala
blob2c8fbefd3665979152a3b61160963be3adee06c9
1 /* paragraph.vala
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
20 * Author:
21 * Didier 'Ptitjes Villevalois <ptitjes@free.fr>
25 public class Valadoc.Content.Paragraph : InlineContent, Block, StyleAttributes {
26 public HorizontalAlign horizontal_align {
27 get;
28 set;
31 public VerticalAlign vertical_align {
32 get;
33 set;
36 public string? style {
37 get;
38 set;
41 internal Paragraph () {
42 base ();
45 public override void check (Api.Tree api_root, Api.Node container, string file_path,
46 ErrorReporter reporter, Settings settings)
48 // Check inline content
49 base.check (api_root, container, file_path, reporter, settings);
52 public override void accept (ContentVisitor visitor) {
53 visitor.visit_paragraph (this);
56 public override ContentElement copy (ContentElement? new_parent = null) {
57 Paragraph p = new Paragraph ();
58 p.parent = new_parent;
60 p.horizontal_align = horizontal_align;
61 p.vertical_align = vertical_align;
62 p.style = style;
64 foreach (Inline element in content) {
65 Inline copy = element.copy (p) as Inline;
66 p.content.add (copy);
69 return p;