X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetbibitem.h;h=32f4574c22431878f977160d2cd912ababff8bd8;hb=e28331ed63062dea10d0a21b9ec12034b4b17b9a;hp=1d0444057c9d1be2ab6b911f0b0ce4c0da17f311;hpb=86e2d69f18bedbdd11a01e6aa3886cdc7d259060;p=lyx.git diff --git a/src/insets/insetbibitem.h b/src/insets/insetbibitem.h index 1d0444057c..32f4574c22 100644 --- a/src/insets/insetbibitem.h +++ b/src/insets/insetbibitem.h @@ -6,7 +6,7 @@ * * \author Alejandro Aguilar Sierra * - * Full author contact details are available in file CREDITS + * Full author contact details are available in file CREDITS. */ #ifndef INSET_BIBITEM_H @@ -15,7 +15,8 @@ #include "insetcommand.h" -class Buffer; + +namespace lyx { /** Used to insert bibitem's information (key and label) @@ -27,48 +28,38 @@ public: /// InsetBibitem(InsetCommandParams const &); /// - ~InsetBibitem(); - /// - Inset * clone(Buffer const &, bool same_id = false) const; - /// small wrapper for the time being - virtual dispatch_result localDispatch(FuncRequest const & cmd); - /** 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 string const getScreenLabel(Buffer const *) const; + void read(Buffer const &, LyXLex & lex); /// - void edit(BufferView *, int x, int y, mouse_button::state button); - /// - void edit(BufferView * bv, bool front = true); + docstring const getScreenLabel(Buffer const &) const; /// EDITABLE editable() const { return IS_EDITABLE; } /// - Inset::Code lyxCode() const { return Inset::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; } + int getCounter() const { return counter; } /// - string const getBibLabel() const; + docstring const getBibLabel() const; /// - struct Holder { - InsetBibitem * inset; - BufferView * view; - }; - + int plaintext(Buffer const &, odocstream &, OutputParams const &) const; +protected: + /// + virtual void doDispatch(LCursor & cur, FuncRequest & cmd); private: + virtual std::auto_ptr doClone() const; + /// int counter; /// - Holder holder; - /// static int key_counter; }; + +/// Return the widest label in the Bibliography. +docstring const bibitemWidest(Buffer const &); + + +} // namespace lyx + #endif // INSET_BIBITEM_H