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 unsigned char 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 unsigned char 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,
117 Inset * Clone() const {
118 return new InsetBibtex(contents, options, 0);
121 Inset::Code LyxCode() const
123 return Inset::BIBTEX_CODE;
126 string getScreenLabel() const;
128 void Edit(BufferView *, int x, int y, unsigned int button);
130 int Latex(ostream &, signed char) const;
132 int Latex(string & file, signed char fragile) const;
134 string getKeys(char delim);
136 unsigned char Editable() const {
140 bool addDatabase(string const &);
142 bool delDatabase(string const &);
144 bool display() const { return true; }
147 mutable Buffer * owner;