]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetBranch.h
Cleanup mouse/selection/context-menu interactions.
[lyx.git] / src / insets / InsetBranch.h
index 586176b9b6e958d8ef8278d2f6a1c6da5069362e..8793602a2e1299bcea5305387d395a26e9d79929 100644 (file)
@@ -18,8 +18,6 @@
 
 namespace lyx {
 
-class Buffer;
-
 class InsetBranchParams {
 public:
        explicit InsetBranchParams(docstring const & b = docstring())
@@ -39,34 +37,31 @@ public:
 class InsetBranch : public InsetCollapsable {
 public:
        ///
-       InsetBranch(BufferParams const &, InsetBranchParams const &);
+       InsetBranch(Buffer const &, InsetBranchParams const &);
        ///
        ~InsetBranch();
        ///
-       virtual docstring const editMessage() const;
+       docstring editMessage() const;
        ///
-       Inset::Code lyxCode() const { return Inset::BRANCH_CODE; }
+       InsetCode lyxCode() const { return BRANCH_CODE; }
        ///
-       void write(Buffer const &, std::ostream &) const;
+       void write(std::ostream &) const;
        ///
-       void read(Buffer const & buf, Lexer & lex);
+       void read(Lexer & lex);
        ///
        void setButtonLabel();
        ///
-       virtual Color_color backgroundColor() const;
+       virtual ColorCode backgroundColor() const;
        ///
        bool showInsetDialog(BufferView *) const;
        ///
-       int latex(Buffer const &, odocstream &,
-                 OutputParams const &) const;
+       int latex(odocstream &, OutputParams const &) const;
        ///
-       int plaintext(Buffer const &, odocstream &,
-                     OutputParams const &) const;
+       int plaintext(odocstream &, OutputParams const &) const;
        ///
-       int docbook(Buffer const &, odocstream &,
-                   OutputParams const &) const;
+       int docbook(odocstream &, OutputParams const &) const;
        ///
-       void textString(Buffer const & buf, odocstream &) const;
+       void textString(odocstream &) const;
        ///
        void validate(LaTeXFeatures &) const;
        ///
@@ -77,25 +72,27 @@ public:
        /** \returns true if params_.branch is listed as 'selected' in
            \c buffer. This handles the case of child documents.
         */
-       bool isBranchSelected(Buffer const & buffer) const;
+       bool isBranchSelected() const;
        ///
        bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
-       // 
-       virtual void updateLabels(Buffer const &, ParIterator const &);
-protected:
        ///
-       InsetBranch(InsetBranch const &);
+       virtual void updateLabels(ParIterator const &);
        ///
-       virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
+       bool isMacroScope() const;
+       ///
+       docstring toolTip(BufferView const & bv, int x, int y) const;
+       ///
+       virtual bool useEmptyLayout() const { return false; }
+protected:
+       ///
+       void doDispatch(Cursor & cur, FuncRequest & cmd);
        ///
        docstring name() const { return from_ascii("Branch"); }
 private:
+       ///
        friend class InsetBranchParams;
-
-       virtual std::auto_ptr<Inset> doClone() const;
-
-       /// used by the constructors
-       void init();
+       ///
+       Inset * clone() const { return new InsetBranch(*this); }
        ///
        InsetBranchParams params_;
 };