]> git.lyx.org Git - lyx.git/blob - src/insets/InsetLabel.h
Adjust comments to the truth.
[lyx.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 Counter;
21
22 class InsetLabel : public InsetCommand 
23 {
24 public:
25         ///
26         InsetLabel(Buffer * buf, InsetCommandParams const &);
27
28         /// verify label and update references.
29         /**
30           * Overloaded from Inset::initView.
31           **/
32         void initView();
33
34         ///
35         bool isLabeled() const { return true; }
36
37         ///
38         docstring screenLabel() const;
39         ///
40         bool hasSettings() const { return true; }
41         ///
42         InsetCode lyxCode() const { return LABEL_CODE; }
43         ///
44         int plaintext(odocstream &, OutputParams const &) const;
45         ///
46         int docbook(odocstream &, OutputParams const &) const;
47         ///
48         docstring xhtml(XHTMLStream &, OutputParams const &) const;
49         ///
50         static ParamInfo const & findInfo(std::string const &);
51         ///
52         static std::string defaultCommand() { return "label"; }
53         ///
54         static bool isCompatibleCommand(std::string const & s) 
55                 { return s == "label"; }
56         ///
57         void updateBuffer(ParIterator const & it, UpdateType);
58         ///
59         void addToToc(DocIterator const &);
60         ///
61         void updateCommand(docstring const & new_label, bool updaterefs = true);
62         ///
63         bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const;
64         ///
65         docstring const & activeCounter() const { return active_counter_; }
66         ///
67         docstring const & counterValue() const { return counter_value_; }
68         ///
69         docstring const & prettyCounter() const { return pretty_counter_; }
70 protected:
71         ///
72         void doDispatch(Cursor & cur, FuncRequest & cmd);
73 private:
74         ///
75         Inset * clone() const { return new InsetLabel(*this); }
76         ///
77         docstring screen_label_;
78         ///
79         docstring active_counter_;
80         ///
81         docstring counter_value_;
82         ///
83         docstring pretty_counter_;
84 };
85
86
87 } // namespace lyx
88
89 #endif