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") {}
30 InsetCitation(string const & key, string const & note = string());
34 Inset * Clone() const {
35 return new InsetCitation(contents, options);
38 string getScreenLabel()const;
40 void Edit(BufferView *, int x, int y, unsigned int button);
42 EDITABLE Editable() const {
47 InsetCitation * inset;
57 /** Used to insert bibitem's information (key and label)
59 Must be automatically inserted as the first object in a
60 bibliography paragraph.
62 class InsetBibKey: public InsetCommand {
65 InsetBibKey() : InsetCommand("bibitem") { counter = 1; }
67 InsetBibKey(string const & key, string const & label = string());
69 InsetBibKey(InsetBibKey const *);
73 Inset * Clone() const { return new InsetBibKey(this); }
74 /// Currently \bibitem is used as a LyX2.x command, so we need this method.
75 void Write(ostream &) const;
77 virtual string getScreenLabel() const;
79 void Edit(BufferView *, int x, int y, unsigned int button);
81 EDITABLE Editable() const {
84 /// A user can't neither insert nor delete this inset
85 bool Deletable() const {
91 int getCounter() const { return counter; }
107 /** Used to insert BibTeX's information
109 class InsetBibtex: public InsetCommand {
112 InsetBibtex() : InsetCommand("BibTeX") { owner = 0; }
114 InsetBibtex(string const & dbase, string const & style,
120 Inset * Clone() const {
121 return new InsetBibtex(contents, options, 0);
124 Inset::Code LyxCode() const
126 return Inset::BIBTEX_CODE;
129 string getScreenLabel() const;
131 void Edit(BufferView *, int x, int y, unsigned int button);
133 int Latex(ostream &, signed char, bool) const;
135 string getKeys(char delim);
137 EDITABLE Editable() const {
141 bool addDatabase(string const &);
143 bool delDatabase(string const &);
145 bool display() const { return true; }
154 mutable Buffer * owner;