#ifndef INSET_BIBITEM_H
#define INSET_BIBITEM_H
+
#include "InsetCommand.h"
-#include "BiblioInfo.h"
namespace lyx {
+class BiblioInfo;
+
/////////////////////////////////////////////////////////////////////////
//
// InsetBibItem
{
public:
///
- InsetBibitem(InsetCommandParams const &);
+ InsetBibitem(Buffer *, InsetCommandParams const &);
///
- static ParamInfo const & findInfo(std::string const &);
+ ~InsetBibitem();
+
///
- static std::string defaultCommand() { return "bibitem"; }
+ void updateCommand(docstring const & new_key, bool dummy = false);
+
+ /// \name Public functions inherited from Inset class
+ //@{
///
- static bool isCompatibleCommand(std::string const & s)
- { return s == "bibitem"; }
-private:
+ InsetCode lyxCode() const { return BIBITEM_CODE; }
+ ///
+ 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(odocstringstream &, OutputParams const &,
+ size_t max_length = INT_MAX) const;
///
- EDITABLE editable() const { return IS_EDITABLE; }
+ docstring xhtml(XMLStream &, OutputParams const &) const;
///
- InsetCode lyxCode() const { return BIBITEM_CODE; }
+ void docbook(XMLStream &, OutputParams const &) const;
///
- docstring bibLabel() const;
+ void collectBibKeys(InsetIterator const &, support::FileNameList &) const;
+ /// update the counter of this inset
+ void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false);
+ ///@}
+
+ /// \name Static public methods obligated for InsetCommand derived classes
+ //@{
///
- int plaintext(odocstream &, OutputParams const &) const;
+ static ParamInfo const & findInfo(std::string const &);
///
- virtual void fillWithBibKeys(BiblioInfo &, InsetIterator const &) const;
- /// Update the counter of this inset
- virtual void updateLabels(ParIterator const &);
+ static std::string defaultCommand() { return "bibitem"; }
///
- void updateCommand(docstring const & new_key, bool dummy = false);
+ static bool isCompatibleCommand(std::string const & s)
+ { return s == "bibitem"; }
+ ///
+ docstring bibLabel() const;
+ ///@}
+
+private:
+ /// \name Private functions inherited from Inset class
+ //@{
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
///
Inset * clone() const { return new InsetBibitem(*this); }
+ /// Is the content of this inset part of the immediate (visible) text sequence?
+ bool isPartOfTextSequence() const { return false; }
+ ///@}
- friend docstring bibitemWidest(Buffer const & buffer);
- /// The label that is set by updateLabels
+ /// \name Private functions inherited from InsetCommand class
+ //@{
+ ///
+ docstring screenLabel() const;
+ //@}
+
+ friend docstring bibitemWidest(Buffer const & buffer, OutputParams const &);
+
+ /// The label that is set by updateBuffer
docstring autolabel_;
///
static int key_counter;
/// Return the widest label in the Bibliography.
-docstring bibitemWidest(Buffer const &);
+docstring bibitemWidest(Buffer const &, OutputParams const &);
+
} // namespace lyx