X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foutput%2Ftext-item.h;h=9efc26490baa59c46459a9c4f72dc952902e0974;hb=81dece3642da9bdcbdec4aa09b0c2008c86d6161;hp=b62e7dc4011e8616b843c0bc604938fa9fd04a8a;hpb=d0b91eae59319ab2756d0d43b9cb15eb9cd3c234;p=pspp diff --git a/src/output/text-item.h b/src/output/text-item.h index b62e7dc401..9efc26490b 100644 --- a/src/output/text-item.h +++ b/src/output/text-item.h @@ -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 @@ -25,60 +25,48 @@ A text item is just a text string. */ #include -#include -#include +#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_SUBHEAD, /* Heading within a command's output.*/ - - /* Syntax. */ - 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. */ - - /* Spacing. Some output drivers that are not based on lines and pages - (e.g. CSV, HTML) may ignore these. */ - TEXT_ITEM_BLANK_LINE, /* Blank line. */ + TEXT_ITEM_PAGE_TITLE, /* TITLE and SUBTITLE commands. */ + TEXT_ITEM_TITLE, /* Title. */ + TEXT_ITEM_SYNTAX, /* Syntax printback logging. */ + TEXT_ITEM_LOG, /* Other logging. */ TEXT_ITEM_EJECT_PAGE /* Eject page. */ }; +const char *text_item_type_to_string (enum text_item_type); + /* A text item. */ struct text_item { struct output_item output_item; char *text; /* The content. */ enum text_item_type type; /* Type. */ + + bool bold, italic, underline, markup; + char *typeface; + int size; }; 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); 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 *); /* This boilerplate for text_item, a subclass of output_item, was autogenerated by mk-class-boilerplate. */ #include -#include +#include "libpspp/cast.h" extern const struct output_item_class text_item_class;