X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetlabel.h;h=b4478c3d82c099206c864ddb4536d1a0fbb186f5;hb=26f1a5bfcae4b7fd7b946a1884c396d842b24925;hp=9932bdfdba23e44b7511aa5f3745643bdadc9b7e;hpb=b3e20a15e74bc3a419ed6d01e49dccc11192b205;p=lyx.git diff --git a/src/insets/insetlabel.h b/src/insets/insetlabel.h index 9932bdfdba..b4478c3d82 100644 --- a/src/insets/insetlabel.h +++ b/src/insets/insetlabel.h @@ -1,61 +1,53 @@ // -*- 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 1995 Matthias Ettrich - * Copyright 1995-1999 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 -#ifdef __GNUG__ -#pragma interface -#endif #include "insetcommand.h" -#include "LString.h" -/// class InsetLabel : public InsetCommand { public: /// - InsetLabel(string const & cmd); + InsetLabel(InsetCommandParams const &, bool same_id = false); /// - InsetLabel() : InsetCommand("label") {} + ~InsetLabel(); /// - 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; } + virtual dispatch_result localDispatch(FuncRequest const & cmd); /// - int GetNumberOfLabels() const; + string const getScreenLabel(Buffer const *) const { return getContents(); } /// - string getLabel(int) const; + EDITABLE editable() const { return IS_EDITABLE; } /// - string getScreenLabel() const { return getContents(); } + Inset::Code lyxCode() const { return Inset::LABEL_CODE; } /// - EDITABLE Editable() const { return NOT_EDITABLE; } + void edit(BufferView *, int, int, mouse_button::state); /// - int Latex(ostream &, signed char fragile) const; -#ifndef USE_OSTREAM_ONLY + void edit(BufferView * bv, bool front = true); /// - int Latex(string & file, signed char fragile) const; + std::vector const getLabelList() const; /// - int Linuxdoc(string & file) const; + int latex(Buffer const *, std::ostream &, + bool fragile, bool free_spc) const; /// - int DocBook(string & file) const; -#else + int ascii(Buffer const *, std::ostream &, int linelen) const; /// - int Linuxdoc(ostream &) const; + int linuxdoc(Buffer const *, std::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 &, bool mixcont) const; }; #endif