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