// -*- C++ -*-
-/* This file is part of*
- * ======================================================
+/**
+ * \file insetfloatlist.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
- * LyX, The Document Word Processor
- *
- * Copyright 1995 Matthias Ettrich
- * Copyright 1996-2001 The LyX Team.
- *
- * ====================================================== */
+ * \author Lars Gullik Bjønnes
+ *
+ * Full author contact details are available in file CREDITS.
+ */
#ifndef INSET_FLOATLIST_H
#define INSET_FLOATLIST_H
-#ifdef __GNUG__
-#pragma interface
-#endif
-#include "insetbutton.h"
+#include "insetcommand.h"
+
+
+namespace lyx {
/** Used to insert table of contents
*/
-class InsetFloatList : public InsetButton {
+class InsetFloatList : public InsetCommand {
public:
///
- InsetFloatList() {}
+ InsetFloatList();
///
- InsetFloatList(string const & type)
- : float_type(type) {}
+ InsetFloatList(std::string const & type);
///
- Inset * Clone(Buffer const &) const {
- return new InsetFloatList(*this);
- }
- ///
- string const getScreenLabel() const;
+ docstring const getScreenLabel(Buffer const &) const;
///
- void Edit(BufferView * bv, int, int, unsigned int);
- ///
- EDITABLE Editable() const { return IS_EDITABLE; }
+ EDITABLE editable() const { return IS_EDITABLE; }
///
- bool display() const { return true; }
+ InsetBase::Code lyxCode() const;
///
- Inset::Code LyxCode() const;
+ bool display() const { return true; }
///
- void Write(Buffer const *, ostream &) const;
+ void write(Buffer const &, std::ostream &) const;
///
- void Read(Buffer const *, LyXLex &);
+ void read(Buffer const &, LyXLex &);
///
- int Latex(Buffer const *, ostream &, bool, bool) const;
+ int latex(Buffer const &, odocstream &,
+ OutputParams const &) const;
///
- int Linuxdoc(Buffer const *, ostream &) const { return 0; }
+ int docbook(Buffer const &, odocstream &,
+ OutputParams const &) const { return 0; }
///
- int DocBook(Buffer const *, ostream &) const { return 0; }
+ int plaintext(Buffer const &, odocstream &,
+ OutputParams const & runparams) const;
///
- int Ascii(Buffer const *, std::ostream &, int linelen) const;
+ void validate(LaTeXFeatures & features) const;
private:
- string float_type;
+ virtual std::auto_ptr<InsetBase> doClone() const
+ {
+ return std::auto_ptr<InsetBase>(new InsetFloatList(to_ascii(getParam("type"))));
+ }
};
+
+} // namespace lyx
+
#endif