#ifndef EL__DOCUMENT_OPTIONS_H #define EL__DOCUMENT_OPTIONS_H #include "document/format.h" #include "terminal/color.h" #include "util/color.h" #include "util/box.h" #ifdef __cplusplus extern "C" { #endif struct session; /** Active link coloring options */ struct active_link_options_colors { color_T foreground; color_T background; }; struct active_link_options { unsigned int enable_color:1; unsigned int underline:1; unsigned int bold:1; unsigned int invert:1; struct active_link_options_colors color; struct active_link_options_colors insert_mode_color; }; /** This mostly acts as a option cache so rendering will be faster. However it * is also used to validate and invalidate documents in the format cache as to * whether they satisfy the current state of the document options. */ struct document_options_colors { color_T link; color_T vlink; #ifdef CONFIG_BOOKMARKS color_T bookmark_link; #endif color_T image_link; color_T link_number; }; struct document_options_image_link { char *prefix; char *suffix; int filename_maxlen; int label_maxlen; int display_style; int tagging; unsigned int show_any_as_links:1; }; struct document_options { color_mode_T color_mode; /** cp is the codepage for which the document is being formatted; * typically it is the codepage of a terminal. It is set in * render_document_frames(). */ int cp, assume_cp, hard_assume; int margin; int num_links_key; int use_document_colors; int meta_link_display; int default_form_input_size; int document_width; /** @name The default (fallback) colors. * @{ */ struct text_style default_style; struct document_options_colors default_color; /** @} */ unsigned int use_link_number_color:1; /** Color model/optimizations */ color_flags_T color_flags; /* XXX: Keep boolean options grouped to save padding */ #ifdef CONFIG_CSS /** @name CSS stuff * @{ */ unsigned int css_enable:1; unsigned int css_import:1; unsigned int css_ignore_display_none:1; /** @} */ #endif /** @name HTML stuff * @{ */ unsigned int tables:1; unsigned int table_order:1; unsigned int frames:1; unsigned int images:1; unsigned int iframes:1; unsigned int display_subs:1; unsigned int display_sups:1; unsigned int underline_links:1; unsigned int wrap_nbsp:1; /** @} */ /** @name Plain rendering stuff * @{ */ unsigned int plain_display_links:1; unsigned int plain_compress_empty_lines:1; unsigned int plain_fixup_tables:1; /** @} */ /** @name Link navigation * @{ */ unsigned int links_numbering:1; unsigned int use_tabindex:1; /** @} */ unsigned int plain:1; unsigned int wrap:1; unsigned int links_show_goto:1; unsigned int was_xml_parsed:1; /* XXX: Everything past this comment is specialy handled by compare_opt() */ char *framename; /** The location of the window in which the document is rendered. * *