#endif
#include "insetcommand.h"
-
-using std::ostream;
+#include <vector>
class Buffer;
-/** Used to insert citations
- */
-class InsetCitation: public InsetCommand {
-public:
- ///
- InsetCitation() : InsetCommand("cite") {}
- ///
- 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;
-};
-
-
/** Used to insert bibitem's information (key and label)
Must be automatically inserted as the first object in a
///
InsetBibKey() : InsetCommand("bibitem") { counter = 1; }
///
+ explicit
InsetBibKey(string const & key, string const & label = string());
///
+ explicit
InsetBibKey(InsetBibKey const *);
///
~InsetBibKey();
///
Inset * Clone() const { return new InsetBibKey(this); }
/// Currently \bibitem is used as a LyX2.x command, so we need this method.
- void Write(ostream &) const;
+ void Write(Buffer const *, std::ostream &) const;
///
virtual string getScreenLabel() const;
///
InsetBibKey * inset;
BufferView * view;
};
-
+
private:
///
int counter;
///
Inset * Clone() const {
- return new InsetBibtex(contents, options, 0);
+ return new InsetBibtex(getCmdName(), getOptions(), 0);
}
///
Inset::Code LyxCode() const
///
void Edit(BufferView *, int x, int y, unsigned int button);
///
- int Latex(ostream &, signed char, bool) 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;