4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
15 #include "InsetCommand.h"
21 /// The reference inset
22 class InsetRef : public InsetCommand {
26 std::string latex_name;
30 std::string short_gui_name;
32 static type_info types[];
34 static int getType(std::string const & name);
36 static std::string const & getName(int type);
39 InsetRef(Buffer * buffer, InsetCommandParams const &);
41 /// \name Public functions inherited from Inset class
44 bool isLabeled() const { return true; }
46 docstring toolTip(BufferView const &, int, int) const
49 bool hasSettings() const { return true; }
51 InsetCode lyxCode() const { return REF_CODE; }
53 DisplayType display() const { return Inline; }
55 int latex(odocstream &, OutputParams const &) const;
57 int plaintext(odocstream &, OutputParams const &) const;
59 int docbook(odocstream &, OutputParams const &) const;
61 docstring xhtml(XHTMLStream &, OutputParams const &) const;
62 /// the string that is passed to the TOC
63 void tocString(odocstream &) const;
65 void validate(LaTeXFeatures & features) const;
67 void updateBuffer(ParIterator const & it, UpdateType);
69 void addToToc(DocIterator const &);
71 bool forceLTR() const { return true; }
74 /// \name Static public methods obligated for InsetCommand derived classes
77 static ParamInfo const & findInfo(std::string const &);
79 static std::string defaultCommand() { return "ref"; }
81 static bool isCompatibleCommand(std::string const & s);
85 /// \name Private functions inherited from InsetCommand class
88 docstring screenLabel() const { return screen_label_; }
93 InsetRef(InsetRef const &);
96 /// \name Private functions inherited from Inset class
99 Inset * clone() const { return new InsetRef(*this); }
103 mutable docstring screen_label_;
105 mutable docstring tooltip_;
111 #endif // INSET_REF_H