]> git.lyx.org Git - features.git/blob - src/insets/InsetLabel.h
6e97d511009d71d147ff74db5bd926d3a4881c8a
[features.git] / src / insets / InsetLabel.h
1 // -*- C++ -*-
2 /**
3  * \file InsetLabel.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef INSET_LABEL_H
13 #define INSET_LABEL_H
14
15 #include "InsetCommand.h"
16
17
18 namespace lyx {
19
20 class InsetLabel : public InsetCommand {
21 public:
22         ///
23         InsetLabel(InsetCommandParams const &);
24         ///
25         docstring screenLabel() const;
26         ///
27         EDITABLE editable() const { return IS_EDITABLE; }
28         ///
29         InsetCode lyxCode() const { return LABEL_CODE; }
30         /// Appends \c list with this label
31         void getLabelList(std::vector<docstring> & list) const;
32         ///
33         int latex(odocstream &, OutputParams const &) const;
34         ///
35         int plaintext(odocstream &, OutputParams const &) const;
36         ///
37         int docbook(odocstream &, OutputParams const &) const;
38         ///
39         static ParamInfo const & findInfo(std::string const &);
40         ///
41         static std::string defaultCommand() { return "label"; };
42         ///
43         static bool isCompatibleCommand(std::string const & s) 
44                 { return s == "label"; }
45         ///
46         void addToToc(ParConstIterator const &) const;
47 protected:
48         ///
49         void doDispatch(Cursor & cur, FuncRequest & cmd);
50 private:
51         ///
52         Inset * clone() const { return new InsetLabel(*this); }
53 };
54
55
56 } // namespace lyx
57
58 #endif