1 #ifndef ROBODOC_ITEMS_H
2 #define ROBODOC_ITEMS_H
5 Copyright (C) 1994-2007 Frans Slothouber, Jacco van Weert, Petteri Kettunen,
6 Bernd Koesling, Thomas Aglassinger, Anthon Pang, Stefan Kost, David Druffner,
7 Sasha Vasko, Kai Hofmann, Thierry Pierron, Friedrich Haase, and Gergely Budai.
9 This file is part of ROBODoc
11 ROBODoc is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 3 of the License, or
14 (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program. If not, see <http://www.gnu.org/licenses/>.
29 /****t* Items/ItemTypes
31 * ItemTypes -- enumeration of item types
33 * Defines a number of item types. There are two kind of items:
34 * * the SOURCE item which is always available,
35 * * and items defined by the user (or through the default items).
37 * Never check an item type against SOURCECODE_ITEM directily!
38 * Use Works_Like_SourceItem() function instead.
43 { POSSIBLE_ITEM = -2, NO_ITEM = -1, SOURCECODE_ITEM = 0, OTHER_ITEM };
48 #define RBILA_BEGIN_PARAGRAPH ( 1 << 1 )
49 #define RBILA_END_PARAGRAPH ( 1 << 2 )
50 #define RBILA_BEGIN_LIST ( 1 << 3 )
51 #define RBILA_END_LIST ( 1 << 4 )
52 #define RBILA_BEGIN_LIST_ITEM ( 1 << 5 )
53 #define RBILA_END_LIST_ITEM ( 1 << 6 )
54 #define RBILA_BEGIN_PRE ( 1 << 7 )
55 #define RBILA_END_PRE ( 1 << 8 )
56 #define RBILA_BEGIN_SOURCE ( 1 << 9 )
57 #define RBILA_END_SOURCE ( 1 << 10 )
61 ITEM_LINE_RAW, /* A line that does not start with a remark marker */
62 ITEM_LINE_PLAIN, /* A line that starts with a remark marker */
63 ITEM_LINE_PIPE, /* A line that starts with a remark marked and is
64 followed by a pipe marker. */
65 ITEM_LINE_END, /* The last line of an item */
67 ITEM_LINE_TOOL_START, // Start line of a tool item
68 ITEM_LINE_TOOL_BODY, // Body of a tool item
69 ITEM_LINE_TOOL_END, // End line of a tool item
70 ITEM_LINE_EXEC, // Exec item
71 ITEM_LINE_DOT_START, // Similar to TOOL_START but use DOT tool
72 ITEM_LINE_DOT_END, // End line of a DOT item
73 ITEM_LINE_DOT_FILE // DOT file to include
80 enum ItemLineKind kind;
82 T_RB_DocType pipe_mode;
87 * Keeps track of where items start end end in the header.
88 * The index numbers point to the lines array in
98 struct RB_Item_Line **lines;
107 int RB_Get_Item_Type(
109 int RB_Get_Item_Attr(
111 enum ItemType RB_Is_ItemName(
113 int RB_Ignore_Last_Item(
115 char *RB_Get_Item_Name(
117 struct RB_Item *RB_Create_Item(
118 enum ItemType arg_item_type );
121 int Works_Like_SourceItem(
122 enum ItemType item_type );
124 int Is_Preformatted_Item(
125 enum ItemType item_type );
128 enum ItemType item_type );
130 #endif /* ROBODOC_ITEMS_H */