X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetBranch.h;h=c51c728e4f1610a4ce2a070a2cd11087f6240e78;hb=bfddee97e191a853f0576f4fab3f095c4e9ce0de;hp=ca24e99980a760c71120b5c292ae85583b886ddf;hpb=f9b81e51e943bcaac885d74edbce41a9d74ad3dd;p=lyx.git diff --git a/src/insets/InsetBranch.h b/src/insets/InsetBranch.h index ca24e99980..c51c728e4f 100644 --- a/src/insets/InsetBranch.h +++ b/src/insets/InsetBranch.h @@ -14,7 +14,6 @@ #include "InsetCollapsable.h" - namespace lyx { class InsetBranchParams { @@ -43,18 +42,18 @@ class InsetBranch : public InsetCollapsable { public: /// - InsetBranch(Buffer const &, InsetBranchParams const &); - /// - ~InsetBranch(); + InsetBranch(Buffer *, InsetBranchParams const &); /// static std::string params2string(InsetBranchParams const &); /// static void string2params(std::string const &, InsetBranchParams &); + /// + docstring branch() const { return params_.branch; } + /// + void rename(docstring const & newname) { params_.branch = newname; } private: - /// - docstring editMessage() const; /// InsetCode lyxCode() const { return BRANCH_CODE; } /// @@ -62,22 +61,28 @@ private: /// void read(Lexer & lex); /// - void setButtonLabel(); - /// - ColorCode backgroundColor() const; + docstring const buttonLabel(BufferView const & bv) const; /// - bool showInsetDialog(BufferView *) const; + ColorCode backgroundColor(PainterInfo const &) const; /// - int latex(odocstream &, OutputParams const &) const; + void latex(otexstream &, OutputParams const &) const; /// int plaintext(odocstream &, OutputParams const &) const; /// int docbook(odocstream &, OutputParams const &) const; /// - void textString(odocstream &) const; + docstring xhtml(XHTMLStream &, OutputParams const &) const; + /// + void toString(odocstream &) const; + /// + void forToc(docstring &, size_t) const; /// void validate(LaTeXFeatures &) const; /// + docstring contextMenuName() const; + /// + void addToToc(DocIterator const &) const; + /// InsetBranchParams const & params() const { return params_; } /// void setParams(InsetBranchParams const & params) { params_ = params; } @@ -86,20 +91,25 @@ private: \c buffer. This handles the case of child documents. */ bool isBranchSelected() const; + /*! + * Is the content of this inset part of the output document? + * + * Note that Branch insets are only considered part of the + * document when they are selected. + */ + bool producesOutput() const { return isBranchSelected(); } /// bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const; /// - void updateLabels(ParIterator const &); - /// bool isMacroScope() const; /// docstring toolTip(BufferView const & bv, int x, int y) const; /// - bool useEmptyLayout() const { return false; } + bool usePlainLayout() const { return false; } /// void doDispatch(Cursor & cur, FuncRequest & cmd); /// - docstring name() const { return from_ascii("Branch"); } + docstring layoutName() const { return from_ascii("Branch"); } /// Inset * clone() const { return new InsetBranch(*this); }