#endif
#include "insetcommand.h"
+#include <vector>
class Buffer;
-
-/** Used to insert citations
- */
-class InsetCitation: public InsetCommand {
-public:
- ///
- InsetCitation() : InsetCommand("cite") {}
- ///
- explicit
- InsetCitation(string const & key, string const & note = string());
- ///
- ~InsetCitation();
- ///
- Inset * Clone() const {
- return new InsetCitation(contents, options);
- }
- ///
- string getScreenLabel()const;
- ///
- void Edit(BufferView *, int x, int y, unsigned int button);
- ///
- EDITABLE Editable() const {
- return IS_EDITABLE;
- }
- ///
- struct Holder {
- InsetCitation * inset;
- BufferView * view;
- };
-
-private:
- ///
- Holder holder;
-};
-
+struct FD_bibitem_form;
/** Used to insert bibitem's information (key and label)
Must be automatically inserted as the first object in a
bibliography paragraph.
*/
-class InsetBibKey: public InsetCommand {
+class InsetBibKey : public InsetCommand {
public:
///
InsetBibKey() : InsetCommand("bibitem") { counter = 1; }
~InsetBibKey();
///
Inset * Clone() const { return new InsetBibKey(this); }
- /// Currently \bibitem is used as a LyX2.x command, so we need this method.
- void Write(std::ostream &) const;
+ /** Currently \bibitem is used as a LyX2.x command,
+ so we need this method.
+ */
+ void Write(Buffer const *, std::ostream &) const;
+ ///
+ void Read(Buffer const *, LyXLex & lex);
///
virtual string getScreenLabel() const;
///
///
int getCounter() const { return counter; }
///
+ void callback( FD_bibitem_form *, long );
+ ///
struct Holder {
InsetBibKey * inset;
BufferView * view;
};
-
- private:
+
+private:
///
int counter;
-
///
Holder holder;
};
/** Used to insert BibTeX's information
*/
-class InsetBibtex: public InsetCommand {
+class InsetBibtex : public InsetCommand {
public:
///
InsetBibtex() : InsetCommand("BibTeX") { owner = 0; }
///
Inset * Clone() const {
- return new InsetBibtex(contents, options, 0);
+ return new InsetBibtex(getCmdName(), getOptions(), 0);
}
- ///
+ ///
Inset::Code LyxCode() const
{
return Inset::BIBTEX_CODE;
///
void Edit(BufferView *, int x, int y, unsigned int button);
///
- int Latex(std::ostream &, bool fragile, bool freespace) const;
+ int Latex(Buffer const *, std::ostream &,
+ bool fragile, bool freespace) const;
///
- string getKeys(char delim);
+ std::vector<std::pair<string,string> > getKeys() const;
///
EDITABLE Editable() const {
return IS_EDITABLE;
bool delDatabase(string const &);
///
bool display() const { return true; }
-
+ ///
struct Holder {
InsetBibtex * inset;
BufferView * view;