]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCitation.h
Merge branch 'master' into biblatex2
[lyx.git] / src / insets / InsetCitation.h
index aedbd2e43b33a0c9d358795b0137a3283d31b1e1..40926b310a3330ec27522826c9fe8c24885116c1 100644 (file)
@@ -15,8 +15,6 @@
 
 #include "InsetCommand.h"
 
-#include "Citation.h"
-
 namespace lyx {
 
 /////////////////////////////////////////////////////////////////////////
@@ -31,6 +29,11 @@ class InsetCitation : public InsetCommand
 public:
        ///
        InsetCitation(Buffer * buf, InsetCommandParams const &);
+       ///
+       ~InsetCitation();
+
+       ///
+       bool addKey(std::string const & key);
 
        /// \name Public functions inherited from Inset class
        //@{
@@ -41,38 +44,43 @@ public:
        ///
        docstring toolTip(BufferView const & bv, int x, int y) const;
        ///
+       void doDispatch(Cursor & cur, FuncRequest & cmd);
+       ///
+       bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
+       ///
        InsetCode lyxCode() const { return CITE_CODE; }
        ///
-       int latex(odocstream &, OutputParams const &) const;
+       void latex(otexstream &, OutputParams const &) const;
        ///
-       int plaintext(odocstream &, OutputParams const &) const;
+       int plaintext(odocstringstream & ods, OutputParams const & op,
+                     size_t max_length = INT_MAX) const;
        ///
        int docbook(odocstream &, OutputParams const &) const;
        ///
        docstring xhtml(XHTMLStream &, OutputParams const &) const;
        ///
-       void tocString(odocstream &) const;
+       void toString(odocstream &) const;
+       ///
+       void forOutliner(docstring &, size_t const, bool const) const;
        ///
-       void validate(LaTeXFeatures &) const;
+       void validate(LaTeXFeatures &) const {}
        ///
        void updateBuffer(ParIterator const & it, UpdateType);
        ///
-       void addToToc(DocIterator const &);
+       void addToToc(DocIterator const & di, bool output_active,
+                                 UpdateType utype) const;
        ///
-       docstring contextMenu(BufferView const & bv, int x, int y) const;
+       std::string contextMenuName() const;
        //@}
 
        /// \name Static public methods obligated for InsetCommand derived classes
        //@{
        ///
        static ParamInfo const & findInfo(std::string const &);
-       // FIXME This is the locus of the design problem we have.
-       // It really ought to do what default_cite_command() does,
-       // but to do that it needs to know what CiteEngine we are
-       // using.
+       ///
        static std::string defaultCommand() { return "cite"; }
        ///
-       static bool isCompatibleCommand(std::string const & cmd);
+       static bool isCompatibleCommand(std::string const &);
        //@}
 
 private:
@@ -95,19 +103,15 @@ private:
        docstring screenLabel() const;
        //@}
 
-       /// we'll eventually want to be able to get info on this from the 
+       /// we'll eventually want to be able to get info on this from the
        /// various CiteEngines
        static ParamInfo param_info_;
 
        ///
-       class Cache {
-       public:
-               ///
-               Cache() : engine(ENGINE_BASIC), params(CITE_CODE) {}
-               ///
-               CiteEngine engine;
+       struct Cache {
+               Cache() : recalculate(true) {}
                ///
-               InsetCommandParams params;
+               bool recalculate;
                ///
                docstring generated_label;
                ///