* ======================================================
*
* LyX, The Document Processor
- *
+ *
* Copyright 1995 Matthias Ettrich
- * Copyright 1995-1999 The LyX Team
+ * Copyright 1995-2001 The LyX Team
*
* ====================================================== */
#endif
#include "insetcommand.h"
-#include "LString.h"
-///
class InsetLabel : public InsetCommand {
public:
///
- InsetLabel(string const & cmd);
- ///
- InsetLabel() : InsetCommand("label") {}
+ InsetLabel(InsetCommandParams const &, bool same_id = false);
///
- Inset * Clone() const;
+ virtual Inset * clone(Buffer const &, bool same_id = false) const {
+ return new InsetLabel(params(), same_id);
+ }
///
- Inset::Code LyxCode() const { return Inset::LABEL_CODE; }
+ string const getScreenLabel(Buffer const *) const { return getContents(); }
///
- int GetNumberOfLabels() const;
+ EDITABLE editable() const { return IS_EDITABLE; }
///
- string getLabel(int) const;
+ Inset::Code lyxCode() const { return Inset::LABEL_CODE; }
///
- string getScreenLabel() const { return getContents(); }
+ void edit(BufferView *, int, int, mouse_button::state);
///
- unsigned char Editable() const { return 0; }
+ void edit(BufferView * bv, bool front = true);
///
- int Latex(ostream &, signed char fragile) const;
-#ifndef USE_OSTREAM_ONLY
+ std::vector<string> const getLabelList() const;
///
- int Latex(string & file, signed char fragile) const;
+ int latex(Buffer const *, std::ostream &,
+ bool fragile, bool free_spc) const;
///
- int Linuxdoc(string & file) const;
+ int ascii(Buffer const *, std::ostream &, int linelen) const;
///
- int DocBook(string & file) const;
-#else
+ int linuxdoc(Buffer const *, std::ostream &) const;
///
- int Linuxdoc(ostream &) const;
- ///
- int DocBook(ostream &) const;
-#endif
-private:
- /// This function escapes 8-bit characters
- string escape(string const &) const;
+ int docbook(Buffer const *, std::ostream &) const;
};
#endif