mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
Add CiteItem class
This will be used to transfer any single-cite related information from anywhere to BiblioInfo (instead of the many strings and bools we use until now). This is a prerequisite for some forthcoming fixes and enhancements.
This commit is contained in:
parent
979294d5ec
commit
2f1d1a60ac
@ -12,6 +12,7 @@
|
||||
#ifndef CITATION_H
|
||||
#define CITATION_H
|
||||
|
||||
#include "support/docstring.h"
|
||||
#include <string>
|
||||
|
||||
namespace lyx {
|
||||
@ -51,6 +52,44 @@ public:
|
||||
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),
|
||||
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;
|
||||
/// where this to be displayed?
|
||||
CiteItem::CiteContext context;
|
||||
/// text after the citation
|
||||
docstring textAfter;
|
||||
/// text before the citation
|
||||
docstring textBefore;
|
||||
/// 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
|
||||
|
Loading…
Reference in New Issue
Block a user