]> git.lyx.org Git - lyx.git/blob - src/mathed/ref_inset.h
the DocIterator stuff
[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         std::string const screenLabel() const;
33         ///
34         void validate(LaTeXFeatures & features) const;
35         ///
36         virtual RefInset * asRefInset() { return this; }
37
38         /// plain ascii output
39         int plaintext(std::ostream & os, OutputParams const &) const;
40         /// linuxdoc output
41         int linuxdoc(std::ostream & os, OutputParams const &) const;
42         /// docbook output
43         int docbook(std::ostream & os, OutputParams const &) const;
44
45         /// small wrapper for the time being
46         DispatchResult localDispatch(FuncRequest const & cmd);
47
48         struct ref_type_info {
49                 ///
50                 std::string latex_name;
51                 ///
52                 std::string gui_name;
53                 ///
54                 std::string short_gui_name;
55         };
56         static ref_type_info types[];
57         ///
58         static int getType(std::string const & name);
59         ///
60         static std::string const & getName(int type);
61 protected:
62         ///
63         void priv_dispatch(LCursor & cur, FuncRequest const & cmd);
64 };
65
66 #endif