X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetbibitem.h;h=32f4574c22431878f977160d2cd912ababff8bd8;hb=e28331ed63062dea10d0a21b9ec12034b4b17b9a;hp=b91d9f01590cb0d7228e3506d43b1060300037e8;hpb=59413be9a0b999c17784d1abad01e55819ecd27a;p=lyx.git diff --git a/src/insets/insetbibitem.h b/src/insets/insetbibitem.h index b91d9f0159..32f4574c22 100644 --- a/src/insets/insetbibitem.h +++ b/src/insets/insetbibitem.h @@ -15,6 +15,9 @@ #include "insetcommand.h" + +namespace lyx { + /** Used to insert bibitem's information (key and label) Must be automatically inserted as the first object in a @@ -24,32 +27,25 @@ class InsetBibitem : public InsetCommand { public: /// InsetBibitem(InsetCommandParams const &); - /** Currently \bibitem is used as a LyX2.x command, - so we need this method. - */ - void write(Buffer const &, std::ostream &) const; /// void read(Buffer const &, LyXLex & lex); /// - virtual std::string const getScreenLabel(Buffer const &) const; + docstring const getScreenLabel(Buffer const &) const; /// EDITABLE editable() const { return IS_EDITABLE; } /// - InsetOld::Code lyxCode() const { return InsetOld::BIBITEM_CODE; } - /// keep .lyx format compatible - bool directWrite() const { return true; } + InsetBase::Code lyxCode() const { return InsetBase::BIBITEM_CODE; } /// void setCounter(int); /// int getCounter() const { return counter; } /// - std::string const getBibLabel() const; + docstring const getBibLabel() const; /// - int plaintext(Buffer const &, std::ostream &, - OutputParams const &) const; + int plaintext(Buffer const &, odocstream &, OutputParams const &) const; protected: /// - virtual void priv_dispatch(LCursor & cur, FuncRequest & cmd); + virtual void doDispatch(LCursor & cur, FuncRequest & cmd); private: virtual std::auto_ptr doClone() const; @@ -59,4 +55,11 @@ private: static int key_counter; }; + +/// Return the widest label in the Bibliography. +docstring const bibitemWidest(Buffer const &); + + +} // namespace lyx + #endif // INSET_BIBITEM_H