output: Introduce group_item in place of TEXT_ITEM_COMMAND_OPEN and CLOSE.
[pspp] / src / output / text-item.h
index b62e7dc4011e8616b843c0bc604938fa9fd04a8a..1bfb63689b28cd94f6cce1c14b7c8fa570456e03 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2009 Free Sonftware Foundation, Inc.
+   Copyright (C) 2009, 2010, 2011 Free Sonftware Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    A text item is just a text string. */
 
 #include <stdbool.h>
-#include <libpspp/compiler.h>
-#include <output/output-item.h>
+#include "libpspp/compiler.h"
+#include "output/output-item.h"
 
 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_TITLE,            /* TITLE command. */
-    TEXT_ITEM_SUBTITLE,         /* SUBTITLE command. */
+    TEXT_ITEM_PAGE_TITLE,       /* TITLE and SUBTITLE commands. */
     TEXT_ITEM_SUBHEAD,          /* Heading within a command's output.*/
 
     /* Syntax. */
@@ -64,9 +55,13 @@ 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;
   };
 
 struct text_item *text_item_create (enum text_item_type, const char *text);
+struct text_item *text_item_create_nocopy (enum text_item_type, char *text);
 struct text_item *text_item_create_format (enum text_item_type,
                                            const char *format, ...)
   PRINTF_FORMAT (2, 3);
@@ -78,7 +73,7 @@ const char *text_item_get_text (const struct text_item *);
    autogenerated by mk-class-boilerplate. */
 
 #include <assert.h>
-#include <libpspp/cast.h>
+#include "libpspp/cast.h"
 
 extern const struct output_item_class text_item_class;