X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetBranch.h;h=ecd2f7d7e2b5ffdeec15201629240705ead56043;hb=68ee68103a77300c3aa01db9e63bd01b8243a0eb;hp=e9c7f6b6f5803f3ee0329ad6b82871779f42b69e;hpb=317432f3151961c0803336c8c38f6ecf4704ad0d;p=lyx.git diff --git a/src/insets/InsetBranch.h b/src/insets/InsetBranch.h index e9c7f6b6f5..ecd2f7d7e2 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,32 +61,37 @@ 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 plaintext(odocstringstream & ods, OutputParams const & op, + size_t max_length = INT_MAX) const; /// int docbook(odocstream &, OutputParams const &) const; /// - void textString(odocstream &) const; + docstring xhtml(XHTMLStream &, OutputParams const &) const; + /// + void toString(odocstream &) const; + /// + void forOutliner(docstring &, size_t) const; /// void validate(LaTeXFeatures &) const; /// + std::string contextMenuName() const; + /// + void addToToc(DocIterator const & di, bool output_active) const; + /// InsetBranchParams const & params() const { return params_; } /// void setParams(InsetBranchParams const & params) { params_ = params; } - /// - virtual bool useEmptyLayout() { return false; } /** \returns true if params_.branch is listed as 'selected' in - \c buffer. This handles the case of child documents. + \c buffer. \p child only checks within child documents. */ - bool isBranchSelected() const; + bool isBranchSelected(bool const child = false) const; /*! * Is the content of this inset part of the output document? * @@ -102,11 +106,11 @@ private: /// 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:") + branch(); } /// Inset * clone() const { return new InsetBranch(*this); }