]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetBibitem.h
* add PreBabelPreamble to Language definition (fixes #4786).
[lyx.git] / src / insets / InsetBibitem.h
index ca5559ce42e938b6c693c8479dae4711a35ad305..9231b3cb9b0f01ea7c464e6a089e9120fb01cf49 100644 (file)
 #ifndef INSET_BIBITEM_H
 #define INSET_BIBITEM_H
 
-#include "BiblioInfo.h"
+
 #include "InsetCommand.h"
 
 
 namespace lyx {
 
+class BiblioInfo;
+
 /////////////////////////////////////////////////////////////////////////
 //
 // InsetBibItem
@@ -32,47 +34,68 @@ class InsetBibitem : public InsetCommand
 {
 public:
        ///
-       InsetBibitem(Buffer const &, InsetCommandParams const &);
+       InsetBibitem(Buffer *, InsetCommandParams const &);
        ///
-       virtual ~InsetBibitem();
+       ~InsetBibitem();
+
        ///
-       static ParamInfo const & findInfo(std::string const &);
+       void updateCommand(docstring const & new_key, bool dummy = false);
+
+       /// \name Public functions inherited from Inset class
+       //@{
        ///
-       static std::string defaultCommand() { return "bibitem"; }
+       InsetCode lyxCode() const { return BIBITEM_CODE; }
        ///
-       static bool isCompatibleCommand(std::string const & s) 
-               { return s == "bibitem"; }
-private:
+       bool hasSettings() const { return true; }
+       /// \copydoc Inset::initView()
        /// verify label and update references.
-       /// Overloaded from Inset::initView.
        void initView();
        ///
        bool isLabeled() const { return true; }
        ///
        void read(Lexer & lex);
        ///
-       docstring screenLabel() const;
+       int plaintext(odocstream &, OutputParams const &) const;
        ///
-       bool hasSettings() const { return true; }
+       docstring xhtml(XHTMLStream &, OutputParams const &) const;
        ///
-       InsetCode lyxCode() const { return BIBITEM_CODE; }
+       void fillWithBibKeys(BiblioInfo &, InsetIterator const &) const;
+       /// update the counter of this inset
+       void updateBuffer(ParIterator const &, UpdateType);
+       ///@}
+
+       /// \name Static public methods obligated for InsetCommand derived classes
+       //@{
        ///
-       docstring bibLabel() const;
+       static ParamInfo const & findInfo(std::string const &);
        ///
-       int plaintext(odocstream &, OutputParams const &) const;
+       static std::string defaultCommand() { return "bibitem"; }
        ///
-       virtual void fillWithBibKeys(BiblioInfo &, InsetIterator const &) const;
-       /// Update the counter of this inset
-       virtual void updateLabels(ParIterator const &);
+       static bool isCompatibleCommand(std::string const & s) 
+               { return s == "bibitem"; }
+       ///@}
+
+private:
        ///
-       void updateCommand(docstring const & new_key, bool dummy = false);
+       docstring bibLabel() const;
+
+       /// \name Private functions inherited from Inset class
+       //@{
        ///
        void doDispatch(Cursor & cur, FuncRequest & cmd);
        ///
        Inset * clone() const { return new InsetBibitem(*this); }
+       ///@}
+
+       /// \name Private functions inherited from InsetCommand class
+       //@{
+       ///
+       docstring screenLabel() const;
+       //@}
 
-       friend docstring bibitemWidest(Buffer const & buffer);
-       /// The label that is set by updateLabels
+       friend docstring bibitemWidest(Buffer const & buffer, OutputParams const &);
+
+       /// The label that is set by updateBuffer
        docstring autolabel_;
        ///
        static int key_counter;
@@ -80,7 +103,8 @@ private:
 
 
 /// Return the widest label in the Bibliography.
-docstring bibitemWidest(Buffer const &);
+docstring bibitemWidest(Buffer const &, OutputParams const &);
+
 
 } // namespace lyx