X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FCitation.h;h=600ba6ca97bc8a8b1282ec5606283793b71eb254;hb=0dcf78a4ad21b62de6082fdf3feb7c564ebd1dc7;hp=fed47a5aef79d125c247a0d0c9610dea3acae357;hpb=298730215c21735f16e7278a5d5a4469fb0b9859;p=lyx.git diff --git a/src/Citation.h b/src/Citation.h index fed47a5aef..600ba6ca97 100644 --- a/src/Citation.h +++ b/src/Citation.h @@ -12,6 +12,8 @@ #ifndef CITATION_H #define CITATION_H +#include "support/docstring.h" +#include #include namespace lyx { @@ -31,7 +33,8 @@ class CitationStyle public: /// CitationStyle() : name("cite"), cmd("cite"), forceUpperCase(false), - hasStarredVersion(false), textAfter(false), textBefore(false) {} + hasStarredVersion(false), hasQualifiedList(false), + textAfter(false), textBefore(false) {} /// the LyX name std::string name; @@ -45,12 +48,62 @@ public: bool forceUpperCase; /// starred version (full author list by default) bool hasStarredVersion; + /// allows for qualified citation lists (a Biblatex feature) + bool hasQualifiedList; /// supports text after the citation bool textAfter; /// supports text before the citation bool textBefore; }; + +/** + * Class for storing information about a given citation item in a given context. + * This is used in the label and menu string generation process. + */ +class CiteItem +{ +public: + /// The context this citation is displayed + enum CiteContext{ + Everywhere, + Dialog, + Export + }; + /// + CiteItem() : forceUpperCase(false), Starred(false), isQualified(false), + context(CiteItem::Everywhere), textAfter(docstring()), + textBefore(docstring()), max_size(128), max_key_size(128), + richtext(false) {} + /// requests upper casing author prefixes (van -> Van) + bool forceUpperCase; + /// is starred version (full author list by default) + bool Starred; + /// is a real qualified list + bool isQualified; + /// where this to be displayed? + CiteItem::CiteContext context; + /// text after the citation + docstring textAfter; + /// text before the citation + docstring textBefore; + /// Qualified lists's pre texts + std::map pretexts; + /// + std::map getPretexts() const { return pretexts; } + /// Qualified lists's post texts + std::map posttexts; + /// + std::map getPosttexts() const { return posttexts; } + /// the maximum display size as a label + size_t max_size; + /// the maximum size of the processed keys + /// (limited for performance reasons) + size_t max_key_size; + /// output richtext information? + bool richtext; +}; + } // namespace lyx #endif