]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetNote.h
This should be the last of the commits refactoring the InsetLayout code.
[lyx.git] / src / insets / InsetNote.h
index f431abdbdfd3cec32e9884513ac99f7e6921aab8..d234966071db6b5225373581843cceefeb847bc2 100644 (file)
@@ -23,9 +23,7 @@ public:
        enum Type {
                Note,
                Comment,
-               Greyedout,
-               Framed,
-               Shaded
+               Greyedout
        };
        /// \c type defaults to Note
        InsetNoteParams();
@@ -50,7 +48,11 @@ public:
        ///
        virtual docstring const editMessage() const;
        ///
-       InsetBase::Code lyxCode() const { return InsetBase::NOTE_CODE; }
+       InsetCode lyxCode() const { return NOTE_CODE; }
+       ///
+       docstring name() const;
+       ///
+       virtual DisplayType display() const;
        ///
        void write(Buffer const &, std::ostream &) const;
        ///
@@ -60,6 +62,8 @@ public:
        /// show the note dialog
        bool showInsetDialog(BufferView * bv) const;
        ///
+       bool isMacroScope(Buffer const & buf) const;
+       ///
        int latex(Buffer const &, odocstream &, OutputParams const &) const;
        ///
        int plaintext(Buffer const &, odocstream &, OutputParams const &) const;
@@ -71,6 +75,10 @@ public:
        InsetNoteParams const & params() const { return params_; }
        ///
        bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
+       // Update the counters of this inset and of its contents
+       virtual void updateLabels(Buffer const &, ParIterator const &);
+       ///
+       void addToToc(Buffer const &, ParConstIterator const &) const;
 protected:
        InsetNote(InsetNote const &);
        ///
@@ -78,7 +86,7 @@ protected:
 private:
        friend class InsetNoteParams;
 
-       virtual std::auto_ptr<InsetBase> doClone() const;
+       virtual Inset * clone() const;
 
        /// used by the constructors
        void init();
@@ -92,7 +100,7 @@ public:
        ///
        InsetNoteMailer(InsetNote & inset);
        ///
-       virtual InsetBase & inset() const { return inset_; }
+       virtual Inset & inset() const { return inset_; }
        ///
        virtual std::string const & name() const { return name_; }
        ///