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"
23 /** Used to insert citations
25 class InsetCitation: public InsetCommand {
28 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 x, int y, unsigned int button);
43 EDITABLE Editable() const {
48 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; }
69 InsetBibKey(string const & key, string const & label = string());
72 InsetBibKey(InsetBibKey const *);
76 Inset * Clone() const { return new InsetBibKey(this); }
77 /// Currently \bibitem is used as a LyX2.x command, so we need this method.
78 void Write(std::ostream &) const;
80 virtual string getScreenLabel() const;
82 void Edit(BufferView *, int x, int y, unsigned int button);
84 EDITABLE Editable() const {
87 /// A user can't neither insert nor delete this inset
88 bool Deletable() const {
94 int getCounter() const { return counter; }
110 /** Used to insert BibTeX's information
112 class InsetBibtex: public InsetCommand {
115 InsetBibtex() : InsetCommand("BibTeX") { owner = 0; }
117 InsetBibtex(string const & dbase, string const & style,
123 Inset * Clone() const {
124 return new InsetBibtex(contents, options, 0);
127 Inset::Code LyxCode() const
129 return Inset::BIBTEX_CODE;
132 string getScreenLabel() const;
134 void Edit(BufferView *, int x, int y, unsigned int button);
136 int Latex(std::ostream &, signed char, bool) const;
138 string getKeys(char delim);
140 EDITABLE Editable() const {
144 bool addDatabase(string const &);
146 bool delDatabase(string const &);
148 bool display() const { return true; }
157 mutable Buffer * owner;