]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetref.h
Rename LatexRunParams::fragile as moving_arg.
[lyx.git] / src / insets / insetref.h
index 994d3ad914786a9f3fd023ab33561529ff2cd0ce..532c7eaa2a60a1dc4e634a12e3209b776436df85 100644 (file)
@@ -1,84 +1,71 @@
 // -*- C++ -*-
-/* This file is part of*
- * ======================================================
+/**
+ * \file insetref.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *           LyX, The Document Processor
- *      
- *         Copyright 1997 LyX Team (this file was created this year)
- * 
- * ====================================================== */
+ * \author José Matos
+ *
+ * Full author contact details are available in file CREDITS
+ */
 
 #ifndef INSET_REF_H
 #define INSET_REF_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
 
 #include "insetcommand.h"
 
-class Buffer;
 struct LaTeXFeatures;
 
-/** The reference inset  
+/** The reference inset
  */
 class InsetRef : public InsetCommand {
 public:
-        ///
-        enum Ref_Flags {
-               ///
-               REF = 0,
-               ///
-               PAGE_REF,
-               ///
-               VREF,
-               ///
-               VPAGE_REF,
+       struct type_info {
                ///
-               PRETTY_REF,
+               string latex_name;
                ///
-               REF_LAST = PRETTY_REF,
+               string gui_name;
                ///
-               REF_FIRST = REF
+               string short_gui_name;
        };
-       
+       static type_info types[];
        ///
-       InsetRef(InsetCommandParams const &, Buffer *);
+       static int getType(string const & name);
        ///
-       Inset * Clone() const { return new InsetRef(params(), master); }
+       static string const & getName(int type);
+
        ///
-       string getScreenLabel() const;
+       InsetRef(InsetCommandParams const &, Buffer const &, bool same_id = false);
        ///
-       EDITABLE Editable() const { return IS_EDITABLE; }
+       ~InsetRef();
        ///
-       Inset::Code LyxCode() const { return Inset::REF_CODE; }
+       virtual Inset * clone(Buffer const & buffer, bool same_id = false) const {
+               return new InsetRef(params(), buffer, same_id);
+       }
        ///
-       void Edit(BufferView *, int, int, unsigned int);
-        ///
-       bool display() const { return false; }
+       dispatch_result localDispatch(FuncRequest const & cmd);
        ///
-       void Toggle();
-        ///
-        void gotoLabel();
+       string const getScreenLabel(Buffer const *) const;
        ///
-       int Latex(Buffer const *, std::ostream &,
-                 bool fragile, bool free_spc) const;
+       EDITABLE editable() const { return IS_EDITABLE; }
        ///
-       int Ascii(Buffer const *, std::ostream &) const;
+       Inset::Code lyxCode() const { return Inset::REF_CODE; }
        ///
-       int Linuxdoc(Buffer const *, std::ostream &) const;
+       bool display() const { return false; }
        ///
-       int DocBook(Buffer const *, std::ostream &) const;
+       int latex(Buffer const *, std::ostream &,
+                 LatexRunParams const &) const;
        ///
-       void Validate(LaTeXFeatures & features) const;
-private:
+       int ascii(Buffer const *, std::ostream &, int linelen) const;
        ///
-       void GenerateFlag();
-       /// This function escapes 8-bit characters
-       string escape(string const &) const;
+       int linuxdoc(Buffer const *, std::ostream &) const;
+       ///
+       int docbook(Buffer const *, std::ostream &, bool mixcont) const;
+       ///
+       void validate(LaTeXFeatures & features) const;
+private:
        ///
-        Ref_Flags flag;
-        ///
-       Buffer * master;
+       bool isLatex;
 };
 #endif