]> git.lyx.org Git - lyx.git/blob - src/mathed/ref_inset.h
The std::string mammoth path.
[lyx.git] / src / mathed / ref_inset.h
1 // -*- C++ -*-
2 /**
3  * \file ref_inset.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef REF_INSET_H
13 #define REF_INSET_H
14
15
16 #include "command_inset.h"
17
18 // for \ref
19 class RefInset : public CommandInset {
20 public:
21         ///
22         RefInset();
23         ///
24         explicit RefInset(std::string const & data);
25         ///
26         virtual std::auto_ptr<InsetBase> clone() const;
27         ///
28         //void write(WriteStream & os) const;
29         ///
30         void infoize(std::ostream & os) const;
31         ///
32         dispatch_result dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos);
33         ///
34         std::string const screenLabel() const;
35         ///
36         void validate(LaTeXFeatures & features) const;
37         ///
38         virtual RefInset * asRefInset() { return this; }
39
40         /// plain ascii output
41         int ascii(std::ostream & os, int) const;
42         /// linuxdoc output
43         int linuxdoc(std::ostream & os) const;
44         /// docbook output
45         int docbook(std::ostream & os, bool) const;
46
47         /// small wrapper for the time being
48         dispatch_result localDispatch(FuncRequest const & cmd);
49
50         struct ref_type_info {
51                 ///
52                 std::string latex_name;
53                 ///
54                 std::string gui_name;
55                 ///
56                 std::string short_gui_name;
57         };
58         static ref_type_info types[];
59         ///
60         static int getType(std::string const & name);
61         ///
62         static std::string const & getName(int type);
63 };
64
65 #endif