X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetCitation.h;h=cde7bd126ce511f0475029944020dd40e84ae208;hb=33fa147fcab25bbc0649d620e9df229736870bfc;hp=aedbd2e43b33a0c9d358795b0137a3283d31b1e1;hpb=a7e2b7eea989ec1ede17242176c0a81769842439;p=lyx.git diff --git a/src/insets/InsetCitation.h b/src/insets/InsetCitation.h index aedbd2e43b..cde7bd126c 100644 --- a/src/insets/InsetCitation.h +++ b/src/insets/InsetCitation.h @@ -14,7 +14,6 @@ #define INSET_CITATION_H #include "InsetCommand.h" - #include "Citation.h" namespace lyx { @@ -31,6 +30,11 @@ class InsetCitation : public InsetCommand public: /// InsetCitation(Buffer * buf, InsetCommandParams const &); + /// + ~InsetCitation(); + + /// + bool addKey(std::string const & key); /// \name Public functions inherited from Inset class //@{ @@ -41,39 +45,47 @@ public: /// docstring toolTip(BufferView const & bv, int x, int y) const; /// + void doDispatch(Cursor & cur, FuncRequest & cmd); + /// + bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const; + /// InsetCode lyxCode() const { return CITE_CODE; } /// - int latex(odocstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const; /// - int plaintext(odocstream &, OutputParams const &) const; + int plaintext(odocstringstream & ods, OutputParams const & op, + size_t max_length = INT_MAX) const; /// int docbook(odocstream &, OutputParams const &) const; /// docstring xhtml(XHTMLStream &, OutputParams const &) const; /// - void tocString(odocstream &) const; + void toString(odocstream &) const; /// - void validate(LaTeXFeatures &) const; + void forOutliner(docstring &, size_t const, bool const) const; + /// + void validate(LaTeXFeatures &) const {} /// void updateBuffer(ParIterator const & it, UpdateType); /// - void addToToc(DocIterator const &); + void addToToc(DocIterator const & di, bool output_active, + UpdateType utype) const; /// - docstring contextMenu(BufferView const & bv, int x, int y) const; + std::string contextMenuName() const; //@} /// \name Static public methods obligated for InsetCommand derived classes //@{ /// static ParamInfo const & findInfo(std::string const &); - // FIXME This is the locus of the design problem we have. - // It really ought to do what default_cite_command() does, - // but to do that it needs to know what CiteEngine we are - // using. + /// static std::string defaultCommand() { return "cite"; } /// - static bool isCompatibleCommand(std::string const & cmd); + static bool isCompatibleCommand(std::string const &); //@} + /// + CitationStyle getCitationStyle(BufferParams const & bp, std::string const & input, + std::vector const & valid_styles) const; private: /// tries to make a pretty label and makes a basic one if not @@ -95,19 +107,15 @@ private: docstring screenLabel() const; //@} - /// we'll eventually want to be able to get info on this from the + /// we'll eventually want to be able to get info on this from the /// various CiteEngines static ParamInfo param_info_; /// - class Cache { - public: - /// - Cache() : engine(ENGINE_BASIC), params(CITE_CODE) {} - /// - CiteEngine engine; + struct Cache { + Cache() : recalculate(true) {} /// - InsetCommandParams params; + bool recalculate; /// docstring generated_label; ///