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;
41 void Edit(BufferView *, int, int);
43 unsigned char Editable() const {
49 InsetCitation * inset;
58 /** Used to insert bibitem's information (key and label)
60 Must be automatically inserted as the first object in a
61 bibliography paragraph.
63 class InsetBibKey: public InsetCommand {
66 InsetBibKey() : InsetCommand("bibitem") { counter = 1; }
68 InsetBibKey(string const & key, string const & label = string());
70 InsetBibKey(InsetBibKey const *);
74 Inset * Clone() const { return new InsetBibKey(this); }
75 /// Currently \bibitem is used as a LyX2.x command, so we need this method.
76 void Write(ostream &) const;
78 virtual string getScreenLabel() const;
80 void Edit(BufferView *, int, int);
82 unsigned char Editable() const {
85 /// A user can't neither insert nor delete this inset
86 bool Deletable() const {
92 int getCounter() const { return counter; }
108 /** Used to insert BibTeX's information
110 class InsetBibtex: public InsetCommand {
113 InsetBibtex() : InsetCommand("BibTeX") { owner = 0; }
115 InsetBibtex(string const & dbase, string const & style,
118 Inset * Clone() const {
119 return new InsetBibtex(contents, options, 0);
122 Inset::Code LyxCode() const
124 return Inset::BIBTEX_CODE;
127 string getScreenLabel() const;
129 void Edit(BufferView *, int, int);
131 int Latex(ostream &, signed char) const;
133 int Latex(string & file, signed char fragile) const;
135 string getKeys(char delim);
137 unsigned char Editable() const {
141 bool addDatabase(string const &);
143 bool delDatabase(string const &);
145 bool display() const { return true; }
148 mutable Buffer * owner;