output: Support decimal and mixed alignment,
[pspp] / src / output / text-item.h
index e09d06badc4da4f3ff11d8b626f72a393c9f4eee..2e27529fecbae5ad29039bf4f07ea618c978ed26 100644 (file)
 
 enum text_item_type
   {
-    /* Each PSPP command is bracketed between a pair of these text items.  The
-       text item's string is the full name of the command.  The syntax text
-       items associated with the command, as well as all output produced
-       directly by the command, are contained within the pair.  There is no
-       nesting. */
-    TEXT_ITEM_COMMAND_OPEN,     /* Command starting. */
-    TEXT_ITEM_COMMAND_CLOSE,    /* Command completed. */
-
-    /* Headings. */
     TEXT_ITEM_PAGE_TITLE,       /* TITLE and SUBTITLE commands. */
-    TEXT_ITEM_SUBHEAD,          /* Heading within a command's output.*/
+    TEXT_ITEM_TITLE,            /* Title. */
+    TEXT_ITEM_PARAGRAPH,        /* Normal paragraph of text. */
 
-    /* Syntax. */
+    /* Log items. */
     TEXT_ITEM_SYNTAX,           /* A single line of PSPP syntax. */
-    TEXT_ITEM_COMMENT,          /* COMMENT command. */
-    TEXT_ITEM_ECHO,             /* ECHO command. */
-
-    /* Ordinary text. */
-    TEXT_ITEM_PARAGRAPH,        /* Normal paragraph of text. */
-    TEXT_ITEM_MONOSPACE,        /* Paragraph of monospaced text. */
+    TEXT_ITEM_LOG,              /* Other logging. */
 
     /* Spacing.  Some output drivers that are not based on lines and pages
        (e.g. CSV, HTML) may ignore these. */
@@ -63,9 +50,10 @@ struct text_item
     struct output_item output_item;
     char *text;                 /* The content. */
     enum text_item_type type;   /* Type. */
-    char *font;
-    int font_size;
-    bool bold, italic, underline;
+
+    bool bold, italic, underline, markup;
+    char *typeface;
+    int size;
   };
 
 struct text_item *text_item_create (enum text_item_type, const char *text);
@@ -76,6 +64,8 @@ struct text_item *text_item_create_format (enum text_item_type,
 
 enum text_item_type text_item_get_type (const struct text_item *);
 const char *text_item_get_text (const struct text_item *);
+
+struct table_item *text_item_to_table_item (struct text_item *);
 \f
 /* This boilerplate for text_item, a subclass of output_item, was
    autogenerated by mk-class-boilerplate. */