2 /* This file is part of*
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2000 The LyX Team.
10 * ====================================================== */
19 #include "insetcommand.h"
21 // Created by Alejandro 970222
24 /** Used to insert citations
26 class InsetCitation: public InsetCommand {
29 InsetCitation() : InsetCommand("cite") {}
31 InsetCitation(string const & key, string const & note = string());
35 Inset * Clone() const {
36 return new InsetCitation(contents, options);
39 string getScreenLabel()const;
43 unsigned char Editable() const {
49 /** Used to insert bibitem's information (key and label)
51 Must be automatically inserted as the first object in a
52 bibliography paragraph.
54 class InsetBibKey: public InsetCommand {
57 InsetBibKey() : InsetCommand("bibitem") { counter = 1; }
59 InsetBibKey(string const & key, string const & label = string());
61 InsetBibKey(InsetBibKey const *);
65 Inset * Clone() const { return new InsetBibKey(this); }
66 /// Currently \bibitem is used as a LyX2.x command, so we need this method.
67 void Write(ostream &);
69 virtual string getScreenLabel() const;
73 unsigned char Editable() const {
76 /// A user can't neither insert nor delete this inset
77 bool Deletable() const {
83 int getCounter() const { return counter; }
91 /** Used to insert BibTeX's information
93 class InsetBibtex: public InsetCommand {
96 InsetBibtex() : InsetCommand("BibTeX") { owner = 0; }
98 InsetBibtex(string const & dbase, string const & style,
101 Inset * Clone() const {
102 return new InsetBibtex(contents, options, 0);
105 Inset::Code LyxCode() const
107 return Inset::BIBTEX_CODE;
110 string getScreenLabel() const;
114 int Latex(ostream &, signed char);
116 int Latex(string & file, signed char fragile);
118 string getKeys(char delim);
120 unsigned char Editable() const {
124 bool addDatabase(string const &);
126 bool delDatabase(string const &);
128 bool display() const { return true; }