// -*- C++ -*-
-/* This file is part of*
- * ======================================================
+/**
+ * \file insetlabel.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
- * LyX, The Document Processor
- *
- * Copyright (C) 1995 Matthias Ettrich
- * 1995-1998 The LyX Team
+ * \author Lars Gullik Bjønnes
*
- *======================================================*/
+ * Full author contact details are available in file CREDITS
+ */
-#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 &);
///
~InsetLabel();
///
- Inset* Clone();
+ virtual std::auto_ptr<InsetBase> clone() const {
+ return std::auto_ptr<InsetBase>(new InsetLabel(params()));
+ }
///
- Inset::Code LyxCode() const { return Inset::LABEL_CODE; }
+ virtual dispatch_result localDispatch(FuncRequest const & cmd);
///
- int GetNumberOfLabels() const;
+ string const getScreenLabel(Buffer const *) const { return getContents(); }
///
- LString getLabel(int) const;
+ EDITABLE editable() const { return IS_EDITABLE; }
///
- LString getScreenLabel() const { return getContents(); }
+ InsetOld::Code lyxCode() const { return InsetOld::LABEL_CODE; }
///
- unsigned char Editable() const { return 0; }
+ void getLabelList(std::vector<string> &) const;
///
- int Latex(FILE *file, signed char fragile);
+ int latex(Buffer const *, std::ostream &,
+ LatexRunParams const &) 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 &, bool mixcont) const;
};
#endif