#ifndef REF_INSET_H
#define REF_INSET_H
+
#include "command_inset.h"
-// for \ref
+// for \ref
class RefInset : public CommandInset {
public:
///
///
void infoize(std::ostream & os) const;
///
- result_type dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos);
+ dispatch_result dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos);
///
string screenLabel() const;
///
void validate(LaTeXFeatures & features) const;
+ ///
+ virtual RefInset * asRefInset() { return this; }
/// plain ascii output
int ascii(std::ostream & os, int) const;
/// docbook output
int docbook(std::ostream & os, bool) const;
+ /// small wrapper for the time being
+ dispatch_result localDispatch(FuncRequest const & cmd);
- struct type_info {
+ struct ref_type_info {
///
string latex_name;
///
///
string short_gui_name;
};
- static type_info types[];
+ static ref_type_info types[];
///
static int getType(string const & name);
///
static string const & getName(int type);
};
+/** Fills ar with the contents of str.
+ * str is created by the reference dialog and returned to the LyX core.
+ * The function returns true if it succeeds in creating a RefInset.
+ */
+bool string2RefInset(string const & str, MathArray & ar);
+
#endif