X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetcite.h;h=efa21fd17883dfb5f3e2f1af2832cfc058d81b39;hb=4a5b7a5952ad2381fcdf4830511293e184c7c5a1;hp=ee1581323b91d44ec2826afc22691ac48de2fa7c;hpb=474b65cd25930b5745dc7aca27f346cd5766ddd9;p=lyx.git diff --git a/src/insets/insetcite.h b/src/insets/insetcite.h index ee1581323b..efa21fd178 100644 --- a/src/insets/insetcite.h +++ b/src/insets/insetcite.h @@ -4,8 +4,7 @@ * * LyX, The Document Processor * - * Copyright 1995 Matthias Ettrich - * Copyright 1995-2000 The LyX Team. + * Copyright 2000-2001 The LyX Team. * * ====================================================== */ @@ -17,66 +16,33 @@ #endif #include "insetcommand.h" -#include "bibforms.h" -#include - -class Buffer; /** Used to insert citations */ -class InsetCitation: public InsetCommand { +class InsetCitation : public InsetCommand { public: /// - enum State { - CANCEL, - OK, - DOWN, - UP, - DELETE, - ADD, - BIBBRSR, - CITEBRSR, - ON, - OFF - }; - /// - InsetCitation() : InsetCommand("cite") {} + InsetCitation(InsetCommandParams const &, bool same_id = false); /// - explicit - InsetCitation(string const & key, string const & note = string()); - /// - ~InsetCitation(); - /// - Inset * Clone() const { - return new InsetCitation(getContents(), getOptions()); + Inset * clone(Buffer const &, bool same_id = false) const { + return new InsetCitation(params(), same_id); } - /// - string getScreenLabel()const; - /// - void Edit(BufferView *, int x, int y, unsigned int button); /// - void callback( FD_citation_form *, State ); - /// - EDITABLE Editable() const { - return IS_EDITABLE; - } + string const getScreenLabel(Buffer const *) const; /// - struct Holder { - InsetCitation * inset; - BufferView * view; - }; - -private: - /// - void setSize( FD_citation_form *, int, bool ) const; + EDITABLE editable() const { return IS_EDITABLE; } /// - void setBibButtons( FD_citation_form *, State ) const; + Inset::Code lyxCode() const { return Inset::CITE_CODE; } /// - void setCiteButtons( FD_citation_form *, State ) const; + void edit(BufferView *, int, int, unsigned int); + /// + void edit(BufferView * bv, bool front = true); + /// + int ascii(Buffer const *, std::ostream &, int linelen) const; + /// + int latex(Buffer const *, std::ostream &, bool, bool) const; /// - void updateBrowser( FL_OBJECT *, std::vector const & ) const; - /// - Holder holder; + void validate(LaTeXFeatures &) const; }; #endif // INSET_CITE_H