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"
25 /** Used to insert citations
27 class InsetCitation: public InsetCommand {
30 InsetCitation() : InsetCommand("cite") {}
32 InsetCitation(string const & key, string const & note = string());
36 Inset * Clone() const {
37 return new InsetCitation(contents, options);
40 string getScreenLabel()const;
42 void Edit(BufferView *, int x, int y, unsigned int button);
44 EDITABLE Editable() const {
49 InsetCitation * inset;
59 /** Used to insert bibitem's information (key and label)
61 Must be automatically inserted as the first object in a
62 bibliography paragraph.
64 class InsetBibKey: public InsetCommand {
67 InsetBibKey() : InsetCommand("bibitem") { counter = 1; }
69 InsetBibKey(string const & key, string const & label = string());
71 InsetBibKey(InsetBibKey const *);
75 Inset * Clone() const { return new InsetBibKey(this); }
76 /// Currently \bibitem is used as a LyX2.x command, so we need this method.
77 void Write(ostream &) const;
79 virtual string getScreenLabel() const;
81 void Edit(BufferView *, int x, int y, unsigned int button);
83 EDITABLE Editable() const {
86 /// A user can't neither insert nor delete this inset
87 bool Deletable() const {
93 int getCounter() const { return counter; }
109 /** Used to insert BibTeX's information
111 class InsetBibtex: public InsetCommand {
114 InsetBibtex() : InsetCommand("BibTeX") { owner = 0; }
116 InsetBibtex(string const & dbase, string const & style,
122 Inset * Clone() const {
123 return new InsetBibtex(contents, options, 0);
126 Inset::Code LyxCode() const
128 return Inset::BIBTEX_CODE;
131 string getScreenLabel() const;
133 void Edit(BufferView *, int x, int y, unsigned int button);
135 int Latex(ostream &, signed char, bool) const;
137 string getKeys(char delim);
139 EDITABLE Editable() const {
143 bool addDatabase(string const &);
145 bool delDatabase(string const &);
147 bool display() const { return true; }
156 mutable Buffer * owner;