5 #include "command_inset.h"
8 class RefInset : public CommandInset {
13 explicit RefInset(string const & data);
15 MathInset * clone() const;
17 //void write(WriteStream & os) const;
19 void infoize(std::ostream & os) const;
21 dispatch_result dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos);
23 string screenLabel() const;
25 void validate(LaTeXFeatures & features) const;
27 virtual RefInset * asRefInset() { return this; }
29 /// plain ascii output
30 int ascii(std::ostream & os, int) const;
32 int linuxdoc(std::ostream & os) const;
34 int docbook(std::ostream & os, bool) const;
36 /// small wrapper for the time being
37 dispatch_result localDispatch(FuncRequest const & cmd);
39 struct ref_type_info {
45 string short_gui_name;
47 static ref_type_info types[];
49 static int getType(string const & name);
51 static string const & getName(int type);
54 /** Fills ar with the contents of str.
55 * str is created by the reference dialog and returned to the LyX core.
56 * The function returns true if it succeeds in creating a RefInset.
58 bool string2RefInset(string const & str, MathArray & ar);