]> git.lyx.org Git - lyx.git/blob - src/insets/insetlabel.h
Some more changes for updating text-insets.
[lyx.git] / src / insets / insetlabel.h
1 // -*- C++ -*-
2 /* This file is part of*
3  * ======================================================
4  *
5  *           LyX, The Document Processor
6  *       
7  *           Copyright 1995 Matthias Ettrich
8  *           Copyright 1995-2000 The LyX Team
9  *
10  * ====================================================== */
11
12 #ifndef INSET_LABEL_H
13 #define INSET_LABEL_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "insetcommand.h"
20 #include "LString.h"
21
22 ///
23 class InsetLabel : public InsetCommand {
24 public:
25         ///
26         explicit
27         InsetLabel(string const & cmd);
28         ///
29         InsetLabel() : InsetCommand("label") {}
30         ///
31         Inset * Clone() const;
32         ///
33         Inset::Code LyxCode() const { return Inset::LABEL_CODE; }
34         ///
35         std::vector<string> getLabelList() const;
36         ///
37         string getScreenLabel() const { return getContents(); }
38         ///
39         EDITABLE Editable() const { return IS_EDITABLE; }
40         ///
41         void Edit(BufferView *, int, int, unsigned int);
42         ///
43         int Latex(Buffer const *, std::ostream &, bool fragile, bool free_spc) const;
44         ///
45         int Ascii(Buffer const *, std::ostream &) const;
46         ///
47         int Linuxdoc(Buffer const *, std::ostream &) const;
48         ///
49         int DocBook(Buffer const *, std::ostream &) const;
50 private:
51         /// This function escapes 8-bit characters
52         string escape(string const &) const;
53 };
54
55 #endif